; LLVM IR from InsightSoftwareConsortium/ITK :: Modules/ThirdParty/VNL/src/vxl/v3p/netlib/sparse (spFactor)

; 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.MatrixFrame = type { double, i32, i32, i32, i32, ptr, ptr, ptr, i32, i32, i32, ptr, ptr, i32, i32, ptr, ptr, i64, ptr, i32, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32, i8, i32, double, i32, i32, i32, i32, i32, i32, %struct.MatrixElement, ptr, i32, ptr, i32, ptr, i32, ptr, ptr }
%struct.MatrixElement = type { double, i32, i32, ptr, ptr, ptr }

@stdout = external global ptr, align 8
@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [66 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [123 x i8], align 1
@spcMatrixIsNotValid = external global [0 x i8], align 1
@spcErrorsMustBeCleared = external global [0 x i8], align 1
@spcMatrixMustNotBeFactored = external global [0 x i8], align 1

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

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

declare i32 @fflush(ptr noundef) #2

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

; Function Attrs: noreturn nounwind
declare void @abort() #4

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

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

16:                                               ; preds = %1
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.MatrixFrame, ptr %17, i32 0, i32 17
  %19 = load i64, ptr %18, align 8, !tbaa !9
  %20 = icmp eq i64 %19, 3735928559
  br i1 %20, label %28, label %21

21:                                               ; preds = %16, %1
  %22 = load ptr, ptr @stdout, align 8, !tbaa !5
  %23 = call i32 @fflush(ptr noundef %22)
  %24 = load ptr, ptr @stderr, align 8, !tbaa !5
  %25 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %24, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 347, ptr noundef @spcMatrixIsNotValid) #6
  %26 = load ptr, ptr @stderr, align 8, !tbaa !5
  %27 = call i32 @fflush(ptr noundef %26)
  call void @abort() #7
  unreachable

28:                                               ; preds = %16
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.MatrixFrame, ptr %29, i32 0, i32 9
  %31 = load i32, ptr %30, align 4, !tbaa !15
  %32 = icmp sge i32 %31, 0
  br i1 %32, label %33, label %38

33:                                               ; preds = %28
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.MatrixFrame, ptr %34, i32 0, i32 9
  %36 = load i32, ptr %35, align 4, !tbaa !15
  %37 = icmp slt i32 %36, 2
  br i1 %37, label %45, label %38

38:                                               ; preds = %33, %28
  %39 = load ptr, ptr @stdout, align 8, !tbaa !5
  %40 = call i32 @fflush(ptr noundef %39)
  %41 = load ptr, ptr @stderr, align 8, !tbaa !5
  %42 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %41, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 348, ptr noundef @spcErrorsMustBeCleared) #6
  %43 = load ptr, ptr @stderr, align 8, !tbaa !5
  %44 = call i32 @fflush(ptr noundef %43)
  call void @abort() #7
  unreachable

45:                                               ; preds = %33
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.MatrixFrame, ptr %46, i32 0, i32 13
  %48 = load i32, ptr %47, align 8, !tbaa !16
  %49 = icmp ne i32 %48, 0
  br i1 %49, label %50, label %57

50:                                               ; preds = %45
  %51 = load ptr, ptr @stdout, align 8, !tbaa !5
  %52 = call i32 @fflush(ptr noundef %51)
  %53 = load ptr, ptr @stderr, align 8, !tbaa !5
  %54 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %53, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 349, ptr noundef @spcMatrixMustNotBeFactored) #6
  %55 = load ptr, ptr @stderr, align 8, !tbaa !5
  %56 = call i32 @fflush(ptr noundef %55)
  call void @abort() #7
  unreachable

57:                                               ; preds = %45
  %58 = load ptr, ptr %4, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.MatrixFrame, ptr %58, i32 0, i32 26
  %60 = load i32, ptr %59, align 4, !tbaa !17
  %61 = icmp ne i32 %60, 0
  br i1 %61, label %62, label %65

62:                                               ; preds = %57
  %63 = load ptr, ptr %3, align 8, !tbaa !5
  %64 = call i32 @spOrderAndFactor(ptr noundef %63, ptr noundef null, double noundef 0.000000e+00, double noundef 0.000000e+00, i32 noundef 1)
  store i32 %64, ptr %2, align 4
  store i32 1, ptr %10, align 4
  br label %391

65:                                               ; preds = %57
  %66 = load ptr, ptr %4, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.MatrixFrame, ptr %66, i32 0, i32 28
  %68 = load i32, ptr %67, align 4, !tbaa !18
  %69 = icmp ne i32 %68, 0
  br i1 %69, label %72, label %70

70:                                               ; preds = %65
  %71 = load ptr, ptr %3, align 8, !tbaa !5
  call void @spPartition(ptr noundef %71, i32 noundef 0)
  br label %72

72:                                               ; preds = %70, %65
  %73 = load ptr, ptr %4, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.MatrixFrame, ptr %73, i32 0, i32 39
  %75 = load i32, ptr %74, align 4, !tbaa !19
  store i32 %75, ptr %8, align 4, !tbaa !20
  %76 = load ptr, ptr %4, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.MatrixFrame, ptr %76, i32 0, i32 5
  %78 = load ptr, ptr %77, align 8, !tbaa !21
  %79 = getelementptr inbounds ptr, ptr %78, i64 1
  %80 = load ptr, ptr %79, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.MatrixElement, ptr %80, i32 0, i32 0
  %82 = load double, ptr %81, align 8, !tbaa !22
  %83 = fcmp oeq double %82, 0.000000e+00
  br i1 %83, label %84, label %87

84:                                               ; preds = %72
  %85 = load ptr, ptr %4, align 8, !tbaa !5
  %86 = call i32 @ZeroPivot(ptr noundef %85, i32 noundef 1)
  store i32 %86, ptr %2, align 4
  store i32 1, ptr %10, align 4
  br label %391

87:                                               ; preds = %72
  %88 = load ptr, ptr %4, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.MatrixFrame, ptr %88, i32 0, i32 5
  %90 = load ptr, ptr %89, align 8, !tbaa !21
  %91 = getelementptr inbounds ptr, ptr %90, i64 1
  %92 = load ptr, ptr %91, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.MatrixElement, ptr %92, i32 0, i32 0
  %94 = load double, ptr %93, align 8, !tbaa !22
  %95 = fdiv double 1.000000e+00, %94
  %96 = load ptr, ptr %4, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.MatrixFrame, ptr %96, i32 0, i32 5
  %98 = load ptr, ptr %97, align 8, !tbaa !21
  %99 = getelementptr inbounds ptr, ptr %98, i64 1
  %100 = load ptr, ptr %99, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.MatrixElement, ptr %100, i32 0, i32 0
  store double %95, ptr %101, align 8, !tbaa !22
  store i32 2, ptr %7, align 4, !tbaa !20
  br label %102

