; LLVM IR from Dimandragon/non-parametric-dsp :: 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_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.1 }
%union.anon.1 = type { ptr }
%"struct.alglib_impl::ae_matrix" = type { i64, i64, i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = type { ptr }
%"struct.alglib_impl::matinvreport" = type { i64, double, double }

@.str.489 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.490 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.491 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.492 = external hidden unnamed_addr constant [61 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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZN11alglib_impl22spdmatrixcholeskyrcondEPKNS_9ae_matrixElbPNS_8ae_stateE(ptr noundef, i64 noundef, i1 noundef zeroext, ptr noundef) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl24spdmatrixcholeskyinverseEPNS_9ae_matrixElbPNS_12matinvreportEPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i1 noundef zeroext %2, ptr noundef %3, ptr noundef %4) #3 {
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca i8, align 1
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca %"struct.alglib_impl::ae_frame", align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca %"struct.alglib_impl::ae_vector", align 8
  %15 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i64 %1, ptr %7, align 8, !tbaa !9
  %16 = zext i1 %2 to i8
  store i8 %16, ptr %8, align 1, !tbaa !11
  store ptr %3, ptr %9, align 8, !tbaa !5
  store ptr %4, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, 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 64, ptr %14) #4
  %17 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %17, ptr noundef %11)
  call void @llvm.memset.p0.i64(ptr align 8 %14, i8 0, i64 64, i1 false)
  %18 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN11alglib_impl19_matinvreport_clearEPv(ptr noundef %18)
  %19 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %14, i64 noundef 0, i64 noundef 3, ptr noundef %19, i1 noundef zeroext true)
  %20 = load i64, ptr %7, align 8, !tbaa !9
  %21 = icmp sgt i64 %20, 0
  %22 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %21, ptr noundef @.str.489, ptr noundef %22)
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %23, i32 0, i32 1
  %25 = load i64, ptr %24, align 8, !tbaa !13
  %26 = load i64, ptr %7, align 8, !tbaa !9
  %27 = icmp sge i64 %25, %26
  %28 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %27, ptr noundef @.str.490, ptr noundef %28)
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %29, i32 0, i32 0
  %31 = load i64, ptr %30, align 8, !tbaa !16
  %32 = load i64, ptr %7, align 8, !tbaa !9
  %33 = icmp sge i64 %31, %32
  %34 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %33, ptr noundef @.str.491, ptr noundef %34)
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  %36 = load i64, ptr %7, align 8, !tbaa !9
  %37 = load i8, ptr %8, align 1, !tbaa !11, !range !17, !noundef !18
  %38 = trunc i8 %37 to i1
  %39 = load ptr, ptr %10, align 8, !tbaa !5
  %40 = call noundef zeroext i1 @_ZN11alglib_impl17isfinitertrmatrixEPKNS_9ae_matrixElbPNS_8ae_stateE(ptr noundef %35, i64 noundef %36, i1 noundef zeroext %38, ptr noundef %39)
  %41 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %40, ptr noundef @.str.492, ptr noundef %41)
  %42 = load ptr, ptr %9, align 8, !tbaa !5
  %43 = getelementptr inbounds %"struct.alglib_impl::matinvreport", ptr %42, i32 0, i32 0
  store i64 1, ptr %43, align 8, !tbaa !19
  %44 = load ptr, ptr %6, align 8, !tbaa !5
  %45 = load i64, ptr %7, align 8, !tbaa !9
  %46 = load i8, ptr %8, align 1, !tbaa !11, !range !17, !noundef !18
  %47 = trunc i8 %46 to i1
  %48 = load ptr, ptr %10, align 8, !tbaa !5
  %49 = call noundef double @_ZN11alglib_impl22spdmatrixcholeskyrcondEPKNS_9ae_matrixElbPNS_8ae_stateE(ptr noundef %44, i64 noundef %45, i1 noundef zeroext %47, ptr noundef %48)
  %50 = load ptr, ptr %9, align 8, !tbaa !5
  %51 = getelementptr inbounds %"struct.alglib_impl::matinvreport", ptr %50, i32 0, i32 1
  store double %49, ptr %51, align 8, !tbaa !22
  %52 = load ptr, ptr %9, align 8, !tbaa !5
  %53 = getelementptr inbounds %"struct.alglib_impl::matinvreport", ptr %52, i32 0, i32 1
  %54 = load double, ptr %53, align 8, !tbaa !22
  %55 = load ptr, ptr %9, align 8, !tbaa !5
  %56 = getelementptr inbounds %"struct.alglib_impl::matinvreport", ptr %55, i32 0, i32 2
  store double %54, ptr %56, align 8, !tbaa !23
  %57 = load ptr, ptr %9, align 8, !tbaa !5
  %58 = getelementptr inbounds %"struct.alglib_impl::matinvreport", ptr %57, i32 0, i32 1
  %59 = load double, ptr %58, align 8, !tbaa !22
  %60 = load ptr, ptr %10, align 8, !tbaa !5
  %61 = call noundef double @_ZN11alglib_impl14rcondthresholdEPNS_8ae_stateE(ptr noundef %60)
  %62 = call noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef %59, double noundef %61)
  br i1 %62, label %70, label %63

