; LLVM IR from venumb/ZSPACE :: cpp/depends/alglib/cpp/src (linalg)

; 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.alglib_impl::sparsematrix" = type { %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", i64, i64, i64, i64, i64, i64 }
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%union.anon.0 = type { ptr }

@.str.248 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.249 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.250 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.251 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.252 = external hidden unnamed_addr constant [32 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 void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext, ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl18sparsetransposesksEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN11alglib_impl11sparseissksEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN11alglib_impl14sparsegetnrowsEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef, ptr noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN11alglib_impl14sparsegetncolsEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef, ptr noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN11alglib_impl21sparsecholeskyskylineEPNS_12sparsematrixElbPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i1 noundef zeroext %2, ptr noundef %3) #2 {
  %5 = alloca i1, align 1
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca i8, align 1
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca i64, align 8
  %24 = alloca i8, align 1
  %25 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i64 %1, ptr %7, align 8, !tbaa !9
  %26 = zext i1 %2 to i8
  store i8 %26, ptr %8, align 1, !tbaa !11
  store ptr %3, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %24) #5
  %27 = load i64, ptr %7, align 8, !tbaa !9
  %28 = icmp sge i64 %27, 0
  %29 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %28, ptr noundef @.str.248, ptr noundef %29)
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = load ptr, ptr %9, align 8, !tbaa !5
  %32 = call noundef i64 @_ZN11alglib_impl14sparsegetnrowsEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %30, ptr noundef %31)
  %33 = load i64, ptr %7, align 8, !tbaa !9
  %34 = icmp sge i64 %32, %33
  %35 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %34, ptr noundef @.str.249, ptr noundef %35)
  %36 = load ptr, ptr %6, align 8, !tbaa !5
  %37 = load ptr, ptr %9, align 8, !tbaa !5
  %38 = call noundef i64 @_ZN11alglib_impl14sparsegetncolsEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %36, ptr noundef %37)
  %39 = load i64, ptr %7, align 8, !tbaa !9
  %40 = icmp sge i64 %38, %39
  %41 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %40, ptr noundef @.str.250, ptr noundef %41)
  %42 = load ptr, ptr %6, align 8, !tbaa !5
  %43 = load ptr, ptr %9, align 8, !tbaa !5
  %44 = call noundef zeroext i1 @_ZN11alglib_impl11sparseissksEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %42, ptr noundef %43)
  %45 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %44, ptr noundef @.str.251, ptr noundef %45)
  store i8 0, ptr %24, align 1, !tbaa !11
  %46 = load i8, ptr %8, align 1, !tbaa !11, !range !13, !noundef !14
  %47 = trunc i8 %46 to i1
  br i1 %47, label %48, label %51

48:                                               ; preds = %4
  %49 = load ptr, ptr %6, align 8, !tbaa !5
  %50 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl18sparsetransposesksEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %49, ptr noundef %50)
  br label %51

51:                                               ; preds = %48, %4
  store i64 0, ptr %19, align 8, !tbaa !9
  store i64 1, ptr %20, align 8, !tbaa !9
  br label %52

52:                                               ; preds = %226, %51
  %53 = load i64, ptr %19, align 8, !tbaa !9
  %54 = load i64, ptr %7, align 8, !tbaa !9
  %55 = icmp slt i64 %53, %54
  br i1 %55, label %56, label %239

56:                                               ; preds = %52
  %57 = load i64, ptr %20, align 8, !tbaa !9
  %58 = icmp eq i64 %57, 1
  %59 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %58, ptr noundef @.str.252, ptr noundef %59)
  store double 0.000000e+00, ptr %18, align 8, !tbaa !15
  %60 = load ptr, ptr %6, align 8, !tbaa !5
  %61 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %60, i32 0, i32 3
  %62 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %61, i32 0, i32 4
  %63 = load ptr, ptr %62, align 8, !tbaa !17
  %64 = load i64, ptr %19, align 8, !tbaa !9
  %65 = getelementptr inbounds i64, ptr %63, i64 %64
  %66 = load i64, ptr %65, align 8, !tbaa !9
  %67 = icmp sgt i64 %66, 0
  br i1 %67, label %68, label %197

68:                                               ; preds = %56
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  %70 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %69, i32 0, i32 3
  %71 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %70, i32 0, i32 4
  %72 = load ptr, ptr %71, align 8, !tbaa !17
  %73 = load i64, ptr %19, align 8, !tbaa !9
  %74 = getelementptr inbounds i64, ptr %72, i64 %73
  %75 = load i64, ptr %74, align 8, !tbaa !9
  store i64 %75, ptr %21, align 8, !tbaa !9
  %76 = load i64, ptr %19, align 8, !tbaa !9
  %77 = load i64, ptr %21, align 8, !tbaa !9
  %78 = sub nsw i64 %76, %77
  store i64 %78, ptr %10, align 8, !tbaa !9
  br label %79

79:                                               ; preds = %193, %68
  %80 = load i64, ptr %10, align 8, !tbaa !9
  %81 = load i64, ptr %19, align 8, !tbaa !9
  %82 = sub nsw i64 %81, 1
  %83 = icmp sle i64 %80, %82
  br i1 %83, label %84, label %196

84:                                               ; preds = %79
  %85 = load i64, ptr %19, align 8, !tbaa !9
  %86 = load i64, ptr %21, align 8, !tbaa !9
  %87 = sub nsw i64 %85, %86
  store i64 %87, ptr %14, align 8, !tbaa !9
  %88 = load i64, ptr %10, align 8, !tbaa !9
  %89 = load ptr, ptr %6, align 8, !tbaa !5
  %90 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %89, i32 0, i32 3
  %91 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %90, i32 0, i32 4
  %92 = load ptr, ptr %91, align 8, !tbaa !17
  %93 = load i64, ptr %10, align 8, !tbaa !9
  %94 = getelementptr inbounds i64, ptr %92, i64 %93
  %95 = load i64, ptr %94, align 8, !tbaa !9
  %96 = sub nsw i64 %88, %95
  store i64 %96, ptr %15, align 8, !tbaa !9
  %97 = load i64, ptr %14, align 8, !tbaa !9
  %98 = load i64, ptr %15, align 8, !tbaa !9
  %99 = load ptr, ptr %9, align 8, !tbaa !5
  %100 = call noundef i64 @_ZN11alglib_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef %97, i64 noundef %98, ptr noundef %99)
  store i64 %100, ptr %13, align 8, !tbaa !9
  %101 = load ptr, ptr %6, align 8, !tbaa !5
  %102 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %101, i32 0, i32 2
  %103 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %102, i32 0, i32 4
  %104 = load ptr, ptr %103, align 8, !tbaa !17
  %105 = load i64, ptr %19, align 8, !tbaa !9
  %106 = getelementptr inbounds i64, ptr %104, i64 %105
  %107 = load i64, ptr %106, align 8, !tbaa !9
  %108 = load i64, ptr %13, align 8, !tbaa !9
  %109 = load i64, ptr %14, align 8, !tbaa !9
  %110 = sub nsw i64 %108, %109
  %111 = add nsw i64 %107, %110
  store i64 %111, ptr %22, align 8, !tbaa !9
  %112 = load ptr, ptr %6, align 8, !tbaa !5
  %113 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %112, i32 0, i32 2
  %114 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %113, i32 0, i32 4
  %115 = load ptr, ptr %114, align 8, !tbaa !17
  %116 = load i64, ptr %10, align 8, !tbaa !9
  %117 = getelementptr inbounds i64, ptr %115, i64 %116
  %118 = load i64, ptr %117, align 8, !tbaa !9
  %119 = load i64, ptr %13, align 8, !tbaa !9
  %120 = load i64, ptr %15, align 8, !tbaa !9
  %121 = sub nsw i64 %119, %120
  %122 = add nsw i64 %118, %121
  store i64 %122, ptr %23, align 8, !tbaa !9
  store double 0.000000e+00, ptr %16, align 8, !tbaa !15
  %123 = load i64, ptr %10, align 8, !tbaa !9
  %124 = sub nsw i64 %123, 1
  %125 = load i64, ptr %13, align 8, !tbaa !9
  %126 = sub nsw i64 %124, %125
  store i64 %126, ptr %12, align 8, !tbaa !9
  store i64 0, ptr %11, align 8, !tbaa !9
  br label %127

127:                                              ; preds = %152, %84
  %128 = load i64, ptr %11, align 8, !tbaa !9
  %129 = load i64, ptr %12, align 8, !tbaa !9
  %130 = icmp sle i64 %128, %129
  br i1 %130, label %131, label %155

131:                                              ; preds = %127
  %132 = load double, ptr %16, align 8, !tbaa !15
  %133 = load ptr, ptr %6, align 8, !tbaa !5
  %134 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %133, i32 0, i32 0
  %135 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %134, i32 0, i32 4
  %136 = load ptr, ptr %135, align 8, !tbaa !17
  %137 = load i64, ptr %22, align 8, !tbaa !9
  %138 = load i64, ptr %11, align 8, !tbaa !9
  %139 = add nsw i64 %137, %138
  %140 = getelementptr inbounds double, ptr %136, i64 %139
  %141 = load double, ptr %140, align 8, !tbaa !15
  %142 = load ptr, ptr %6, align 8, !tbaa !5
  %143 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %142, i32 0, i32 0
  %144 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %143, i32 0, i32 4
  %145 = load ptr, ptr %144, align 8, !tbaa !17
  %146 = load i64, ptr %23, align 8, !tbaa !9
  %147 = load i64, ptr %11, align 8, !tbaa !9
  %148 = add nsw i64 %146, %147
  %149 = getelementptr inbounds double, ptr %145, i64 %148
  %150 = load double, ptr %149, align 8, !tbaa !15
  %151 = call double @llvm.fmuladd.f64(double %141, double %150, double %132)
  store double %151, ptr %16, align 8, !tbaa !15
  br label %152

152:                                              ; preds = %131
  %153 = load i64, ptr %11, align 8, !tbaa !9
  %154 = add nsw i64 %153, 1
  store i64 %154, ptr %11, align 8, !tbaa !9
  br label %127, !llvm.loop !18

155:                                              ; preds = %127
  %156 = load ptr, ptr %6, align 8, !tbaa !5
  %157 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %156, i32 0, i32 0
  %158 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %157, i32 0, i32 4
  %159 = load ptr, ptr %158, align 8, !tbaa !17
  %160 = load i64, ptr %22, align 8, !tbaa !9
  %161 = load i64, ptr %12, align 8, !tbaa !9
  %162 = add nsw i64 %160, %161
  %163 = add nsw i64 %162, 1
  %164 = getelementptr inbounds double, ptr %159, i64 %163
  %165 = load double, ptr %164, align 8, !tbaa !15
  %166 = load double, ptr %16, align 8, !tbaa !15
  %167 = fsub double %165, %166
  %168 = load ptr, ptr %6, align 8, !tbaa !5
  %169 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %168, i32 0, i32 0
  %170 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %169, i32 0, i32 4
  %171 = load ptr, ptr %170, align 8, !tbaa !17
  %172 = load i64, ptr %23, align 8, !tbaa !9
  %173 = load i64, ptr %12, align 8, !tbaa !9
  %174 = add nsw i64 %172, %173
  %175 = add nsw i64 %174, 1
  %176 = getelementptr inbounds double, ptr %171, i64 %175
  %177 = load double, ptr %176, align 8, !tbaa !15
  %178 = fdiv double %167, %177
  store double %178, ptr %17, align 8, !tbaa !15
  %179 = load double, ptr %17, align 8, !tbaa !15
  %180 = load ptr, ptr %6, align 8, !tbaa !5
  %181 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %180, i32 0, i32 0
  %182 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %181, i32 0, i32 4
  %183 = load ptr, ptr %182, align 8, !tbaa !17
  %184 = load i64, ptr %22, align 8, !tbaa !9
  %185 = load i64, ptr %12, align 8, !tbaa !9
  %186 = add nsw i64 %184, %185
  %187 = add nsw i64 %186, 1
  %188 = getelementptr inbounds double, ptr %183, i64 %187
  store double %179, ptr %188, align 8, !tbaa !15
  %189 = load double, ptr %18, align 8, !tbaa !15
  %190 = load double, ptr %17, align 8, !tbaa !15
  %191 = load double, ptr %17, align 8, !tbaa !15
  %192 = call double @llvm.fmuladd.f64(double %190, double %191, double %189)
  store double %192, ptr %18, align 8, !tbaa !15
  br label %193

