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

; 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: nounwind uwtable
define dso_local i32 @SMcomputeConstraintMatrix(ptr noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3) #1 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %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 ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %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 double, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  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 4, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 4, 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 8, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #3
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %29, i32 0, i32 7
  %31 = load ptr, ptr %30, align 8, !tbaa !11
  store ptr %31, ptr %17, align 8, !tbaa !5
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %32, i32 0, i32 6
  %34 = load ptr, ptr %33, align 8, !tbaa !14
  store ptr %34, ptr %18, align 8, !tbaa !5
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %35, i32 0, i32 0
  %37 = load i32, ptr %36, align 8, !tbaa !15
  %38 = icmp eq i32 %37, 2
  br i1 %38, label %39, label %125

39:                                               ; preds = %4
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %40

40:                                               ; preds = %121, %39
  %41 = load i32, ptr %10, align 4, !tbaa !9
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %42, i32 0, i32 2
  %44 = load i32, ptr %43, align 8, !tbaa !16
  %45 = icmp slt i32 %41, %44
  br i1 %45, label %46, label %124

46:                                               ; preds = %40
  %47 = load ptr, ptr %17, align 8, !tbaa !5
  %48 = load i32, ptr %10, align 4, !tbaa !9
  %49 = sext i32 %48 to i64
  %50 = getelementptr inbounds ptr, ptr %47, i64 %49
  %51 = load ptr, ptr %50, align 8, !tbaa !5
  %52 = getelementptr inbounds i32, ptr %51, i64 0
  %53 = load i32, ptr %52, align 4, !tbaa !9
  store i32 %53, ptr %11, align 4, !tbaa !9
  %54 = load ptr, ptr %17, align 8, !tbaa !5
  %55 = load i32, ptr %10, align 4, !tbaa !9
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds ptr, ptr %54, i64 %56
  %58 = load ptr, ptr %57, align 8, !tbaa !5
  %59 = getelementptr inbounds i32, ptr %58, i64 1
  %60 = load i32, ptr %59, align 4, !tbaa !9
  store i32 %60, ptr %12, align 4, !tbaa !9
  %61 = load ptr, ptr %18, align 8, !tbaa !5
  %62 = load i32, ptr %11, align 4, !tbaa !9
  %63 = sext i32 %62 to i64
  %64 = getelementptr inbounds ptr, ptr %61, i64 %63
  %65 = load ptr, ptr %64, align 8, !tbaa !5
  %66 = getelementptr inbounds double, ptr %65, i64 0
  %67 = load double, ptr %66, align 8, !tbaa !17
  store double %67, ptr %13, align 8, !tbaa !17
  %68 = load ptr, ptr %18, align 8, !tbaa !5
  %69 = load i32, ptr %11, align 4, !tbaa !9
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds ptr, ptr %68, i64 %70
  %72 = load ptr, ptr %71, align 8, !tbaa !5
  %73 = getelementptr inbounds double, ptr %72, i64 1
  %74 = load double, ptr %73, align 8, !tbaa !17
  store double %74, ptr %15, align 8, !tbaa !17
  %75 = load ptr, ptr %18, align 8, !tbaa !5
  %76 = load i32, ptr %12, align 4, !tbaa !9
  %77 = sext i32 %76 to i64
  %78 = getelementptr inbounds ptr, ptr %75, i64 %77
  %79 = load ptr, ptr %78, align 8, !tbaa !5
  %80 = getelementptr inbounds double, ptr %79, i64 0
  %81 = load double, ptr %80, align 8, !tbaa !17
  store double %81, ptr %14, align 8, !tbaa !17
  %82 = load ptr, ptr %18, align 8, !tbaa !5
  %83 = load i32, ptr %12, align 4, !tbaa !9
  %84 = sext i32 %83 to i64
  %85 = getelementptr inbounds ptr, ptr %82, i64 %84
  %86 = load ptr, ptr %85, align 8, !tbaa !5
  %87 = getelementptr inbounds double, ptr %86, i64 1
  %88 = load double, ptr %87, align 8, !tbaa !17
  store double %88, ptr %16, align 8, !tbaa !17
  %89 = load double, ptr %15, align 8, !tbaa !17
  %90 = load double, ptr %16, align 8, !tbaa !17
  %91 = fsub double %89, %90
  %92 = fmul double 5.000000e-01, %91
  %93 = load ptr, ptr %7, align 8, !tbaa !5
  %94 = load i32, ptr %10, align 4, !tbaa !9
  %95 = sext i32 %94 to i64
  %96 = getelementptr inbounds ptr, ptr %93, i64 %95
  %97 = load ptr, ptr %96, align 8, !tbaa !5
  %98 = getelementptr inbounds double, ptr %97, i64 0
  store double %92, ptr %98, align 8, !tbaa !17
  %99 = load double, ptr %14, align 8, !tbaa !17
  %100 = load double, ptr %13, align 8, !tbaa !17
  %101 = fsub double %99, %100
  %102 = fmul double 5.000000e-01, %101
  %103 = load ptr, ptr %7, align 8, !tbaa !5
  %104 = load i32, ptr %10, align 4, !tbaa !9
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds ptr, ptr %103, i64 %105
  %107 = load ptr, ptr %106, align 8, !tbaa !5
  %108 = getelementptr inbounds double, ptr %107, i64 1
  store double %102, ptr %108, align 8, !tbaa !17
  %109 = load double, ptr %14, align 8, !tbaa !17
  %110 = load double, ptr %15, align 8, !tbaa !17
  %111 = load double, ptr %13, align 8, !tbaa !17
  %112 = load double, ptr %16, align 8, !tbaa !17
  %113 = fmul double %111, %112
  %114 = fneg double %113
  %115 = call double @llvm.fmuladd.f64(double %109, double %110, double %114)
  %116 = fmul double 5.000000e-01, %115
  %117 = load ptr, ptr %8, align 8, !tbaa !5
  %118 = load i32, ptr %10, align 4, !tbaa !9
  %119 = sext i32 %118 to i64
  %120 = getelementptr inbounds double, ptr %117, i64 %119
  store double %116, ptr %120, align 8, !tbaa !17
  br label %121

