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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN11alglib_impl14spdmatrixrcondEPNS_9ae_matrixElbPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i1 noundef zeroext %2, ptr noundef %3) #2 {
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i8, align 1
  %8 = alloca ptr, align 8
  %9 = alloca %"struct.alglib_impl::ae_frame", align 8
  %10 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca %"struct.alglib_impl::ae_vector", align 8
  %18 = alloca double, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i64 %1, ptr %6, align 8, !tbaa !9
  %19 = zext i1 %2 to i8
  store i8 %19, ptr %7, align 1, !tbaa !11
  store ptr %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  %20 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %20, ptr noundef %9)
  call void @llvm.memset.p0.i64(ptr align 8 %10, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %17, i8 0, i64 64, i1 false)
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl19ae_matrix_init_copyEPNS_9ae_matrixES1_PNS_8ae_stateEb(ptr noundef %10, ptr noundef %21, ptr noundef %22, i1 noundef zeroext true)
  store ptr %10, ptr %5, align 8, !tbaa !5
  %23 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %17, i64 noundef 0, i64 noundef 3, ptr noundef %23, i1 noundef zeroext true)
  %24 = load i64, ptr %6, align 8, !tbaa !9
  %25 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %17, i64 noundef %24, ptr noundef %25)
  store i64 0, ptr %11, align 8, !tbaa !9
  br label %26

26:                                               ; preds = %36, %4
  %27 = load i64, ptr %11, align 8, !tbaa !9
  %28 = load i64, ptr %6, align 8, !tbaa !9
  %29 = sub nsw i64 %28, 1
  %30 = icmp sle i64 %27, %29
  br i1 %30, label %31, label %39

31:                                               ; preds = %26
  %32 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %17, i32 0, i32 4
  %33 = load ptr, ptr %32, align 8, !tbaa !13
  %34 = load i64, ptr %11, align 8, !tbaa !9
  %35 = getelementptr inbounds double, ptr %33, i64 %34
  store double 0.000000e+00, ptr %35, align 8, !tbaa !14
  br label %36

36:                                               ; preds = %31
  %37 = load i64, ptr %11, align 8, !tbaa !9
  %38 = add nsw i64 %37, 1
  store i64 %38, ptr %11, align 8, !tbaa !9
  br label %26, !llvm.loop !16

39:                                               ; preds = %26
  store i64 0, ptr %11, align 8, !tbaa !9
  br label %40

40:                                               ; preds = %134, %39
  %41 = load i64, ptr %11, align 8, !tbaa !9
  %42 = load i64, ptr %6, align 8, !tbaa !9
  %43 = sub nsw i64 %42, 1
  %44 = icmp sle i64 %41, %43
  br i1 %44, label %45, label %137

45:                                               ; preds = %40
  %46 = load i8, ptr %7, align 1, !tbaa !11, !range !18, !noundef !19
  %47 = trunc i8 %46 to i1
  br i1 %47, label %48, label %52

48:                                               ; preds = %45
  %49 = load i64, ptr %11, align 8, !tbaa !9
  store i64 %49, ptr %13, align 8, !tbaa !9
  %50 = load i64, ptr %6, align 8, !tbaa !9
  %51 = sub nsw i64 %50, 1
  store i64 %51, ptr %14, align 8, !tbaa !9
  br label %54

52:                                               ; preds = %45
  store i64 0, ptr %13, align 8, !tbaa !9
  %53 = load i64, ptr %11, align 8, !tbaa !9
  store i64 %53, ptr %14, align 8, !tbaa !9
  br label %54

54:                                               ; preds = %52, %48
  %55 = load i64, ptr %13, align 8, !tbaa !9
  store i64 %55, ptr %12, align 8, !tbaa !9
  br label %56

56:                                               ; preds = %130, %54
  %57 = load i64, ptr %12, align 8, !tbaa !9
  %58 = load i64, ptr %14, align 8, !tbaa !9
  %59 = icmp sle i64 %57, %58
  br i1 %59, label %60, label %133

