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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #1

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fabs.f64(double) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @SMstepToCusp(ptr noundef %0, ptr noundef %1, ptr noundef %2) #2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca [3 x double], align 16
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %21, i32 0, i32 16
  %23 = load ptr, ptr %22, align 8, !tbaa !9
  store ptr %23, ptr %18, align 8, !tbaa !5
  %24 = load ptr, ptr %18, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.__SMoptimal, ptr %24, i32 0, i32 18
  %26 = getelementptr inbounds [3 x double], ptr %25, i64 0, i64 1
  %27 = load double, ptr %26, align 8, !tbaa !13
  %28 = fmul double -1.000000e+00, %27
  %29 = getelementptr inbounds [3 x double], ptr %17, i64 0, i64 0
  store double %28, ptr %29, align 16, !tbaa !13
  %30 = load ptr, ptr %18, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.__SMoptimal, ptr %30, i32 0, i32 18
  %32 = getelementptr inbounds [3 x double], ptr %31, i64 0, i64 0
  %33 = load double, ptr %32, align 8, !tbaa !13
  %34 = getelementptr inbounds [3 x double], ptr %17, i64 0, i64 1
  store double %33, ptr %34, align 8, !tbaa !13
  %35 = load ptr, ptr %18, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.__SMoptimal, ptr %35, i32 0, i32 14
  %37 = load ptr, ptr %36, align 8, !tbaa !14
  %38 = getelementptr inbounds %struct.__SMactive, ptr %37, i32 0, i32 2
  %39 = load ptr, ptr %38, align 8, !tbaa !16
  %40 = getelementptr inbounds i32, ptr %39, i64 0
  %41 = load i32, ptr %40, align 4, !tbaa !18
  store i32 %41, ptr %8, align 4, !tbaa !18
  %42 = load ptr, ptr %18, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.__SMoptimal, ptr %42, i32 0, i32 14
  %44 = load ptr, ptr %43, align 8, !tbaa !14
  %45 = getelementptr inbounds %struct.__SMactive, ptr %44, i32 0, i32 2
  %46 = load ptr, ptr %45, align 8, !tbaa !16
  %47 = getelementptr inbounds i32, ptr %46, i64 1
  %48 = load i32, ptr %47, align 4, !tbaa !18
  store i32 %48, ptr %9, align 4, !tbaa !18
  %49 = load ptr, ptr %18, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.__SMoptimal, ptr %49, i32 0, i32 10
  %51 = load ptr, ptr %50, align 8, !tbaa !19
  %52 = load i32, ptr %8, align 4, !tbaa !18
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds double, ptr %51, i64 %53
  %55 = load double, ptr %54, align 8, !tbaa !13
  store double %55, ptr %11, align 8, !tbaa !13
  %56 = load ptr, ptr %18, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.__SMoptimal, ptr %56, i32 0, i32 10
  %58 = load ptr, ptr %57, align 8, !tbaa !19
  %59 = load i32, ptr %9, align 4, !tbaa !18
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds double, ptr %58, i64 %60
  %62 = load double, ptr %61, align 8, !tbaa !13
  store double %62, ptr %12, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #3
  %63 = load ptr, ptr %4, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %63, i32 0, i32 0
  %65 = load i32, ptr %64, align 8, !tbaa !20
  %66 = icmp eq i32 %65, 2
  br i1 %66, label %67, label %92

67:                                               ; preds = %3
  %68 = load ptr, ptr %18, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.__SMoptimal, ptr %68, i32 0, i32 11
  %70 = load ptr, ptr %69, align 8, !tbaa !21
  %71 = load i32, ptr %8, align 4, !tbaa !18
  %72 = sext i32 %71 to i64
  %73 = getelementptr inbounds ptr, ptr %70, i64 %72
  %74 = load ptr, ptr %73, align 8, !tbaa !5
  %75 = getelementptr inbounds double, ptr %74, i64 0
  %76 = load double, ptr %75, align 8, !tbaa !13
  %77 = getelementptr inbounds [3 x double], ptr %17, i64 0, i64 0
  %78 = load double, ptr %77, align 16, !tbaa !13
  %79 = load ptr, ptr %18, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.__SMoptimal, ptr %79, i32 0, i32 11
  %81 = load ptr, ptr %80, align 8, !tbaa !21
  %82 = load i32, ptr %8, align 4, !tbaa !18
  %83 = sext i32 %82 to i64
  %84 = getelementptr inbounds ptr, ptr %81, i64 %83
  %85 = load ptr, ptr %84, align 8, !tbaa !5
  %86 = getelementptr inbounds double, ptr %85, i64 1
  %87 = load double, ptr %86, align 8, !tbaa !13
  %88 = getelementptr inbounds [3 x double], ptr %17, i64 0, i64 1
  %89 = load double, ptr %88, align 8, !tbaa !13
  %90 = fmul double %87, %89
  %91 = call double @llvm.fmuladd.f64(double %76, double %78, double %90)
  store double %91, ptr %13, align 8, !tbaa !13
  br label %164