121:                                              ; preds = %46
  %122 = load i32, ptr %10, align 4, !tbaa !9
  %123 = add nsw i32 %122, 1
  store i32 %123, ptr %10, align 4, !tbaa !9
  br label %40, !llvm.loop !18

124:                                              ; preds = %40
  br label %344

125:                                              ; preds = %4
  %126 = load ptr, ptr %5, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %126, i32 0, i32 0
  %128 = load i32, ptr %127, align 8, !tbaa !15
  %129 = icmp eq i32 %128, 3
  br i1 %129, label %130, label %343

130:                                              ; preds = %125
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %131

131:                                              ; preds = %339, %130
  %132 = load i32, ptr %10, align 4, !tbaa !9
  %133 = load ptr, ptr %5, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.__SMlocal_mesh, ptr %133, i32 0, i32 2
  %135 = load i32, ptr %134, align 8, !tbaa !16
  %136 = icmp slt i32 %132, %135
  br i1 %136, label %137, label %342

137:                                              ; preds = %131
  %138 = load ptr, ptr %17, align 8, !tbaa !5
  %139 = load i32, ptr %10, align 4, !tbaa !9
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds ptr, ptr %138, i64 %140
  %142 = load ptr, ptr %141, align 8, !tbaa !5
  %143 = getelementptr inbounds i32, ptr %142, i64 0
  %144 = load i32, ptr %143, align 4, !tbaa !9
  store i32 %144, ptr %11, align 4, !tbaa !9
  %145 = load ptr, ptr %17, align 8, !tbaa !5
  %146 = load i32, ptr %10, align 4, !tbaa !9
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds ptr, ptr %145, i64 %147
  %149 = load ptr, ptr %148, align 8, !tbaa !5
  %150 = getelementptr inbounds i32, ptr %149, i64 1
  %151 = load i32, ptr %150, align 4, !tbaa !9
  store i32 %151, ptr %12, align 4, !tbaa !9
  %152 = load ptr, ptr %17, align 8, !tbaa !5
  %153 = load i32, ptr %10, align 4, !tbaa !9
  %154 = sext i32 %153 to i64
  %155 = getelementptr inbounds ptr, ptr %152, i64 %154
  %156 = load ptr, ptr %155, align 8, !tbaa !5
  %157 = getelementptr inbounds i32, ptr %156, i64 2
  %158 = load i32, ptr %157, align 4, !tbaa !9
  store i32 %158, ptr %19, align 4, !tbaa !9
  %159 = load ptr, ptr %18, align 8, !tbaa !5
  %160 = load i32, ptr %11, align 4, !tbaa !9
  %161 = sext i32 %160 to i64
  %162 = getelementptr inbounds ptr, ptr %159, i64 %161
  %163 = load ptr, ptr %162, align 8, !tbaa !5
  %164 = getelementptr inbounds double, ptr %163, i64 0
  %165 = load double, ptr %164, align 8, !tbaa !17
  store double %165, ptr %13, align 8, !tbaa !17
  %166 = load ptr, ptr %18, align 8, !tbaa !5
  %167 = load i32, ptr %11, align 4, !tbaa !9
  %168 = sext i32 %167 to i64
  %169 = getelementptr inbounds ptr, ptr %166, i64 %168
  %170 = load ptr, ptr %169, align 8, !tbaa !5
  %171 = getelementptr inbounds double, ptr %170, i64 1
  %172 = load double, ptr %171, align 8, !tbaa !17
  store double %172, ptr %15, align 8, !tbaa !17
  %173 = load ptr, ptr %18, align 8, !tbaa !5
  %174 = load i32, ptr %11, align 4, !tbaa !9
  %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 2
  %179 = load double, ptr %178, align 8, !tbaa !17
  store double %179, ptr %22, align 8, !tbaa !17
  %180 = load ptr, ptr %18, align 8, !tbaa !5
  %181 = load i32, ptr %12, align 4, !tbaa !9
  %182 = sext i32 %181 to i64
  %183 = getelementptr inbounds ptr, ptr %180, i64 %182
  %184 = load ptr, ptr %183, align 8, !tbaa !5
  %185 = getelementptr inbounds double, ptr %184, i64 0
  %186 = load double, ptr %185, align 8, !tbaa !17
  store double %186, ptr %14, align 8, !tbaa !17
  %187 = load ptr, ptr %18, align 8, !tbaa !5
  %188 = load i32, ptr %12, align 4, !tbaa !9
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds ptr, ptr %187, i64 %189
  %191 = load ptr, ptr %190, align 8, !tbaa !5
  %192 = getelementptr inbounds double, ptr %191, i64 1
  %193 = load double, ptr %192, align 8, !tbaa !17
  store double %193, ptr %16, align 8, !tbaa !17
  %194 = load ptr, ptr %18, align 8, !tbaa !5
  %195 = load i32, ptr %12, align 4, !tbaa !9
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds ptr, ptr %194, i64 %196
  %198 = load ptr, ptr %197, align 8, !tbaa !5
  %199 = getelementptr inbounds double, ptr %198, i64 2
  %200 = load double, ptr %199, align 8, !tbaa !17
  store double %200, ptr %23, align 8, !tbaa !17
  %201 = load ptr, ptr %18, align 8, !tbaa !5
  %202 = load i32, ptr %19, align 4, !tbaa !9
  %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 0
  %207 = load double, ptr %206, align 8, !tbaa !17
  store double %207, ptr %20, align 8, !tbaa !17
  %208 = load ptr, ptr %18, align 8, !tbaa !5
  %209 = load i32, ptr %19, align 4, !tbaa !9
  %210 = sext i32 %209 to i64
  %211 = getelementptr inbounds ptr, ptr %208, i64 %210
  %212 = load ptr, ptr %211, align 8, !tbaa !5
  %213 = getelementptr inbounds double, ptr %212, i64 1
  %214 = load double, ptr %213, align 8, !tbaa !17
  store double %214, ptr %21, align 8, !tbaa !17
  %215 = load ptr, ptr %18, align 8, !tbaa !5
  %216 = load i32, ptr %19, align 4, !tbaa !9
  %217 = sext i32 %216 to i64
  %218 = getelementptr inbounds ptr, ptr %215, i64 %217
  %219 = load ptr, ptr %218, align 8, !tbaa !5
  %220 = getelementptr inbounds double, ptr %219, i64 2
  %221 = load double, ptr %220, align 8, !tbaa !17
  store double %221, ptr %24, align 8, !tbaa !17
  %222 = load double, ptr %13, align 8, !tbaa !17
  %223 = load double, ptr %16, align 8, !tbaa !17
  %224 = load double, ptr %24, align 8, !tbaa !17
  %225 = load double, ptr %23, align 8, !tbaa !17
  %226 = load double, ptr %21, align 8, !tbaa !17
  %227 = fmul double %225, %226
  %228 = fneg double %227
  %229 = call double @llvm.fmuladd.f64(double %223, double %224, double %228)
  %230 = load double, ptr %14, align 8, !tbaa !17
  %231 = load double, ptr %15, align 8, !tbaa !17
  %232 = load double, ptr %24, align 8, !tbaa !17
  %233 = load double, ptr %21, align 8, !tbaa !17
  %234 = load double, ptr %22, align 8, !tbaa !17
  %235 = fmul double %233, %234
  %236 = fneg double %235
  %237 = call double @llvm.fmuladd.f64(double %231, double %232, double %236)
  %238 = fmul double %230, %237
  %239 = fneg double %238
  %240 = call double @llvm.fmuladd.f64(double %222, double %229, double %239)
  %241 = load double, ptr %20, align 8, !tbaa !17
  %242 = load double, ptr %15, align 8, !tbaa !17
  %243 = load double, ptr %23, align 8, !tbaa !17
  %244 = load double, ptr %22, align 8, !tbaa !17
  %245 = load double, ptr %16, align 8, !tbaa !17
  %246 = fmul double %244, %245
  %247 = fneg double %246
  %248 = call double @llvm.fmuladd.f64(double %242, double %243, double %247)
  %249 = call double @llvm.fmuladd.f64(double %241, double %248, double %240)
  store double %249, ptr %25, align 8, !tbaa !17
  %250 = load double, ptr %16, align 8, !tbaa !17
  %251 = load double, ptr %24, align 8, !tbaa !17
  %252 = load double, ptr %23, align 8, !tbaa !17
  %253 = load double, ptr %21, align 8, !tbaa !17
  %254 = fmul double %252, %253
  %255 = fneg double %254
  %256 = call double @llvm.fmuladd.f64(double %250, double %251, double %255)
  %257 = load double, ptr %15, align 8, !tbaa !17
  %258 = load double, ptr %24, align 8, !tbaa !17
  %259 = load double, ptr %21, align 8, !tbaa !17
  %260 = load double, ptr %22, align 8, !tbaa !17
  %261 = fmul double %259, %260
  %262 = fneg double %261
  %263 = call double @llvm.fmuladd.f64(double %257, double %258, double %262)
  %264 = fsub double %256, %263
  %265 = load double, ptr %15, align 8, !tbaa !17
  %266 = load double, ptr %23, align 8, !tbaa !17
  %267 = load double, ptr %16, align 8, !tbaa !17
  %268 = load double, ptr %22, align 8, !tbaa !17
  %269 = fmul double %267, %268
  %270 = fneg double %269
  %271 = call double @llvm.fmuladd.f64(double %265, double %266, double %270)
  %272 = fadd double %264, %271
  store double %272, ptr %26, align 8, !tbaa !17
  %273 = load double, ptr %13, align 8, !tbaa !17
  %274 = load double, ptr %24, align 8, !tbaa !17
  %275 = load double, ptr %23, align 8, !tbaa !17
  %276 = fsub double %274, %275
  %277 = load double, ptr %14, align 8, !tbaa !17
  %278 = load double, ptr %24, align 8, !tbaa !17
  %279 = load double, ptr %22, align 8, !tbaa !17
  %280 = fsub double %278, %279
  %281 = fmul double %277, %280
  %282 = fneg double %281
  %283 = call double @llvm.fmuladd.f64(double %273, double %276, double %282)
  %284 = load double, ptr %20, align 8, !tbaa !17
  %285 = load double, ptr %23, align 8, !tbaa !17
  %286 = load double, ptr %22, align 8, !tbaa !17
  %287 = fsub double %285, %286
  %288 = call double @llvm.fmuladd.f64(double %284, double %287, double %283)
  store double %288, ptr %27, align 8, !tbaa !17
  %289 = load double, ptr %13, align 8, !tbaa !17
  %290 = load double, ptr %16, align 8, !tbaa !17
  %291 = load double, ptr %21, align 8, !tbaa !17
  %292 = fsub double %290, %291
  %293 = load double, ptr %14, align 8, !tbaa !17
  %294 = load double, ptr %15, align 8, !tbaa !17
  %295 = load double, ptr %21, align 8, !tbaa !17
  %296 = fsub double %294, %295
  %297 = fmul double %293, %296
  %298 = fneg double %297
  %299 = call double @llvm.fmuladd.f64(double %289, double %292, double %298)
  %300 = load double, ptr %20, align 8, !tbaa !17
  %301 = load double, ptr %15, align 8, !tbaa !17
  %302 = load double, ptr %16, align 8, !tbaa !17
  %303 = fsub double %301, %302
  %304 = call double @llvm.fmuladd.f64(double %300, double %303, double %299)
  store double %304, ptr %28, align 8, !tbaa !17
  %305 = load double, ptr %26, align 8, !tbaa !17
  %306 = fneg double %305
  %307 = fdiv double %306, 6.000000e+00
  %308 = load ptr, ptr %7, align 8, !tbaa !5
  %309 = load i32, ptr %10, align 4, !tbaa !9
  %310 = sext i32 %309 to i64
  %311 = getelementptr inbounds ptr, ptr %308, i64 %310
  %312 = load ptr, ptr %311, align 8, !tbaa !5
  %313 = getelementptr inbounds double, ptr %312, i64 0
  store double %307, ptr %313, align 8, !tbaa !17
  %314 = load double, ptr %27, align 8, !tbaa !17
  %315 = fneg double %314
  %316 = fdiv double %315, 6.000000e+00
  %317 = load ptr, ptr %7, align 8, !tbaa !5
  %318 = load i32, ptr %10, align 4, !tbaa !9
  %319 = sext i32 %318 to i64
  %320 = getelementptr inbounds ptr, ptr %317, i64 %319
  %321 = load ptr, ptr %320, align 8, !tbaa !5
  %322 = getelementptr inbounds double, ptr %321, i64 1
  store double %316, ptr %322, align 8, !tbaa !17
  %323 = load double, ptr %28, align 8, !tbaa !17
  %324 = fneg double %323
  %325 = fdiv double %324, 6.000000e+00
  %326 = load ptr, ptr %7, align 8, !tbaa !5
  %327 = load i32, ptr %10, align 4, !tbaa !9
  %328 = sext i32 %327 to i64
  %329 = getelementptr inbounds ptr, ptr %326, i64 %328
  %330 = load ptr, ptr %329, align 8, !tbaa !5
  %331 = getelementptr inbounds double, ptr %330, i64 2
  store double %325, ptr %331, align 8, !tbaa !17
  %332 = load double, ptr %25, align 8, !tbaa !17
  %333 = fneg double %332
  %334 = fdiv double %333, 6.000000e+00
  %335 = load ptr, ptr %8, align 8, !tbaa !5
  %336 = load i32, ptr %10, align 4, !tbaa !9
  %337 = sext i32 %336 to i64
  %338 = getelementptr inbounds double, ptr %335, i64 %337
  store double %334, ptr %338, align 8, !tbaa !17
  br label %339

