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

; 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 }

@.str.1 = external hidden unnamed_addr constant [113 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [38 x i8], align 1

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

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

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

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #2

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

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

33:                                               ; preds = %2
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = icmp eq ptr %34, null
  br i1 %35, label %36, label %38

36:                                               ; preds = %33
  %37 = call i32 @SMerror(i32 noundef 105, ptr noundef @.str.11, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 56, i32 noundef 0, ptr noundef null)
  store i32 %37, ptr %3, align 4
  store i32 1, ptr %28, align 4
  br label %401

38:                                               ; preds = %33
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %39, i32 0, i32 16
  %41 = load ptr, ptr %40, align 8, !tbaa !9
  %42 = getelementptr inbounds %struct.__SMoptimal, ptr %41, i32 0, i32 9
  %43 = load i32, ptr %42, align 4, !tbaa !13
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %44, i32 0, i32 2
  %46 = load i32, ptr %45, align 8, !tbaa !15
  %47 = mul nsw i32 %46, 3
  %48 = icmp eq i32 %43, %47
  br i1 %48, label %49, label %282

49:                                               ; preds = %38
  store i32 0, ptr %12, align 4, !tbaa !16
  store i32 0, ptr %11, align 4, !tbaa !16
  store i32 0, ptr %7, align 4, !tbaa !16
  br label %50

50:                                               ; preds = %278, %49
  %51 = load i32, ptr %7, align 4, !tbaa !16
  %52 = load ptr, ptr %5, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %52, i32 0, i32 16
  %54 = load ptr, ptr %53, align 8, !tbaa !9
  %55 = getelementptr inbounds %struct.__SMoptimal, ptr %54, i32 0, i32 14
  %56 = load ptr, ptr %55, align 8, !tbaa !17
  %57 = getelementptr inbounds %struct.__SMactive, ptr %56, i32 0, i32 0
  %58 = load i32, ptr %57, align 8, !tbaa !18
  %59 = icmp slt i32 %51, %58
  br i1 %59, label %60, label %281

60:                                               ; preds = %50
  %61 = load ptr, ptr %5, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %61, i32 0, i32 16
  %63 = load ptr, ptr %62, align 8, !tbaa !9
  %64 = getelementptr inbounds %struct.__SMoptimal, ptr %63, i32 0, i32 14
  %65 = load ptr, ptr %64, align 8, !tbaa !17
  %66 = getelementptr inbounds %struct.__SMactive, ptr %65, i32 0, i32 2
  %67 = load ptr, ptr %66, align 8, !tbaa !20
  %68 = load i32, ptr %7, align 4, !tbaa !16
  %69 = sext i32 %68 to i64
  %70 = getelementptr inbounds i32, ptr %67, i64 %69
  %71 = load i32, ptr %70, align 4, !tbaa !16
  store i32 %71, ptr %8, align 4, !tbaa !16
  %72 = load i32, ptr %8, align 4, !tbaa !16
  %73 = sdiv i32 %72, 3
  store i32 %73, ptr %9, align 4, !tbaa !16
  %74 = load i32, ptr %8, align 4, !tbaa !16
  %75 = srem i32 %74, 3
  store i32 %75, ptr %10, align 4, !tbaa !16
  %76 = load ptr, ptr %5, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %76, i32 0, i32 7
  %78 = load ptr, ptr %77, align 8, !tbaa !21
  %79 = load i32, ptr %9, align 4, !tbaa !16
  %80 = sext i32 %79 to i64
  %81 = getelementptr inbounds ptr, ptr %78, i64 %80
  %82 = load ptr, ptr %81, align 8, !tbaa !5
  %83 = getelementptr inbounds i32, ptr %82, i64 0
  %84 = load i32, ptr %83, align 4, !tbaa !16
  store i32 %84, ptr %11, align 4, !tbaa !16
  %85 = load ptr, ptr %5, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %85, i32 0, i32 7
  %87 = load ptr, ptr %86, align 8, !tbaa !21
  %88 = load i32, ptr %9, align 4, !tbaa !16
  %89 = sext i32 %88 to i64
  %90 = getelementptr inbounds ptr, ptr %87, i64 %89
  %91 = load ptr, ptr %90, align 8, !tbaa !5
  %92 = getelementptr inbounds i32, ptr %91, i64 1
  %93 = load i32, ptr %92, align 4, !tbaa !16
  store i32 %93, ptr %12, align 4, !tbaa !16
  %94 = load i32, ptr %10, align 4, !tbaa !16
  %95 = icmp eq i32 %94, 0
  br i1 %95, label %96, label %141

96:                                               ; preds = %60
  %97 = load ptr, ptr %5, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %97, i32 0, i32 5
  %99 = getelementptr inbounds [3 x double], ptr %98, i64 0, i64 0
  %100 = load double, ptr %99, align 8, !tbaa !22
  store double %100, ptr %13, align 8, !tbaa !22
  %101 = load ptr, ptr %5, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %101, i32 0, i32 5
  %103 = getelementptr inbounds [3 x double], ptr %102, i64 0, i64 1
  %104 = load double, ptr %103, align 8, !tbaa !22
  store double %104, ptr %14, align 8, !tbaa !22
  %105 = load ptr, ptr %5, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %105, i32 0, i32 6
  %107 = load ptr, ptr %106, align 8, !tbaa !23
  %108 = load i32, ptr %11, align 4, !tbaa !16
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds ptr, ptr %107, i64 %109
  %111 = load ptr, ptr %110, align 8, !tbaa !5
  %112 = getelementptr inbounds double, ptr %111, i64 0
  %113 = load double, ptr %112, align 8, !tbaa !22
  store double %113, ptr %15, align 8, !tbaa !22
  %114 = load ptr, ptr %5, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %114, i32 0, i32 6
  %116 = load ptr, ptr %115, align 8, !tbaa !23
  %117 = load i32, ptr %12, align 4, !tbaa !16
  %118 = sext i32 %117 to i64
  %119 = getelementptr inbounds ptr, ptr %116, i64 %118
  %120 = load ptr, ptr %119, align 8, !tbaa !5
  %121 = getelementptr inbounds double, ptr %120, i64 0
  %122 = load double, ptr %121, align 8, !tbaa !22
  store double %122, ptr %16, align 8, !tbaa !22
  %123 = load ptr, ptr %5, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %123, i32 0, i32 6
  %125 = load ptr, ptr %124, align 8, !tbaa !23
  %126 = load i32, ptr %11, align 4, !tbaa !16
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds ptr, ptr %125, i64 %127
  %129 = load ptr, ptr %128, align 8, !tbaa !5
  %130 = getelementptr inbounds double, ptr %129, i64 1
  %131 = load double, ptr %130, align 8, !tbaa !22
  store double %131, ptr %17, align 8, !tbaa !22
  %132 = load ptr, ptr %5, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %132, i32 0, i32 6
  %134 = load ptr, ptr %133, align 8, !tbaa !23
  %135 = load i32, ptr %12, align 4, !tbaa !16
  %136 = sext i32 %135 to i64
  %137 = getelementptr inbounds ptr, ptr %134, i64 %136
  %138 = load ptr, ptr %137, align 8, !tbaa !5
  %139 = getelementptr inbounds double, ptr %138, i64 1
  %140 = load double, ptr %139, align 8, !tbaa !22
  store double %140, ptr %18, align 8, !tbaa !22
  br label %235

141:                                              ; preds = %60
  %142 = load i32, ptr %10, align 4, !tbaa !16
  %143 = icmp eq i32 %142, 1
  br i1 %143, label %144, label %189

144:                                              ; preds = %141
  %145 = load ptr, ptr %5, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %145, i32 0, i32 6
  %147 = load ptr, ptr %146, align 8, !tbaa !23
  %148 = load i32, ptr %11, align 4, !tbaa !16
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds ptr, ptr %147, i64 %149
  %151 = load ptr, ptr %150, align 8, !tbaa !5
  %152 = getelementptr inbounds double, ptr %151, i64 0
  %153 = load double, ptr %152, align 8, !tbaa !22
  store double %153, ptr %13, align 8, !tbaa !22
  %154 = load ptr, ptr %5, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %154, i32 0, i32 6
  %156 = load ptr, ptr %155, align 8, !tbaa !23
  %157 = load i32, ptr %11, align 4, !tbaa !16
  %158 = sext i32 %157 to i64
  %159 = getelementptr inbounds ptr, ptr %156, i64 %158
  %160 = load ptr, ptr %159, align 8, !tbaa !5
  %161 = getelementptr inbounds double, ptr %160, i64 1
  %162 = load double, ptr %161, align 8, !tbaa !22
  store double %162, ptr %14, align 8, !tbaa !22
  %163 = load ptr, ptr %5, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %163, i32 0, i32 5
  %165 = getelementptr inbounds [3 x double], ptr %164, i64 0, i64 0
  %166 = load double, ptr %165, align 8, !tbaa !22
  store double %166, ptr %15, align 8, !tbaa !22
  %167 = load ptr, ptr %5, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %167, i32 0, i32 5
  %169 = getelementptr inbounds [3 x double], ptr %168, i64 0, i64 1
  %170 = load double, ptr %169, align 8, !tbaa !22
  store double %170, ptr %17, align 8, !tbaa !22
  %171 = load ptr, ptr %5, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %171, i32 0, i32 6
  %173 = load ptr, ptr %172, align 8, !tbaa !23
  %174 = load i32, ptr %12, align 4, !tbaa !16
  %175 = sext i32 %174 to i64
  %176 = getelementptr inbounds ptr, ptr %173, i64 %175
  %177 = load ptr, ptr %176, align 8, !tbaa !5
  %178 = getelementptr inbounds double, ptr %177, i64 0
  %179 = load double, ptr %178, align 8, !tbaa !22
  store double %179, ptr %16, align 8, !tbaa !22
  %180 = load ptr, ptr %5, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %180, i32 0, i32 6
  %182 = load ptr, ptr %181, align 8, !tbaa !23
  %183 = load i32, ptr %12, align 4, !tbaa !16
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds ptr, ptr %182, i64 %184
  %186 = load ptr, ptr %185, align 8, !tbaa !5
  %187 = getelementptr inbounds double, ptr %186, i64 1
  %188 = load double, ptr %187, align 8, !tbaa !22
  store double %188, ptr %18, align 8, !tbaa !22
  br label %234

189:                                              ; preds = %141
  %190 = load ptr, ptr %5, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %190, i32 0, i32 6
  %192 = load ptr, ptr %191, align 8, !tbaa !23
  %193 = load i32, ptr %12, align 4, !tbaa !16
  %194 = sext i32 %193 to i64
  %195 = getelementptr inbounds ptr, ptr %192, i64 %194
  %196 = load ptr, ptr %195, align 8, !tbaa !5
  %197 = getelementptr inbounds double, ptr %196, i64 0
  %198 = load double, ptr %197, align 8, !tbaa !22
  store double %198, ptr %13, align 8, !tbaa !22
  %199 = load ptr, ptr %5, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %199, i32 0, i32 6
  %201 = load ptr, ptr %200, align 8, !tbaa !23
  %202 = load i32, ptr %12, align 4, !tbaa !16
  %203 = sext i32 %202 to i64
  %204 = getelementptr inbounds ptr, ptr %201, i64 %203
  %205 = load ptr, ptr %204, align 8, !tbaa !5
  %206 = getelementptr inbounds double, ptr %205, i64 1
  %207 = load double, ptr %206, align 8, !tbaa !22
  store double %207, ptr %14, align 8, !tbaa !22
  %208 = load ptr, ptr %5, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %208, i32 0, i32 5
  %210 = getelementptr inbounds [3 x double], ptr %209, i64 0, i64 0
  %211 = load double, ptr %210, align 8, !tbaa !22
  store double %211, ptr %15, align 8, !tbaa !22
  %212 = load ptr, ptr %5, align 8, !tbaa !5
  %213 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %212, i32 0, i32 5
  %214 = getelementptr inbounds [3 x double], ptr %213, i64 0, i64 1
  %215 = load double, ptr %214, align 8, !tbaa !22
  store double %215, ptr %17, align 8, !tbaa !22
  %216 = load ptr, ptr %5, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %216, i32 0, i32 6
  %218 = load ptr, ptr %217, align 8, !tbaa !23
  %219 = load i32, ptr %11, align 4, !tbaa !16
  %220 = sext i32 %219 to i64
  %221 = getelementptr inbounds ptr, ptr %218, i64 %220
  %222 = load ptr, ptr %221, align 8, !tbaa !5
  %223 = getelementptr inbounds double, ptr %222, i64 0
  %224 = load double, ptr %223, align 8, !tbaa !22
  store double %224, ptr %16, align 8, !tbaa !22
  %225 = load ptr, ptr %5, align 8, !tbaa !5
  %226 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %225, i32 0, i32 6
  %227 = load ptr, ptr %226, align 8, !tbaa !23
  %228 = load i32, ptr %11, align 4, !tbaa !16
  %229 = sext i32 %228 to i64
  %230 = getelementptr inbounds ptr, ptr %227, i64 %229
  %231 = load ptr, ptr %230, align 8, !tbaa !5
  %232 = getelementptr inbounds double, ptr %231, i64 1
  %233 = load double, ptr %232, align 8, !tbaa !22
  store double %233, ptr %18, align 8, !tbaa !22
  br label %234

234:                                              ; preds = %189, %144
  br label %235

235:                                              ; preds = %234, %96
  %236 = load double, ptr %15, align 8, !tbaa !22
  %237 = load double, ptr %16, align 8, !tbaa !22
  %238 = fadd double %236, %237
  %239 = fdiv double %238, 2.000000e+00
  store double %239, ptr %23, align 8, !tbaa !22
  %240 = load double, ptr %17, align 8, !tbaa !22
  %241 = load double, ptr %18, align 8, !tbaa !22
  %242 = fadd double %240, %241
  %243 = fdiv double %242, 2.000000e+00
  store double %243, ptr %24, align 8, !tbaa !22
  %244 = load double, ptr %13, align 8, !tbaa !22
  %245 = load double, ptr %23, align 8, !tbaa !22
  %246 = fsub double %244, %245
  store double %246, ptr %25, align 8, !tbaa !22
  %247 = load double, ptr %14, align 8, !tbaa !22
  %248 = load double, ptr %24, align 8, !tbaa !22
  %249 = fsub double %247, %248
  store double %249, ptr %19, align 8, !tbaa !22
  %250 = load double, ptr %13, align 8, !tbaa !22
  %251 = load double, ptr %23, align 8, !tbaa !22
  %252 = fsub double %250, %251
  store double %252, ptr %20, align 8, !tbaa !22
  %253 = load double, ptr %20, align 8, !tbaa !22
  %254 = call double @llvm.fabs.f64(double %253)
  %255 = fcmp olt double %254, 1.000000e-15
  br i1 %255, label %256, label %258

256:                                              ; preds = %235
  %257 = call i32 @SMerror(i32 noundef 147, ptr noundef @.str.11, ptr noundef @.str.1, ptr noundef @.str.2, i32 noundef 57, i32 noundef 0, ptr noundef @.str.12)
  store i32 %257, ptr %3, align 4
  store i32 1, ptr %28, align 4
  br label %401

258:                                              ; preds = %235
  %259 = load double, ptr %19, align 8, !tbaa !22
  %260 = load double, ptr %20, align 8, !tbaa !22
  %261 = fdiv double %259, %260
  store double %261, ptr %21, align 8, !tbaa !22
  %262 = load double, ptr %24, align 8, !tbaa !22
  %263 = load double, ptr %21, align 8, !tbaa !22
  %264 = load double, ptr %23, align 8, !tbaa !22
  %265 = fneg double %263
  %266 = call double @llvm.fmuladd.f64(double %265, double %264, double %262)
  store double %266, ptr %22, align 8, !tbaa !22
  %267 = load double, ptr %13, align 8, !tbaa !22
  %268 = load double, ptr %25, align 8, !tbaa !22
  %269 = call double @llvm.fmuladd.f64(double -1.000000e-01, double %268, double %267)
  store double %269, ptr %26, align 8, !tbaa !22
  %270 = load double, ptr %21, align 8, !tbaa !22
  %271 = load double, ptr %26, align 8, !tbaa !22
  %272 = load double, ptr %22, align 8, !tbaa !22
  %273 = call double @llvm.fmuladd.f64(double %270, double %271, double %272)
  store double %273, ptr %27, align 8, !tbaa !22
  %274 = load ptr, ptr %4, align 8, !tbaa !5
  %275 = load double, ptr %26, align 8, !tbaa !22
  %276 = load double, ptr %27, align 8, !tbaa !22
  %277 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %274, ptr noundef @.str.13, double noundef %275, double noundef %276) #5
  br label %278