63:                                               ; preds = %5
  %64 = load ptr, ptr %9, align 8, !tbaa !5
  %65 = getelementptr inbounds %"struct.alglib_impl::matinvreport", ptr %64, i32 0, i32 2
  %66 = load double, ptr %65, align 8, !tbaa !23
  %67 = load ptr, ptr %10, align 8, !tbaa !5
  %68 = call noundef double @_ZN11alglib_impl14rcondthresholdEPNS_8ae_stateE(ptr noundef %67)
  %69 = call noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef %66, double noundef %68)
  br i1 %69, label %70, label %139

70:                                               ; preds = %63, %5
  %71 = load i8, ptr %8, align 1, !tbaa !11, !range !17, !noundef !18
  %72 = trunc i8 %71 to i1
  br i1 %72, label %73, label %103

73:                                               ; preds = %70
  store i64 0, ptr %12, align 8, !tbaa !9
  br label %74

74:                                               ; preds = %99, %73
  %75 = load i64, ptr %12, align 8, !tbaa !9
  %76 = load i64, ptr %7, align 8, !tbaa !9
  %77 = sub nsw i64 %76, 1
  %78 = icmp sle i64 %75, %77
  br i1 %78, label %79, label %102

79:                                               ; preds = %74
  %80 = load i64, ptr %12, align 8, !tbaa !9
  store i64 %80, ptr %13, align 8, !tbaa !9
  br label %81

81:                                               ; preds = %95, %79
  %82 = load i64, ptr %13, align 8, !tbaa !9
  %83 = load i64, ptr %7, align 8, !tbaa !9
  %84 = sub nsw i64 %83, 1
  %85 = icmp sle i64 %82, %84
  br i1 %85, label %86, label %98

86:                                               ; preds = %81
  %87 = load ptr, ptr %6, align 8, !tbaa !5
  %88 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %87, i32 0, i32 6
  %89 = load ptr, ptr %88, align 8, !tbaa !24
  %90 = load i64, ptr %12, align 8, !tbaa !9
  %91 = getelementptr inbounds ptr, ptr %89, i64 %90
  %92 = load ptr, ptr %91, align 8, !tbaa !5
  %93 = load i64, ptr %13, align 8, !tbaa !9
  %94 = getelementptr inbounds double, ptr %92, i64 %93
  store double 0.000000e+00, ptr %94, align 8, !tbaa !25
  br label %95

95:                                               ; preds = %86
  %96 = load i64, ptr %13, align 8, !tbaa !9
  %97 = add nsw i64 %96, 1
  store i64 %97, ptr %13, align 8, !tbaa !9
  br label %81, !llvm.loop !26

98:                                               ; preds = %81
  br label %99

99:                                               ; preds = %98
  %100 = load i64, ptr %12, align 8, !tbaa !9
  %101 = add nsw i64 %100, 1
  store i64 %101, ptr %12, align 8, !tbaa !9
  br label %74, !llvm.loop !28

102:                                              ; preds = %74
  br label %131

103:                                              ; preds = %70
  store i64 0, ptr %12, align 8, !tbaa !9
  br label %104

104:                                              ; preds = %127, %103
  %105 = load i64, ptr %12, align 8, !tbaa !9
  %106 = load i64, ptr %7, align 8, !tbaa !9
  %107 = sub nsw i64 %106, 1
  %108 = icmp sle i64 %105, %107
  br i1 %108, label %109, label %130

109:                                              ; preds = %104
  store i64 0, ptr %13, align 8, !tbaa !9
  br label %110

110:                                              ; preds = %123, %109
  %111 = load i64, ptr %13, align 8, !tbaa !9
  %112 = load i64, ptr %12, align 8, !tbaa !9
  %113 = icmp sle i64 %111, %112
  br i1 %113, label %114, label %126

114:                                              ; preds = %110
  %115 = load ptr, ptr %6, align 8, !tbaa !5
  %116 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %115, i32 0, i32 6
  %117 = load ptr, ptr %116, align 8, !tbaa !24
  %118 = load i64, ptr %12, align 8, !tbaa !9
  %119 = getelementptr inbounds ptr, ptr %117, i64 %118
  %120 = load ptr, ptr %119, align 8, !tbaa !5
  %121 = load i64, ptr %13, align 8, !tbaa !9
  %122 = getelementptr inbounds double, ptr %120, i64 %121
  store double 0.000000e+00, ptr %122, align 8, !tbaa !25
  br label %123

123:                                              ; preds = %114
  %124 = load i64, ptr %13, align 8, !tbaa !9
  %125 = add nsw i64 %124, 1
  store i64 %125, ptr %13, align 8, !tbaa !9
  br label %110, !llvm.loop !29

126:                                              ; preds = %110
  br label %127

127:                                              ; preds = %126
  %128 = load i64, ptr %12, align 8, !tbaa !9
  %129 = add nsw i64 %128, 1
  store i64 %129, ptr %12, align 8, !tbaa !9
  br label %104, !llvm.loop !30

130:                                              ; preds = %104
  br label %131

131:                                              ; preds = %130, %102
  %132 = load ptr, ptr %9, align 8, !tbaa !5
  %133 = getelementptr inbounds %"struct.alglib_impl::matinvreport", ptr %132, i32 0, i32 1
  store double 0.000000e+00, ptr %133, align 8, !tbaa !22
  %134 = load ptr, ptr %9, align 8, !tbaa !5
  %135 = getelementptr inbounds %"struct.alglib_impl::matinvreport", ptr %134, i32 0, i32 2
  store double 0.000000e+00, ptr %135, align 8, !tbaa !23
  %136 = load ptr, ptr %9, align 8, !tbaa !5
  %137 = getelementptr inbounds %"struct.alglib_impl::matinvreport", ptr %136, i32 0, i32 0
  store i64 -3, ptr %137, align 8, !tbaa !19
  %138 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %138)
  store i32 1, ptr %15, align 4
  br label %149

139:                                              ; preds = %63
  %140 = load i64, ptr %7, align 8, !tbaa !9
  %141 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %14, i64 noundef %140, ptr noundef %141)
  %142 = load ptr, ptr %6, align 8, !tbaa !5
  %143 = load i64, ptr %7, align 8, !tbaa !9
  %144 = load i8, ptr %8, align 1, !tbaa !11, !range !17, !noundef !18
  %145 = trunc i8 %144 to i1
  %146 = load ptr, ptr %9, align 8, !tbaa !5
  %147 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl27spdmatrixcholeskyinverserecEPNS_9ae_matrixEllbPNS_9ae_vectorEPNS_12matinvreportEPNS_8ae_stateE(ptr noundef %142, i64 noundef 0, i64 noundef %143, i1 noundef zeroext %145, ptr noundef %14, ptr noundef %146, ptr noundef %147)
  %148 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %148)
  store i32 0, ptr %15, align 4
  br label %149

149:                                              ; preds = %139, %131
  call void @llvm.lifetime.end.p0(i64 64, 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 32, ptr %11) #4
  %150 = load i32, ptr %15, align 4
  switch i32 %150, label %152 [
    i32 0, label %151
    i32 1, label %151
  ]

151:                                              ; preds = %149, %149
  ret void

152:                                              ; preds = %149
  unreachable
}

declare noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef, double noundef) #2

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

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #2

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

declare noundef zeroext i1 @_ZN11alglib_impl17isfinitertrmatrixEPKNS_9ae_matrixElbPNS_8ae_stateE(ptr noundef, i64 noundef, i1 noundef zeroext, ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZN11alglib_impl14rcondthresholdEPNS_8ae_stateE(ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl19_matinvreport_clearEPv(ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl27spdmatrixcholeskyinverserecEPNS_9ae_matrixEllbPNS_9ae_vectorEPNS_12matinvreportEPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, i1 noundef zeroext, ptr noundef, ptr noundef, ptr noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #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 = !{!14, !10, i64 8}
!14 = !{!"_ZTSN11alglib_impl9ae_matrixE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !12, i64 32, !15, i64 40, !7, i64 72}
!15 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!16 = !{!14, !10, i64 0}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = !{!20, !10, i64 0}
!20 = !{!"_ZTSN11alglib_impl12matinvreportE", !10, i64 0, !21, i64 8, !21, i64 16}
!21 = !{!"double", !7, i64 0}
!22 = !{!20, !21, i64 8}
!23 = !{!20, !21, i64 16}
!24 = !{!7, !7, i64 0}
!25 = !{!21, !21, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = distinct !{!28, !27}
!29 = distinct !{!29, !27}
!30 = distinct !{!30, !27}


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

@.str.489 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.490 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.491 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.492 = external hidden unnamed_addr constant [61 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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZN11alglib_impl22spdmatrixcholeskyrcondEPKNS_9ae_matrixElbPNS_8ae_stateE(ptr noundef, i64 noundef, i1 noundef zeroext, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl24spdmatrixcholeskyinverseEPNS_9ae_matrixElbPNS_12matinvreportEPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i1 noundef zeroext %2, ptr noundef %3, ptr noundef %4) local_unnamed_addr #3 {
  %6 = alloca %"struct.alglib_impl::ae_frame", align 8
  %7 = alloca %"struct.alglib_impl::ae_vector", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %7) #4
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %4, ptr noundef nonnull %6)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %7, i8 0, i64 64, i1 false)
  call void @_ZN11alglib_impl19_matinvreport_clearEPv(ptr noundef %3)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %7, i64 noundef 0, i64 noundef 3, ptr noundef %4, i1 noundef zeroext true)
  %8 = icmp sgt i64 %1, 0
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %8, ptr noundef nonnull @.str.489, ptr noundef %4)
  %9 = getelementptr inbounds i8, ptr %0, i64 8
  %10 = load i64, ptr %9, align 8, !tbaa !5
  %11 = icmp sge i64 %10, %1
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %11, ptr noundef nonnull @.str.490, ptr noundef %4)
  %12 = load i64, ptr %0, align 8, !tbaa !13
  %13 = icmp sge i64 %12, %1
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %13, ptr noundef nonnull @.str.491, ptr noundef %4)
  %14 = call noundef zeroext i1 @_ZN11alglib_impl17isfinitertrmatrixEPKNS_9ae_matrixElbPNS_8ae_stateE(ptr noundef nonnull %0, i64 noundef %1, i1 noundef zeroext %2, ptr noundef %4)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %14, ptr noundef nonnull @.str.492, ptr noundef %4)
  store i64 1, ptr %3, align 8, !tbaa !14
  %15 = call noundef double @_ZN11alglib_impl22spdmatrixcholeskyrcondEPKNS_9ae_matrixElbPNS_8ae_stateE(ptr noundef nonnull %0, i64 noundef %1, i1 noundef zeroext %2, ptr noundef %4)
  %16 = getelementptr inbounds i8, ptr %3, i64 8
  store double %15, ptr %16, align 8, !tbaa !17
  %17 = getelementptr inbounds i8, ptr %3, i64 16
  store double %15, ptr %17, align 8, !tbaa !18
  %18 = call noundef double @_ZN11alglib_impl14rcondthresholdEPNS_8ae_stateE(ptr noundef %4)
  %19 = call noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef %15, double noundef %18)
  br i1 %19, label %24, label %20