339:                                              ; preds = %137
  %340 = load i32, ptr %10, align 4, !tbaa !9
  %341 = add nsw i32 %340, 1
  store i32 %341, ptr %10, align 4, !tbaa !9
  br label %131, !llvm.loop !20

342:                                              ; preds = %131
  br label %343

343:                                              ; preds = %342, %125
  br label %344

344:                                              ; preds = %343, %124
  store i32 0, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, 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 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  ret i32 0
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { nounwind }

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

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


; 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: nofree norecurse nosync nounwind memory(readwrite, inaccessiblemem: none) uwtable
define dso_local noundef i32 @SMcomputeConstraintMatrix(ptr nocapture noundef readonly %0, i32 noundef %1, ptr nocapture noundef readonly %2, ptr nocapture noundef writeonly %3) local_unnamed_addr #0 {
  %5 = getelementptr inbounds i8, ptr %0, i64 96
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 88
  %8 = load ptr, ptr %7, align 8, !tbaa !12
  %9 = load i32, ptr %0, align 8, !tbaa !13
  switch i32 %9, label %.loopexit [
    i32 2, label %.preheader
    i32 3, label %.preheader117
  ]

.preheader117:                                    ; preds = %4
  %10 = getelementptr inbounds i8, ptr %0, i64 8
  %11 = load i32, ptr %10, align 8, !tbaa !14
  %12 = icmp sgt i32 %11, 0
  br i1 %12, label %.lr.ph.preheader, label %.loopexit