102:                                              ; preds = %383, %87
  %103 = load i32, ptr %7, align 4, !tbaa !20
  %104 = load i32, ptr %8, align 4, !tbaa !20
  %105 = icmp sle i32 %103, %104
  br i1 %105, label %106, label %386

106:                                              ; preds = %102
  %107 = load ptr, ptr %4, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.MatrixFrame, ptr %107, i32 0, i32 7
  %109 = load ptr, ptr %108, align 8, !tbaa !23
  %110 = load i32, ptr %7, align 4, !tbaa !20
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds i32, ptr %109, i64 %111
  %113 = load i32, ptr %112, align 4, !tbaa !20
  %114 = icmp ne i32 %113, 0
  br i1 %114, label %115, label %259

115:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %116 = load ptr, ptr %4, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.MatrixFrame, ptr %116, i32 0, i32 18
  %118 = load ptr, ptr %117, align 8, !tbaa !24
  store ptr %118, ptr %11, align 8, !tbaa !5
  %119 = load ptr, ptr %4, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.MatrixFrame, ptr %119, i32 0, i32 15
  %121 = load ptr, ptr %120, align 8, !tbaa !25
  %122 = load i32, ptr %7, align 4, !tbaa !20
  %123 = sext i32 %122 to i64
  %124 = getelementptr inbounds ptr, ptr %121, i64 %123
  %125 = load ptr, ptr %124, align 8, !tbaa !5
  store ptr %125, ptr %5, align 8, !tbaa !5
  br label %126

126:                                              ; preds = %129, %115
  %127 = load ptr, ptr %5, align 8, !tbaa !5
  %128 = icmp ne ptr %127, null
  br i1 %128, label %129, label %142

129:                                              ; preds = %126
  %130 = load ptr, ptr %5, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.MatrixElement, ptr %130, i32 0, i32 0
  %132 = load double, ptr %131, align 8, !tbaa !22
  %133 = load ptr, ptr %11, align 8, !tbaa !5
  %134 = load ptr, ptr %5, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.MatrixElement, ptr %134, i32 0, i32 1
  %136 = load i32, ptr %135, align 8, !tbaa !26
  %137 = sext i32 %136 to i64
  %138 = getelementptr inbounds double, ptr %133, i64 %137
  store double %132, ptr %138, align 8, !tbaa !27
  %139 = load ptr, ptr %5, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.MatrixElement, ptr %139, i32 0, i32 4
  %141 = load ptr, ptr %140, align 8, !tbaa !28
  store ptr %141, ptr %5, align 8, !tbaa !5
  br label %126, !llvm.loop !29

142:                                              ; preds = %126
  %143 = load ptr, ptr %4, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.MatrixFrame, ptr %143, i32 0, i32 15
  %145 = load ptr, ptr %144, align 8, !tbaa !25
  %146 = load i32, ptr %7, align 4, !tbaa !20
  %147 = sext i32 %146 to i64
  %148 = getelementptr inbounds ptr, ptr %145, i64 %147
  %149 = load ptr, ptr %148, align 8, !tbaa !5
  store ptr %149, ptr %6, align 8, !tbaa !5
  br label %150

150:                                              ; preds = %200, %142
  %151 = load ptr, ptr %6, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.MatrixElement, ptr %151, i32 0, i32 1
  %153 = load i32, ptr %152, align 8, !tbaa !26
  %154 = load i32, ptr %7, align 4, !tbaa !20
  %155 = icmp slt i32 %153, %154
  br i1 %155, label %156, label %204

156:                                              ; preds = %150
  %157 = load ptr, ptr %4, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.MatrixFrame, ptr %157, i32 0, i32 5
  %159 = load ptr, ptr %158, align 8, !tbaa !21
  %160 = load ptr, ptr %6, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.MatrixElement, ptr %160, i32 0, i32 1
  %162 = load i32, ptr %161, align 8, !tbaa !26
  %163 = sext i32 %162 to i64
  %164 = getelementptr inbounds ptr, ptr %159, i64 %163
  %165 = load ptr, ptr %164, align 8, !tbaa !5
  store ptr %165, ptr %5, align 8, !tbaa !5
  %166 = load ptr, ptr %11, align 8, !tbaa !5
  %167 = load ptr, ptr %6, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.MatrixElement, ptr %167, i32 0, i32 1
  %169 = load i32, ptr %168, align 8, !tbaa !26
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds double, ptr %166, i64 %170
  %172 = load double, ptr %171, align 8, !tbaa !27
  %173 = load ptr, ptr %5, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.MatrixElement, ptr %173, i32 0, i32 0
  %175 = load double, ptr %174, align 8, !tbaa !22
  %176 = fmul double %172, %175
  %177 = load ptr, ptr %6, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.MatrixElement, ptr %177, i32 0, i32 0
  store double %176, ptr %178, align 8, !tbaa !22
  br label %179

179:                                              ; preds = %184, %156
  %180 = load ptr, ptr %5, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.MatrixElement, ptr %180, i32 0, i32 4
  %182 = load ptr, ptr %181, align 8, !tbaa !28
  store ptr %182, ptr %5, align 8, !tbaa !5
  %183 = icmp ne ptr %182, null
  br i1 %183, label %184, label %200

184:                                              ; preds = %179
  %185 = load ptr, ptr %6, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.MatrixElement, ptr %185, i32 0, i32 0
  %187 = load double, ptr %186, align 8, !tbaa !22
  %188 = load ptr, ptr %5, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.MatrixElement, ptr %188, i32 0, i32 0
  %190 = load double, ptr %189, align 8, !tbaa !22
  %191 = load ptr, ptr %11, align 8, !tbaa !5
  %192 = load ptr, ptr %5, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.MatrixElement, ptr %192, i32 0, i32 1
  %194 = load i32, ptr %193, align 8, !tbaa !26
  %195 = sext i32 %194 to i64
  %196 = getelementptr inbounds double, ptr %191, i64 %195
  %197 = load double, ptr %196, align 8, !tbaa !27
  %198 = fneg double %187
  %199 = call double @llvm.fmuladd.f64(double %198, double %190, double %197)
  store double %199, ptr %196, align 8, !tbaa !27
  br label %179, !llvm.loop !31