278:                                              ; preds = %258
  %279 = load i32, ptr %7, align 4, !tbaa !16
  %280 = add nsw i32 %279, 1
  store i32 %280, ptr %7, align 4, !tbaa !16
  br label %50, !llvm.loop !24

281:                                              ; preds = %50
  br label %282

282:                                              ; preds = %281, %38
  %283 = load ptr, ptr %5, align 8, !tbaa !5
  %284 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %283, i32 0, i32 16
  %285 = load ptr, ptr %284, align 8, !tbaa !9
  %286 = getelementptr inbounds %struct.__SMoptimal, ptr %285, i32 0, i32 9
  %287 = load i32, ptr %286, align 4, !tbaa !13
  %288 = load ptr, ptr %5, align 8, !tbaa !5
  %289 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %288, i32 0, i32 2
  %290 = load i32, ptr %289, align 8, !tbaa !15
  %291 = icmp eq i32 %287, %290
  br i1 %291, label %292, label %400

292:                                              ; preds = %282
  store i32 0, ptr %12, align 4, !tbaa !16
  store i32 0, ptr %11, align 4, !tbaa !16
  store i32 0, ptr %7, align 4, !tbaa !16
  br label %293

293:                                              ; preds = %396, %292
  %294 = load i32, ptr %7, align 4, !tbaa !16
  %295 = load ptr, ptr %5, align 8, !tbaa !5
  %296 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %295, i32 0, i32 16
  %297 = load ptr, ptr %296, align 8, !tbaa !9
  %298 = getelementptr inbounds %struct.__SMoptimal, ptr %297, i32 0, i32 14
  %299 = load ptr, ptr %298, align 8, !tbaa !17
  %300 = getelementptr inbounds %struct.__SMactive, ptr %299, i32 0, i32 0
  %301 = load i32, ptr %300, align 8, !tbaa !18
  %302 = icmp slt i32 %294, %301
  br i1 %302, label %303, label %399