.lr.ph.preheader:                                 ; preds = %.preheader117
  %wide.trip.count = zext nneg i32 %11 to i64
  br label %.lr.ph

.preheader:                                       ; preds = %4
  %13 = getelementptr inbounds i8, ptr %0, i64 8
  %14 = load i32, ptr %13, align 8, !tbaa !14
  %15 = icmp sgt i32 %14, 0
  br i1 %15, label %.lr.ph121.preheader, label %.loopexit

.lr.ph121.preheader:                              ; preds = %.preheader
  %wide.trip.count127 = zext nneg i32 %14 to i64
  br label %.lr.ph121

.lr.ph121:                                        ; preds = %.lr.ph121.preheader, %.lr.ph121
  %indvars.iv124 = phi i64 [ 0, %.lr.ph121.preheader ], [ %indvars.iv.next125, %.lr.ph121 ]
  %16 = getelementptr inbounds ptr, ptr %6, i64 %indvars.iv124
  %17 = load ptr, ptr %16, align 8, !tbaa !15
  %18 = load i32, ptr %17, align 4, !tbaa !16
  %19 = getelementptr inbounds i8, ptr %17, i64 4
  %20 = load i32, ptr %19, align 4, !tbaa !16
  %21 = sext i32 %18 to i64
  %22 = getelementptr inbounds ptr, ptr %8, i64 %21
  %23 = load ptr, ptr %22, align 8, !tbaa !15
  %24 = load double, ptr %23, align 8, !tbaa !17
  %25 = getelementptr inbounds i8, ptr %23, i64 8
  %26 = load double, ptr %25, align 8, !tbaa !17
  %27 = sext i32 %20 to i64
  %28 = getelementptr inbounds ptr, ptr %8, i64 %27
  %29 = load ptr, ptr %28, align 8, !tbaa !15
  %30 = load double, ptr %29, align 8, !tbaa !17
  %31 = getelementptr inbounds i8, ptr %29, i64 8
  %32 = load double, ptr %31, align 8, !tbaa !17
  %33 = getelementptr inbounds ptr, ptr %2, i64 %indvars.iv124
  %34 = load ptr, ptr %33, align 8, !tbaa !15
  %35 = insertelement <2 x double> poison, double %26, i64 0
  %36 = insertelement <2 x double> %35, double %30, i64 1
  %37 = insertelement <2 x double> poison, double %32, i64 0
  %38 = insertelement <2 x double> %37, double %24, i64 1
  %39 = fsub <2 x double> %36, %38
  %40 = fmul <2 x double> %39, <double 5.000000e-01, double 5.000000e-01>
  store <2 x double> %40, ptr %34, align 8, !tbaa !17
  %41 = fneg double %24
  %42 = fmul double %32, %41
  %43 = tail call double @llvm.fmuladd.f64(double %30, double %26, double %42)
  %44 = fmul double %43, 5.000000e-01
  %45 = getelementptr inbounds double, ptr %3, i64 %indvars.iv124
  store double %44, ptr %45, align 8, !tbaa !17
  %indvars.iv.next125 = add nuw nsw i64 %indvars.iv124, 1
  %exitcond128.not = icmp eq i64 %indvars.iv.next125, %wide.trip.count127
  br i1 %exitcond128.not, label %.loopexit, label %.lr.ph121, !llvm.loop !18

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %46 = getelementptr inbounds ptr, ptr %6, i64 %indvars.iv
  %47 = load ptr, ptr %46, align 8, !tbaa !15
  %48 = load i32, ptr %47, align 4, !tbaa !16
  %49 = getelementptr inbounds i8, ptr %47, i64 4
  %50 = load i32, ptr %49, align 4, !tbaa !16
  %51 = getelementptr inbounds i8, ptr %47, i64 8
  %52 = load i32, ptr %51, align 4, !tbaa !16
  %53 = sext i32 %48 to i64
  %54 = getelementptr inbounds ptr, ptr %8, i64 %53
  %55 = load ptr, ptr %54, align 8, !tbaa !15
  %56 = load double, ptr %55, align 8, !tbaa !17
  %57 = getelementptr inbounds i8, ptr %55, i64 8
  %58 = load double, ptr %57, align 8, !tbaa !17
  %59 = getelementptr inbounds i8, ptr %55, i64 16
  %60 = load double, ptr %59, align 8, !tbaa !17
  %61 = sext i32 %50 to i64
  %62 = getelementptr inbounds ptr, ptr %8, i64 %61
  %63 = load ptr, ptr %62, align 8, !tbaa !15
  %64 = load double, ptr %63, align 8, !tbaa !17
  %65 = getelementptr inbounds i8, ptr %63, i64 8
  %66 = load double, ptr %65, align 8, !tbaa !17
  %67 = getelementptr inbounds i8, ptr %63, i64 16
  %68 = load double, ptr %67, align 8, !tbaa !17
  %69 = sext i32 %52 to i64
  %70 = getelementptr inbounds ptr, ptr %8, i64 %69
  %71 = load ptr, ptr %70, align 8, !tbaa !15
  %72 = load double, ptr %71, align 8, !tbaa !17
  %73 = getelementptr inbounds i8, ptr %71, i64 8
  %74 = load double, ptr %73, align 8, !tbaa !17
  %75 = getelementptr inbounds i8, ptr %71, i64 16
  %76 = load double, ptr %75, align 8, !tbaa !17
  %77 = insertelement <2 x double> poison, double %68, i64 0
  %78 = insertelement <2 x double> %77, double %74, i64 1
  %79 = fneg <2 x double> %78
  %80 = insertelement <2 x double> poison, double %74, i64 0
  %81 = insertelement <2 x double> %80, double %60, i64 1
  %82 = fmul <2 x double> %81, %79
  %83 = insertelement <2 x double> poison, double %66, i64 0
  %84 = insertelement <2 x double> %83, double %58, i64 1
  %85 = insertelement <2 x double> poison, double %76, i64 0
  %86 = shufflevector <2 x double> %85, <2 x double> poison, <2 x i32> zeroinitializer
  %87 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %84, <2 x double> %86, <2 x double> %82)
  %88 = fneg double %64
  %89 = extractelement <2 x double> %87, i64 1
  %90 = fmul double %89, %88
  %91 = extractelement <2 x double> %87, i64 0
  %92 = tail call double @llvm.fmuladd.f64(double %56, double %91, double %90)
  %93 = fneg double %60
  %94 = fmul double %66, %93
  %95 = tail call double @llvm.fmuladd.f64(double %58, double %68, double %94)
  %96 = tail call double @llvm.fmuladd.f64(double %72, double %95, double %92)
  %97 = fsub double %91, %89
  %98 = fadd double %95, %97
  %99 = fsub double %76, %68
  %100 = fsub double %76, %60
  %101 = fmul double %100, %88
  %102 = tail call double @llvm.fmuladd.f64(double %56, double %99, double %101)
  %103 = fsub double %68, %60
  %104 = tail call double @llvm.fmuladd.f64(double %72, double %103, double %102)
  %105 = fsub double %66, %74
  %106 = fsub double %58, %74
  %107 = fmul double %106, %88
  %108 = tail call double @llvm.fmuladd.f64(double %56, double %105, double %107)
  %109 = fsub double %58, %66
  %110 = tail call double @llvm.fmuladd.f64(double %72, double %109, double %108)
  %111 = getelementptr inbounds ptr, ptr %2, i64 %indvars.iv
  %112 = load ptr, ptr %111, align 8, !tbaa !15
  %113 = insertelement <2 x double> poison, double %98, i64 0
  %114 = insertelement <2 x double> %113, double %104, i64 1
  %115 = fdiv <2 x double> %114, <double -6.000000e+00, double -6.000000e+00>
  store <2 x double> %115, ptr %112, align 8, !tbaa !17
  %116 = fdiv double %110, -6.000000e+00
  %117 = getelementptr inbounds i8, ptr %112, i64 16
  store double %116, ptr %117, align 8, !tbaa !17
  %118 = fdiv double %96, -6.000000e+00
  %119 = getelementptr inbounds double, ptr %3, i64 %indvars.iv
  store double %118, ptr %119, align 8, !tbaa !17
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit, label %.lr.ph, !llvm.loop !20

.loopexit:                                        ; preds = %.lr.ph, %.lr.ph121, %.preheader117, %.preheader, %4
  ret i32 0
}

; Function Attrs: mustprogress 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 <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #2

attributes #0 = { nofree norecurse nosync nounwind memory(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 #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

!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 96}
!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 = !{!6, !10, i64 88}
!13 = !{!6, !7, i64 0}
!14 = !{!6, !7, i64 8}
!15 = !{!10, !10, i64 0}
!16 = !{!7, !7, i64 0}
!17 = !{!11, !11, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass