; LLVM IR from jgaeddert/liquid-dsp :: src/matrix/src (matrixc)

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

@.str.5 = external hidden unnamed_addr constant [89 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [82 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

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

declare i32 @liquid_error_fl(i32 noundef, ptr noundef, i32 noundef, ptr noundef, ...) #1

declare { double, double } @__muldc3(double, double, double, double)

declare { double, double } @__divdc3(double, double, double, double)

; Function Attrs: nounwind
declare double @sqrt(double noundef) #2

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

18:                                               ; preds = %31, %3
  %19 = load i32, ptr %8, align 4, !tbaa !9
  %20 = load i32, ptr %6, align 4, !tbaa !9
  %21 = load i32, ptr %6, align 4, !tbaa !9
  %22 = mul i32 %20, %21
  %23 = icmp ult i32 %19, %22
  br i1 %23, label %24, label %34

24:                                               ; preds = %18
  %25 = load ptr, ptr %7, align 8, !tbaa !5
  %26 = load i32, ptr %8, align 4, !tbaa !9
  %27 = zext i32 %26 to i64
  %28 = getelementptr inbounds { double, double }, ptr %25, i64 %27
  %29 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 0
  %30 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 1
  store double 0.000000e+00, ptr %29, align 8
  store double 0.000000e+00, ptr %30, align 8
  br label %31

31:                                               ; preds = %24
  %32 = load i32, ptr %8, align 4, !tbaa !9
  %33 = add i32 %32, 1
  store i32 %33, ptr %8, align 4, !tbaa !9
  br label %18, !llvm.loop !11

34:                                               ; preds = %18
  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 16, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #5
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %35

35:                                               ; preds = %289, %34
  %36 = load i32, ptr %9, align 4, !tbaa !9
  %37 = load i32, ptr %6, align 4, !tbaa !9
  %38 = icmp ult i32 %36, %37
  br i1 %38, label %39, label %292

39:                                               ; preds = %35
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  %41 = load i32, ptr %9, align 4, !tbaa !9
  %42 = load i32, ptr %6, align 4, !tbaa !9
  %43 = mul i32 %41, %42
  %44 = load i32, ptr %9, align 4, !tbaa !9
  %45 = add i32 %43, %44
  %46 = zext i32 %45 to i64
  %47 = getelementptr inbounds { double, double }, ptr %40, i64 %46
  %48 = getelementptr inbounds { double, double }, ptr %47, i32 0, i32 0
  %49 = load double, ptr %48, align 8
  %50 = getelementptr inbounds { double, double }, ptr %47, i32 0, i32 1
  %51 = load double, ptr %50, align 8
  %52 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 0
  %53 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 1
  store double %49, ptr %52, align 8
  store double %51, ptr %53, align 8
  %54 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 0
  %55 = load double, ptr %54, align 8
  %56 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 1
  %57 = load double, ptr %56, align 8
  %58 = fcmp olt double %55, 0.000000e+00
  br i1 %58, label %59, label %67

59:                                               ; preds = %39
  %60 = load i32, ptr %9, align 4, !tbaa !9
  %61 = load i32, ptr %9, align 4, !tbaa !9
  %62 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 0
  %63 = load double, ptr %62, align 8
  %64 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 1
  %65 = load double, ptr %64, align 8
  %66 = call i32 (i32, ptr, i32, ptr, ...) @liquid_error_fl(i32 noundef 3, ptr noundef @.str.5, i32 noundef 58, ptr noundef @.str.6, i32 noundef %60, i32 noundef %61, double noundef %63)
  store i32 %66, ptr %4, align 4
  store i32 1, ptr %17, align 4
  br label %293

67:                                               ; preds = %39
  %68 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 0
  %69 = load double, ptr %68, align 8
  %70 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 1
  %71 = load double, ptr %70, align 8
  %72 = call double @llvm.fabs.f64(double %71)
  %73 = fcmp ogt double %72, 0.000000e+00
  br i1 %73, label %74, label %83

74:                                               ; preds = %67
  %75 = load i32, ptr %9, align 4, !tbaa !9
  %76 = load i32, ptr %9, align 4, !tbaa !9
  %77 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 0
  %78 = load double, ptr %77, align 8
  %79 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 1
  %80 = load double, ptr %79, align 8
  %81 = call double @llvm.fabs.f64(double %80)
  %82 = call i32 (i32, ptr, i32, ptr, ...) @liquid_error_fl(i32 noundef 3, ptr noundef @.str.5, i32 noundef 61, ptr noundef @.str.7, i32 noundef %75, i32 noundef %76, double noundef %81)
  store i32 %82, ptr %4, align 4
  store i32 1, ptr %17, align 4
  br label %293

83:                                               ; preds = %67
  store double 0.000000e+00, ptr %15, align 8, !tbaa !13
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %84

84:                                               ; preds = %130, %83
  %85 = load i32, ptr %10, align 4, !tbaa !9
  %86 = load i32, ptr %9, align 4, !tbaa !9
  %87 = icmp ult i32 %85, %86
  br i1 %87, label %88, label %133

88:                                               ; preds = %84
  %89 = load ptr, ptr %7, align 8, !tbaa !5
  %90 = load i32, ptr %9, align 4, !tbaa !9
  %91 = load i32, ptr %6, align 4, !tbaa !9
  %92 = mul i32 %90, %91
  %93 = load i32, ptr %10, align 4, !tbaa !9
  %94 = add i32 %92, %93
  %95 = zext i32 %94 to i64
  %96 = getelementptr inbounds { double, double }, ptr %89, i64 %95
  %97 = getelementptr inbounds { double, double }, ptr %96, i32 0, i32 0
  %98 = load double, ptr %97, align 8
  %99 = getelementptr inbounds { double, double }, ptr %96, i32 0, i32 1
  %100 = load double, ptr %99, align 8
  %101 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 0
  %102 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 1
  store double %98, ptr %101, align 8
  store double %100, ptr %102, align 8
  %103 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 0
  %104 = load double, ptr %103, align 8
  %105 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 1
  %106 = load double, ptr %105, align 8
  %107 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 0
  %108 = load double, ptr %107, align 8
  %109 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 1
  %110 = load double, ptr %109, align 8
  %111 = fneg double %110
  %112 = fmul double %104, %108
  %113 = fmul double %106, %111
  %114 = fmul double %104, %111
  %115 = fmul double %106, %108
  %116 = fsub double %112, %113
  %117 = fadd double %114, %115
  %118 = fcmp uno double %116, %116
  br i1 %118, label %119, label %125, !prof !15

119:                                              ; preds = %88
  %120 = fcmp uno double %117, %117
  br i1 %120, label %121, label %125, !prof !15

121:                                              ; preds = %119
  %122 = call { double, double } @__muldc3(double noundef %104, double noundef %106, double noundef %108, double noundef %111) #5
  %123 = extractvalue { double, double } %122, 0
  %124 = extractvalue { double, double } %122, 1
  br label %125

125:                                              ; preds = %121, %119, %88
  %126 = phi double [ %116, %88 ], [ %116, %119 ], [ %123, %121 ]
  %127 = phi double [ %117, %88 ], [ %117, %119 ], [ %124, %121 ]
  %128 = load double, ptr %15, align 8, !tbaa !13
  %129 = fadd double %128, %126
  store double %129, ptr %15, align 8, !tbaa !13
  br label %130

130:                                              ; preds = %125
  %131 = load i32, ptr %10, align 4, !tbaa !9
  %132 = add i32 %131, 1
  store i32 %132, ptr %10, align 4, !tbaa !9
  br label %84, !llvm.loop !16

133:                                              ; preds = %84
  %134 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 0
  %135 = load double, ptr %134, align 8
  %136 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 1
  %137 = load double, ptr %136, align 8
  %138 = load double, ptr %15, align 8, !tbaa !13
  %139 = fcmp olt double %135, %138
  br i1 %139, label %140, label %149

140:                                              ; preds = %133
  %141 = load i32, ptr %9, align 4, !tbaa !9
  %142 = load i32, ptr %9, align 4, !tbaa !9
  %143 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 0
  %144 = load double, ptr %143, align 8
  %145 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 1
  %146 = load double, ptr %145, align 8
  %147 = load double, ptr %15, align 8, !tbaa !13
  %148 = call i32 (i32, ptr, i32, ptr, ...) @liquid_error_fl(i32 noundef 3, ptr noundef @.str.5, i32 noundef 76, ptr noundef @.str.8, i32 noundef %141, i32 noundef %142, double noundef %144, double noundef %147)
  store i32 %148, ptr %4, align 4
  store i32 1, ptr %17, align 4
  br label %293

149:                                              ; preds = %133
  %150 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 0
  %151 = load double, ptr %150, align 8
  %152 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 1
  %153 = load double, ptr %152, align 8
  %154 = load double, ptr %15, align 8, !tbaa !13
  %155 = fsub double %151, %154
  %156 = call double @sqrt(double noundef %155) #5
  %157 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 0
  %158 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 1
  store double %156, ptr %157, align 8
  store double 0.000000e+00, ptr %158, align 8
  %159 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 0
  %160 = load double, ptr %159, align 8
  %161 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 1
  %162 = load double, ptr %161, align 8
  %163 = load ptr, ptr %7, align 8, !tbaa !5
  %164 = load i32, ptr %9, align 4, !tbaa !9
  %165 = load i32, ptr %6, align 4, !tbaa !9
  %166 = mul i32 %164, %165
  %167 = load i32, ptr %9, align 4, !tbaa !9
  %168 = add i32 %166, %167
  %169 = zext i32 %168 to i64
  %170 = getelementptr inbounds { double, double }, ptr %163, i64 %169
  %171 = getelementptr inbounds { double, double }, ptr %170, i32 0, i32 0
  %172 = getelementptr inbounds { double, double }, ptr %170, i32 0, i32 1
  store double %160, ptr %171, align 8
  store double %162, ptr %172, align 8
  %173 = load i32, ptr %9, align 4, !tbaa !9
  %174 = add i32 %173, 1
  store i32 %174, ptr %8, align 4, !tbaa !9
  br label %175

175:                                              ; preds = %285, %149
  %176 = load i32, ptr %8, align 4, !tbaa !9
  %177 = load i32, ptr %6, align 4, !tbaa !9
  %178 = icmp ult i32 %176, %177
  br i1 %178, label %179, label %288

179:                                              ; preds = %175
  %180 = load ptr, ptr %5, align 8, !tbaa !5
  %181 = load i32, ptr %8, align 4, !tbaa !9
  %182 = load i32, ptr %6, align 4, !tbaa !9
  %183 = mul i32 %181, %182
  %184 = load i32, ptr %9, align 4, !tbaa !9
  %185 = add i32 %183, %184
  %186 = zext i32 %185 to i64
  %187 = getelementptr inbounds { double, double }, ptr %180, i64 %186
  %188 = getelementptr inbounds { double, double }, ptr %187, i32 0, i32 0
  %189 = load double, ptr %188, align 8
  %190 = getelementptr inbounds { double, double }, ptr %187, i32 0, i32 1
  %191 = load double, ptr %190, align 8
  %192 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 0
  %193 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 1
  store double %189, ptr %192, align 8
  store double %191, ptr %193, align 8
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %194

194:                                              ; preds = %260, %179
  %195 = load i32, ptr %10, align 4, !tbaa !9
  %196 = load i32, ptr %9, align 4, !tbaa !9
  %197 = icmp ult i32 %195, %196
  br i1 %197, label %198, label %263

198:                                              ; preds = %194
  %199 = load ptr, ptr %7, align 8, !tbaa !5
  %200 = load i32, ptr %8, align 4, !tbaa !9
  %201 = load i32, ptr %6, align 4, !tbaa !9
  %202 = mul i32 %200, %201
  %203 = load i32, ptr %10, align 4, !tbaa !9
  %204 = add i32 %202, %203
  %205 = zext i32 %204 to i64
  %206 = getelementptr inbounds { double, double }, ptr %199, i64 %205
  %207 = getelementptr inbounds { double, double }, ptr %206, i32 0, i32 0
  %208 = load double, ptr %207, align 8
  %209 = getelementptr inbounds { double, double }, ptr %206, i32 0, i32 1
  %210 = load double, ptr %209, align 8
  %211 = getelementptr inbounds { double, double }, ptr %13, i32 0, i32 0
  %212 = getelementptr inbounds { double, double }, ptr %13, i32 0, i32 1
  store double %208, ptr %211, align 8
  store double %210, ptr %212, align 8
  %213 = load ptr, ptr %7, align 8, !tbaa !5
  %214 = load i32, ptr %9, align 4, !tbaa !9
  %215 = load i32, ptr %6, align 4, !tbaa !9
  %216 = mul i32 %214, %215
  %217 = load i32, ptr %10, align 4, !tbaa !9
  %218 = add i32 %216, %217
  %219 = zext i32 %218 to i64
  %220 = getelementptr inbounds { double, double }, ptr %213, i64 %219
  %221 = getelementptr inbounds { double, double }, ptr %220, i32 0, i32 0
  %222 = load double, ptr %221, align 8
  %223 = getelementptr inbounds { double, double }, ptr %220, i32 0, i32 1
  %224 = load double, ptr %223, align 8
  %225 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 0
  %226 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 1
  store double %222, ptr %225, align 8
  store double %224, ptr %226, align 8
  %227 = getelementptr inbounds { double, double }, ptr %13, i32 0, i32 0
  %228 = load double, ptr %227, align 8
  %229 = getelementptr inbounds { double, double }, ptr %13, i32 0, i32 1
  %230 = load double, ptr %229, align 8
  %231 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 0
  %232 = load double, ptr %231, align 8
  %233 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 1
  %234 = load double, ptr %233, align 8
  %235 = fneg double %234
  %236 = fmul double %228, %232
  %237 = fmul double %230, %235
  %238 = fmul double %228, %235
  %239 = fmul double %230, %232
  %240 = fsub double %236, %237
  %241 = fadd double %238, %239
  %242 = fcmp uno double %240, %240
  br i1 %242, label %243, label %249, !prof !15

243:                                              ; preds = %198
  %244 = fcmp uno double %241, %241
  br i1 %244, label %245, label %249, !prof !15

245:                                              ; preds = %243
  %246 = call { double, double } @__muldc3(double noundef %228, double noundef %230, double noundef %232, double noundef %235) #5
  %247 = extractvalue { double, double } %246, 0
  %248 = extractvalue { double, double } %246, 1
  br label %249

249:                                              ; preds = %245, %243, %198
  %250 = phi double [ %240, %198 ], [ %240, %243 ], [ %247, %245 ]
  %251 = phi double [ %241, %198 ], [ %241, %243 ], [ %248, %245 ]
  %252 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 0
  %253 = load double, ptr %252, align 8
  %254 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 1
  %255 = load double, ptr %254, align 8
  %256 = fsub double %253, %250
  %257 = fsub double %255, %251
  %258 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 0
  %259 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 1
  store double %256, ptr %258, align 8
  store double %257, ptr %259, align 8
  br label %260

260:                                              ; preds = %249
  %261 = load i32, ptr %10, align 4, !tbaa !9
  %262 = add i32 %261, 1
  store i32 %262, ptr %10, align 4, !tbaa !9
  br label %194, !llvm.loop !17

263:                                              ; preds = %194
  %264 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 0
  %265 = load double, ptr %264, align 8
  %266 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 1
  %267 = load double, ptr %266, align 8
  %268 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 0
  %269 = load double, ptr %268, align 8
  %270 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 1
  %271 = load double, ptr %270, align 8
  %272 = call { double, double } @__divdc3(double noundef %265, double noundef %267, double noundef %269, double noundef %271) #5
  %273 = extractvalue { double, double } %272, 0
  %274 = extractvalue { double, double } %272, 1
  %275 = load ptr, ptr %7, align 8, !tbaa !5
  %276 = load i32, ptr %8, align 4, !tbaa !9
  %277 = load i32, ptr %6, align 4, !tbaa !9
  %278 = mul i32 %276, %277
  %279 = load i32, ptr %9, align 4, !tbaa !9
  %280 = add i32 %278, %279
  %281 = zext i32 %280 to i64
  %282 = getelementptr inbounds { double, double }, ptr %275, i64 %281
  %283 = getelementptr inbounds { double, double }, ptr %282, i32 0, i32 0
  %284 = getelementptr inbounds { double, double }, ptr %282, i32 0, i32 1
  store double %273, ptr %283, align 8
  store double %274, ptr %284, align 8
  br label %285

285:                                              ; preds = %263
  %286 = load i32, ptr %8, align 4, !tbaa !9
  %287 = add i32 %286, 1
  store i32 %287, ptr %8, align 4, !tbaa !9
  br label %175, !llvm.loop !18

288:                                              ; preds = %175
  br label %289

289:                                              ; preds = %288
  %290 = load i32, ptr %9, align 4, !tbaa !9
  %291 = add i32 %290, 1
  store i32 %291, ptr %9, align 4, !tbaa !9
  br label %35, !llvm.loop !19

292:                                              ; preds = %35
  store i32 0, ptr %4, align 4
  store i32 1, ptr %17, align 4
  br label %293

293:                                              ; preds = %292, %140, %74, %59
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 16, 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
  %294 = load i32, ptr %4, align 4
  ret i32 %294
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fabs.f64(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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{!"branch_weights", i32 1, i32 1048575}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}


; 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.5 = external hidden unnamed_addr constant [89 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [82 x i8], align 1

declare i32 @liquid_error_fl(i32 noundef, ptr noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #0

declare { double, double } @__muldc3(double, double, double, double) local_unnamed_addr

declare { double, double } @__divdc3(double, double, double, double) local_unnamed_addr

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local i32 @matrixc_chol(ptr nocapture noundef readonly %0, i32 noundef %1, ptr nocapture noundef %2) local_unnamed_addr #2 {
  %4 = mul i32 %1, %1
  %.not = icmp eq i32 %4, 0
  br i1 %.not, label %.preheader90, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %3
  %5 = zext i32 %4 to i64
  %6 = shl nuw nsw i64 %5, 4
  tail call void @llvm.memset.p0.i64(ptr align 8 %2, i8 0, i64 %6, i1 false)
  br label %.preheader90

.preheader90:                                     ; preds = %.lr.ph.preheader, %3
  %.not116 = icmp eq i32 %1, 0
  br i1 %.not116, label %.loopexit91, label %.lr.ph115.preheader

.lr.ph115.preheader:                              ; preds = %.preheader90
  %7 = zext i32 %1 to i64
  br label %.lr.ph115

.loopexit:                                        ; preds = %._crit_edge108.us, %.lr.ph113.split, %49
  %indvars.iv.next141 = add nuw nsw i64 %indvars.iv140, 1
  %exitcond155.not = icmp eq i64 %indvars.iv.next152, %7
  br i1 %exitcond155.not, label %.loopexit91, label %.lr.ph115, !llvm.loop !5

.lr.ph115:                                        ; preds = %.lr.ph115.preheader, %.loopexit
  %indvars.iv151 = phi i64 [ 0, %.lr.ph115.preheader ], [ %indvars.iv.next152, %.loopexit ]
  %indvars.iv140 = phi i64 [ 1, %.lr.ph115.preheader ], [ %indvars.iv.next141, %.loopexit ]
  %8 = trunc nuw i64 %indvars.iv151 to i32
  %9 = mul i32 %8, %1
  %10 = add i32 %9, %8
  %11 = zext i32 %10 to i64
  %12 = getelementptr inbounds { double, double }, ptr %0, i64 %11
  %13 = load double, ptr %12, align 8
  %14 = fcmp olt double %13, 0.000000e+00
  br i1 %14, label %15, label %17

15:                                               ; preds = %.lr.ph115
  %16 = tail call i32 (i32, ptr, i32, ptr, ...) @liquid_error_fl(i32 noundef 3, ptr noundef nonnull @.str.5, i32 noundef 58, ptr noundef nonnull @.str.6, i32 noundef %8, i32 noundef %8, double noundef %13) #5
  br label %.loopexit91

17:                                               ; preds = %.lr.ph115
  %18 = getelementptr inbounds i8, ptr %12, i64 8
  %19 = load double, ptr %18, align 8
  %20 = fcmp ueq double %19, 0.000000e+00
  br i1 %20, label %.preheader, label %21

.preheader:                                       ; preds = %17
  %.not117 = icmp eq i64 %indvars.iv151, 0
  br i1 %.not117, label %._crit_edge, label %.lr.ph102

21:                                               ; preds = %17
  %22 = tail call double @llvm.fabs.f64(double %19)
  %23 = tail call i32 (i32, ptr, i32, ptr, ...) @liquid_error_fl(i32 noundef 3, ptr noundef nonnull @.str.5, i32 noundef 61, ptr noundef nonnull @.str.7, i32 noundef %8, i32 noundef %8, double noundef %22) #5
  br label %.loopexit91

.lr.ph102:                                        ; preds = %.preheader, %43
  %indvars.iv = phi i64 [ %indvars.iv.next, %43 ], [ 0, %.preheader ]
  %.0101 = phi double [ %45, %43 ], [ 0.000000e+00, %.preheader ]
  %24 = trunc nuw i64 %indvars.iv to i32
  %25 = add i32 %9, %24
  %26 = zext i32 %25 to i64
  %27 = getelementptr inbounds { double, double }, ptr %2, i64 %26
  %28 = load <2 x double>, ptr %27, align 8
  %29 = extractelement <2 x double> %28, i64 1
  %30 = fneg double %29
  %31 = fmul <2 x double> %28, %28
  %shift = shufflevector <2 x double> %31, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %32 = fadd <2 x double> %31, %shift
  %33 = extractelement <2 x double> %32, i64 0
  %34 = fcmp uno double %33, 0.000000e+00
  br i1 %34, label %35, label %43, !prof !7

35:                                               ; preds = %.lr.ph102
  %36 = extractelement <2 x double> %28, i64 0
  %37 = fmul double %36, %29
  %38 = fsub double %37, %37
  %39 = fcmp uno double %38, 0.000000e+00
  br i1 %39, label %40, label %43, !prof !7

40:                                               ; preds = %35
  %41 = tail call { double, double } @__muldc3(double noundef %36, double noundef %29, double noundef %36, double noundef %30) #5
  %42 = extractvalue { double, double } %41, 0
  br label %43

43:                                               ; preds = %40, %35, %.lr.ph102
  %44 = phi double [ %33, %.lr.ph102 ], [ %33, %35 ], [ %42, %40 ]
  %45 = fadd double %.0101, %44
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %indvars.iv151
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph102, !llvm.loop !8

._crit_edge:                                      ; preds = %43, %.preheader
  %.0.lcssa = phi double [ 0.000000e+00, %.preheader ], [ %45, %43 ]
  %46 = fcmp olt double %13, %.0.lcssa
  br i1 %46, label %47, label %49

47:                                               ; preds = %._crit_edge
  %48 = tail call i32 (i32, ptr, i32, ptr, ...) @liquid_error_fl(i32 noundef 3, ptr noundef nonnull @.str.5, i32 noundef 76, ptr noundef nonnull @.str.8, i32 noundef %8, i32 noundef %8, double noundef %13, double noundef %.0.lcssa) #5
  br label %.loopexit91

49:                                               ; preds = %._crit_edge
  %50 = fsub double %13, %.0.lcssa
  %51 = tail call double @sqrt(double noundef %50) #5
  %52 = getelementptr inbounds { double, double }, ptr %2, i64 %11
  %53 = getelementptr inbounds i8, ptr %52, i64 8
  store double %51, ptr %52, align 8
  store double 0.000000e+00, ptr %53, align 8
  %indvars.iv.next152 = add nuw nsw i64 %indvars.iv151, 1
  %54 = icmp ult i64 %indvars.iv.next152, %7
  br i1 %54, label %.lr.ph113, label %.loopexit

.lr.ph113:                                        ; preds = %49
  br i1 %.not117, label %.lr.ph113.split, label %.lr.ph107.us

.lr.ph107.us:                                     ; preds = %.lr.ph113, %._crit_edge108.us
  %indvars.iv142 = phi i64 [ %indvars.iv.next143, %._crit_edge108.us ], [ %indvars.iv140, %.lr.ph113 ]
  %55 = trunc nuw i64 %indvars.iv142 to i32
  %56 = mul i32 %55, %1
  %57 = add i32 %56, %8
  %58 = zext i32 %57 to i64
  %59 = getelementptr inbounds { double, double }, ptr %0, i64 %58
  %60 = load double, ptr %59, align 8
  %61 = getelementptr inbounds i8, ptr %59, i64 8
  %62 = load double, ptr %61, align 8
  br label %63

63:                                               ; preds = %.lr.ph107.us, %92
  %indvars.iv135 = phi i64 [ 0, %.lr.ph107.us ], [ %indvars.iv.next136, %92 ]
  %.sroa.0.0105.us = phi double [ %60, %.lr.ph107.us ], [ %95, %92 ]
  %.sroa.6.0104.us = phi double [ %62, %.lr.ph107.us ], [ %96, %92 ]
  %64 = trunc nuw i64 %indvars.iv135 to i32
  %65 = add i32 %56, %64
  %66 = zext i32 %65 to i64
  %67 = getelementptr inbounds { double, double }, ptr %2, i64 %66
  %68 = add i32 %9, %64
  %69 = zext i32 %68 to i64
  %70 = getelementptr inbounds { double, double }, ptr %2, i64 %69
  %71 = load <2 x double>, ptr %67, align 8
  %72 = load <2 x double>, ptr %70, align 8
  %73 = extractelement <2 x double> %72, i64 1
  %74 = fneg double %73
  %75 = shufflevector <2 x double> %71, <2 x double> poison, <2 x i32> <i32 1, i32 0>
  %76 = fmul <2 x double> %71, %72
  %shift186 = shufflevector <2 x double> %76, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %77 = fadd <2 x double> %76, %shift186
  %78 = extractelement <2 x double> %77, i64 0
  %79 = fmul <2 x double> %75, %72
  %shift187 = shufflevector <2 x double> %79, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %80 = fsub <2 x double> %79, %shift187
  %81 = extractelement <2 x double> %80, i64 0
  %82 = fcmp uno double %78, 0.000000e+00
  br i1 %82, label %83, label %92, !prof !7

83:                                               ; preds = %63
  %84 = fcmp uno double %81, 0.000000e+00
  br i1 %84, label %85, label %92, !prof !7

85:                                               ; preds = %83
  %86 = extractelement <2 x double> %71, i64 0
  %87 = extractelement <2 x double> %71, i64 1
  %88 = extractelement <2 x double> %72, i64 0
  %89 = tail call { double, double } @__muldc3(double noundef %86, double noundef %87, double noundef %88, double noundef %74) #5
  %90 = extractvalue { double, double } %89, 0
  %91 = extractvalue { double, double } %89, 1
  br label %92

92:                                               ; preds = %85, %83, %63
  %93 = phi double [ %78, %63 ], [ %78, %83 ], [ %90, %85 ]
  %94 = phi double [ %81, %63 ], [ %81, %83 ], [ %91, %85 ]
  %95 = fsub double %.sroa.0.0105.us, %93
  %96 = fsub double %.sroa.6.0104.us, %94
  %indvars.iv.next136 = add nuw nsw i64 %indvars.iv135, 1
  %exitcond139.not = icmp eq i64 %indvars.iv.next136, %indvars.iv151
  br i1 %exitcond139.not, label %._crit_edge108.us, label %63, !llvm.loop !9

._crit_edge108.us:                                ; preds = %92
  %97 = tail call { double, double } @__divdc3(double noundef %95, double noundef %96, double noundef %51, double noundef 0.000000e+00) #5
  %98 = extractvalue { double, double } %97, 0
  %99 = extractvalue { double, double } %97, 1
  %100 = getelementptr inbounds { double, double }, ptr %2, i64 %58
  %101 = getelementptr inbounds i8, ptr %100, i64 8
  store double %98, ptr %100, align 8
  store double %99, ptr %101, align 8
  %indvars.iv.next143 = add nuw nsw i64 %indvars.iv142, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next143 to i32
  %exitcond145.not = icmp eq i32 %lftr.wideiv, %1
  br i1 %exitcond145.not, label %.loopexit, label %.lr.ph107.us, !llvm.loop !10

.lr.ph113.split:                                  ; preds = %.lr.ph113, %.lr.ph113.split
  %indvars.iv146 = phi i64 [ %indvars.iv.next147, %.lr.ph113.split ], [ %indvars.iv140, %.lr.ph113 ]
  %102 = trunc nuw i64 %indvars.iv146 to i32
  %103 = mul i32 %102, %1
  %104 = zext i32 %103 to i64
  %105 = getelementptr inbounds { double, double }, ptr %0, i64 %104
  %106 = load double, ptr %105, align 8
  %107 = getelementptr inbounds i8, ptr %105, i64 8
  %108 = load double, ptr %107, align 8
  %109 = tail call { double, double } @__divdc3(double noundef %106, double noundef %108, double noundef %51, double noundef 0.000000e+00) #5
  %110 = extractvalue { double, double } %109, 0
  %111 = extractvalue { double, double } %109, 1
  %112 = getelementptr inbounds { double, double }, ptr %2, i64 %104
  %113 = getelementptr inbounds i8, ptr %112, i64 8
  store double %110, ptr %112, align 8
  store double %111, ptr %113, align 8
  %indvars.iv.next147 = add nuw nsw i64 %indvars.iv146, 1
  %lftr.wideiv149 = trunc i64 %indvars.iv.next147 to i32
  %exitcond150.not = icmp eq i32 %lftr.wideiv149, %1
  br i1 %exitcond150.not, label %.loopexit, label %.lr.ph113.split, !llvm.loop !10

.loopexit91:                                      ; preds = %.loopexit, %.preheader90, %47, %21, %15
  %.081 = phi i32 [ %16, %15 ], [ %23, %21 ], [ %48, %47 ], [ 0, %.preheader90 ], [ 0, %.loopexit ]
  ret i32 %.081
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

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 = { mustprogress nofree nounwind willreturn memory(write) "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!"branch_weights", i32 1, i32 1048575}
!8 = distinct !{!8, !6}
!9 = distinct !{!9, !6}
!10 = distinct !{!10, !6}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass,VectorCombinePass