303:                                              ; preds = %293
  %304 = load ptr, ptr %5, align 8, !tbaa !5
  %305 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %304, i32 0, i32 16
  %306 = load ptr, ptr %305, align 8, !tbaa !9
  %307 = getelementptr inbounds %struct.__SMoptimal, ptr %306, i32 0, i32 14
  %308 = load ptr, ptr %307, align 8, !tbaa !17
  %309 = getelementptr inbounds %struct.__SMactive, ptr %308, i32 0, i32 2
  %310 = load ptr, ptr %309, align 8, !tbaa !20
  %311 = load i32, ptr %7, align 4, !tbaa !16
  %312 = sext i32 %311 to i64
  %313 = getelementptr inbounds i32, ptr %310, i64 %312
  %314 = load i32, ptr %313, align 4, !tbaa !16
  store i32 %314, ptr %8, align 4, !tbaa !16
  %315 = load i32, ptr %8, align 4, !tbaa !16
  store i32 %315, ptr %9, align 4, !tbaa !16
  %316 = load ptr, ptr %5, align 8, !tbaa !5
  %317 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %316, i32 0, i32 7
  %318 = load ptr, ptr %317, align 8, !tbaa !21
  %319 = load i32, ptr %9, align 4, !tbaa !16
  %320 = sext i32 %319 to i64
  %321 = getelementptr inbounds ptr, ptr %318, i64 %320
  %322 = load ptr, ptr %321, align 8, !tbaa !5
  %323 = getelementptr inbounds i32, ptr %322, i64 0
  %324 = load i32, ptr %323, align 4, !tbaa !16
  store i32 %324, ptr %11, align 4, !tbaa !16
  %325 = load ptr, ptr %5, align 8, !tbaa !5
  %326 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %325, i32 0, i32 7
  %327 = load ptr, ptr %326, align 8, !tbaa !21
  %328 = load i32, ptr %9, align 4, !tbaa !16
  %329 = sext i32 %328 to i64
  %330 = getelementptr inbounds ptr, ptr %327, i64 %329
  %331 = load ptr, ptr %330, align 8, !tbaa !5
  %332 = getelementptr inbounds i32, ptr %331, i64 1
  %333 = load i32, ptr %332, align 4, !tbaa !16
  store i32 %333, ptr %12, align 4, !tbaa !16
  %334 = load ptr, ptr %5, align 8, !tbaa !5
  %335 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %334, i32 0, i32 5
  %336 = getelementptr inbounds [3 x double], ptr %335, i64 0, i64 0
  %337 = load double, ptr %336, align 8, !tbaa !22
  store double %337, ptr %13, align 8, !tbaa !22
  %338 = load ptr, ptr %5, align 8, !tbaa !5
  %339 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %338, i32 0, i32 5
  %340 = getelementptr inbounds [3 x double], ptr %339, i64 0, i64 1
  %341 = load double, ptr %340, align 8, !tbaa !22
  store double %341, ptr %14, align 8, !tbaa !22
  %342 = load ptr, ptr %5, align 8, !tbaa !5
  %343 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %342, i32 0, i32 6
  %344 = load ptr, ptr %343, align 8, !tbaa !23
  %345 = load i32, ptr %11, align 4, !tbaa !16
  %346 = sext i32 %345 to i64
  %347 = getelementptr inbounds ptr, ptr %344, i64 %346
  %348 = load ptr, ptr %347, align 8, !tbaa !5
  %349 = getelementptr inbounds double, ptr %348, i64 0
  %350 = load double, ptr %349, align 8, !tbaa !22
  store double %350, ptr %15, align 8, !tbaa !22
  %351 = load ptr, ptr %5, align 8, !tbaa !5
  %352 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %351, i32 0, i32 6
  %353 = load ptr, ptr %352, align 8, !tbaa !23
  %354 = load i32, ptr %12, align 4, !tbaa !16
  %355 = sext i32 %354 to i64
  %356 = getelementptr inbounds ptr, ptr %353, i64 %355
  %357 = load ptr, ptr %356, align 8, !tbaa !5
  %358 = getelementptr inbounds double, ptr %357, i64 0
  %359 = load double, ptr %358, align 8, !tbaa !22
  store double %359, ptr %16, align 8, !tbaa !22
  %360 = load ptr, ptr %5, align 8, !tbaa !5
  %361 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %360, i32 0, i32 6
  %362 = load ptr, ptr %361, align 8, !tbaa !23
  %363 = load i32, ptr %11, align 4, !tbaa !16
  %364 = sext i32 %363 to i64
  %365 = getelementptr inbounds ptr, ptr %362, i64 %364
  %366 = load ptr, ptr %365, align 8, !tbaa !5
  %367 = getelementptr inbounds double, ptr %366, i64 1
  %368 = load double, ptr %367, align 8, !tbaa !22
  store double %368, ptr %17, align 8, !tbaa !22
  %369 = load ptr, ptr %5, align 8, !tbaa !5
  %370 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %369, i32 0, i32 6
  %371 = load ptr, ptr %370, align 8, !tbaa !23
  %372 = load i32, ptr %12, align 4, !tbaa !16
  %373 = sext i32 %372 to i64
  %374 = getelementptr inbounds ptr, ptr %371, i64 %373
  %375 = load ptr, ptr %374, align 8, !tbaa !5
  %376 = getelementptr inbounds double, ptr %375, i64 1
  %377 = load double, ptr %376, align 8, !tbaa !22
  store double %377, ptr %18, align 8, !tbaa !22
  %378 = load ptr, ptr %4, align 8, !tbaa !5
  %379 = load double, ptr %15, align 8, !tbaa !22
  %380 = load double, ptr %16, align 8, !tbaa !22
  %381 = load double, ptr %17, align 8, !tbaa !22
  %382 = load double, ptr %18, align 8, !tbaa !22
  %383 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %378, ptr noundef @.str.14, double noundef %379, double noundef %380, double noundef %381, double noundef %382) #5
  %384 = load ptr, ptr %4, align 8, !tbaa !5
  %385 = load double, ptr %13, align 8, !tbaa !22
  %386 = load double, ptr %16, align 8, !tbaa !22
  %387 = load double, ptr %14, align 8, !tbaa !22
  %388 = load double, ptr %18, align 8, !tbaa !22
  %389 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %384, ptr noundef @.str.14, double noundef %385, double noundef %386, double noundef %387, double noundef %388) #5
  %390 = load ptr, ptr %4, align 8, !tbaa !5
  %391 = load double, ptr %15, align 8, !tbaa !22
  %392 = load double, ptr %13, align 8, !tbaa !22
  %393 = load double, ptr %17, align 8, !tbaa !22
  %394 = load double, ptr %14, align 8, !tbaa !22
  %395 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %390, ptr noundef @.str.14, double noundef %391, double noundef %392, double noundef %393, double noundef %394) #5
  br label %396