92:                                               ; preds = %3
  %93 = load ptr, ptr %4, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %93, i32 0, i32 0
  %95 = load i32, ptr %94, align 8, !tbaa !20
  %96 = icmp eq i32 %95, 3
  br i1 %96, label %97, label %134

97:                                               ; preds = %92
  %98 = load ptr, ptr %18, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.__SMoptimal, ptr %98, i32 0, i32 11
  %100 = load ptr, ptr %99, align 8, !tbaa !21
  %101 = load i32, ptr %8, align 4, !tbaa !18
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds ptr, ptr %100, i64 %102
  %104 = load ptr, ptr %103, align 8, !tbaa !5
  %105 = getelementptr inbounds double, ptr %104, i64 0
  %106 = load double, ptr %105, align 8, !tbaa !13
  %107 = getelementptr inbounds [3 x double], ptr %17, i64 0, i64 0
  %108 = load double, ptr %107, align 16, !tbaa !13
  %109 = load ptr, ptr %18, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.__SMoptimal, ptr %109, i32 0, i32 11
  %111 = load ptr, ptr %110, align 8, !tbaa !21
  %112 = load i32, ptr %8, align 4, !tbaa !18
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds ptr, ptr %111, i64 %113
  %115 = load ptr, ptr %114, align 8, !tbaa !5
  %116 = getelementptr inbounds double, ptr %115, i64 1
  %117 = load double, ptr %116, align 8, !tbaa !13
  %118 = getelementptr inbounds [3 x double], ptr %17, i64 0, i64 1
  %119 = load double, ptr %118, align 8, !tbaa !13
  %120 = fmul double %117, %119
  %121 = call double @llvm.fmuladd.f64(double %106, double %108, double %120)
  %122 = load ptr, ptr %18, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.__SMoptimal, ptr %122, i32 0, i32 11
  %124 = load ptr, ptr %123, align 8, !tbaa !21
  %125 = load i32, ptr %8, align 4, !tbaa !18
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds ptr, ptr %124, i64 %126
  %128 = load ptr, ptr %127, align 8, !tbaa !5
  %129 = getelementptr inbounds double, ptr %128, i64 2
  %130 = load double, ptr %129, align 8, !tbaa !13
  %131 = getelementptr inbounds [3 x double], ptr %17, i64 0, i64 2
  %132 = load double, ptr %131, align 16, !tbaa !13
  %133 = call double @llvm.fmuladd.f64(double %130, double %132, double %121)
  store double %133, ptr %13, align 8, !tbaa !13
  br label %163

134:                                              ; preds = %92
  store i32 0, ptr %19, align 4, !tbaa !18
  br label %135

135:                                              ; preds = %159, %134
  %136 = load i32, ptr %19, align 4, !tbaa !18
  %137 = load ptr, ptr %4, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %137, i32 0, i32 0
  %139 = load i32, ptr %138, align 8, !tbaa !20
  %140 = icmp slt i32 %136, %139
  br i1 %140, label %141, label %162

141:                                              ; preds = %135
  %142 = load ptr, ptr %18, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.__SMoptimal, ptr %142, i32 0, i32 11
  %144 = load ptr, ptr %143, align 8, !tbaa !21
  %145 = load i32, ptr %8, align 4, !tbaa !18
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds ptr, ptr %144, i64 %146
  %148 = load ptr, ptr %147, align 8, !tbaa !5
  %149 = load i32, ptr %19, align 4, !tbaa !18
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds double, ptr %148, i64 %150
  %152 = load double, ptr %151, align 8, !tbaa !13
  %153 = load i32, ptr %19, align 4, !tbaa !18
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds [3 x double], ptr %17, i64 0, i64 %154
  %156 = load double, ptr %155, align 8, !tbaa !13
  %157 = load double, ptr %13, align 8, !tbaa !13
  %158 = call double @llvm.fmuladd.f64(double %152, double %156, double %157)
  store double %158, ptr %13, align 8, !tbaa !13
  br label %159

159:                                              ; preds = %141
  %160 = load i32, ptr %19, align 4, !tbaa !18
  %161 = add nsw i32 %160, 1
  store i32 %161, ptr %19, align 4, !tbaa !18
  br label %135, !llvm.loop !22

162:                                              ; preds = %135
  br label %163

163:                                              ; preds = %162, %97
  br label %164

164:                                              ; preds = %163, %67
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #3
  %165 = load ptr, ptr %4, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %165, i32 0, i32 0
  %167 = load i32, ptr %166, align 8, !tbaa !20
  %168 = icmp eq i32 %167, 2
  br i1 %168, label %169, label %194