193:                                              ; preds = %155
  %194 = load i64, ptr %10, align 8, !tbaa !9
  %195 = add nsw i64 %194, 1
  store i64 %195, ptr %10, align 8, !tbaa !9
  br label %79, !llvm.loop !20

196:                                              ; preds = %79
  br label %197

197:                                              ; preds = %196, %56
  %198 = load ptr, ptr %6, align 8, !tbaa !5
  %199 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %198, i32 0, i32 2
  %200 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %199, i32 0, i32 4
  %201 = load ptr, ptr %200, align 8, !tbaa !17
  %202 = load i64, ptr %19, align 8, !tbaa !9
  %203 = getelementptr inbounds i64, ptr %201, i64 %202
  %204 = load i64, ptr %203, align 8, !tbaa !9
  %205 = load ptr, ptr %6, align 8, !tbaa !5
  %206 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %205, i32 0, i32 3
  %207 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %206, i32 0, i32 4
  %208 = load ptr, ptr %207, align 8, !tbaa !17
  %209 = load i64, ptr %19, align 8, !tbaa !9
  %210 = getelementptr inbounds i64, ptr %208, i64 %209
  %211 = load i64, ptr %210, align 8, !tbaa !9
  %212 = add nsw i64 %204, %211
  store i64 %212, ptr %22, align 8, !tbaa !9
  %213 = load ptr, ptr %6, align 8, !tbaa !5
  %214 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %213, i32 0, i32 0
  %215 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %214, i32 0, i32 4
  %216 = load ptr, ptr %215, align 8, !tbaa !17
  %217 = load i64, ptr %22, align 8, !tbaa !9
  %218 = getelementptr inbounds double, ptr %216, i64 %217
  %219 = load double, ptr %218, align 8, !tbaa !15
  store double %219, ptr %16, align 8, !tbaa !15
  %220 = load double, ptr %16, align 8, !tbaa !15
  %221 = load double, ptr %18, align 8, !tbaa !15
  %222 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_less_eqEdd(double noundef %220, double noundef %221)
  br i1 %222, label %223, label %226

223:                                              ; preds = %197
  store i8 0, ptr %24, align 1, !tbaa !11
  %224 = load i8, ptr %24, align 1, !tbaa !11, !range !13, !noundef !14
  %225 = trunc i8 %224 to i1
  store i1 %225, ptr %5, align 1
  store i32 1, ptr %25, align 4
  br label %248

226:                                              ; preds = %197
  %227 = load double, ptr %16, align 8, !tbaa !15
  %228 = load double, ptr %18, align 8, !tbaa !15
  %229 = fsub double %227, %228
  %230 = load ptr, ptr %9, align 8, !tbaa !5
  %231 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %229, ptr noundef %230)
  %232 = load ptr, ptr %6, align 8, !tbaa !5
  %233 = getelementptr inbounds %"struct.alglib_impl::sparsematrix", ptr %232, i32 0, i32 0
  %234 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %233, i32 0, i32 4
  %235 = load ptr, ptr %234, align 8, !tbaa !17
  %236 = load i64, ptr %22, align 8, !tbaa !9
  %237 = getelementptr inbounds double, ptr %235, i64 %236
  store double %231, ptr %237, align 8, !tbaa !15
  %238 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl3incEPlPNS_8ae_stateE(ptr noundef %19, ptr noundef %238)
  br label %52, !llvm.loop !21

239:                                              ; preds = %52
  %240 = load i8, ptr %8, align 1, !tbaa !11, !range !13, !noundef !14
  %241 = trunc i8 %240 to i1
  br i1 %241, label %242, label %245

242:                                              ; preds = %239
  %243 = load ptr, ptr %6, align 8, !tbaa !5
  %244 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl18sparsetransposesksEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %243, ptr noundef %244)
  br label %245

245:                                              ; preds = %242, %239
  store i8 1, ptr %24, align 1, !tbaa !11
  %246 = load i8, ptr %24, align 1, !tbaa !11, !range !13, !noundef !14
  %247 = trunc i8 %246 to i1
  store i1 %247, ptr %5, align 1
  store i32 1, ptr %25, align 4
  br label %248

248:                                              ; preds = %245, %223
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  %249 = load i1, ptr %5, align 1
  ret i1 %249
}

declare noundef i64 @_ZN11alglib_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef, i64 noundef, ptr noundef) #1

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

declare noundef zeroext i1 @_ZN11alglib_impl13ae_fp_less_eqEdd(double noundef, double noundef) #1

declare noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef, ptr noundef) #1

declare void @_ZN11alglib_impl3incEPlPNS_8ae_stateE(ptr noundef, ptr noundef) #1

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 = { mustprogress 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 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!16, !16, i64 0}
!16 = !{!"double", !7, i64 0}
!17 = !{!7, !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = distinct !{!21, !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"

@.str.248 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.249 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.250 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.251 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.252 = external hidden unnamed_addr constant [32 x i8], align 1

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

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

declare void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl18sparsetransposesksEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN11alglib_impl11sparseissksEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN11alglib_impl14sparsegetnrowsEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN11alglib_impl14sparsegetncolsEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN11alglib_impl21sparsecholeskyskylineEPNS_12sparsematrixElbPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i1 noundef zeroext %2, ptr noundef %3) local_unnamed_addr #2 {
  %5 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %6 = icmp sgt i64 %1, -1
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %6, ptr noundef nonnull @.str.248, ptr noundef %3)
  %7 = tail call noundef i64 @_ZN11alglib_impl14sparsegetnrowsEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %0, ptr noundef %3)
  %8 = icmp sge i64 %7, %1
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %8, ptr noundef nonnull @.str.249, ptr noundef %3)
  %9 = tail call noundef i64 @_ZN11alglib_impl14sparsegetncolsEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %0, ptr noundef %3)
  %10 = icmp sge i64 %9, %1
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %10, ptr noundef nonnull @.str.250, ptr noundef %3)
  %11 = tail call noundef zeroext i1 @_ZN11alglib_impl11sparseissksEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %0, ptr noundef %3)
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %11, ptr noundef nonnull @.str.251, ptr noundef %3)
  br i1 %2, label %12, label %13

12:                                               ; preds = %4
  tail call void @_ZN11alglib_impl18sparsetransposesksEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %0, ptr noundef %3)
  br label %13

13:                                               ; preds = %12, %4
  store i64 0, ptr %5, align 8, !tbaa !5
  %14 = icmp slt i64 %1, 1
  br i1 %14, label %._crit_edge100, label %.lr.ph99

.lr.ph99:                                         ; preds = %13
  %15 = getelementptr inbounds i8, ptr %0, i64 248
  %16 = getelementptr inbounds i8, ptr %0, i64 184
  %17 = getelementptr inbounds i8, ptr %0, i64 56
  br label %18

18:                                               ; preds = %.lr.ph99, %101
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext true, ptr noundef nonnull @.str.252, ptr noundef %3)
  %19 = load ptr, ptr %15, align 8, !tbaa !9
  %20 = load i64, ptr %5, align 8, !tbaa !5
  %21 = getelementptr inbounds i64, ptr %19, i64 %20
  %22 = load i64, ptr %21, align 8, !tbaa !5
  %23 = icmp sgt i64 %22, 0
  br i1 %23, label %.lr.ph96.preheader, label %.loopexit

.lr.ph96.preheader:                               ; preds = %18
  %24 = sub nsw i64 %20, %22
  br label %.lr.ph96

.lr.ph96:                                         ; preds = %.lr.ph96.preheader, %._crit_edge
  %25 = phi i64 [ %33, %._crit_edge ], [ %20, %.lr.ph96.preheader ]
  %.08194 = phi i64 [ %90, %._crit_edge ], [ %24, %.lr.ph96.preheader ]
  %.08393 = phi double [ %89, %._crit_edge ], [ 0.000000e+00, %.lr.ph96.preheader ]
  %26 = sub nsw i64 %25, %22
  %27 = load ptr, ptr %15, align 8, !tbaa !9
  %28 = getelementptr inbounds i64, ptr %27, i64 %.08194
  %29 = load i64, ptr %28, align 8, !tbaa !5
  %30 = sub nsw i64 %.08194, %29
  %31 = call noundef i64 @_ZN11alglib_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef %26, i64 noundef %30, ptr noundef %3)
  %32 = load ptr, ptr %16, align 8, !tbaa !9
  %33 = load i64, ptr %5, align 8, !tbaa !5
  %34 = getelementptr inbounds i64, ptr %32, i64 %33
  %35 = load i64, ptr %34, align 8, !tbaa !5
  %36 = sub nsw i64 %31, %26
  %37 = add nsw i64 %35, %36
  %38 = getelementptr inbounds i64, ptr %32, i64 %.08194
  %39 = load i64, ptr %38, align 8, !tbaa !5
  %40 = sub nsw i64 %31, %30
  %41 = add nsw i64 %39, %40
  %42 = xor i64 %31, -1
  %43 = add i64 %.08194, %42
  %.not89 = icmp slt i64 %43, 0
  %.pre = load ptr, ptr %17, align 8, !tbaa !9
  br i1 %.not89, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph96
  %44 = getelementptr double, ptr %.pre, i64 %37
  %45 = getelementptr double, ptr %.pre, i64 %41
  %46 = sub i64 %.08194, %31
  %xtraiter = and i64 %46, 3
  %47 = icmp ult i64 %43, 3
  br i1 %47, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %46, -4
  br label %48