396:                                              ; preds = %303
  %397 = load i32, ptr %7, align 4, !tbaa !16
  %398 = add nsw i32 %397, 1
  store i32 %398, ptr %7, align 4, !tbaa !16
  br label %293, !llvm.loop !26

399:                                              ; preds = %293
  br label %400

400:                                              ; preds = %399, %282
  store i32 0, ptr %6, align 4, !tbaa !16
  store i32 0, ptr %3, align 4
  store i32 1, ptr %28, align 4
  br label %401

401:                                              ; preds = %400, %256, %36, %31
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #5
  %402 = load i32, ptr %3, align 4
  ret i32 %402
}

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind "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 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 = !{!14, !11, i64 44}
!14 = !{!"__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}
!15 = !{!10, !11, i64 8}
!16 = !{!11, !11, i64 0}
!17 = !{!14, !6, i64 80}
!18 = !{!19, !11, i64 0}
!19 = !{!"__SMactive", !11, i64 0, !11, i64 4, !6, i64 8, !12, i64 16}
!20 = !{!19, !6, i64 8}
!21 = !{!10, !6, i64 96}
!22 = !{!12, !12, i64 0}
!23 = !{!10, !6, i64 88}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !25}


; 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.1 = external hidden unnamed_addr constant [113 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [38 x i8], align 1

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

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local i32 @SMwriteActiveSet(ptr noundef %0, ptr noundef readonly %1) local_unnamed_addr #2 {
  %3 = icmp eq ptr %0, null
  br i1 %3, label %4, label %6

4:                                                ; preds = %2
  %5 = tail call i32 @SMerror(i32 noundef 104, ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 56, i32 noundef 0, ptr noundef null) #4
  br label %.loopexit

6:                                                ; preds = %2
  %7 = icmp eq ptr %1, null
  br i1 %7, label %8, label %10

8:                                                ; preds = %6
  %9 = tail call i32 @SMerror(i32 noundef 105, ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 56, i32 noundef 0, ptr noundef null) #4
  br label %.loopexit

10:                                               ; preds = %6
  %11 = getelementptr inbounds i8, ptr %1, i64 160
  %12 = load ptr, ptr %11, align 8, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %12, i64 44
  %14 = load i32, ptr %13, align 4, !tbaa !12
  %15 = getelementptr inbounds i8, ptr %1, i64 8
  %16 = load i32, ptr %15, align 8, !tbaa !14
  %17 = mul nsw i32 %16, 3
  %18 = icmp eq i32 %14, %17
  br i1 %18, label %.preheader118, label %.loopexit119

.preheader118:                                    ; preds = %10
  %19 = getelementptr inbounds i8, ptr %12, i64 80
  %20 = load ptr, ptr %19, align 8, !tbaa !15
  %21 = load i32, ptr %20, align 8, !tbaa !16
  %22 = icmp sgt i32 %21, 0
  br i1 %22, label %.lr.ph, label %.loopexit119

.lr.ph:                                           ; preds = %.preheader118
  %23 = getelementptr inbounds i8, ptr %1, i64 96
  %24 = getelementptr inbounds i8, ptr %1, i64 88
  %25 = getelementptr inbounds i8, ptr %1, i64 64
  %26 = getelementptr inbounds i8, ptr %1, i64 72
  br label %27

27:                                               ; preds = %.lr.ph, %72
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %72 ]
  %28 = phi ptr [ %20, %.lr.ph ], [ %85, %72 ]
  %29 = getelementptr inbounds i8, ptr %28, i64 8
  %30 = load ptr, ptr %29, align 8, !tbaa !18
  %31 = getelementptr inbounds i32, ptr %30, i64 %indvars.iv
  %32 = load i32, ptr %31, align 4, !tbaa !19
  %33 = sdiv i32 %32, 3
  %34 = srem i32 %32, 3
  %35 = load ptr, ptr %23, align 8, !tbaa !20
  %36 = sext i32 %33 to i64
  %37 = getelementptr inbounds ptr, ptr %35, i64 %36
  %38 = load ptr, ptr %37, align 8, !tbaa !21
  %39 = load i32, ptr %38, align 4, !tbaa !19
  %40 = getelementptr inbounds i8, ptr %38, i64 4
  %41 = load i32, ptr %40, align 4, !tbaa !19
  %42 = load ptr, ptr %24, align 8, !tbaa !22
  switch i32 %34, label %57 [
    i32 0, label %43
    i32 1, label %50
  ]

43:                                               ; preds = %27
  %44 = sext i32 %39 to i64
  %45 = getelementptr inbounds ptr, ptr %42, i64 %44
  %46 = load ptr, ptr %45, align 8, !tbaa !21
  %47 = sext i32 %41 to i64
  %48 = getelementptr inbounds ptr, ptr %42, i64 %47
  %49 = getelementptr inbounds i8, ptr %46, i64 8
  br label %64

50:                                               ; preds = %27
  %51 = sext i32 %39 to i64
  %52 = getelementptr inbounds ptr, ptr %42, i64 %51
  %53 = load ptr, ptr %52, align 8, !tbaa !21
  %54 = getelementptr inbounds i8, ptr %53, i64 8
  %55 = sext i32 %41 to i64
  %56 = getelementptr inbounds ptr, ptr %42, i64 %55
  br label %64

57:                                               ; preds = %27
  %58 = sext i32 %41 to i64
  %59 = getelementptr inbounds ptr, ptr %42, i64 %58
  %60 = load ptr, ptr %59, align 8, !tbaa !21
  %61 = getelementptr inbounds i8, ptr %60, i64 8
  %62 = sext i32 %39 to i64
  %63 = getelementptr inbounds ptr, ptr %42, i64 %62
  br label %64

64:                                               ; preds = %50, %57, %43
  %.sink.in = phi ptr [ %56, %50 ], [ %63, %57 ], [ %48, %43 ]
  %.0113.in = phi ptr [ %26, %50 ], [ %26, %57 ], [ %49, %43 ]
  %.0111.in = phi ptr [ %25, %50 ], [ %25, %57 ], [ %46, %43 ]
  %.0110.in = phi ptr [ %54, %50 ], [ %61, %57 ], [ %26, %43 ]
  %.0109.in = phi ptr [ %53, %50 ], [ %60, %57 ], [ %25, %43 ]
  %.sink = load ptr, ptr %.sink.in, align 8, !tbaa !21
  %.0109 = load double, ptr %.0109.in, align 8, !tbaa !23
  %.0111 = load double, ptr %.0111.in, align 8, !tbaa !23
  %.0114 = load double, ptr %.sink, align 8, !tbaa !23
  %65 = fadd double %.0111, %.0114
  %66 = fmul double %65, 5.000000e-01
  %67 = fsub double %.0109, %66
  %68 = tail call double @llvm.fabs.f64(double %67)
  %69 = fcmp olt double %68, 1.000000e-15
  br i1 %69, label %70, label %72