60:                                               ; preds = %56
  %61 = load i64, ptr %11, align 8, !tbaa !9
  %62 = load i64, ptr %12, align 8, !tbaa !9
  %63 = icmp eq i64 %61, %62
  br i1 %63, label %64, label %86

64:                                               ; preds = %60
  %65 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %17, i32 0, i32 4
  %66 = load ptr, ptr %65, align 8, !tbaa !13
  %67 = load i64, ptr %11, align 8, !tbaa !9
  %68 = getelementptr inbounds double, ptr %66, i64 %67
  %69 = load double, ptr %68, align 8, !tbaa !14
  %70 = load ptr, ptr %5, align 8, !tbaa !5
  %71 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %70, i32 0, i32 6
  %72 = load ptr, ptr %71, align 8, !tbaa !13
  %73 = load i64, ptr %11, align 8, !tbaa !9
  %74 = getelementptr inbounds ptr, ptr %72, i64 %73
  %75 = load ptr, ptr %74, align 8, !tbaa !5
  %76 = load i64, ptr %11, align 8, !tbaa !9
  %77 = getelementptr inbounds double, ptr %75, i64 %76
  %78 = load double, ptr %77, align 8, !tbaa !14
  %79 = load ptr, ptr %8, align 8, !tbaa !5
  %80 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %78, ptr noundef %79)
  %81 = fadd double %69, %80
  %82 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %17, i32 0, i32 4
  %83 = load ptr, ptr %82, align 8, !tbaa !13
  %84 = load i64, ptr %11, align 8, !tbaa !9
  %85 = getelementptr inbounds double, ptr %83, i64 %84
  store double %81, ptr %85, align 8, !tbaa !14
  br label %129

86:                                               ; preds = %60
  %87 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %17, i32 0, i32 4
  %88 = load ptr, ptr %87, align 8, !tbaa !13
  %89 = load i64, ptr %11, align 8, !tbaa !9
  %90 = getelementptr inbounds double, ptr %88, i64 %89
  %91 = load double, ptr %90, align 8, !tbaa !14
  %92 = load ptr, ptr %5, align 8, !tbaa !5
  %93 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %92, i32 0, i32 6
  %94 = load ptr, ptr %93, align 8, !tbaa !13
  %95 = load i64, ptr %11, align 8, !tbaa !9
  %96 = getelementptr inbounds ptr, ptr %94, i64 %95
  %97 = load ptr, ptr %96, align 8, !tbaa !5
  %98 = load i64, ptr %12, align 8, !tbaa !9
  %99 = getelementptr inbounds double, ptr %97, i64 %98
  %100 = load double, ptr %99, align 8, !tbaa !14
  %101 = load ptr, ptr %8, align 8, !tbaa !5
  %102 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %100, ptr noundef %101)
  %103 = fadd double %91, %102
  %104 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %17, i32 0, i32 4
  %105 = load ptr, ptr %104, align 8, !tbaa !13
  %106 = load i64, ptr %11, align 8, !tbaa !9
  %107 = getelementptr inbounds double, ptr %105, i64 %106
  store double %103, ptr %107, align 8, !tbaa !14
  %108 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %17, i32 0, i32 4
  %109 = load ptr, ptr %108, align 8, !tbaa !13
  %110 = load i64, ptr %12, align 8, !tbaa !9
  %111 = getelementptr inbounds double, ptr %109, i64 %110
  %112 = load double, ptr %111, align 8, !tbaa !14
  %113 = load ptr, ptr %5, align 8, !tbaa !5
  %114 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %113, i32 0, i32 6
  %115 = load ptr, ptr %114, align 8, !tbaa !13
  %116 = load i64, ptr %11, align 8, !tbaa !9
  %117 = getelementptr inbounds ptr, ptr %115, i64 %116
  %118 = load ptr, ptr %117, align 8, !tbaa !5
  %119 = load i64, ptr %12, align 8, !tbaa !9
  %120 = getelementptr inbounds double, ptr %118, i64 %119
  %121 = load double, ptr %120, align 8, !tbaa !14
  %122 = load ptr, ptr %8, align 8, !tbaa !5
  %123 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %121, ptr noundef %122)
  %124 = fadd double %112, %123
  %125 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %17, i32 0, i32 4
  %126 = load ptr, ptr %125, align 8, !tbaa !13
  %127 = load i64, ptr %12, align 8, !tbaa !9
  %128 = getelementptr inbounds double, ptr %126, i64 %127
  store double %124, ptr %128, align 8, !tbaa !14
  br label %129

129:                                              ; preds = %86, %64
  br label %130

130:                                              ; preds = %129
  %131 = load i64, ptr %12, align 8, !tbaa !9
  %132 = add nsw i64 %131, 1
  store i64 %132, ptr %12, align 8, !tbaa !9
  br label %56, !llvm.loop !20

133:                                              ; preds = %56
  br label %134

134:                                              ; preds = %133
  %135 = load i64, ptr %11, align 8, !tbaa !9
  %136 = add nsw i64 %135, 1
  store i64 %136, ptr %11, align 8, !tbaa !9
  br label %40, !llvm.loop !21

137:                                              ; preds = %40
  store double 0.000000e+00, ptr %16, align 8, !tbaa !14
  store i64 0, ptr %11, align 8, !tbaa !9
  br label %138

138:                                              ; preds = %152, %137
  %139 = load i64, ptr %11, align 8, !tbaa !9
  %140 = load i64, ptr %6, align 8, !tbaa !9
  %141 = sub nsw i64 %140, 1
  %142 = icmp sle i64 %139, %141
  br i1 %142, label %143, label %155

143:                                              ; preds = %138
  %144 = load double, ptr %16, align 8, !tbaa !14
  %145 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %17, i32 0, i32 4
  %146 = load ptr, ptr %145, align 8, !tbaa !13
  %147 = load i64, ptr %11, align 8, !tbaa !9
  %148 = getelementptr inbounds double, ptr %146, i64 %147
  %149 = load double, ptr %148, align 8, !tbaa !14
  %150 = load ptr, ptr %8, align 8, !tbaa !5
  %151 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %144, double noundef %149, ptr noundef %150)
  store double %151, ptr %16, align 8, !tbaa !14
  br label %152

152:                                              ; preds = %143
  %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 %138, !llvm.loop !22

155:                                              ; preds = %138
  %156 = load ptr, ptr %5, align 8, !tbaa !5
  %157 = load i64, ptr %6, align 8, !tbaa !9
  %158 = load i8, ptr %7, align 1, !tbaa !11, !range !18, !noundef !19
  %159 = trunc i8 %158 to i1
  %160 = load ptr, ptr %8, align 8, !tbaa !5
  %161 = call noundef zeroext i1 @_ZN11alglib_impl17spdmatrixcholeskyEPNS_9ae_matrixElbPNS_8ae_stateE(ptr noundef %156, i64 noundef %157, i1 noundef zeroext %159, ptr noundef %160)
  br i1 %161, label %162, label %170

162:                                              ; preds = %155
  %163 = load ptr, ptr %5, align 8, !tbaa !5
  %164 = load i64, ptr %6, align 8, !tbaa !9
  %165 = load i8, ptr %7, align 1, !tbaa !11, !range !18, !noundef !19
  %166 = trunc i8 %165 to i1
  %167 = load double, ptr %16, align 8, !tbaa !14
  %168 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_implL36rcond_spdmatrixrcondcholeskyinternalEPNS_9ae_matrixElbbdPdPNS_8ae_stateE(ptr noundef %163, i64 noundef %164, i1 noundef zeroext %166, i1 noundef zeroext true, double noundef %167, ptr noundef %15, ptr noundef %168)
  %169 = load double, ptr %15, align 8, !tbaa !14
  store double %169, ptr %18, align 8, !tbaa !14
  br label %171

170:                                              ; preds = %155
  store double -1.000000e+00, ptr %18, align 8, !tbaa !14
  br label %171

171:                                              ; preds = %170, %162
  %172 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %172)
  %173 = load double, ptr %18, align 8, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #4
  ret double %173
}

declare void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef, ptr noundef) #3

declare void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef, i64 noundef, i64 noundef, ptr noundef, i1 noundef zeroext) #3

declare void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) #3

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #3

declare noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef, double noundef, ptr noundef) #3

declare noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef, ptr noundef) #3

declare void @_ZN11alglib_impl19ae_matrix_init_copyEPNS_9ae_matrixES1_PNS_8ae_stateEb(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) #3

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL36rcond_spdmatrixrcondcholeskyinternalEPNS_9ae_matrixElbbdPdPNS_8ae_stateE(ptr noundef, i64 noundef, i1 noundef zeroext, i1 noundef zeroext, double noundef, ptr noundef, ptr noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { "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 = { 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 = !{!7, !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"double", !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = distinct !{!20, !17}
!21 = distinct !{!21, !17}
!22 = distinct !{!22, !17}


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

%"struct.alglib_impl::ae_frame" = type { %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%"struct.alglib_impl::ae_matrix" = type { i64, i64, i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.1 }
%union.anon.1 = type { ptr }
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = type { ptr }

; 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 nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN11alglib_impl14spdmatrixrcondEPNS_9ae_matrixElbPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i1 noundef zeroext %2, ptr noundef %3) local_unnamed_addr #2 {
  %5 = alloca %"struct.alglib_impl::ae_frame", align 8
  %6 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %7 = alloca double, align 8
  %8 = alloca %"struct.alglib_impl::ae_vector", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %8) #4
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %3, ptr noundef nonnull %5)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %6, i8 0, i64 80, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %8, i8 0, i64 64, i1 false)
  call void @_ZN11alglib_impl19ae_matrix_init_copyEPNS_9ae_matrixES1_PNS_8ae_stateEb(ptr noundef nonnull %6, ptr noundef %0, ptr noundef %3, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %8, i64 noundef 0, i64 noundef 3, ptr noundef %3, i1 noundef zeroext true)
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %8, i64 noundef %1, ptr noundef %3)
  %.not.not66 = icmp sgt i64 %1, 0
  br i1 %.not.not66, label %.lr.ph, label %._crit_edge78

.lr.ph:                                           ; preds = %4
  %9 = getelementptr inbounds i8, ptr %8, i64 56
  %xtraiter = and i64 %1, 3
  %10 = icmp ult i64 %1, 4
  br i1 %10, label %.preheader65.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %1, 9223372036854775804
  br label %17

