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

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

@.str = external hidden unnamed_addr constant [11 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [110 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [70 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @SMuntangle(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 i32, align 4
  %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 i32, align 4
  %25 = 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
  store i32 0, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 4, 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
  %26 = load ptr, ptr %13, align 8, !tbaa !9
  %27 = icmp eq ptr %26, null
  br i1 %27, label %28, label %30

28:                                               ; preds = %6
  %29 = call i32 @SMerror(i32 noundef 75, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 56, i32 noundef 0, ptr noundef null)
  store i32 %29, ptr %7, align 4
  store i32 1, ptr %24, align 4
  br label %264

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

56:                                               ; preds = %30
  %57 = load i32, ptr %14, align 4, !tbaa !5
  %58 = call i32 @SMerror(i32 noundef 85, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef %57, i32 noundef 0, ptr noundef null)
  store i32 %58, ptr %7, align 4
  store i32 1, ptr %24, align 4
  br label %264

59:                                               ; preds = %30
  store i32 0, ptr %15, align 4, !tbaa !5
  %60 = load ptr, ptr %23, align 8, !tbaa !9
  %61 = getelementptr inbounds %struct.__SMuntangle_param, ptr %60, i32 0, i32 0
  %62 = load i32, ptr %61, align 4, !tbaa !16
  switch i32 %62, label %142 [
    i32 1, label %63
    i32 2, label %96
    i32 3, label %97
  ]

63:                                               ; preds = %59
  %64 = load ptr, ptr %21, align 8, !tbaa !9
  %65 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %64, i32 0, i32 9
  %66 = load i32, ptr %65, align 8, !tbaa !18
  %67 = load ptr, ptr %21, align 8, !tbaa !9
  %68 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %67, i32 0, i32 17
  %69 = load ptr, ptr %68, align 8, !tbaa !21
  %70 = call i32 @SMinitLap(i32 noundef %66, ptr noundef %69)
  store i32 %70, ptr %14, align 4, !tbaa !5
  %71 = load i32, ptr %14, align 4, !tbaa !5
  %72 = icmp ne i32 %71, 0
  br i1 %72, label %73, label %76

73:                                               ; preds = %63
  %74 = load i32, ptr %14, align 4, !tbaa !5
  %75 = call i32 @SMerror(i32 noundef 106, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef %74, i32 noundef 0, ptr noundef null)
  store i32 %75, ptr %7, align 4
  store i32 1, ptr %24, align 4
  br label %264

76:                                               ; preds = %63
  %77 = load ptr, ptr %21, align 8, !tbaa !9
  %78 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %77, i32 0, i32 1
  %79 = load i32, ptr %78, align 4, !tbaa !22
  %80 = load ptr, ptr %21, align 8, !tbaa !9
  %81 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %80, i32 0, i32 6
  %82 = load ptr, ptr %81, align 8, !tbaa !23
  %83 = load ptr, ptr %21, align 8, !tbaa !9
  %84 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %83, i32 0, i32 5
  %85 = getelementptr inbounds [3 x double], ptr %84, i64 0, i64 0
  %86 = load ptr, ptr %21, align 8, !tbaa !9
  %87 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %86, i32 0, i32 0
  %88 = load i32, ptr %87, align 8, !tbaa !24
  %89 = call i32 @SMcentroidSmoothMesh(i32 noundef %79, ptr noundef %82, ptr noundef %85, i32 noundef %88)
  store i32 %89, ptr %14, align 4, !tbaa !5
  %90 = load i32, ptr %14, align 4, !tbaa !5
  %91 = icmp ne i32 %90, 0
  br i1 %91, label %92, label %95

92:                                               ; preds = %76
  %93 = load i32, ptr %14, align 4, !tbaa !5
  %94 = call i32 @SMerror(i32 noundef 109, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef %93, i32 noundef 0, ptr noundef null)
  store i32 %94, ptr %7, align 4
  store i32 1, ptr %24, align 4
  br label %264

95:                                               ; preds = %76
  br label %144

96:                                               ; preds = %59
  store i32 1, ptr %15, align 4, !tbaa !5
  br label %144

97:                                               ; preds = %59
  %98 = load ptr, ptr %21, align 8, !tbaa !9
  %99 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %98, i32 0, i32 9
  %100 = load i32, ptr %99, align 8, !tbaa !18
  %101 = load ptr, ptr %21, align 8, !tbaa !9
  %102 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %101, i32 0, i32 17
  %103 = load ptr, ptr %102, align 8, !tbaa !21
  %104 = call i32 @SMinitLap(i32 noundef %100, ptr noundef %103)
  store i32 %104, ptr %14, align 4, !tbaa !5
  %105 = load i32, ptr %14, align 4, !tbaa !5
  %106 = icmp ne i32 %105, 0
  br i1 %106, label %107, label %110

107:                                              ; preds = %97
  %108 = load i32, ptr %14, align 4, !tbaa !5
  %109 = call i32 @SMerror(i32 noundef 118, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef %108, i32 noundef 0, ptr noundef null)
  store i32 %109, ptr %7, align 4
  store i32 1, ptr %24, align 4
  br label %264

110:                                              ; preds = %97
  %111 = load ptr, ptr %21, align 8, !tbaa !9
  %112 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %111, i32 0, i32 1
  %113 = load i32, ptr %112, align 4, !tbaa !22
  %114 = load ptr, ptr %21, align 8, !tbaa !9
  %115 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %114, i32 0, i32 6
  %116 = load ptr, ptr %115, align 8, !tbaa !23
  %117 = load ptr, ptr %21, align 8, !tbaa !9
  %118 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %117, i32 0, i32 5
  %119 = getelementptr inbounds [3 x double], ptr %118, i64 0, i64 0
  %120 = load ptr, ptr %21, align 8, !tbaa !9
  %121 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %120, i32 0, i32 0
  %122 = load i32, ptr %121, align 8, !tbaa !24
  %123 = call i32 @SMcentroidSmoothMesh(i32 noundef %113, ptr noundef %116, ptr noundef %119, i32 noundef %122)
  store i32 %123, ptr %14, align 4, !tbaa !5
  %124 = load i32, ptr %14, align 4, !tbaa !5
  %125 = icmp ne i32 %124, 0
  br i1 %125, label %126, label %129

126:                                              ; preds = %110
  %127 = load i32, ptr %14, align 4, !tbaa !5
  %128 = call i32 @SMerror(i32 noundef 120, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef %127, i32 noundef 0, ptr noundef null)
  store i32 %128, ptr %7, align 4
  store i32 1, ptr %24, align 4
  br label %264

129:                                              ; preds = %110
  %130 = load ptr, ptr %21, align 8, !tbaa !9
  %131 = call i32 @SMvalidMesh(ptr noundef %130, ptr noundef %18)
  store i32 %131, ptr %14, align 4, !tbaa !5
  %132 = load i32, ptr %14, align 4, !tbaa !5
  %133 = icmp ne i32 %132, 0
  br i1 %133, label %134, label %137

134:                                              ; preds = %129
  %135 = load i32, ptr %14, align 4, !tbaa !5
  %136 = call i32 @SMerror(i32 noundef 122, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef %135, i32 noundef 0, ptr noundef null)
  store i32 %136, ptr %7, align 4
  store i32 1, ptr %24, align 4
  br label %264

137:                                              ; preds = %129
  %138 = load i32, ptr %18, align 4, !tbaa !5
  %139 = icmp ne i32 %138, 0
  br i1 %139, label %141, label %140

140:                                              ; preds = %137
  store i32 1, ptr %15, align 4, !tbaa !5
  br label %141

141:                                              ; preds = %140, %137
  br label %144

142:                                              ; preds = %59
  %143 = call i32 @SMerror(i32 noundef 127, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 57, i32 noundef 0, ptr noundef @.str.3)
  store i32 %143, ptr %7, align 4
  store i32 1, ptr %24, align 4
  br label %264

144:                                              ; preds = %141, %96, %95
  %145 = load i32, ptr %15, align 4, !tbaa !5
  %146 = icmp ne i32 %145, 0
  br i1 %146, label %147, label %198

147:                                              ; preds = %144
  %148 = load ptr, ptr %21, align 8, !tbaa !9
  %149 = call i32 @SMuntangle_mesh(ptr noundef %148, ptr noundef %16)
  store i32 %149, ptr %14, align 4, !tbaa !5
  %150 = load i32, ptr %14, align 4, !tbaa !5
  %151 = icmp ne i32 %150, 0
  br i1 %151, label %152, label %155

152:                                              ; preds = %147
  %153 = load i32, ptr %14, align 4, !tbaa !5
  %154 = call i32 @SMerror(i32 noundef 132, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef %153, i32 noundef 0, ptr noundef null)
  store i32 %154, ptr %7, align 4
  store i32 1, ptr %24, align 4
  br label %264

155:                                              ; preds = %147
  %156 = load i32, ptr %16, align 4, !tbaa !5
  %157 = icmp ne i32 %156, 0
  br i1 %157, label %158, label %197

158:                                              ; preds = %155
  %159 = load ptr, ptr %21, align 8, !tbaa !9
  %160 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %159, i32 0, i32 0
  %161 = load i32, ptr %160, align 8, !tbaa !24
  %162 = call i32 @SMremoveIdenticalVtx(i32 noundef %161, ptr noundef %8, ptr noundef %9, ptr noundef %11, ptr noundef %12, ptr noundef %17)
  store i32 %162, ptr %14, align 4, !tbaa !5
  %163 = load i32, ptr %14, align 4, !tbaa !5
  %164 = icmp ne i32 %163, 0
  br i1 %164, label %165, label %168

165:                                              ; preds = %158
  %166 = load i32, ptr %14, align 4, !tbaa !5
  %167 = call i32 @SMerror(i32 noundef 137, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef %166, i32 noundef 0, ptr noundef null)
  store i32 %167, ptr %7, align 4
  store i32 1, ptr %24, align 4
  br label %264

168:                                              ; preds = %158
  %169 = load i32, ptr %17, align 4, !tbaa !5
  %170 = icmp ne i32 %169, 0
  br i1 %170, label %171, label %196

171:                                              ; preds = %168
  %172 = load i32, ptr %8, align 4, !tbaa !5
  %173 = load i32, ptr %9, align 4, !tbaa !5
  %174 = load ptr, ptr %10, align 8, !tbaa !9
  %175 = load ptr, ptr %11, align 8, !tbaa !9
  %176 = load ptr, ptr %12, align 8, !tbaa !9
  %177 = load ptr, ptr %21, align 8, !tbaa !9
  %178 = load ptr, ptr %19, align 8, !tbaa !9
  %179 = getelementptr inbounds %struct.__SMsmooth_data, ptr %178, i32 0, i32 2
  %180 = load ptr, ptr %179, align 8, !tbaa !13
  %181 = call i32 @SMinitLocalMesh(i32 noundef %172, i32 noundef %173, ptr noundef %174, ptr noundef %175, ptr noundef %176, ptr noundef %177, ptr noundef %180)
  store i32 %181, ptr %14, align 4, !tbaa !5
  %182 = load i32, ptr %14, align 4, !tbaa !5
  %183 = icmp ne i32 %182, 0
  br i1 %183, label %184, label %187

184:                                              ; preds = %171
  %185 = load i32, ptr %14, align 4, !tbaa !5
  %186 = call i32 @SMerror(i32 noundef 142, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef %185, i32 noundef 0, ptr noundef null)
  store i32 %186, ptr %7, align 4
  store i32 1, ptr %24, align 4
  br label %264

187:                                              ; preds = %171
  %188 = load ptr, ptr %21, align 8, !tbaa !9
  %189 = call i32 @SMuntangle_mesh(ptr noundef %188, ptr noundef %16)
  store i32 %189, ptr %14, align 4, !tbaa !5
  %190 = load i32, ptr %14, align 4, !tbaa !5
  %191 = icmp ne i32 %190, 0
  br i1 %191, label %192, label %195

192:                                              ; preds = %187
  %193 = load i32, ptr %14, align 4, !tbaa !5
  %194 = call i32 @SMerror(i32 noundef 143, ptr noundef @.str, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef %193, i32 noundef 0, ptr noundef null)
  store i32 %194, ptr %7, align 4
  store i32 1, ptr %24, align 4
  br label %264

195:                                              ; preds = %187
  br label %196

196:                                              ; preds = %195, %168
  br label %197

197:                                              ; preds = %196, %155
  br label %198

198:                                              ; preds = %197, %144
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #3
  %199 = load ptr, ptr %21, align 8, !tbaa !9
  %200 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %199, i32 0, i32 0
  %201 = load i32, ptr %200, align 8, !tbaa !24
  %202 = icmp eq i32 %201, 2
  br i1 %202, label %203, label %216

203:                                              ; preds = %198
  %204 = load ptr, ptr %21, align 8, !tbaa !9
  %205 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %204, i32 0, i32 5
  %206 = getelementptr inbounds [3 x double], ptr %205, i64 0, i64 0
  %207 = load double, ptr %206, align 8, !tbaa !25
  %208 = load ptr, ptr %10, align 8, !tbaa !9
  %209 = getelementptr inbounds double, ptr %208, i64 0
  store double %207, ptr %209, align 8, !tbaa !25
  %210 = load ptr, ptr %21, align 8, !tbaa !9
  %211 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %210, i32 0, i32 5
  %212 = getelementptr inbounds [3 x double], ptr %211, i64 0, i64 1
  %213 = load double, ptr %212, align 8, !tbaa !25
  %214 = load ptr, ptr %10, align 8, !tbaa !9
  %215 = getelementptr inbounds double, ptr %214, i64 1
  store double %213, ptr %215, align 8, !tbaa !25
  br label %263

216:                                              ; preds = %198
  %217 = load ptr, ptr %21, align 8, !tbaa !9
  %218 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %217, i32 0, i32 0
  %219 = load i32, ptr %218, align 8, !tbaa !24
  %220 = icmp eq i32 %219, 3
  br i1 %220, label %221, label %240

221:                                              ; preds = %216
  %222 = load ptr, ptr %21, align 8, !tbaa !9
  %223 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %222, i32 0, i32 5
  %224 = getelementptr inbounds [3 x double], ptr %223, i64 0, i64 0
  %225 = load double, ptr %224, align 8, !tbaa !25
  %226 = load ptr, ptr %10, align 8, !tbaa !9
  %227 = getelementptr inbounds double, ptr %226, i64 0
  store double %225, ptr %227, align 8, !tbaa !25
  %228 = load ptr, ptr %21, align 8, !tbaa !9
  %229 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %228, i32 0, i32 5
  %230 = getelementptr inbounds [3 x double], ptr %229, i64 0, i64 1
  %231 = load double, ptr %230, align 8, !tbaa !25
  %232 = load ptr, ptr %10, align 8, !tbaa !9
  %233 = getelementptr inbounds double, ptr %232, i64 1
  store double %231, ptr %233, align 8, !tbaa !25
  %234 = load ptr, ptr %21, align 8, !tbaa !9
  %235 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %234, i32 0, i32 5
  %236 = getelementptr inbounds [3 x double], ptr %235, i64 0, i64 2
  %237 = load double, ptr %236, align 8, !tbaa !25
  %238 = load ptr, ptr %10, align 8, !tbaa !9
  %239 = getelementptr inbounds double, ptr %238, i64 2
  store double %237, ptr %239, align 8, !tbaa !25
  br label %262

240:                                              ; preds = %216
  store i32 0, ptr %25, align 4, !tbaa !5
  br label %241

241:                                              ; preds = %258, %240
  %242 = load i32, ptr %25, align 4, !tbaa !5
  %243 = load ptr, ptr %21, align 8, !tbaa !9
  %244 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %243, i32 0, i32 0
  %245 = load i32, ptr %244, align 8, !tbaa !24
  %246 = icmp slt i32 %242, %245
  br i1 %246, label %247, label %261

247:                                              ; preds = %241
  %248 = load ptr, ptr %21, align 8, !tbaa !9
  %249 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %248, i32 0, i32 5
  %250 = load i32, ptr %25, align 4, !tbaa !5
  %251 = sext i32 %250 to i64
  %252 = getelementptr inbounds [3 x double], ptr %249, i64 0, i64 %251
  %253 = load double, ptr %252, align 8, !tbaa !25
  %254 = load ptr, ptr %10, align 8, !tbaa !9
  %255 = load i32, ptr %25, align 4, !tbaa !5
  %256 = sext i32 %255 to i64
  %257 = getelementptr inbounds double, ptr %254, i64 %256
  store double %253, ptr %257, align 8, !tbaa !25
  br label %258

258:                                              ; preds = %247
  %259 = load i32, ptr %25, align 4, !tbaa !5
  %260 = add nsw i32 %259, 1
  store i32 %260, ptr %25, align 4, !tbaa !5
  br label %241, !llvm.loop !26

261:                                              ; preds = %241
  br label %262

262:                                              ; preds = %261, %221
  br label %263

263:                                              ; preds = %262, %203
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #3
  store i32 0, ptr %14, align 4, !tbaa !5
  store i32 0, ptr %7, align 4
  store i32 1, ptr %24, align 4
  br label %264

264:                                              ; preds = %263, %192, %184, %165, %152, %142, %134, %126, %107, %92, %73, %56, %28
  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 4, 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
  %265 = load i32, ptr %7, align 4
  ret i32 %265
}

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

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

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

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

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

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 40}
!15 = !{!12, !10, i64 48}
!16 = !{!17, !6, i64 0}
!17 = !{!"__SMuntangle_param", !6, i64 0}
!18 = !{!19, !6, i64 112}
!19 = !{!"__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, !20, i64 120, !10, i64 128, !20, i64 136, !6, i64 144, !6, i64 148, !6, i64 152, !10, i64 160, !10, i64 168, !10, i64 176}
!20 = !{!"double", !7, i64 0}
!21 = !{!19, !10, i64 168}
!22 = !{!19, !6, i64 4}
!23 = !{!19, !10, i64 88}
!24 = !{!19, !6, i64 0}
!25 = !{!20, !20, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}


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

; Function Attrs: nounwind uwtable
define dso_local i32 @SMuntangle(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
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  store i32 %0, ptr %8, align 4, !tbaa !5
  store i32 %1, ptr %9, align 4, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !9
  store ptr %4, ptr %11, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #3
  store i32 0, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #3
  %15 = icmp eq ptr %5, null
  br i1 %15, label %16, label %18

16:                                               ; preds = %6
  %17 = tail call i32 @SMerror(i32 noundef 75, 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

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

27:                                               ; preds = %18
  %28 = tail call i32 @SMerror(i32 noundef 85, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef %26, i32 noundef 0, ptr noundef null) #3
  br label %.loopexit

29:                                               ; preds = %18
  %30 = load i32, ptr %24, align 4, !tbaa !15
  switch i32 %30, label %73 [
    i32 1, label %31
    i32 2, label %.critedge97
    i32 3, label %49
  ]

31:                                               ; preds = %29
  %32 = getelementptr inbounds i8, ptr %20, i64 112
  %33 = load i32, ptr %32, align 8, !tbaa !17
  %34 = getelementptr inbounds i8, ptr %20, i64 168
  %35 = load ptr, ptr %34, align 8, !tbaa !20
  %36 = tail call i32 @SMinitLap(i32 noundef %33, ptr noundef %35) #3
  %.not87 = icmp eq i32 %36, 0
  br i1 %.not87, label %39, label %37

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

39:                                               ; preds = %31
  %40 = getelementptr inbounds i8, ptr %20, i64 4
  %41 = load i32, ptr %40, align 4, !tbaa !21
  %42 = getelementptr inbounds i8, ptr %20, i64 88
  %43 = load ptr, ptr %42, align 8, !tbaa !22
  %44 = getelementptr inbounds i8, ptr %20, i64 64
  %45 = load i32, ptr %20, align 8, !tbaa !23
  %46 = tail call i32 @SMcentroidSmoothMesh(i32 noundef %41, ptr noundef %43, ptr noundef nonnull %44, i32 noundef %45) #3
  %.not88 = icmp eq i32 %46, 0
  br i1 %.not88, label %.critedge, label %47

47:                                               ; preds = %39
  %48 = tail call i32 @SMerror(i32 noundef 109, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef %46, i32 noundef 0, ptr noundef null) #3
  br label %.loopexit

49:                                               ; preds = %29
  %50 = getelementptr inbounds i8, ptr %20, i64 112
  %51 = load i32, ptr %50, align 8, !tbaa !17
  %52 = getelementptr inbounds i8, ptr %20, i64 168
  %53 = load ptr, ptr %52, align 8, !tbaa !20
  %54 = tail call i32 @SMinitLap(i32 noundef %51, ptr noundef %53) #3
  %.not83 = icmp eq i32 %54, 0
  br i1 %.not83, label %57, label %55

55:                                               ; preds = %49
  %56 = tail call i32 @SMerror(i32 noundef 118, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef %54, i32 noundef 0, ptr noundef null) #3
  br label %.loopexit

57:                                               ; preds = %49
  %58 = getelementptr inbounds i8, ptr %20, i64 4
  %59 = load i32, ptr %58, align 4, !tbaa !21
  %60 = getelementptr inbounds i8, ptr %20, i64 88
  %61 = load ptr, ptr %60, align 8, !tbaa !22
  %62 = getelementptr inbounds i8, ptr %20, i64 64
  %63 = load i32, ptr %20, align 8, !tbaa !23
  %64 = tail call i32 @SMcentroidSmoothMesh(i32 noundef %59, ptr noundef %61, ptr noundef nonnull %62, i32 noundef %63) #3
  %.not84 = icmp eq i32 %64, 0
  br i1 %.not84, label %67, label %65

65:                                               ; preds = %57
  %66 = tail call i32 @SMerror(i32 noundef 120, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef %64, i32 noundef 0, ptr noundef null) #3
  br label %.loopexit

67:                                               ; preds = %57
  %68 = call i32 @SMvalidMesh(ptr noundef nonnull %20, ptr noundef nonnull %14) #3
  %.not85 = icmp eq i32 %68, 0
  br i1 %.not85, label %71, label %69

69:                                               ; preds = %67
  %70 = call i32 @SMerror(i32 noundef 122, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef %68, i32 noundef 0, ptr noundef null) #3
  br label %.loopexit

71:                                               ; preds = %67
  %72 = load i32, ptr %14, align 4, !tbaa !5
  %.not86.not = icmp eq i32 %72, 0
  br i1 %.not86.not, label %.critedge97, label %.critedge

73:                                               ; preds = %29
  %74 = tail call i32 @SMerror(i32 noundef 127, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 57, i32 noundef 0, ptr noundef nonnull @.str.3) #3
  br label %.loopexit

.critedge97:                                      ; preds = %29, %71
  %75 = call i32 @SMuntangle_mesh(ptr noundef %20, ptr noundef nonnull %12)
  %.not90 = icmp eq i32 %75, 0
  br i1 %.not90, label %78, label %76

76:                                               ; preds = %.critedge97
  %77 = call i32 @SMerror(i32 noundef 132, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef %75, i32 noundef 0, ptr noundef null) #3
  br label %.loopexit

78:                                               ; preds = %.critedge97
  %79 = load i32, ptr %12, align 4, !tbaa !5
  %.not91 = icmp eq i32 %79, 0
  br i1 %.not91, label %.critedge, label %80

80:                                               ; preds = %78
  %81 = load i32, ptr %20, align 8, !tbaa !23
  %82 = call i32 @SMremoveIdenticalVtx(i32 noundef %81, ptr noundef nonnull %8, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %11, ptr noundef nonnull %13)
  %.not92 = icmp eq i32 %82, 0
  br i1 %.not92, label %85, label %83

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

85:                                               ; preds = %80
  %86 = load i32, ptr %13, align 4, !tbaa !5
  %.not93 = icmp eq i32 %86, 0
  br i1 %.not93, label %.critedge, label %87

87:                                               ; preds = %85
  %88 = load i32, ptr %8, align 4, !tbaa !5
  %89 = load i32, ptr %9, align 4, !tbaa !5
  %90 = load ptr, ptr %10, align 8, !tbaa !9
  %91 = load ptr, ptr %11, align 8, !tbaa !9
  %92 = load ptr, ptr %22, align 8, !tbaa !14
  %93 = call i32 @SMinitLocalMesh(i32 noundef %88, i32 noundef %89, ptr noundef %2, ptr noundef %90, ptr noundef %91, ptr noundef nonnull %20, ptr noundef %92) #3
  %.not94 = icmp eq i32 %93, 0
  br i1 %.not94, label %96, label %94

94:                                               ; preds = %87
  %95 = call i32 @SMerror(i32 noundef 142, 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

96:                                               ; preds = %87
  %97 = call i32 @SMuntangle_mesh(ptr noundef nonnull %20, ptr noundef nonnull %12)
  %.not95 = icmp eq i32 %97, 0
  br i1 %.not95, label %.critedge, label %98

98:                                               ; preds = %96
  %99 = call i32 @SMerror(i32 noundef 143, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef %97, i32 noundef 0, ptr noundef null) #3
  br label %.loopexit

.critedge:                                        ; preds = %39, %78, %96, %85, %71
  %100 = load i32, ptr %20, align 8, !tbaa !23
  switch i32 %100, label %.preheader [
    i32 2, label %115
    i32 3, label %121
  ]

.preheader:                                       ; preds = %.critedge
  %101 = icmp sgt i32 %100, 0
  br i1 %101, label %.lr.ph, label %.loopexit

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

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

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader, %scalar.ph.prol
  %indvars.iv.prol = phi i64 [ %indvars.iv.next.prol, %scalar.ph.prol ], [ %indvars.iv.ph, %scalar.ph.preheader ]
  %prol.iter = phi i64 [ %prol.iter.next, %scalar.ph.prol ], [ 0, %scalar.ph.preheader ]
  %103 = getelementptr inbounds [3 x double], ptr %102, i64 0, i64 %indvars.iv.prol
  %104 = load double, ptr %103, align 8, !tbaa !24
  %105 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.prol
  store double %104, ptr %105, align 8, !tbaa !24
  %indvars.iv.next.prol = add nuw nsw i64 %indvars.iv.prol, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %scalar.ph.prol.loopexit, label %scalar.ph.prol, !llvm.loop !25

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %scalar.ph.preheader ], [ %indvars.iv.next.prol, %scalar.ph.prol ]
  %106 = sub nsw i64 %indvars.iv.ph, %wide.trip.count
  %107 = icmp ugt i64 %106, -4
  br i1 %107, label %.loopexit, label %scalar.ph

vector.memcheck:                                  ; preds = %.lr.ph
  %108 = add i64 %7, -64
  %109 = sub i64 %108, %21
  %diff.check = icmp ult i64 %109, 32
  br i1 %diff.check, label %scalar.ph.preheader, label %vector.ph

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

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %110 = getelementptr inbounds [3 x double], ptr %102, i64 0, i64 %index
  %111 = getelementptr inbounds i8, ptr %110, i64 16
  %wide.load = load <2 x double>, ptr %110, align 8, !tbaa !24
  %wide.load100 = load <2 x double>, ptr %111, align 8, !tbaa !24
  %112 = getelementptr inbounds double, ptr %2, i64 %index
  %113 = getelementptr inbounds i8, ptr %112, i64 16
  store <2 x double> %wide.load, ptr %112, align 8, !tbaa !24
  store <2 x double> %wide.load100, ptr %113, align 8, !tbaa !24
  %index.next = add nuw i64 %index, 4
  %114 = icmp eq i64 %index.next, %n.vec
  br i1 %114, label %middle.block, label %vector.body, !llvm.loop !27

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

115:                                              ; preds = %.critedge
  %116 = getelementptr inbounds i8, ptr %20, i64 64
  %117 = load double, ptr %116, align 8, !tbaa !24
  store double %117, ptr %2, align 8, !tbaa !24
  %118 = getelementptr inbounds i8, ptr %20, i64 72
  %119 = load double, ptr %118, align 8, !tbaa !24
  %120 = getelementptr inbounds i8, ptr %2, i64 8
  store double %119, ptr %120, align 8, !tbaa !24
  br label %.loopexit

121:                                              ; preds = %.critedge
  %122 = getelementptr inbounds i8, ptr %20, i64 64
  %123 = load double, ptr %122, align 8, !tbaa !24
  store double %123, ptr %2, align 8, !tbaa !24
  %124 = getelementptr inbounds i8, ptr %20, i64 72
  %125 = load double, ptr %124, align 8, !tbaa !24
  %126 = getelementptr inbounds i8, ptr %2, i64 8
  store double %125, ptr %126, align 8, !tbaa !24
  %127 = getelementptr inbounds i8, ptr %20, i64 80
  %128 = load double, ptr %127, align 8, !tbaa !24
  %129 = getelementptr inbounds i8, ptr %2, i64 16
  store double %128, ptr %129, align 8, !tbaa !24
  br label %.loopexit

scalar.ph:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph
  %indvars.iv = phi i64 [ %indvars.iv.next.3, %scalar.ph ], [ %indvars.iv.unr, %scalar.ph.prol.loopexit ]
  %130 = getelementptr inbounds [3 x double], ptr %102, i64 0, i64 %indvars.iv
  %131 = load double, ptr %130, align 8, !tbaa !24
  %132 = getelementptr inbounds double, ptr %2, i64 %indvars.iv
  store double %131, ptr %132, align 8, !tbaa !24
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %133 = getelementptr inbounds [3 x double], ptr %102, i64 0, i64 %indvars.iv.next
  %134 = load double, ptr %133, align 8, !tbaa !24
  %135 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.next
  store double %134, ptr %135, align 8, !tbaa !24
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %136 = getelementptr inbounds [3 x double], ptr %102, i64 0, i64 %indvars.iv.next.1
  %137 = load double, ptr %136, align 8, !tbaa !24
  %138 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.next.1
  store double %137, ptr %138, align 8, !tbaa !24
  %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3
  %139 = getelementptr inbounds [3 x double], ptr %102, i64 0, i64 %indvars.iv.next.2
  %140 = load double, ptr %139, align 8, !tbaa !24
  %141 = getelementptr inbounds double, ptr %2, i64 %indvars.iv.next.2
  store double %140, ptr %141, align 8, !tbaa !24
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4
  %exitcond.not.3 = icmp eq i64 %indvars.iv.next.3, %wide.trip.count
  br i1 %exitcond.not.3, label %.loopexit, label %scalar.ph, !llvm.loop !31

.loopexit:                                        ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block, %.preheader, %115, %121, %98, %94, %83, %76, %73, %69, %65, %55, %47, %37, %27, %16
  %.069 = phi i32 [ %17, %16 ], [ %28, %27 ], [ %74, %73 ], [ %56, %55 ], [ %66, %65 ], [ %70, %69 ], [ %77, %76 ], [ %84, %83 ], [ %95, %94 ], [ %99, %98 ], [ %38, %37 ], [ %48, %47 ], [ 0, %121 ], [ 0, %115 ], [ 0, %.preheader ], [ 0, %middle.block ], [ 0, %scalar.ph ], [ 0, %scalar.ph.prol.loopexit ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #3
  ret i32 %.069
}

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

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

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

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

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

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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, !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 48}
!14 = !{!12, !10, i64 16}
!15 = !{!16, !6, i64 0}
!16 = !{!"__SMuntangle_param", !6, i64 0}
!17 = !{!18, !6, i64 112}
!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 = !{!18, !10, i64 168}
!21 = !{!18, !6, i64 4}
!22 = !{!18, !10, i64 88}
!23 = !{!18, !6, i64 0}
!24 = !{!19, !19, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.unroll.disable"}
!27 = distinct !{!27, !28, !29, !30}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!"llvm.loop.isvectorized", i32 1}
!30 = !{!"llvm.loop.unroll.runtime.disable"}
!31 = distinct !{!31, !28, !29}


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