70:                                               ; preds = %64
  %71 = tail call i32 @SMerror(i32 noundef 147, ptr noundef nonnull @.str.11, ptr noundef nonnull @.str.1, ptr noundef nonnull @.str.2, i32 noundef 57, i32 noundef 0, ptr noundef nonnull @.str.12) #4
  br label %.loopexit

72:                                               ; preds = %64
  %73 = getelementptr inbounds i8, ptr %.sink, i64 8
  %.0110 = load double, ptr %.0110.in, align 8, !tbaa !23
  %.0113 = load double, ptr %.0113.in, align 8, !tbaa !23
  %.0112 = load double, ptr %73, align 8, !tbaa !23
  %74 = fadd double %.0113, %.0112
  %75 = fmul double %74, 5.000000e-01
  %76 = fsub double %.0110, %75
  %77 = fdiv double %76, %67
  %78 = fneg double %77
  %79 = tail call double @llvm.fmuladd.f64(double %78, double %66, double %75)
  %80 = tail call double @llvm.fmuladd.f64(double %67, double -1.000000e-01, double %.0109)
  %81 = tail call double @llvm.fmuladd.f64(double %77, double %80, double %79)
  %82 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %0, ptr noundef nonnull @.str.13, double noundef %80, double noundef %81) #4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %83 = load ptr, ptr %11, align 8, !tbaa !5
  %84 = getelementptr inbounds i8, ptr %83, i64 80
  %85 = load ptr, ptr %84, align 8, !tbaa !15
  %86 = load i32, ptr %85, align 8, !tbaa !16
  %87 = sext i32 %86 to i64
  %88 = icmp slt i64 %indvars.iv.next, %87
  br i1 %88, label %27, label %.loopexit119.loopexit, !llvm.loop !24

.loopexit119.loopexit:                            ; preds = %72
  %.phi.trans.insert = getelementptr inbounds i8, ptr %83, i64 44
  %.pre = load i32, ptr %.phi.trans.insert, align 4, !tbaa !12
  %.pre127 = load i32, ptr %15, align 8, !tbaa !14
  br label %.loopexit119

.loopexit119:                                     ; preds = %.loopexit119.loopexit, %.preheader118, %10
  %89 = phi i32 [ %.pre127, %.loopexit119.loopexit ], [ %16, %.preheader118 ], [ %16, %10 ]
  %90 = phi i32 [ %.pre, %.loopexit119.loopexit ], [ %14, %.preheader118 ], [ %14, %10 ]
  %91 = phi ptr [ %83, %.loopexit119.loopexit ], [ %12, %.preheader118 ], [ %12, %10 ]
  %92 = icmp eq i32 %90, %89
  br i1 %92, label %.preheader, label %.loopexit

.preheader:                                       ; preds = %.loopexit119
  %93 = getelementptr inbounds i8, ptr %91, i64 80
  %94 = load ptr, ptr %93, align 8, !tbaa !15
  %95 = load i32, ptr %94, align 8, !tbaa !16
  %96 = icmp sgt i32 %95, 0
  br i1 %96, label %.lr.ph122, label %.loopexit