200:                                              ; preds = %179
  %201 = load ptr, ptr %6, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.MatrixElement, ptr %201, i32 0, i32 4
  %203 = load ptr, ptr %202, align 8, !tbaa !28
  store ptr %203, ptr %6, align 8, !tbaa !5
  br label %150, !llvm.loop !32

204:                                              ; preds = %150
  %205 = load ptr, ptr %4, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct.MatrixFrame, ptr %205, i32 0, i32 5
  %207 = load ptr, ptr %206, align 8, !tbaa !21
  %208 = load i32, ptr %7, align 4, !tbaa !20
  %209 = sext i32 %208 to i64
  %210 = getelementptr inbounds ptr, ptr %207, i64 %209
  %211 = load ptr, ptr %210, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.MatrixElement, ptr %211, i32 0, i32 4
  %213 = load ptr, ptr %212, align 8, !tbaa !28
  store ptr %213, ptr %5, align 8, !tbaa !5
  br label %214

214:                                              ; preds = %217, %204
  %215 = load ptr, ptr %5, align 8, !tbaa !5
  %216 = icmp ne ptr %215, null
  br i1 %216, label %217, label %230

217:                                              ; preds = %214
  %218 = load ptr, ptr %11, align 8, !tbaa !5
  %219 = load ptr, ptr %5, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.MatrixElement, ptr %219, i32 0, i32 1
  %221 = load i32, ptr %220, align 8, !tbaa !26
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds double, ptr %218, i64 %222
  %224 = load double, ptr %223, align 8, !tbaa !27
  %225 = load ptr, ptr %5, align 8, !tbaa !5
  %226 = getelementptr inbounds %struct.MatrixElement, ptr %225, i32 0, i32 0
  store double %224, ptr %226, align 8, !tbaa !22
  %227 = load ptr, ptr %5, align 8, !tbaa !5
  %228 = getelementptr inbounds %struct.MatrixElement, ptr %227, i32 0, i32 4
  %229 = load ptr, ptr %228, align 8, !tbaa !28
  store ptr %229, ptr %5, align 8, !tbaa !5
  br label %214, !llvm.loop !33

230:                                              ; preds = %214
  %231 = load ptr, ptr %11, align 8, !tbaa !5
  %232 = load i32, ptr %7, align 4, !tbaa !20
  %233 = sext i32 %232 to i64
  %234 = getelementptr inbounds double, ptr %231, i64 %233
  %235 = load double, ptr %234, align 8, !tbaa !27
  %236 = fcmp oeq double %235, 0.000000e+00
  br i1 %236, label %237, label %241

237:                                              ; preds = %230
  %238 = load ptr, ptr %4, align 8, !tbaa !5
  %239 = load i32, ptr %7, align 4, !tbaa !20
  %240 = call i32 @ZeroPivot(ptr noundef %238, i32 noundef %239)
  store i32 %240, ptr %2, align 4
  store i32 1, ptr %10, align 4
  br label %256

241:                                              ; preds = %230
  %242 = load ptr, ptr %11, align 8, !tbaa !5
  %243 = load i32, ptr %7, align 4, !tbaa !20
  %244 = sext i32 %243 to i64
  %245 = getelementptr inbounds double, ptr %242, i64 %244
  %246 = load double, ptr %245, align 8, !tbaa !27
  %247 = fdiv double 1.000000e+00, %246
  %248 = load ptr, ptr %4, align 8, !tbaa !5
  %249 = getelementptr inbounds %struct.MatrixFrame, ptr %248, i32 0, i32 5
  %250 = load ptr, ptr %249, align 8, !tbaa !21
  %251 = load i32, ptr %7, align 4, !tbaa !20
  %252 = sext i32 %251 to i64
  %253 = getelementptr inbounds ptr, ptr %250, i64 %252
  %254 = load ptr, ptr %253, align 8, !tbaa !5
  %255 = getelementptr inbounds %struct.MatrixElement, ptr %254, i32 0, i32 0
  store double %247, ptr %255, align 8, !tbaa !22
  store i32 0, ptr %10, align 4
  br label %256

256:                                              ; preds = %241, %237
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  %257 = load i32, ptr %10, align 4
  switch i32 %257, label %391 [
    i32 0, label %258
  ]

258:                                              ; preds = %256
  br label %382

259:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %260 = load ptr, ptr %4, align 8, !tbaa !5
  %261 = getelementptr inbounds %struct.MatrixFrame, ptr %260, i32 0, i32 18
  %262 = load ptr, ptr %261, align 8, !tbaa !24
  store ptr %262, ptr %12, align 8, !tbaa !5
  %263 = load ptr, ptr %4, align 8, !tbaa !5
  %264 = getelementptr inbounds %struct.MatrixFrame, ptr %263, i32 0, i32 15
  %265 = load ptr, ptr %264, align 8, !tbaa !25
  %266 = load i32, ptr %7, align 4, !tbaa !20
  %267 = sext i32 %266 to i64
  %268 = getelementptr inbounds ptr, ptr %265, i64 %267
  %269 = load ptr, ptr %268, align 8, !tbaa !5
  store ptr %269, ptr %5, align 8, !tbaa !5
  br label %270

270:                                              ; preds = %273, %259
  %271 = load ptr, ptr %5, align 8, !tbaa !5
  %272 = icmp ne ptr %271, null
  br i1 %272, label %273, label %285

273:                                              ; preds = %270
  %274 = load ptr, ptr %5, align 8, !tbaa !5
  %275 = getelementptr inbounds %struct.MatrixElement, ptr %274, i32 0, i32 0
  %276 = load ptr, ptr %12, align 8, !tbaa !5
  %277 = load ptr, ptr %5, align 8, !tbaa !5
  %278 = getelementptr inbounds %struct.MatrixElement, ptr %277, i32 0, i32 1
  %279 = load i32, ptr %278, align 8, !tbaa !26
  %280 = sext i32 %279 to i64
  %281 = getelementptr inbounds ptr, ptr %276, i64 %280
  store ptr %275, ptr %281, align 8, !tbaa !5
  %282 = load ptr, ptr %5, align 8, !tbaa !5
  %283 = getelementptr inbounds %struct.MatrixElement, ptr %282, i32 0, i32 4
  %284 = load ptr, ptr %283, align 8, !tbaa !28
  store ptr %284, ptr %5, align 8, !tbaa !5
  br label %270, !llvm.loop !34

285:                                              ; preds = %270
  %286 = load ptr, ptr %4, align 8, !tbaa !5
  %287 = getelementptr inbounds %struct.MatrixFrame, ptr %286, i32 0, i32 15
  %288 = load ptr, ptr %287, align 8, !tbaa !25
  %289 = load i32, ptr %7, align 4, !tbaa !20
  %290 = sext i32 %289 to i64
  %291 = getelementptr inbounds ptr, ptr %288, i64 %290
  %292 = load ptr, ptr %291, align 8, !tbaa !5
  store ptr %292, ptr %6, align 8, !tbaa !5
  br label %293

293:                                              ; preds = %341, %285
  %294 = load ptr, ptr %6, align 8, !tbaa !5
  %295 = getelementptr inbounds %struct.MatrixElement, ptr %294, i32 0, i32 1
  %296 = load i32, ptr %295, align 8, !tbaa !26
  %297 = load i32, ptr %7, align 4, !tbaa !20
  %298 = icmp slt i32 %296, %297
  br i1 %298, label %299, label %345

299:                                              ; preds = %293
  %300 = load ptr, ptr %4, align 8, !tbaa !5
  %301 = getelementptr inbounds %struct.MatrixFrame, ptr %300, i32 0, i32 5
  %302 = load ptr, ptr %301, align 8, !tbaa !21
  %303 = load ptr, ptr %6, align 8, !tbaa !5
  %304 = getelementptr inbounds %struct.MatrixElement, ptr %303, i32 0, i32 1
  %305 = load i32, ptr %304, align 8, !tbaa !26
  %306 = sext i32 %305 to i64
  %307 = getelementptr inbounds ptr, ptr %302, i64 %306
  %308 = load ptr, ptr %307, align 8, !tbaa !5
  store ptr %308, ptr %5, align 8, !tbaa !5
  %309 = load ptr, ptr %5, align 8, !tbaa !5
  %310 = getelementptr inbounds %struct.MatrixElement, ptr %309, i32 0, i32 0
  %311 = load double, ptr %310, align 8, !tbaa !22
  %312 = load ptr, ptr %12, align 8, !tbaa !5
  %313 = load ptr, ptr %6, align 8, !tbaa !5
  %314 = getelementptr inbounds %struct.MatrixElement, ptr %313, i32 0, i32 1
  %315 = load i32, ptr %314, align 8, !tbaa !26
  %316 = sext i32 %315 to i64
  %317 = getelementptr inbounds ptr, ptr %312, i64 %316
  %318 = load ptr, ptr %317, align 8, !tbaa !5
  %319 = load double, ptr %318, align 8, !tbaa !27
  %320 = fmul double %319, %311
  store double %320, ptr %318, align 8, !tbaa !27
  store double %320, ptr %9, align 8, !tbaa !27
  br label %321

321:                                              ; preds = %326, %299
  %322 = load ptr, ptr %5, align 8, !tbaa !5
  %323 = getelementptr inbounds %struct.MatrixElement, ptr %322, i32 0, i32 4
  %324 = load ptr, ptr %323, align 8, !tbaa !28
  store ptr %324, ptr %5, align 8, !tbaa !5
  %325 = icmp ne ptr %324, null
  br i1 %325, label %326, label %341

326:                                              ; preds = %321
  %327 = load double, ptr %9, align 8, !tbaa !27
  %328 = load ptr, ptr %5, align 8, !tbaa !5
  %329 = getelementptr inbounds %struct.MatrixElement, ptr %328, i32 0, i32 0
  %330 = load double, ptr %329, align 8, !tbaa !22
  %331 = load ptr, ptr %12, align 8, !tbaa !5
  %332 = load ptr, ptr %5, align 8, !tbaa !5
  %333 = getelementptr inbounds %struct.MatrixElement, ptr %332, i32 0, i32 1
  %334 = load i32, ptr %333, align 8, !tbaa !26
  %335 = sext i32 %334 to i64
  %336 = getelementptr inbounds ptr, ptr %331, i64 %335
  %337 = load ptr, ptr %336, align 8, !tbaa !5
  %338 = load double, ptr %337, align 8, !tbaa !27
  %339 = fneg double %327
  %340 = call double @llvm.fmuladd.f64(double %339, double %330, double %338)
  store double %340, ptr %337, align 8, !tbaa !27
  br label %321, !llvm.loop !35

341:                                              ; preds = %321
  %342 = load ptr, ptr %6, align 8, !tbaa !5
  %343 = getelementptr inbounds %struct.MatrixElement, ptr %342, i32 0, i32 4
  %344 = load ptr, ptr %343, align 8, !tbaa !28
  store ptr %344, ptr %6, align 8, !tbaa !5
  br label %293, !llvm.loop !36

345:                                              ; preds = %293
  %346 = load ptr, ptr %4, align 8, !tbaa !5
  %347 = getelementptr inbounds %struct.MatrixFrame, ptr %346, i32 0, i32 5
  %348 = load ptr, ptr %347, align 8, !tbaa !21
  %349 = load i32, ptr %7, align 4, !tbaa !20
  %350 = sext i32 %349 to i64
  %351 = getelementptr inbounds ptr, ptr %348, i64 %350
  %352 = load ptr, ptr %351, align 8, !tbaa !5
  %353 = getelementptr inbounds %struct.MatrixElement, ptr %352, i32 0, i32 0
  %354 = load double, ptr %353, align 8, !tbaa !22
  %355 = fcmp oeq double %354, 0.000000e+00
  br i1 %355, label %356, label %360

356:                                              ; preds = %345
  %357 = load ptr, ptr %4, align 8, !tbaa !5
  %358 = load i32, ptr %7, align 4, !tbaa !20
  %359 = call i32 @ZeroPivot(ptr noundef %357, i32 noundef %358)
  store i32 %359, ptr %2, align 4
  store i32 1, ptr %10, align 4
  br label %379

360:                                              ; preds = %345
  %361 = load ptr, ptr %4, align 8, !tbaa !5
  %362 = getelementptr inbounds %struct.MatrixFrame, ptr %361, i32 0, i32 5
  %363 = load ptr, ptr %362, align 8, !tbaa !21
  %364 = load i32, ptr %7, align 4, !tbaa !20
  %365 = sext i32 %364 to i64
  %366 = getelementptr inbounds ptr, ptr %363, i64 %365
  %367 = load ptr, ptr %366, align 8, !tbaa !5
  %368 = getelementptr inbounds %struct.MatrixElement, ptr %367, i32 0, i32 0
  %369 = load double, ptr %368, align 8, !tbaa !22
  %370 = fdiv double 1.000000e+00, %369
  %371 = load ptr, ptr %4, align 8, !tbaa !5
  %372 = getelementptr inbounds %struct.MatrixFrame, ptr %371, i32 0, i32 5
  %373 = load ptr, ptr %372, align 8, !tbaa !21
  %374 = load i32, ptr %7, align 4, !tbaa !20
  %375 = sext i32 %374 to i64
  %376 = getelementptr inbounds ptr, ptr %373, i64 %375
  %377 = load ptr, ptr %376, align 8, !tbaa !5
  %378 = getelementptr inbounds %struct.MatrixElement, ptr %377, i32 0, i32 0
  store double %370, ptr %378, align 8, !tbaa !22
  store i32 0, ptr %10, align 4
  br label %379

379:                                              ; preds = %360, %356
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  %380 = load i32, ptr %10, align 4
  switch i32 %380, label %391 [
    i32 0, label %381
  ]

381:                                              ; preds = %379
  br label %382

382:                                              ; preds = %381, %258
  br label %383

383:                                              ; preds = %382
  %384 = load i32, ptr %7, align 4, !tbaa !20
  %385 = add nsw i32 %384, 1
  store i32 %385, ptr %7, align 4, !tbaa !20
  br label %102, !llvm.loop !37

386:                                              ; preds = %102
  %387 = load ptr, ptr %4, align 8, !tbaa !5
  %388 = getelementptr inbounds %struct.MatrixFrame, ptr %387, i32 0, i32 13
  store i32 1, ptr %388, align 8, !tbaa !16
  %389 = load ptr, ptr %4, align 8, !tbaa !5
  %390 = getelementptr inbounds %struct.MatrixFrame, ptr %389, i32 0, i32 9
  store i32 0, ptr %390, align 4, !tbaa !15
  store i32 0, ptr %2, align 4
  store i32 1, ptr %10, align 4
  br label %391

391:                                              ; preds = %386, %379, %256, %84, %62
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  %392 = load i32, ptr %2, align 4
  ret i32 %392
}

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

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

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind "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 = { noreturn 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 #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }
attributes #7 = { noreturn 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, !13, i64 104}
!10 = !{!"MatrixFrame", !11, i64 0, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !6, i64 24, !6, i64 32, !6, i64 40, !12, i64 48, !12, i64 52, !12, i64 56, !6, i64 64, !6, i64 72, !12, i64 80, !12, i64 84, !6, i64 88, !6, i64 96, !13, i64 104, !6, i64 112, !12, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !12, i64 168, !12, i64 172, !12, i64 176, !12, i64 180, !12, i64 184, !12, i64 188, !7, i64 192, !12, i64 196, !11, i64 200, !12, i64 208, !12, i64 212, !12, i64 216, !12, i64 220, !12, i64 224, !12, i64 228, !14, i64 232, !6, i64 272, !12, i64 280, !6, i64 288, !12, i64 296, !6, i64 304, !12, i64 312, !6, i64 320, !6, i64 328}
!11 = !{!"double", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!"MatrixElement", !11, i64 0, !12, i64 8, !12, i64 12, !6, i64 16, !6, i64 24, !6, i64 32}
!15 = !{!10, !12, i64 52}
!16 = !{!10, !12, i64 80}
!17 = !{!10, !12, i64 172}
!18 = !{!10, !12, i64 180}
!19 = !{!10, !12, i64 228}
!20 = !{!12, !12, i64 0}
!21 = !{!10, !6, i64 24}
!22 = !{!14, !11, i64 0}
!23 = !{!10, !6, i64 40}
!24 = !{!10, !6, i64 112}
!25 = !{!10, !6, i64 88}
!26 = !{!14, !12, i64 8}
!27 = !{!11, !11, i64 0}
!28 = !{!14, !6, i64 24}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}
!31 = distinct !{!31, !30}
!32 = distinct !{!32, !30}
!33 = distinct !{!33, !30}
!34 = distinct !{!34, !30}
!35 = distinct !{!35, !30}
!36 = distinct !{!36, !30}
!37 = distinct !{!37, !30}


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

@stdout = external local_unnamed_addr global ptr, align 8
@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [66 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [123 x i8], align 1
@spcMatrixIsNotValid = external global [0 x i8], align 1
@spcErrorsMustBeCleared = external global [0 x i8], align 1
@spcMatrixMustNotBeFactored = external global [0 x i8], align 1

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

; Function Attrs: nofree nounwind
declare noundef i32 @fflush(ptr nocapture noundef) local_unnamed_addr #1

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

; Function Attrs: noreturn nounwind
declare void @abort() local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local i32 @spFactor(ptr noundef %0) local_unnamed_addr #0 {
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %6, label %2

2:                                                ; preds = %1
  %3 = getelementptr inbounds i8, ptr %0, i64 104
  %4 = load i64, ptr %3, align 8, !tbaa !5
  %5 = icmp eq i64 %4, 3735928559
  br i1 %5, label %13, label %6

6:                                                ; preds = %2, %1
  %7 = load ptr, ptr @stdout, align 8, !tbaa !14
  %8 = tail call i32 @fflush(ptr noundef %7)
  %9 = load ptr, ptr @stderr, align 8, !tbaa !14
  %10 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %9, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 347, ptr noundef nonnull @spcMatrixIsNotValid) #4
  %11 = load ptr, ptr @stderr, align 8, !tbaa !14
  %12 = tail call i32 @fflush(ptr noundef %11)
  tail call void @abort() #5
  unreachable

13:                                               ; preds = %2
  %14 = getelementptr inbounds i8, ptr %0, i64 52
  %15 = load i32, ptr %14, align 4, !tbaa !15
  %or.cond = icmp ult i32 %15, 2
  br i1 %or.cond, label %23, label %16

16:                                               ; preds = %13
  %17 = load ptr, ptr @stdout, align 8, !tbaa !14
  %18 = tail call i32 @fflush(ptr noundef %17)
  %19 = load ptr, ptr @stderr, align 8, !tbaa !14
  %20 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %19, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 348, ptr noundef nonnull @spcErrorsMustBeCleared) #4
  %21 = load ptr, ptr @stderr, align 8, !tbaa !14
  %22 = tail call i32 @fflush(ptr noundef %21)
  tail call void @abort() #5
  unreachable

23:                                               ; preds = %13
  %24 = getelementptr inbounds i8, ptr %0, i64 80
  %25 = load i32, ptr %24, align 8, !tbaa !16
  %.not114 = icmp eq i32 %25, 0
  br i1 %.not114, label %33, label %26

26:                                               ; preds = %23
  %27 = load ptr, ptr @stdout, align 8, !tbaa !14
  %28 = tail call i32 @fflush(ptr noundef %27)
  %29 = load ptr, ptr @stderr, align 8, !tbaa !14
  %30 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %29, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 349, ptr noundef nonnull @spcMatrixMustNotBeFactored) #4
  %31 = load ptr, ptr @stderr, align 8, !tbaa !14
  %32 = tail call i32 @fflush(ptr noundef %31)
  tail call void @abort() #5
  unreachable

33:                                               ; preds = %23
  %34 = getelementptr inbounds i8, ptr %0, i64 172
  %35 = load i32, ptr %34, align 4, !tbaa !17
  %.not115 = icmp eq i32 %35, 0
  br i1 %.not115, label %38, label %36

36:                                               ; preds = %33
  %37 = tail call i32 @spOrderAndFactor(ptr noundef nonnull %0, ptr noundef null, double noundef 0.000000e+00, double noundef 0.000000e+00, i32 noundef 1)
  br label %165

38:                                               ; preds = %33
  %39 = getelementptr inbounds i8, ptr %0, i64 180
  %40 = load i32, ptr %39, align 4, !tbaa !18
  %.not116 = icmp eq i32 %40, 0
  br i1 %.not116, label %41, label %42

41:                                               ; preds = %38
  tail call void @spPartition(ptr noundef nonnull %0, i32 noundef 0)
  br label %42

42:                                               ; preds = %41, %38
  %43 = getelementptr inbounds i8, ptr %0, i64 228
  %44 = load i32, ptr %43, align 4, !tbaa !19
  %45 = getelementptr inbounds i8, ptr %0, i64 24
  %46 = load ptr, ptr %45, align 8, !tbaa !20
  %47 = getelementptr inbounds i8, ptr %46, i64 8
  %48 = load ptr, ptr %47, align 8, !tbaa !14
  %49 = load double, ptr %48, align 8, !tbaa !21
  %50 = fcmp oeq double %49, 0.000000e+00
  br i1 %50, label %51, label %53

51:                                               ; preds = %42
  %52 = tail call i32 @ZeroPivot(ptr noundef nonnull %0, i32 noundef 1)
  br label %165

53:                                               ; preds = %42
  %54 = fdiv double 1.000000e+00, %49
  store double %54, ptr %48, align 8, !tbaa !21
  %.not117160 = icmp slt i32 %44, 2
  br i1 %.not117160, label %._crit_edge164, label %.lr.ph163

.lr.ph163:                                        ; preds = %53
  %55 = getelementptr inbounds i8, ptr %0, i64 40
  %56 = getelementptr inbounds i8, ptr %0, i64 112
  %57 = getelementptr inbounds i8, ptr %0, i64 88
  %58 = add nuw i32 %44, 1
  %wide.trip.count = zext i32 %58 to i64
  br label %59

59:                                               ; preds = %.lr.ph163, %.thread
  %60 = phi ptr [ %46, %.lr.ph163 ], [ %163, %.thread ]
  %indvars.iv = phi i64 [ 2, %.lr.ph163 ], [ %indvars.iv.next, %.thread ]
  %61 = load ptr, ptr %55, align 8, !tbaa !22
  %62 = getelementptr inbounds i32, ptr %61, i64 %indvars.iv
  %63 = load i32, ptr %62, align 4, !tbaa !23
  %.not118 = icmp eq i32 %63, 0
  %64 = load ptr, ptr %56, align 8, !tbaa !24
  %65 = load ptr, ptr %57, align 8, !tbaa !25
  %66 = getelementptr inbounds ptr, ptr %65, i64 %indvars.iv
  %.398145 = load ptr, ptr %66, align 8, !tbaa !14
  br i1 %.not118, label %.lr.ph149, label %67

67:                                               ; preds = %59
  %.not119146.not = icmp eq ptr %.398145, null
  br i1 %.not119146.not, label %.preheader, label %.lr.ph

.preheader:                                       ; preds = %.lr.ph, %67
  %68 = getelementptr inbounds i8, ptr %.398145, i64 8
  %69 = load i32, ptr %68, align 8, !tbaa !26
  %70 = sext i32 %69 to i64
  %71 = icmp sgt i64 %indvars.iv, %70
  br i1 %71, label %.lr.ph136, label %._crit_edge137

.lr.ph:                                           ; preds = %67, %.lr.ph
  %.095131 = phi ptr [ %.095, %.lr.ph ], [ %.398145, %67 ]
  %72 = load double, ptr %.095131, align 8, !tbaa !21
  %73 = getelementptr inbounds i8, ptr %.095131, i64 8
  %74 = load i32, ptr %73, align 8, !tbaa !26
  %75 = sext i32 %74 to i64
  %76 = getelementptr inbounds double, ptr %64, i64 %75
  store double %72, ptr %76, align 8, !tbaa !27
  %77 = getelementptr inbounds i8, ptr %.095131, i64 24
  %.095 = load ptr, ptr %77, align 8, !tbaa !14
  %.not121 = icmp eq ptr %.095, null
  br i1 %.not121, label %.preheader, label %.lr.ph, !llvm.loop !28