169:                                              ; preds = %164
  %170 = load ptr, ptr %18, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.__SMoptimal, ptr %170, i32 0, i32 11
  %172 = load ptr, ptr %171, align 8, !tbaa !21
  %173 = load i32, ptr %9, align 4, !tbaa !18
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds ptr, ptr %172, i64 %174
  %176 = load ptr, ptr %175, align 8, !tbaa !5
  %177 = getelementptr inbounds double, ptr %176, i64 0
  %178 = load double, ptr %177, align 8, !tbaa !13
  %179 = getelementptr inbounds [3 x double], ptr %17, i64 0, i64 0
  %180 = load double, ptr %179, align 16, !tbaa !13
  %181 = load ptr, ptr %18, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.__SMoptimal, ptr %181, i32 0, i32 11
  %183 = load ptr, ptr %182, align 8, !tbaa !21
  %184 = load i32, ptr %9, align 4, !tbaa !18
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds ptr, ptr %183, i64 %185
  %187 = load ptr, ptr %186, align 8, !tbaa !5
  %188 = getelementptr inbounds double, ptr %187, i64 1
  %189 = load double, ptr %188, align 8, !tbaa !13
  %190 = getelementptr inbounds [3 x double], ptr %17, i64 0, i64 1
  %191 = load double, ptr %190, align 8, !tbaa !13
  %192 = fmul double %189, %191
  %193 = call double @llvm.fmuladd.f64(double %178, double %180, double %192)
  store double %193, ptr %14, align 8, !tbaa !13
  br label %266

194:                                              ; preds = %164
  %195 = load ptr, ptr %4, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %195, i32 0, i32 0
  %197 = load i32, ptr %196, align 8, !tbaa !20
  %198 = icmp eq i32 %197, 3
  br i1 %198, label %199, label %236

199:                                              ; preds = %194
  %200 = load ptr, ptr %18, align 8, !tbaa !5
  %201 = getelementptr inbounds %struct.__SMoptimal, ptr %200, i32 0, i32 11
  %202 = load ptr, ptr %201, align 8, !tbaa !21
  %203 = load i32, ptr %9, align 4, !tbaa !18
  %204 = sext i32 %203 to i64
  %205 = getelementptr inbounds ptr, ptr %202, i64 %204
  %206 = load ptr, ptr %205, align 8, !tbaa !5
  %207 = getelementptr inbounds double, ptr %206, i64 0
  %208 = load double, ptr %207, align 8, !tbaa !13
  %209 = getelementptr inbounds [3 x double], ptr %17, i64 0, i64 0
  %210 = load double, ptr %209, align 16, !tbaa !13
  %211 = load ptr, ptr %18, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.__SMoptimal, ptr %211, i32 0, i32 11
  %213 = load ptr, ptr %212, align 8, !tbaa !21
  %214 = load i32, ptr %9, align 4, !tbaa !18
  %215 = sext i32 %214 to i64
  %216 = getelementptr inbounds ptr, ptr %213, i64 %215
  %217 = load ptr, ptr %216, align 8, !tbaa !5
  %218 = getelementptr inbounds double, ptr %217, i64 1
  %219 = load double, ptr %218, align 8, !tbaa !13
  %220 = getelementptr inbounds [3 x double], ptr %17, i64 0, i64 1
  %221 = load double, ptr %220, align 8, !tbaa !13
  %222 = fmul double %219, %221
  %223 = call double @llvm.fmuladd.f64(double %208, double %210, double %222)
  %224 = load ptr, ptr %18, align 8, !tbaa !5
  %225 = getelementptr inbounds %struct.__SMoptimal, ptr %224, i32 0, i32 11
  %226 = load ptr, ptr %225, align 8, !tbaa !21
  %227 = load i32, ptr %9, align 4, !tbaa !18
  %228 = sext i32 %227 to i64
  %229 = getelementptr inbounds ptr, ptr %226, i64 %228
  %230 = load ptr, ptr %229, align 8, !tbaa !5
  %231 = getelementptr inbounds double, ptr %230, i64 2
  %232 = load double, ptr %231, align 8, !tbaa !13
  %233 = getelementptr inbounds [3 x double], ptr %17, i64 0, i64 2
  %234 = load double, ptr %233, align 16, !tbaa !13
  %235 = call double @llvm.fmuladd.f64(double %232, double %234, double %223)
  store double %235, ptr %14, align 8, !tbaa !13
  br label %265

236:                                              ; preds = %194
  store i32 0, ptr %20, align 4, !tbaa !18
  br label %237

237:                                              ; preds = %261, %236
  %238 = load i32, ptr %20, align 4, !tbaa !18
  %239 = load ptr, ptr %4, align 8, !tbaa !5
  %240 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %239, i32 0, i32 0
  %241 = load i32, ptr %240, align 8, !tbaa !20
  %242 = icmp slt i32 %238, %241
  br i1 %242, label %243, label %264