20:                                               ; preds = %5
  %21 = load double, ptr %17, align 8, !tbaa !18
  %22 = call noundef double @_ZN11alglib_impl14rcondthresholdEPNS_8ae_stateE(ptr noundef %4)
  %23 = call noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef %21, double noundef %22)
  br i1 %23, label %24, label %76

24:                                               ; preds = %20, %5
  br i1 %2, label %.preheader64, label %.preheader66

.preheader66:                                     ; preds = %24
  br i1 %8, label %.preheader65.lr.ph, label %.loopexit

.preheader65.lr.ph:                               ; preds = %.preheader66
  %25 = getelementptr inbounds i8, ptr %0, i64 72
  br label %.preheader65

.preheader64:                                     ; preds = %24
  br i1 %8, label %.preheader.lr.ph, label %.loopexit

.preheader.lr.ph:                                 ; preds = %.preheader64
  %26 = getelementptr inbounds i8, ptr %0, i64 72
  %xtraiter81 = and i64 %1, 1
  %27 = icmp eq i64 %1, 1
  br i1 %27, label %.loopexit.loopexit.unr-lcssa, label %.preheader.lr.ph.new

.preheader.lr.ph.new:                             ; preds = %.preheader.lr.ph
  %unroll_iter84 = and i64 %1, 9223372036854775806
  br label %.preheader

.preheader:                                       ; preds = %41, %.preheader.lr.ph.new
  %.05973 = phi i64 [ 0, %.preheader.lr.ph.new ], [ %42, %41 ]
  %niter85 = phi i64 [ 0, %.preheader.lr.ph.new ], [ %niter85.next.1, %41 ]
  br label %28

28:                                               ; preds = %.preheader, %28
  %.071 = phi i64 [ %.05973, %.preheader ], [ %33, %28 ]
  %29 = load ptr, ptr %26, align 8, !tbaa !19
  %30 = getelementptr inbounds ptr, ptr %29, i64 %.05973
  %31 = load ptr, ptr %30, align 8, !tbaa !20
  %32 = getelementptr inbounds double, ptr %31, i64 %.071
  store double 0.000000e+00, ptr %32, align 8, !tbaa !21
  %33 = add nuw nsw i64 %.071, 1
  %.not63.not = icmp slt i64 %33, %1
  br i1 %.not63.not, label %28, label %.preheader.1, !llvm.loop !22

.preheader.1:                                     ; preds = %28
  %34 = or disjoint i64 %.05973, 1
  br label %35

35:                                               ; preds = %35, %.preheader.1
  %.071.1 = phi i64 [ %34, %.preheader.1 ], [ %40, %35 ]
  %36 = load ptr, ptr %26, align 8, !tbaa !19
  %37 = getelementptr inbounds ptr, ptr %36, i64 %34
  %38 = load ptr, ptr %37, align 8, !tbaa !20
  %39 = getelementptr inbounds double, ptr %38, i64 %.071.1
  store double 0.000000e+00, ptr %39, align 8, !tbaa !21
  %40 = add nuw nsw i64 %.071.1, 1
  %.not63.not.1 = icmp slt i64 %40, %1
  br i1 %.not63.not.1, label %35, label %41, !llvm.loop !22

41:                                               ; preds = %35
  %42 = add nuw nsw i64 %.05973, 2
  %niter85.next.1 = add i64 %niter85, 2
  %niter85.ncmp.1 = icmp eq i64 %niter85.next.1, %unroll_iter84
  br i1 %niter85.ncmp.1, label %.loopexit.loopexit.unr-lcssa, label %.preheader, !llvm.loop !24

.preheader65:                                     ; preds = %.preheader65.lr.ph, %.epilog-lcssa
  %indvars.iv = phi i64 [ 1, %.preheader65.lr.ph ], [ %indvars.iv.next, %.epilog-lcssa ]
  %.16070 = phi i64 [ 0, %.preheader65.lr.ph ], [ %70, %.epilog-lcssa ]
  %xtraiter = and i64 %indvars.iv, 3
  %43 = icmp ult i64 %.16070, 3
  br i1 %43, label %.unr-lcssa, label %.preheader65.new

.preheader65.new:                                 ; preds = %.preheader65
  %unroll_iter = and i64 %indvars.iv, -4
  br label %44

44:                                               ; preds = %44, %.preheader65.new
  %.168 = phi i64 [ 0, %.preheader65.new ], [ %64, %44 ]
  %niter = phi i64 [ 0, %.preheader65.new ], [ %niter.next.3, %44 ]
  %45 = load ptr, ptr %25, align 8, !tbaa !19
  %46 = getelementptr inbounds ptr, ptr %45, i64 %.16070
  %47 = load ptr, ptr %46, align 8, !tbaa !20
  %48 = getelementptr inbounds double, ptr %47, i64 %.168
  store double 0.000000e+00, ptr %48, align 8, !tbaa !21
  %49 = or disjoint i64 %.168, 1
  %50 = load ptr, ptr %25, align 8, !tbaa !19
  %51 = getelementptr inbounds ptr, ptr %50, i64 %.16070
  %52 = load ptr, ptr %51, align 8, !tbaa !20
  %53 = getelementptr inbounds double, ptr %52, i64 %49
  store double 0.000000e+00, ptr %53, align 8, !tbaa !21
  %54 = or disjoint i64 %.168, 2
  %55 = load ptr, ptr %25, align 8, !tbaa !19
  %56 = getelementptr inbounds ptr, ptr %55, i64 %.16070
  %57 = load ptr, ptr %56, align 8, !tbaa !20
  %58 = getelementptr inbounds double, ptr %57, i64 %54
  store double 0.000000e+00, ptr %58, align 8, !tbaa !21
  %59 = or disjoint i64 %.168, 3
  %60 = load ptr, ptr %25, align 8, !tbaa !19
  %61 = getelementptr inbounds ptr, ptr %60, i64 %.16070
  %62 = load ptr, ptr %61, align 8, !tbaa !20
  %63 = getelementptr inbounds double, ptr %62, i64 %59
  store double 0.000000e+00, ptr %63, align 8, !tbaa !21
  %64 = add nuw nsw i64 %.168, 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 %.unr-lcssa, label %44, !llvm.loop !25