.lr.ph136:                                        ; preds = %.preheader, %._crit_edge
  %78 = phi i32 [ %102, %._crit_edge ], [ %69, %.preheader ]
  %.0102135 = phi ptr [ %.0102, %._crit_edge ], [ %.398145, %.preheader ]
  %79 = sext i32 %78 to i64
  %80 = getelementptr inbounds ptr, ptr %60, i64 %79
  %81 = load ptr, ptr %80, align 8, !tbaa !14
  %82 = getelementptr inbounds double, ptr %64, i64 %79
  %83 = load double, ptr %82, align 8, !tbaa !27
  %84 = load double, ptr %81, align 8, !tbaa !21
  %85 = fmul double %83, %84
  store double %85, ptr %.0102135, align 8, !tbaa !21
  %86 = getelementptr inbounds i8, ptr %81, i64 24
  %87 = load ptr, ptr %86, align 8, !tbaa !30
  %.not123132 = icmp eq ptr %87, null
  br i1 %.not123132, label %._crit_edge, label %.lr.ph133

.lr.ph133:                                        ; preds = %.lr.ph136, %.lr.ph133
  %88 = phi ptr [ %99, %.lr.ph133 ], [ %87, %.lr.ph136 ]
  %89 = load double, ptr %.0102135, align 8, !tbaa !21
  %90 = load double, ptr %88, align 8, !tbaa !21
  %91 = getelementptr inbounds i8, ptr %88, i64 8
  %92 = load i32, ptr %91, align 8, !tbaa !26
  %93 = sext i32 %92 to i64
  %94 = getelementptr inbounds double, ptr %64, i64 %93
  %95 = load double, ptr %94, align 8, !tbaa !27
  %96 = fneg double %89
  %97 = tail call double @llvm.fmuladd.f64(double %96, double %90, double %95)
  store double %97, ptr %94, align 8, !tbaa !27
  %98 = getelementptr inbounds i8, ptr %88, i64 24
  %99 = load ptr, ptr %98, align 8, !tbaa !30
  %.not123 = icmp eq ptr %99, null
  br i1 %.not123, label %._crit_edge, label %.lr.ph133, !llvm.loop !31

._crit_edge:                                      ; preds = %.lr.ph133, %.lr.ph136
  %100 = getelementptr inbounds i8, ptr %.0102135, i64 24
  %.0102 = load ptr, ptr %100, align 8, !tbaa !14
  %101 = getelementptr inbounds i8, ptr %.0102, i64 8
  %102 = load i32, ptr %101, align 8, !tbaa !26
  %103 = sext i32 %102 to i64
  %104 = icmp sgt i64 %indvars.iv, %103
  br i1 %104, label %.lr.ph136, label %._crit_edge137, !llvm.loop !32

._crit_edge137:                                   ; preds = %._crit_edge, %.preheader
  %105 = getelementptr inbounds ptr, ptr %60, i64 %indvars.iv
  %106 = load ptr, ptr %105, align 8, !tbaa !14
  %.297.in138 = getelementptr inbounds i8, ptr %106, i64 24
  %.297139 = load ptr, ptr %.297.in138, align 8, !tbaa !30
  %.not122140 = icmp eq ptr %.297139, null
  br i1 %.not122140, label %._crit_edge144, label %.lr.ph143

.lr.ph143:                                        ; preds = %._crit_edge137, %.lr.ph143
  %.297141 = phi ptr [ %.297, %.lr.ph143 ], [ %.297139, %._crit_edge137 ]
  %107 = getelementptr inbounds i8, ptr %.297141, i64 8
  %108 = load i32, ptr %107, align 8, !tbaa !26
  %109 = sext i32 %108 to i64
  %110 = getelementptr inbounds double, ptr %64, i64 %109
  %111 = load double, ptr %110, align 8, !tbaa !27
  store double %111, ptr %.297141, align 8, !tbaa !21
  %.297.in = getelementptr inbounds i8, ptr %.297141, i64 24
  %.297 = load ptr, ptr %.297.in, align 8, !tbaa !30
  %.not122 = icmp eq ptr %.297, null
  br i1 %.not122, label %._crit_edge144, label %.lr.ph143, !llvm.loop !33

._crit_edge144:                                   ; preds = %.lr.ph143, %._crit_edge137
  %112 = getelementptr inbounds double, ptr %64, i64 %indvars.iv
  %113 = load double, ptr %112, align 8, !tbaa !27
  %114 = fcmp une double %113, 0.000000e+00
  br i1 %114, label %.thread, label %115

115:                                              ; preds = %._crit_edge144
  %116 = trunc nuw nsw i64 %indvars.iv to i32
  %117 = tail call i32 @ZeroPivot(ptr noundef nonnull %0, i32 noundef %116)
  br label %165

.lr.ph149:                                        ; preds = %59, %.lr.ph149
  %.398147 = phi ptr [ %.398, %.lr.ph149 ], [ %.398145, %59 ]
  %118 = getelementptr inbounds i8, ptr %.398147, i64 8
  %119 = load i32, ptr %118, align 8, !tbaa !26
  %120 = sext i32 %119 to i64
  %121 = getelementptr inbounds ptr, ptr %64, i64 %120
  store ptr %.398147, ptr %121, align 8, !tbaa !14
  %122 = getelementptr inbounds i8, ptr %.398147, i64 24
  %.398 = load ptr, ptr %122, align 8, !tbaa !14
  %.not119 = icmp eq ptr %.398, null
  br i1 %.not119, label %._crit_edge150.loopexit, label %.lr.ph149, !llvm.loop !34

._crit_edge150.loopexit:                          ; preds = %.lr.ph149
  %.pre = load ptr, ptr %57, align 8, !tbaa !25
  %.phi.trans.insert = getelementptr inbounds ptr, ptr %.pre, i64 %indvars.iv
  %.1103155.pre = load ptr, ptr %.phi.trans.insert, align 8, !tbaa !14
  %.pre169.pre = load ptr, ptr %45, align 8, !tbaa !20
  %123 = getelementptr inbounds i8, ptr %.1103155.pre, i64 8
  %124 = load i32, ptr %123, align 8, !tbaa !26
  %125 = sext i32 %124 to i64
  %126 = icmp sgt i64 %indvars.iv, %125
  br i1 %126, label %.lr.ph158, label %._crit_edge159