48:                                               ; preds = %48, %.lr.ph.new
  %.08291 = phi i64 [ 0, %.lr.ph.new ], [ %72, %48 ]
  %.08490 = phi double [ 0.000000e+00, %.lr.ph.new ], [ %71, %48 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.3, %48 ]
  %49 = getelementptr double, ptr %44, i64 %.08291
  %50 = load double, ptr %49, align 8, !tbaa !10
  %51 = getelementptr double, ptr %45, i64 %.08291
  %52 = load double, ptr %51, align 8, !tbaa !10
  %53 = call double @llvm.fmuladd.f64(double %50, double %52, double %.08490)
  %54 = or disjoint i64 %.08291, 1
  %55 = getelementptr double, ptr %44, i64 %54
  %56 = load double, ptr %55, align 8, !tbaa !10
  %57 = getelementptr double, ptr %45, i64 %54
  %58 = load double, ptr %57, align 8, !tbaa !10
  %59 = call double @llvm.fmuladd.f64(double %56, double %58, double %53)
  %60 = or disjoint i64 %.08291, 2
  %61 = getelementptr double, ptr %44, i64 %60
  %62 = load double, ptr %61, align 8, !tbaa !10
  %63 = getelementptr double, ptr %45, i64 %60
  %64 = load double, ptr %63, align 8, !tbaa !10
  %65 = call double @llvm.fmuladd.f64(double %62, double %64, double %59)
  %66 = or disjoint i64 %.08291, 3
  %67 = getelementptr double, ptr %44, i64 %66
  %68 = load double, ptr %67, align 8, !tbaa !10
  %69 = getelementptr double, ptr %45, i64 %66
  %70 = load double, ptr %69, align 8, !tbaa !10
  %71 = call double @llvm.fmuladd.f64(double %68, double %70, double %65)
  %72 = add nuw i64 %.08291, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge.loopexit.unr-lcssa, label %48, !llvm.loop !12

._crit_edge.loopexit.unr-lcssa:                   ; preds = %48, %.lr.ph
  %.lcssa.ph = phi double [ poison, %.lr.ph ], [ %71, %48 ]
  %.08291.unr = phi i64 [ 0, %.lr.ph ], [ %72, %48 ]
  %.08490.unr = phi double [ 0.000000e+00, %.lr.ph ], [ %71, %48 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader
  %.08291.epil = phi i64 [ %78, %.epil.preheader ], [ %.08291.unr, %._crit_edge.loopexit.unr-lcssa ]
  %.08490.epil = phi double [ %77, %.epil.preheader ], [ %.08490.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %73 = getelementptr double, ptr %44, i64 %.08291.epil
  %74 = load double, ptr %73, align 8, !tbaa !10
  %75 = getelementptr double, ptr %45, i64 %.08291.epil
  %76 = load double, ptr %75, align 8, !tbaa !10
  %77 = call double @llvm.fmuladd.f64(double %74, double %76, double %.08490.epil)
  %78 = add nuw i64 %.08291.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge, label %.epil.preheader, !llvm.loop !14

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader, %.lr.ph96
  %.084.lcssa = phi double [ 0.000000e+00, %.lr.ph96 ], [ %.lcssa.ph, %._crit_edge.loopexit.unr-lcssa ], [ %77, %.epil.preheader ]
  %79 = getelementptr double, ptr %.pre, i64 %37
  %80 = getelementptr double, ptr %79, i64 %43
  %81 = getelementptr i8, ptr %80, i64 8
  %82 = load double, ptr %81, align 8, !tbaa !10
  %83 = fsub double %82, %.084.lcssa
  %84 = getelementptr double, ptr %.pre, i64 %41
  %85 = getelementptr double, ptr %84, i64 %43
  %86 = getelementptr i8, ptr %85, i64 8
  %87 = load double, ptr %86, align 8, !tbaa !10
  %88 = fdiv double %83, %87
  store double %88, ptr %81, align 8, !tbaa !10
  %89 = call double @llvm.fmuladd.f64(double %88, double %88, double %.08393)
  %90 = add nsw i64 %.08194, 1
  %.not.not = icmp slt i64 %90, %33
  br i1 %.not.not, label %.lr.ph96, label %.loopexit.loopexit, !llvm.loop !16

.loopexit.loopexit:                               ; preds = %._crit_edge
  %.pre108 = load ptr, ptr %15, align 8, !tbaa !9
  %.phi.trans.insert = getelementptr inbounds i64, ptr %.pre108, i64 %33
  %.pre109 = load i64, ptr %.phi.trans.insert, align 8, !tbaa !5
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit, %18
  %91 = phi i64 [ %22, %18 ], [ %.pre109, %.loopexit.loopexit ]
  %92 = phi i64 [ %20, %18 ], [ %33, %.loopexit.loopexit ]
  %.1 = phi double [ 0.000000e+00, %18 ], [ %89, %.loopexit.loopexit ]
  %93 = load ptr, ptr %16, align 8, !tbaa !9
  %94 = getelementptr inbounds i64, ptr %93, i64 %92
  %95 = load i64, ptr %94, align 8, !tbaa !5
  %96 = add nsw i64 %91, %95
  %97 = load ptr, ptr %17, align 8, !tbaa !9
  %98 = getelementptr inbounds double, ptr %97, i64 %96
  %99 = load double, ptr %98, align 8, !tbaa !10
  %100 = call noundef zeroext i1 @_ZN11alglib_impl13ae_fp_less_eqEdd(double noundef %99, double noundef %.1)
  br i1 %100, label %.loopexit87, label %101

101:                                              ; preds = %.loopexit
  %102 = fsub double %99, %.1
  %103 = call noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef %102, ptr noundef %3)
  %104 = load ptr, ptr %17, align 8, !tbaa !9
  %105 = getelementptr inbounds double, ptr %104, i64 %96
  store double %103, ptr %105, align 8, !tbaa !10
  call void @_ZN11alglib_impl3incEPlPNS_8ae_stateE(ptr noundef nonnull %5, ptr noundef %3)
  %106 = load i64, ptr %5, align 8, !tbaa !5
  %.not = icmp slt i64 %106, %1
  br i1 %.not, label %18, label %._crit_edge100, !llvm.loop !17

._crit_edge100:                                   ; preds = %101, %13
  br i1 %2, label %107, label %.loopexit87

107:                                              ; preds = %._crit_edge100
  call void @_ZN11alglib_impl18sparsetransposesksEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %0, ptr noundef %3)
  br label %.loopexit87

.loopexit87:                                      ; preds = %.loopexit, %._crit_edge100, %107
  %108 = phi i1 [ true, %._crit_edge100 ], [ true, %107 ], [ false, %.loopexit ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  ret i1 %108
}

declare noundef i64 @_ZN11alglib_impl9ae_maxintEllPNS_8ae_stateE(i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #1

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

declare noundef zeroext i1 @_ZN11alglib_impl13ae_fp_less_eqEdd(double noundef, double noundef) local_unnamed_addr #1

declare noundef double @_ZN11alglib_impl7ae_sqrtEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #1

declare void @_ZN11alglib_impl3incEPlPNS_8ae_stateE(ptr noundef, ptr noundef) local_unnamed_addr #1

attributes #0 = { mustprogress 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 = { mustprogress 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 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 = { mustprogress 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"double", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.unroll.disable"}
!16 = distinct !{!16, !13}
!17 = distinct !{!17, !13}


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