.preheader65.unr-lcssa:                           ; preds = %17, %.lr.ph
  %.06167.unr = phi i64 [ 0, %.lr.ph ], [ %29, %17 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader65, label %.epil.preheader

.epil.preheader:                                  ; preds = %.preheader65.unr-lcssa, %.epil.preheader
  %.06167.epil = phi i64 [ %13, %.epil.preheader ], [ %.06167.unr, %.preheader65.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.preheader65.unr-lcssa ]
  %11 = load ptr, ptr %9, align 8, !tbaa !5
  %12 = getelementptr inbounds double, ptr %11, i64 %.06167.epil
  store double 0.000000e+00, ptr %12, align 8, !tbaa !8
  %13 = add nuw nsw i64 %.06167.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 %.preheader65, label %.epil.preheader, !llvm.loop !10

.preheader65:                                     ; preds = %.epil.preheader, %.preheader65.unr-lcssa
  %14 = add nsw i64 %1, -1
  br i1 %.not.not66, label %.lr.ph73, label %._crit_edge78

.lr.ph73:                                         ; preds = %.preheader65
  %15 = getelementptr inbounds i8, ptr %8, i64 56
  %16 = getelementptr inbounds i8, ptr %6, i64 72
  br label %31

17:                                               ; preds = %17, %.lr.ph.new
  %.06167 = phi i64 [ 0, %.lr.ph.new ], [ %29, %17 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.3, %17 ]
  %18 = load ptr, ptr %9, align 8, !tbaa !5
  %19 = getelementptr inbounds double, ptr %18, i64 %.06167
  store double 0.000000e+00, ptr %19, align 8, !tbaa !8
  %20 = or disjoint i64 %.06167, 1
  %21 = load ptr, ptr %9, align 8, !tbaa !5
  %22 = getelementptr inbounds double, ptr %21, i64 %20
  store double 0.000000e+00, ptr %22, align 8, !tbaa !8
  %23 = or disjoint i64 %.06167, 2
  %24 = load ptr, ptr %9, align 8, !tbaa !5
  %25 = getelementptr inbounds double, ptr %24, i64 %23
  store double 0.000000e+00, ptr %25, align 8, !tbaa !8
  %26 = or disjoint i64 %.06167, 3
  %27 = load ptr, ptr %9, align 8, !tbaa !5
  %28 = getelementptr inbounds double, ptr %27, i64 %26
  store double 0.000000e+00, ptr %28, align 8, !tbaa !8
  %29 = add nuw nsw i64 %.06167, 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 %.preheader65.unr-lcssa, label %17, !llvm.loop !12

.preheader:                                       ; preds = %._crit_edge
  br i1 %.not.not66, label %.lr.ph77, label %._crit_edge78

.lr.ph77:                                         ; preds = %.preheader
  %30 = getelementptr inbounds i8, ptr %8, i64 56
  br label %63

31:                                               ; preds = %.lr.ph73, %._crit_edge
  %.172 = phi i64 [ 0, %.lr.ph73 ], [ %62, %._crit_edge ]
  %.1. = select i1 %2, i64 %.172, i64 0
  %..1 = select i1 %2, i64 %14, i64 %.172
  %.not68 = icmp sgt i64 %.1., %..1
  br i1 %.not68, label %._crit_edge, label %.lr.ph70

.lr.ph70:                                         ; preds = %31, %55
  %.06069 = phi i64 [ %61, %55 ], [ %.1., %31 ]
  %32 = icmp eq i64 %.172, %.06069
  %33 = load ptr, ptr %15, align 8, !tbaa !5
  %34 = getelementptr inbounds double, ptr %33, i64 %.172
  %35 = load double, ptr %34, align 8, !tbaa !8
  %36 = load ptr, ptr %16, align 8, !tbaa !5
  %37 = getelementptr inbounds ptr, ptr %36, i64 %.172
  %38 = load ptr, ptr %37, align 8, !tbaa !14
  br i1 %32, label %39, label %41

39:                                               ; preds = %.lr.ph70
  %40 = getelementptr inbounds double, ptr %38, i64 %.172
  br label %55

41:                                               ; preds = %.lr.ph70
  %42 = getelementptr inbounds double, ptr %38, i64 %.06069
  %43 = load double, ptr %42, align 8, !tbaa !8
  %44 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %43, ptr noundef %3)
  %45 = fadd double %35, %44
  %46 = load ptr, ptr %15, align 8, !tbaa !5
  %47 = getelementptr inbounds double, ptr %46, i64 %.172
  store double %45, ptr %47, align 8, !tbaa !8
  %48 = load ptr, ptr %15, align 8, !tbaa !5
  %49 = getelementptr inbounds double, ptr %48, i64 %.06069
  %50 = load double, ptr %49, align 8, !tbaa !8
  %51 = load ptr, ptr %16, align 8, !tbaa !5
  %52 = getelementptr inbounds ptr, ptr %51, i64 %.172
  %53 = load ptr, ptr %52, align 8, !tbaa !14
  %54 = getelementptr inbounds double, ptr %53, i64 %.06069
  br label %55