.unr-lcssa:                                       ; preds = %44, %.preheader65
  %.168.unr = phi i64 [ 0, %.preheader65 ], [ %64, %44 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.epilog-lcssa, label %.epil.preheader

.epil.preheader:                                  ; preds = %.unr-lcssa, %.epil.preheader
  %.168.epil = phi i64 [ %69, %.epil.preheader ], [ %.168.unr, %.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.unr-lcssa ]
  %65 = load ptr, ptr %25, align 8, !tbaa !19
  %66 = getelementptr inbounds ptr, ptr %65, i64 %.16070
  %67 = load ptr, ptr %66, align 8, !tbaa !20
  %68 = getelementptr inbounds double, ptr %67, i64 %.168.epil
  store double 0.000000e+00, ptr %68, align 8, !tbaa !21
  %69 = add nuw nsw i64 %.168.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 %.epilog-lcssa, label %.epil.preheader, !llvm.loop !26

.epilog-lcssa:                                    ; preds = %.epil.preheader, %.unr-lcssa
  %70 = add nuw nsw i64 %.16070, 1
  %indvars.iv.next = add nuw i64 %indvars.iv, 1
  %exitcond76.not = icmp eq i64 %70, %1
  br i1 %exitcond76.not, label %.loopexit, label %.preheader65, !llvm.loop !28

.loopexit.loopexit.unr-lcssa:                     ; preds = %41, %.preheader.lr.ph
  %.05973.unr = phi i64 [ 0, %.preheader.lr.ph ], [ %42, %41 ]
  %lcmp.mod83.not = icmp eq i64 %xtraiter81, 0
  br i1 %lcmp.mod83.not, label %.loopexit, label %.preheader.epil

.preheader.epil:                                  ; preds = %.loopexit.loopexit.unr-lcssa, %.preheader.epil
  %.071.epil = phi i64 [ %75, %.preheader.epil ], [ %.05973.unr, %.loopexit.loopexit.unr-lcssa ]
  %71 = load ptr, ptr %26, align 8, !tbaa !19
  %72 = getelementptr inbounds ptr, ptr %71, i64 %.05973.unr
  %73 = load ptr, ptr %72, align 8, !tbaa !20
  %74 = getelementptr inbounds double, ptr %73, i64 %.071.epil
  store double 0.000000e+00, ptr %74, align 8, !tbaa !21
  %75 = add nuw nsw i64 %.071.epil, 1
  %.not63.not.epil = icmp slt i64 %75, %1
  br i1 %.not63.not.epil, label %.preheader.epil, label %.loopexit, !llvm.loop !22

.loopexit:                                        ; preds = %.epilog-lcssa, %.loopexit.loopexit.unr-lcssa, %.preheader.epil, %.preheader66, %.preheader64
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %16, i8 0, i64 16, i1 false)
  store i64 -3, ptr %3, align 8, !tbaa !14
  br label %77

76:                                               ; preds = %20
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %7, i64 noundef %1, ptr noundef %4)
  call void @_ZN11alglib_impl27spdmatrixcholeskyinverserecEPNS_9ae_matrixEllbPNS_9ae_vectorEPNS_12matinvreportEPNS_8ae_stateE(ptr noundef nonnull %0, i64 noundef 0, i64 noundef %1, i1 noundef zeroext %2, ptr noundef nonnull %7, ptr noundef nonnull %3, ptr noundef %4)
  br label %77

77:                                               ; preds = %76, %.loopexit
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %4)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #4
  ret void
}

declare noundef zeroext i1 @_ZN11alglib_impl10ae_fp_lessEdd(double noundef, double noundef) local_unnamed_addr #2

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

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #2

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

declare noundef zeroext i1 @_ZN11alglib_impl17isfinitertrmatrixEPKNS_9ae_matrixElbPNS_8ae_stateE(ptr noundef, i64 noundef, i1 noundef zeroext, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZN11alglib_impl14rcondthresholdEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl19_matinvreport_clearEPv(ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl27spdmatrixcholeskyinverserecEPNS_9ae_matrixEllbPNS_9ae_vectorEPNS_12matinvreportEPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, i1 noundef zeroext, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #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, !7, i64 8}
!6 = !{!"_ZTSN11alglib_impl9ae_matrixE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !11, i64 40, !8, i64 72}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!6, !7, i64 0}
!14 = !{!15, !7, i64 0}
!15 = !{!"_ZTSN11alglib_impl12matinvreportE", !7, i64 0, !16, i64 8, !16, i64 16}
!16 = !{!"double", !8, i64 0}
!17 = !{!15, !16, i64 8}
!18 = !{!15, !16, i64 16}
!19 = !{!8, !8, i64 0}
!20 = !{!12, !12, i64 0}
!21 = !{!16, !16, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = distinct !{!24, !23}
!25 = distinct !{!25, !23}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.unroll.disable"}
!28 = distinct !{!28, !23}


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