; LLVM IR from Dimandragon/non-parametric-dsp :: alglib-cpp/src/linalg.ll (ZN11alglib_impl14spdmatrixrcondEPKNS_9ae_matrixElbPNS_8ae_stateE)

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

; 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_impl14spdmatrixrcondEPKNS_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_matrixEPKS0_PNS_8ae_stateEb(ptr noundef %10, ptr noundef %21, ptr noundef %22, i1 noundef zeroext true)
  %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 = %131, %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 %134

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 = %127, %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 %130

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 %85

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 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %10, i32 0, i32 6
  %71 = load ptr, ptr %70, align 8, !tbaa !13
  %72 = load i64, ptr %11, align 8, !tbaa !9
  %73 = getelementptr inbounds ptr, ptr %71, i64 %72
  %74 = load ptr, ptr %73, align 8, !tbaa !5
  %75 = load i64, ptr %11, align 8, !tbaa !9
  %76 = getelementptr inbounds double, ptr %74, i64 %75
  %77 = load double, ptr %76, align 8, !tbaa !14
  %78 = load ptr, ptr %8, align 8, !tbaa !5
  %79 = call noundef double @_ZN11alglib_impl7ae_fabsEdPNS_8ae_stateE(double noundef %77, ptr noundef %78)
  %80 = fadd double %69, %79
  %81 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %17, i32 0, i32 4
  %82 = load ptr, ptr %81, align 8, !tbaa !13
  %83 = load i64, ptr %11, align 8, !tbaa !9
  %84 = getelementptr inbounds double, ptr %82, i64 %83
  store double %80, ptr %84, align 8, !tbaa !14
  br label %126

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

126:                                              ; preds = %85, %64
  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 %56, !llvm.loop !20

130:                                              ; preds = %56
  br label %131

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

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

135:                                              ; preds = %149, %134
  %136 = load i64, ptr %11, align 8, !tbaa !9
  %137 = load i64, ptr %6, align 8, !tbaa !9
  %138 = sub nsw i64 %137, 1
  %139 = icmp sle i64 %136, %138
  br i1 %139, label %140, label %152

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

149:                                              ; preds = %140
  %150 = load i64, ptr %11, align 8, !tbaa !9
  %151 = add nsw i64 %150, 1
  store i64 %151, ptr %11, align 8, !tbaa !9
  br label %135, !llvm.loop !22

152:                                              ; preds = %135
  %153 = load i64, ptr %6, align 8, !tbaa !9
  %154 = load i8, ptr %7, align 1, !tbaa !11, !range !18, !noundef !19
  %155 = trunc i8 %154 to i1
  %156 = load ptr, ptr %8, align 8, !tbaa !5
  %157 = call noundef zeroext i1 @_ZN11alglib_impl17spdmatrixcholeskyEPNS_9ae_matrixElbPNS_8ae_stateE(ptr noundef %10, i64 noundef %153, i1 noundef zeroext %155, ptr noundef %156)
  br i1 %157, label %158, label %165

158:                                              ; preds = %152
  %159 = load i64, ptr %6, align 8, !tbaa !9
  %160 = load i8, ptr %7, align 1, !tbaa !11, !range !18, !noundef !19
  %161 = trunc i8 %160 to i1
  %162 = load double, ptr %16, align 8, !tbaa !14
  %163 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_implL36rcond_spdmatrixrcondcholeskyinternalEPKNS_9ae_matrixElbbdPdPNS_8ae_stateE(ptr noundef %10, i64 noundef %159, i1 noundef zeroext %161, i1 noundef zeroext true, double noundef %162, ptr noundef %15, ptr noundef %163)
  %164 = load double, ptr %15, align 8, !tbaa !14
  store double %164, ptr %18, align 8, !tbaa !14
  br label %166

165:                                              ; preds = %152
  store double -1.000000e+00, ptr %18, align 8, !tbaa !14
  br label %166

166:                                              ; preds = %165, %158
  %167 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %167)
  %168 = 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 %168
}

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_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_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #3

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL36rcond_spdmatrixrcondcholeskyinternalEPKNS_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.0 }
%union.anon.0 = type { ptr }
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.1 }
%union.anon.1 = 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 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

; 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_impl14spdmatrixrcondEPKNS_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_matrixEPKS0_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.not61 = icmp sgt i64 %1, 0
  br i1 %.not.not61, label %.lr.ph, label %._crit_edge73

.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 %.preheader60.unr-lcssa, label %.lr.ph.new

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

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

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

.preheader60:                                     ; preds = %.epil.preheader, %.preheader60.unr-lcssa
  %14 = add nsw i64 %1, -1
  br i1 %.not.not61, label %.lr.ph68, label %._crit_edge73

.lr.ph68:                                         ; preds = %.preheader60
  %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
  %.05662 = 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 %.05662
  store double 0.000000e+00, ptr %19, align 8, !tbaa !8
  %20 = or disjoint i64 %.05662, 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 %.05662, 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 %.05662, 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 %.05662, 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 %.preheader60.unr-lcssa, label %17, !llvm.loop !12

.preheader:                                       ; preds = %._crit_edge
  br i1 %.not.not61, label %.lr.ph72, label %._crit_edge73

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

31:                                               ; preds = %.lr.ph68, %._crit_edge
  %.167 = phi i64 [ 0, %.lr.ph68 ], [ %62, %._crit_edge ]
  %.1. = select i1 %2, i64 %.167, i64 0
  %..1 = select i1 %2, i64 %14, i64 %.167
  %.not63 = icmp sgt i64 %.1., %..1
  br i1 %.not63, label %._crit_edge, label %.lr.ph65

.lr.ph65:                                         ; preds = %31, %55
  %.05564 = phi i64 [ %61, %55 ], [ %.1., %31 ]
  %32 = icmp eq i64 %.167, %.05564
  %33 = load ptr, ptr %15, align 8, !tbaa !5
  %34 = getelementptr inbounds double, ptr %33, i64 %.167
  %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 %.167
  %38 = load ptr, ptr %37, align 8, !tbaa !14
  br i1 %32, label %39, label %41

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

41:                                               ; preds = %.lr.ph65
  %42 = getelementptr inbounds double, ptr %38, i64 %.05564
  %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 %.167
  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 %.05564
  %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 %.167
  %53 = load ptr, ptr %52, align 8, !tbaa !14
  %54 = getelementptr inbounds double, ptr %53, i64 %.05564
  br label %55

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

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

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

._crit_edge73:                                    ; preds = %63, %4, %.preheader60, %.preheader
  %.052.lcssa = phi double [ 0.000000e+00, %.preheader ], [ 0.000000e+00, %.preheader60 ], [ 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_edge73
  call void @_ZN11alglib_implL36rcond_spdmatrixrcondcholeskyinternalEPKNS_9ae_matrixElbbdPdPNS_8ae_stateE(ptr noundef nonnull %6, i64 noundef %1, i1 noundef zeroext %2, i1 noundef zeroext true, double noundef %.052.lcssa, ptr noundef nonnull %7, ptr noundef %3)
  %71 = load double, ptr %7, align 8, !tbaa !8
  br label %72

72:                                               ; preds = %._crit_edge73, %70
  %.0 = phi double [ %71, %70 ], [ -1.000000e+00, %._crit_edge73 ]
  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 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_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_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) 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_impl19ae_matrix_init_copyEPNS_9ae_matrixEPKS0_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_spdmatrixrcondcholeskyinternalEPKNS_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