55:                                               ; preds = %39, %41
  %.sink87 = phi ptr [ %40, %39 ], [ %54, %41 ]
  %.sink85 = phi double [ %35, %39 ], [ %50, %41 ]
  %.172.sink = phi i64 [ %.172, %39 ], [ %.06069, %41 ]
  %56 = load double, ptr %.sink87, align 8, !tbaa !8
  %57 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %56, ptr noundef %3)
  %58 = fadd double %.sink85, %57
  %59 = load ptr, ptr %15, align 8, !tbaa !5
  %60 = getelementptr inbounds double, ptr %59, i64 %.172.sink
  store double %58, ptr %60, align 8, !tbaa !8
  %61 = add nuw i64 %.06069, 1
  %exitcond80.not = icmp eq i64 %.06069, %..1
  br i1 %exitcond80.not, label %._crit_edge, label %.lr.ph70, !llvm.loop !16

._crit_edge:                                      ; preds = %55, %31
  %62 = add nuw nsw i64 %.172, 1
  %exitcond81.not = icmp eq i64 %62, %1
  br i1 %exitcond81.not, label %.preheader, label %31, !llvm.loop !17

63:                                               ; preds = %.lr.ph77, %63
  %.05776 = phi double [ 0.000000e+00, %.lr.ph77 ], [ %67, %63 ]
  %.275 = phi i64 [ 0, %.lr.ph77 ], [ %68, %63 ]
  %64 = load ptr, ptr %30, align 8, !tbaa !5
  %65 = getelementptr inbounds double, ptr %64, i64 %.275
  %66 = load double, ptr %65, align 8, !tbaa !8
  %67 = call noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef %.05776, double noundef %66, ptr noundef %3)
  %68 = add nuw nsw i64 %.275, 1
  %exitcond82.not = icmp eq i64 %68, %1
  br i1 %exitcond82.not, label %._crit_edge78, label %63, !llvm.loop !18

._crit_edge78:                                    ; preds = %63, %4, %.preheader65, %.preheader
  %.057.lcssa = phi double [ 0.000000e+00, %.preheader ], [ 0.000000e+00, %.preheader65 ], [ 0.000000e+00, %4 ], [ %67, %63 ]
  %69 = call noundef zeroext i1 @_ZN11alglib_impl17spdmatrixcholeskyEPNS_9ae_matrixElbPNS_8ae_stateE(ptr noundef nonnull %6, i64 noundef %1, i1 noundef zeroext %2, ptr noundef %3)
  br i1 %69, label %70, label %72

70:                                               ; preds = %._crit_edge78
  call void @_ZN11alglib_implL36rcond_spdmatrixrcondcholeskyinternalEPNS_9ae_matrixElbbdPdPNS_8ae_stateE(ptr noundef nonnull %6, i64 noundef %1, i1 noundef zeroext %2, i1 noundef zeroext true, double noundef %.057.lcssa, ptr noundef nonnull %7, ptr noundef %3)
  %71 = load double, ptr %7, align 8, !tbaa !8
  br label %72

72:                                               ; preds = %._crit_edge78, %70
  %.0 = phi double [ %71, %70 ], [ -1.000000e+00, %._crit_edge78 ]
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %3)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #4
  ret double %.0
}

declare void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef, ptr noundef) local_unnamed_addr #3

declare void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef, i64 noundef, i64 noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #3

declare void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #3

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #3

declare noundef double @_ZN11alglib_impl10ae_maxrealEddPNS_8ae_stateE(double noundef, double noundef, ptr noundef) local_unnamed_addr #3

declare noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #3

declare void @_ZN11alglib_impl19ae_matrix_init_copyEPNS_9ae_matrixES1_PNS_8ae_stateEb(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL36rcond_spdmatrixrcondcholeskyinternalEPNS_9ae_matrixElbbdPdPNS_8ae_stateE(ptr noundef, i64 noundef, i1 noundef zeroext, i1 noundef zeroext, double noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { "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 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"double", !6, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.unroll.disable"}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!15, !15, i64 0}
!15 = !{!"any pointer", !6, i64 0}
!16 = distinct !{!16, !13}
!17 = distinct !{!17, !13}
!18 = distinct !{!18, !13}


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