.lr.ph122:                                        ; preds = %.preheader
  %97 = getelementptr inbounds i8, ptr %1, i64 96
  %98 = getelementptr inbounds i8, ptr %1, i64 64
  %99 = getelementptr inbounds i8, ptr %1, i64 72
  %100 = getelementptr inbounds i8, ptr %1, i64 88
  br label %101

101:                                              ; preds = %.lr.ph122, %101
  %indvars.iv124 = phi i64 [ 0, %.lr.ph122 ], [ %indvars.iv.next125, %101 ]
  %102 = phi ptr [ %94, %.lr.ph122 ], [ %134, %101 ]
  %103 = getelementptr inbounds i8, ptr %102, i64 8
  %104 = load ptr, ptr %103, align 8, !tbaa !18
  %105 = getelementptr inbounds i32, ptr %104, i64 %indvars.iv124
  %106 = load i32, ptr %105, align 4, !tbaa !19
  %107 = load ptr, ptr %97, align 8, !tbaa !20
  %108 = sext i32 %106 to i64
  %109 = getelementptr inbounds ptr, ptr %107, i64 %108
  %110 = load ptr, ptr %109, align 8, !tbaa !21
  %111 = load i32, ptr %110, align 4, !tbaa !19
  %112 = getelementptr inbounds i8, ptr %110, i64 4
  %113 = load i32, ptr %112, align 4, !tbaa !19
  %114 = load double, ptr %98, align 8, !tbaa !23
  %115 = load double, ptr %99, align 8, !tbaa !23
  %116 = load ptr, ptr %100, align 8, !tbaa !22
  %117 = sext i32 %111 to i64
  %118 = getelementptr inbounds ptr, ptr %116, i64 %117
  %119 = load ptr, ptr %118, align 8, !tbaa !21
  %120 = load double, ptr %119, align 8, !tbaa !23
  %121 = sext i32 %113 to i64
  %122 = getelementptr inbounds ptr, ptr %116, i64 %121
  %123 = load ptr, ptr %122, align 8, !tbaa !21
  %124 = load double, ptr %123, align 8, !tbaa !23
  %125 = getelementptr inbounds i8, ptr %119, i64 8
  %126 = load double, ptr %125, align 8, !tbaa !23
  %127 = getelementptr inbounds i8, ptr %123, i64 8
  %128 = load double, ptr %127, align 8, !tbaa !23
  %129 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %0, ptr noundef nonnull @.str.14, double noundef %120, double noundef %124, double noundef %126, double noundef %128) #4
  %130 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %0, ptr noundef nonnull @.str.14, double noundef %114, double noundef %124, double noundef %115, double noundef %128) #4
  %131 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef nonnull %0, ptr noundef nonnull @.str.14, double noundef %120, double noundef %114, double noundef %126, double noundef %115) #4
  %indvars.iv.next125 = add nuw nsw i64 %indvars.iv124, 1
  %132 = load ptr, ptr %11, align 8, !tbaa !5
  %133 = getelementptr inbounds i8, ptr %132, i64 80
  %134 = load ptr, ptr %133, align 8, !tbaa !15
  %135 = load i32, ptr %134, align 8, !tbaa !16
  %136 = sext i32 %135 to i64
  %137 = icmp slt i64 %indvars.iv.next125, %136
  br i1 %137, label %101, label %.loopexit, !llvm.loop !26

.loopexit:                                        ; preds = %101, %.preheader, %.loopexit119, %70, %8, %4
  %.0 = phi i32 [ %5, %4 ], [ %9, %8 ], [ %71, %70 ], [ 0, %.loopexit119 ], [ 0, %.preheader ], [ 0, %101 ]
  ret i32 %.0
}

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

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

attributes #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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 = { mustprogress 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 = !{!13, !7, i64 44}
!13 = !{!"__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}
!14 = !{!6, !7, i64 8}
!15 = !{!13, !10, i64 80}
!16 = !{!17, !7, i64 0}
!17 = !{!"__SMactive", !7, i64 0, !7, i64 4, !10, i64 8, !11, i64 16}
!18 = !{!17, !10, i64 8}
!19 = !{!7, !7, i64 0}
!20 = !{!6, !10, i64 96}
!21 = !{!10, !10, i64 0}
!22 = !{!6, !10, i64 88}
!23 = !{!11, !11, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = distinct !{!26, !25}


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