.lr.ph158:                                        ; preds = %._crit_edge150.loopexit, %._crit_edge154
  %127 = phi i32 [ %153, %._crit_edge154 ], [ %124, %._crit_edge150.loopexit ]
  %.1103156 = phi ptr [ %.1103, %._crit_edge154 ], [ %.1103155.pre, %._crit_edge150.loopexit ]
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds ptr, ptr %.pre169.pre, i64 %128
  %130 = load ptr, ptr %129, align 8, !tbaa !14
  %131 = load double, ptr %130, align 8, !tbaa !21
  %132 = getelementptr inbounds ptr, ptr %64, i64 %128
  %133 = load ptr, ptr %132, align 8, !tbaa !14
  %134 = load double, ptr %133, align 8, !tbaa !27
  %135 = fmul double %131, %134
  store double %135, ptr %133, align 8, !tbaa !27
  %136 = getelementptr inbounds i8, ptr %130, i64 24
  %137 = load ptr, ptr %136, align 8, !tbaa !30
  %.not120151 = icmp eq ptr %137, null
  br i1 %.not120151, label %._crit_edge154, label %.lr.ph153

.lr.ph153:                                        ; preds = %.lr.ph158
  %138 = fneg double %135
  br label %139

139:                                              ; preds = %.lr.ph153, %139
  %140 = phi ptr [ %137, %.lr.ph153 ], [ %150, %139 ]
  %141 = load double, ptr %140, align 8, !tbaa !21
  %142 = getelementptr inbounds i8, ptr %140, i64 8
  %143 = load i32, ptr %142, align 8, !tbaa !26
  %144 = sext i32 %143 to i64
  %145 = getelementptr inbounds ptr, ptr %64, i64 %144
  %146 = load ptr, ptr %145, align 8, !tbaa !14
  %147 = load double, ptr %146, align 8, !tbaa !27
  %148 = tail call double @llvm.fmuladd.f64(double %138, double %141, double %147)
  store double %148, ptr %146, align 8, !tbaa !27
  %149 = getelementptr inbounds i8, ptr %140, i64 24
  %150 = load ptr, ptr %149, align 8, !tbaa !30
  %.not120 = icmp eq ptr %150, null
  br i1 %.not120, label %._crit_edge154, label %139, !llvm.loop !35

._crit_edge154:                                   ; preds = %139, %.lr.ph158
  %151 = getelementptr inbounds i8, ptr %.1103156, i64 24
  %.1103 = load ptr, ptr %151, align 8, !tbaa !14
  %152 = getelementptr inbounds i8, ptr %.1103, i64 8
  %153 = load i32, ptr %152, align 8, !tbaa !26
  %154 = sext i32 %153 to i64
  %155 = icmp sgt i64 %indvars.iv, %154
  br i1 %155, label %.lr.ph158, label %._crit_edge159, !llvm.loop !36

._crit_edge159:                                   ; preds = %._crit_edge154, %._crit_edge150.loopexit
  %156 = getelementptr inbounds ptr, ptr %.pre169.pre, i64 %indvars.iv
  %157 = load ptr, ptr %156, align 8, !tbaa !14
  %158 = load double, ptr %157, align 8, !tbaa !21
  %159 = fcmp une double %158, 0.000000e+00
  br i1 %159, label %.thread, label %160

160:                                              ; preds = %._crit_edge159
  %161 = trunc nuw nsw i64 %indvars.iv to i32
  %162 = tail call i32 @ZeroPivot(ptr noundef nonnull %0, i32 noundef %161)
  br label %165

.thread:                                          ; preds = %._crit_edge159, %._crit_edge144
  %.sink176 = phi double [ %113, %._crit_edge144 ], [ %158, %._crit_edge159 ]
  %.sink175 = phi ptr [ %106, %._crit_edge144 ], [ %157, %._crit_edge159 ]
  %163 = phi ptr [ %60, %._crit_edge144 ], [ %.pre169.pre, %._crit_edge159 ]
  %164 = fdiv double 1.000000e+00, %.sink176
  store double %164, ptr %.sink175, align 8, !tbaa !21
  %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 %._crit_edge164, label %59, !llvm.loop !37

._crit_edge164:                                   ; preds = %.thread, %53
  store i32 1, ptr %24, align 8, !tbaa !16
  store i32 0, ptr %14, align 4, !tbaa !15
  br label %165

165:                                              ; preds = %160, %115, %._crit_edge164, %51, %36
  %.4 = phi i32 [ %37, %36 ], [ %52, %51 ], [ %117, %115 ], [ %162, %160 ], [ 0, %._crit_edge164 ]
  ret i32 %.4
}

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

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

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 = { noreturn 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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { cold nounwind }
attributes #5 = { noreturn 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, !12, i64 104}
!6 = !{!"MatrixFrame", !7, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !11, i64 24, !11, i64 32, !11, i64 40, !10, i64 48, !10, i64 52, !10, i64 56, !11, i64 64, !11, i64 72, !10, i64 80, !10, i64 84, !11, i64 88, !11, i64 96, !12, i64 104, !11, i64 112, !10, i64 120, !11, i64 128, !11, i64 136, !11, i64 144, !11, i64 152, !11, i64 160, !10, i64 168, !10, i64 172, !10, i64 176, !10, i64 180, !10, i64 184, !10, i64 188, !8, i64 192, !10, i64 196, !7, i64 200, !10, i64 208, !10, i64 212, !10, i64 216, !10, i64 220, !10, i64 224, !10, i64 228, !13, i64 232, !11, i64 272, !10, i64 280, !11, i64 288, !10, i64 296, !11, i64 304, !10, i64 312, !11, i64 320, !11, i64 328}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"long", !8, i64 0}
!13 = !{!"MatrixElement", !7, i64 0, !10, i64 8, !10, i64 12, !11, i64 16, !11, i64 24, !11, i64 32}
!14 = !{!11, !11, i64 0}
!15 = !{!6, !10, i64 52}
!16 = !{!6, !10, i64 80}
!17 = !{!6, !10, i64 172}
!18 = !{!6, !10, i64 180}
!19 = !{!6, !10, i64 228}
!20 = !{!6, !11, i64 24}
!21 = !{!13, !7, i64 0}
!22 = !{!6, !11, i64 40}
!23 = !{!10, !10, i64 0}
!24 = !{!6, !11, i64 112}
!25 = !{!6, !11, i64 88}
!26 = !{!13, !10, i64 8}
!27 = !{!7, !7, i64 0}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = !{!13, !11, i64 24}
!31 = distinct !{!31, !29}
!32 = distinct !{!32, !29}
!33 = distinct !{!33, !29}
!34 = distinct !{!34, !29}
!35 = distinct !{!35, !29}
!36 = distinct !{!36, !29}
!37 = distinct !{!37, !29}


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