243:                                              ; preds = %237
  %244 = load ptr, ptr %18, align 8, !tbaa !5
  %245 = getelementptr inbounds %struct.__SMoptimal, ptr %244, i32 0, i32 11
  %246 = load ptr, ptr %245, align 8, !tbaa !21
  %247 = load i32, ptr %9, align 4, !tbaa !18
  %248 = sext i32 %247 to i64
  %249 = getelementptr inbounds ptr, ptr %246, i64 %248
  %250 = load ptr, ptr %249, align 8, !tbaa !5
  %251 = load i32, ptr %20, align 4, !tbaa !18
  %252 = sext i32 %251 to i64
  %253 = getelementptr inbounds double, ptr %250, i64 %252
  %254 = load double, ptr %253, align 8, !tbaa !13
  %255 = load i32, ptr %20, align 4, !tbaa !18
  %256 = sext i32 %255 to i64
  %257 = getelementptr inbounds [3 x double], ptr %17, i64 0, i64 %256
  %258 = load double, ptr %257, align 8, !tbaa !13
  %259 = load double, ptr %14, align 8, !tbaa !13
  %260 = call double @llvm.fmuladd.f64(double %254, double %258, double %259)
  store double %260, ptr %14, align 8, !tbaa !13
  br label %261

261:                                              ; preds = %243
  %262 = load i32, ptr %20, align 4, !tbaa !18
  %263 = add nsw i32 %262, 1
  store i32 %263, ptr %20, align 4, !tbaa !18
  br label %237, !llvm.loop !24

264:                                              ; preds = %237
  br label %265

265:                                              ; preds = %264, %199
  br label %266

266:                                              ; preds = %265, %169
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #3
  %267 = load double, ptr %13, align 8, !tbaa !13
  %268 = load double, ptr %14, align 8, !tbaa !13
  %269 = fsub double %267, %268
  store double %269, ptr %15, align 8, !tbaa !13
  %270 = load double, ptr %15, align 8, !tbaa !13
  %271 = call double @llvm.fabs.f64(double %270)
  %272 = fadd double %271, 1.000000e+00
  %273 = fcmp ogt double %272, 1.000000e+00
  br i1 %273, label %274, label %275

274:                                              ; preds = %266
  br i1 false, label %305, label %276

275:                                              ; preds = %266
  br i1 true, label %305, label %276

276:                                              ; preds = %275, %274
  %277 = load double, ptr %12, align 8, !tbaa !13
  %278 = load double, ptr %11, align 8, !tbaa !13
  %279 = fsub double %277, %278
  %280 = load double, ptr %15, align 8, !tbaa !13
  %281 = fdiv double %279, %280
  store double %281, ptr %16, align 8, !tbaa !13
  store i32 0, ptr %10, align 4, !tbaa !18
  br label %282

282:                                              ; preds = %301, %276
  %283 = load i32, ptr %10, align 4, !tbaa !18
  %284 = load ptr, ptr %4, align 8, !tbaa !5
  %285 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %284, i32 0, i32 0
  %286 = load i32, ptr %285, align 8, !tbaa !20
  %287 = icmp slt i32 %283, %286
  br i1 %287, label %288, label %304

288:                                              ; preds = %282
  %289 = load double, ptr %16, align 8, !tbaa !13
  %290 = load i32, ptr %10, align 4, !tbaa !18
  %291 = sext i32 %290 to i64
  %292 = getelementptr inbounds [3 x double], ptr %17, i64 0, i64 %291
  %293 = load double, ptr %292, align 8, !tbaa !13
  %294 = load ptr, ptr %4, align 8, !tbaa !5
  %295 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %294, i32 0, i32 5
  %296 = load i32, ptr %10, align 4, !tbaa !18
  %297 = sext i32 %296 to i64
  %298 = getelementptr inbounds [3 x double], ptr %295, i64 0, i64 %297
  %299 = load double, ptr %298, align 8, !tbaa !13
  %300 = call double @llvm.fmuladd.f64(double %289, double %293, double %299)
  store double %300, ptr %298, align 8, !tbaa !13
  br label %301

301:                                              ; preds = %288
  %302 = load i32, ptr %10, align 4, !tbaa !18
  %303 = add nsw i32 %302, 1
  store i32 %303, ptr %10, align 4, !tbaa !18
  br label %282, !llvm.loop !25

304:                                              ; preds = %282
  br label %305

305:                                              ; preds = %304, %275, %274
  store i32 0, ptr %7, align 4, !tbaa !18
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  ret i32 0
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 160}
!10 = !{!"__SMlocal_mesh", !11, i64 0, !11, i64 4, !11, i64 8, !7, i64 16, !7, i64 40, !7, i64 64, !6, i64 88, !6, i64 96, !6, i64 104, !11, i64 112, !12, i64 120, !6, i64 128, !12, i64 136, !11, i64 144, !11, i64 148, !11, i64 152, !6, i64 160, !6, i64 168, !6, i64 176}
!11 = !{!"int", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!12, !12, i64 0}
!14 = !{!15, !6, i64 80}
!15 = !{!"__SMoptimal", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !12, i64 32, !11, i64 40, !11, i64 44, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !11, i64 104, !7, i64 112, !12, i64 136, !12, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !7, i64 184, !11, i64 196}
!16 = !{!17, !6, i64 8}
!17 = !{!"__SMactive", !11, i64 0, !11, i64 4, !6, i64 8, !12, i64 16}
!18 = !{!11, !11, i64 0}
!19 = !{!15, !6, i64 48}
!20 = !{!10, !11, i64 0}
!21 = !{!15, !6, i64 56}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}
!25 = distinct !{!25, !23}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #1

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fabs.f64(double) #1

; Function Attrs: nofree norecurse nosync nounwind memory(read, argmem: readwrite, inaccessiblemem: none) uwtable
define dso_local noundef i32 @SMstepToCusp(ptr nocapture noundef %0, ptr nocapture noundef readnone %1, ptr nocapture noundef readnone %2) local_unnamed_addr #2 {
  %4 = alloca [3 x double], align 16
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #4
  %5 = getelementptr inbounds i8, ptr %0, i64 160
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %6, i64 112
  %8 = getelementptr inbounds i8, ptr %6, i64 120
  %9 = load double, ptr %8, align 8, !tbaa !12
  %10 = fneg double %9
  store double %10, ptr %4, align 16, !tbaa !12
  %11 = load double, ptr %7, align 8, !tbaa !12
  %12 = getelementptr inbounds i8, ptr %4, i64 8
  store double %11, ptr %12, align 8, !tbaa !12
  %13 = getelementptr inbounds i8, ptr %6, i64 80
  %14 = load ptr, ptr %13, align 8, !tbaa !13
  %15 = getelementptr inbounds i8, ptr %14, i64 8
  %16 = load ptr, ptr %15, align 8, !tbaa !15
  %17 = load i32, ptr %16, align 4, !tbaa !17
  %18 = getelementptr inbounds i8, ptr %16, i64 4
  %19 = load i32, ptr %18, align 4, !tbaa !17
  %20 = getelementptr inbounds i8, ptr %6, i64 48
  %21 = load ptr, ptr %20, align 8, !tbaa !18
  %22 = sext i32 %17 to i64
  %23 = getelementptr inbounds double, ptr %21, i64 %22
  %24 = load double, ptr %23, align 8, !tbaa !12
  %25 = sext i32 %19 to i64
  %26 = getelementptr inbounds double, ptr %21, i64 %25
  %27 = load double, ptr %26, align 8, !tbaa !12
  %28 = load i32, ptr %0, align 8, !tbaa !19
  switch i32 %28, label %.preheader75 [
    i32 2, label %.thread
    i32 3, label %.loopexit74
  ]

.preheader75:                                     ; preds = %3
  %29 = icmp sgt i32 %28, 0
  br i1 %29, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.preheader75
  %30 = getelementptr inbounds i8, ptr %6, i64 56
  %31 = load ptr, ptr %30, align 8, !tbaa !20
  %32 = getelementptr inbounds ptr, ptr %31, i64 %22
  %33 = load ptr, ptr %32, align 8, !tbaa !21
  %wide.trip.count = zext nneg i32 %28 to i64
  %xtraiter = and i64 %wide.trip.count, 3
  %34 = icmp ult i32 %28, 4
  br i1 %34, 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 %44

.thread:                                          ; preds = %3
  %35 = getelementptr inbounds i8, ptr %6, i64 56
  %36 = load ptr, ptr %35, align 8, !tbaa !20
  %37 = getelementptr inbounds ptr, ptr %36, i64 %22
  %38 = load ptr, ptr %37, align 8, !tbaa !21
  %39 = load double, ptr %38, align 8, !tbaa !12
  %40 = getelementptr inbounds i8, ptr %38, i64 8
  %41 = load double, ptr %40, align 8, !tbaa !12
  %42 = fmul double %11, %41
  %43 = tail call double @llvm.fmuladd.f64(double %39, double %10, double %42)
  br label %75

44:                                               ; preds = %44, %.lr.ph.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.new ], [ %indvars.iv.next.3, %44 ]
  %.06376 = phi double [ undef, %.lr.ph.new ], [ %64, %44 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.3, %44 ]
  %45 = getelementptr inbounds double, ptr %33, i64 %indvars.iv
  %46 = load double, ptr %45, align 8, !tbaa !12
  %47 = getelementptr inbounds [3 x double], ptr %4, i64 0, i64 %indvars.iv
  %48 = load double, ptr %47, align 16, !tbaa !12
  %49 = tail call double @llvm.fmuladd.f64(double %46, double %48, double %.06376)
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %50 = getelementptr inbounds double, ptr %33, i64 %indvars.iv.next
  %51 = load double, ptr %50, align 8, !tbaa !12
  %52 = getelementptr inbounds [3 x double], ptr %4, i64 0, i64 %indvars.iv.next
  %53 = load double, ptr %52, align 8, !tbaa !12
  %54 = tail call double @llvm.fmuladd.f64(double %51, double %53, double %49)
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %55 = getelementptr inbounds double, ptr %33, i64 %indvars.iv.next.1
  %56 = load double, ptr %55, align 8, !tbaa !12
  %57 = getelementptr inbounds [3 x double], ptr %4, i64 0, i64 %indvars.iv.next.1
  %58 = load double, ptr %57, align 16, !tbaa !12
  %59 = tail call double @llvm.fmuladd.f64(double %56, double %58, double %54)
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %60 = getelementptr inbounds double, ptr %33, i64 %indvars.iv.next.2
  %61 = load double, ptr %60, align 8, !tbaa !12
  %62 = getelementptr inbounds [3 x double], ptr %4, i64 0, i64 %indvars.iv.next.2
  %63 = load double, ptr %62, align 8, !tbaa !12
  %64 = tail call double @llvm.fmuladd.f64(double %61, double %63, double %59)
  %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 %44, !llvm.loop !22

._crit_edge.loopexit.unr-lcssa:                   ; preds = %44, %.lr.ph
  %.lcssa105.ph = phi double [ poison, %.lr.ph ], [ %64, %44 ]
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next.3, %44 ]
  %.06376.unr = phi double [ undef, %.lr.ph ], [ %64, %44 ]
  %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 ]
  %.06376.epil = phi double [ %69, %.epil.preheader ], [ %.06376.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %65 = getelementptr inbounds double, ptr %33, i64 %indvars.iv.epil
  %66 = load double, ptr %65, align 8, !tbaa !12
  %67 = getelementptr inbounds [3 x double], ptr %4, i64 0, i64 %indvars.iv.epil
  %68 = load double, ptr %67, align 8, !tbaa !12
  %69 = tail call double @llvm.fmuladd.f64(double %66, double %68, double %.06376.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 !24

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader, %.preheader75
  %.063.lcssa = phi double [ undef, %.preheader75 ], [ %.lcssa105.ph, %._crit_edge.loopexit.unr-lcssa ], [ %69, %.epil.preheader ]
  switch i32 %28, label %.preheader [
    i32 2, label %._crit_edge._crit_edge97
    i32 3, label %.loopexit74
  ]

._crit_edge._crit_edge97:                         ; preds = %._crit_edge
  %.phi.trans.insert98 = getelementptr inbounds i8, ptr %6, i64 56
  %.pre99 = load ptr, ptr %.phi.trans.insert98, align 8, !tbaa !20
  br label %75

.preheader:                                       ; preds = %._crit_edge
  br i1 %29, label %.lr.ph80, label %.loopexit74

.lr.ph80:                                         ; preds = %.preheader
  %70 = getelementptr inbounds i8, ptr %6, i64 56
  %71 = load ptr, ptr %70, align 8, !tbaa !20
  %72 = getelementptr inbounds ptr, ptr %71, i64 %25
  %73 = load ptr, ptr %72, align 8, !tbaa !21
  %wide.trip.count90 = zext nneg i32 %28 to i64
  %xtraiter108 = and i64 %wide.trip.count90, 3
  %74 = icmp ult i32 %28, 4
  br i1 %74, label %.loopexit74.loopexit.unr-lcssa, label %.lr.ph80.new

.lr.ph80.new:                                     ; preds = %.lr.ph80
  %unroll_iter112 = and i64 %wide.trip.count90, 2147483644
  br label %84

75:                                               ; preds = %._crit_edge._crit_edge97, %.thread
  %76 = phi ptr [ %36, %.thread ], [ %.pre99, %._crit_edge._crit_edge97 ]
  %.170 = phi double [ %43, %.thread ], [ %.063.lcssa, %._crit_edge._crit_edge97 ]
  %77 = getelementptr inbounds ptr, ptr %76, i64 %25
  %78 = load ptr, ptr %77, align 8, !tbaa !21
  %79 = load double, ptr %78, align 8, !tbaa !12
  %80 = getelementptr inbounds i8, ptr %78, i64 8
  %81 = load double, ptr %80, align 8, !tbaa !12
  %82 = fmul double %11, %81
  %83 = tail call double @llvm.fmuladd.f64(double %79, double %10, double %82)
  br label %.loopexit74

84:                                               ; preds = %84, %.lr.ph80.new
  %indvars.iv87 = phi i64 [ 0, %.lr.ph80.new ], [ %indvars.iv.next88.3, %84 ]
  %.06478 = phi double [ undef, %.lr.ph80.new ], [ %104, %84 ]
  %niter113 = phi i64 [ 0, %.lr.ph80.new ], [ %niter113.next.3, %84 ]
  %85 = getelementptr inbounds double, ptr %73, i64 %indvars.iv87
  %86 = load double, ptr %85, align 8, !tbaa !12
  %87 = getelementptr inbounds [3 x double], ptr %4, i64 0, i64 %indvars.iv87
  %88 = load double, ptr %87, align 16, !tbaa !12
  %89 = tail call double @llvm.fmuladd.f64(double %86, double %88, double %.06478)
  %indvars.iv.next88 = or disjoint i64 %indvars.iv87, 1
  %90 = getelementptr inbounds double, ptr %73, i64 %indvars.iv.next88
  %91 = load double, ptr %90, align 8, !tbaa !12
  %92 = getelementptr inbounds [3 x double], ptr %4, i64 0, i64 %indvars.iv.next88
  %93 = load double, ptr %92, align 8, !tbaa !12
  %94 = tail call double @llvm.fmuladd.f64(double %91, double %93, double %89)
  %indvars.iv.next88.1 = or disjoint i64 %indvars.iv87, 2
  %95 = getelementptr inbounds double, ptr %73, i64 %indvars.iv.next88.1
  %96 = load double, ptr %95, align 8, !tbaa !12
  %97 = getelementptr inbounds [3 x double], ptr %4, i64 0, i64 %indvars.iv.next88.1
  %98 = load double, ptr %97, align 16, !tbaa !12
  %99 = tail call double @llvm.fmuladd.f64(double %96, double %98, double %94)
  %indvars.iv.next88.2 = or disjoint i64 %indvars.iv87, 3
  %100 = getelementptr inbounds double, ptr %73, i64 %indvars.iv.next88.2
  %101 = load double, ptr %100, align 8, !tbaa !12
  %102 = getelementptr inbounds [3 x double], ptr %4, i64 0, i64 %indvars.iv.next88.2
  %103 = load double, ptr %102, align 8, !tbaa !12
  %104 = tail call double @llvm.fmuladd.f64(double %101, double %103, double %99)
  %indvars.iv.next88.3 = add nuw nsw i64 %indvars.iv87, 4
  %niter113.next.3 = add i64 %niter113, 4
  %niter113.ncmp.3 = icmp eq i64 %niter113.next.3, %unroll_iter112
  br i1 %niter113.ncmp.3, label %.loopexit74.loopexit.unr-lcssa, label %84, !llvm.loop !26

.loopexit74.loopexit.unr-lcssa:                   ; preds = %84, %.lr.ph80
  %.lcssa.ph = phi double [ poison, %.lr.ph80 ], [ %104, %84 ]
  %indvars.iv87.unr = phi i64 [ 0, %.lr.ph80 ], [ %indvars.iv.next88.3, %84 ]
  %.06478.unr = phi double [ undef, %.lr.ph80 ], [ %104, %84 ]
  %lcmp.mod110.not = icmp eq i64 %xtraiter108, 0
  br i1 %lcmp.mod110.not, label %.loopexit74, label %.epil.preheader107

.epil.preheader107:                               ; preds = %.loopexit74.loopexit.unr-lcssa, %.epil.preheader107
  %indvars.iv87.epil = phi i64 [ %indvars.iv.next88.epil, %.epil.preheader107 ], [ %indvars.iv87.unr, %.loopexit74.loopexit.unr-lcssa ]
  %.06478.epil = phi double [ %109, %.epil.preheader107 ], [ %.06478.unr, %.loopexit74.loopexit.unr-lcssa ]
  %epil.iter109 = phi i64 [ %epil.iter109.next, %.epil.preheader107 ], [ 0, %.loopexit74.loopexit.unr-lcssa ]
  %105 = getelementptr inbounds double, ptr %73, i64 %indvars.iv87.epil
  %106 = load double, ptr %105, align 8, !tbaa !12
  %107 = getelementptr inbounds [3 x double], ptr %4, i64 0, i64 %indvars.iv87.epil
  %108 = load double, ptr %107, align 8, !tbaa !12
  %109 = tail call double @llvm.fmuladd.f64(double %106, double %108, double %.06478.epil)
  %indvars.iv.next88.epil = add nuw nsw i64 %indvars.iv87.epil, 1
  %epil.iter109.next = add i64 %epil.iter109, 1
  %epil.iter109.cmp.not = icmp eq i64 %epil.iter109.next, %xtraiter108
  br i1 %epil.iter109.cmp.not, label %.loopexit74, label %.epil.preheader107, !llvm.loop !27

.loopexit74:                                      ; preds = %.loopexit74.loopexit.unr-lcssa, %.epil.preheader107, %3, %._crit_edge, %.preheader, %75
  %.169 = phi double [ %.170, %75 ], [ %.063.lcssa, %.preheader ], [ 0x7FF8000000000000, %3 ], [ %.063.lcssa, %._crit_edge ], [ %.063.lcssa, %.epil.preheader107 ], [ %.063.lcssa, %.loopexit74.loopexit.unr-lcssa ]
  %.165 = phi double [ %83, %75 ], [ undef, %.preheader ], [ 0x7FF8000000000000, %3 ], [ 0x7FF8000000000000, %._crit_edge ], [ %.lcssa.ph, %.loopexit74.loopexit.unr-lcssa ], [ %109, %.epil.preheader107 ]
  %110 = fsub double %.169, %.165
  %111 = tail call double @llvm.fabs.f64(double %110)
  %112 = fadd double %111, 1.000000e+00
  %113 = fcmp ogt double %112, 1.000000e+00
  br i1 %113, label %114, label %.loopexit

114:                                              ; preds = %.loopexit74
  %115 = fsub double %27, %24
  %116 = fdiv double %115, %110
  %117 = icmp sgt i32 %28, 0
  br i1 %117, label %.lr.ph84, label %.loopexit

.lr.ph84:                                         ; preds = %114
  %118 = getelementptr inbounds i8, ptr %0, i64 64
  %wide.trip.count95 = zext nneg i32 %28 to i64
  %min.iters.check = icmp ult i32 %28, 4
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph84
  %n.vec = and i64 %wide.trip.count95, 2147483644
  %broadcast.splatinsert = insertelement <2 x double> poison, double %116, i64 0
  %broadcast.splat = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %119 = getelementptr inbounds [3 x double], ptr %4, i64 0, i64 %index
  %120 = getelementptr inbounds i8, ptr %119, i64 16
  %wide.load = load <2 x double>, ptr %119, align 16, !tbaa !12
  %wide.load102 = load <2 x double>, ptr %120, align 16, !tbaa !12
  %121 = getelementptr inbounds [3 x double], ptr %118, i64 0, i64 %index
  %122 = getelementptr inbounds i8, ptr %121, i64 16
  %wide.load103 = load <2 x double>, ptr %121, align 8, !tbaa !12
  %wide.load104 = load <2 x double>, ptr %122, align 8, !tbaa !12
  %123 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat, <2 x double> %wide.load, <2 x double> %wide.load103)
  %124 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %broadcast.splat, <2 x double> %wide.load102, <2 x double> %wide.load104)
  store <2 x double> %123, ptr %121, align 8, !tbaa !12
  store <2 x double> %124, ptr %122, align 8, !tbaa !12
  %index.next = add nuw i64 %index, 4
  %125 = icmp eq i64 %index.next, %n.vec
  br i1 %125, label %middle.block, label %vector.body, !llvm.loop !28

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

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph84
  %indvars.iv92.ph = phi i64 [ 0, %.lr.ph84 ], [ %n.vec, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %indvars.iv92 = phi i64 [ %indvars.iv.next93, %scalar.ph ], [ %indvars.iv92.ph, %scalar.ph.preheader ]
  %126 = getelementptr inbounds [3 x double], ptr %4, i64 0, i64 %indvars.iv92
  %127 = load double, ptr %126, align 8, !tbaa !12
  %128 = getelementptr inbounds [3 x double], ptr %118, i64 0, i64 %indvars.iv92
  %129 = load double, ptr %128, align 8, !tbaa !12
  %130 = tail call double @llvm.fmuladd.f64(double %116, double %127, double %129)
  store double %130, ptr %128, align 8, !tbaa !12
  %indvars.iv.next93 = add nuw nsw i64 %indvars.iv92, 1
  %exitcond96.not = icmp eq i64 %indvars.iv.next93, %wide.trip.count95
  br i1 %exitcond96.not, label %.loopexit, label %scalar.ph, !llvm.loop !31

.loopexit:                                        ; preds = %scalar.ph, %middle.block, %114, %.loopexit74
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #4
  ret i32 0
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { nofree norecurse nosync nounwind memory(read, argmem: readwrite, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !10, i64 160}
!6 = !{!"__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, !11, i64 120, !10, i64 128, !11, i64 136, !7, i64 144, !7, i64 148, !7, i64 152, !10, i64 160, !10, i64 168, !10, i64 176}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"double", !8, i64 0}
!12 = !{!11, !11, i64 0}
!13 = !{!14, !10, i64 80}
!14 = !{!"__SMoptimal", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !11, i64 32, !7, i64 40, !7, i64 44, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !7, i64 104, !8, i64 112, !11, i64 136, !11, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !8, i64 184, !7, i64 196}
!15 = !{!16, !10, i64 8}
!16 = !{!"__SMactive", !7, i64 0, !7, i64 4, !10, i64 8, !11, i64 16}
!17 = !{!7, !7, i64 0}
!18 = !{!14, !10, i64 48}
!19 = !{!6, !7, i64 0}
!20 = !{!14, !10, i64 56}
!21 = !{!10, !10, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.unroll.disable"}
!26 = distinct !{!26, !23}
!27 = distinct !{!27, !25}
!28 = distinct !{!28, !23, !29, !30}
!29 = !{!"llvm.loop.isvectorized", i32 1}
!30 = !{!"llvm.loop.unroll.runtime.disable"}
!31 = distinct !{!31, !23, !30, !29}


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