; LLVM IR from Dimandragon/non-parametric-dsp :: alglib-cpp/src (solvers)

; 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_complex" = type { double, double }

@.str.309 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.310 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.311 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.312 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.313 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.314 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.315 = external hidden unnamed_addr constant [56 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 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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN11alglib_impl19hpdmatrixsolvemfastEPKNS_9ae_matrixElbPS0_lPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i1 noundef zeroext %2, ptr noundef %3, i64 noundef %4, ptr noundef %5) #3 {
  %7 = alloca i1, align 1
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca i8, align 1
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  %13 = alloca ptr, align 8
  %14 = alloca %"struct.alglib_impl::ae_frame", align 8
  %15 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i8, align 1
  %19 = alloca %"struct.alglib_impl::ae_complex", align 8
  %20 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store i64 %1, ptr %9, align 8, !tbaa !9
  %21 = zext i1 %2 to i8
  store i8 %21, ptr %10, align 1, !tbaa !11
  store ptr %3, ptr %11, align 8, !tbaa !5
  store i64 %4, ptr %12, align 8, !tbaa !9
  store ptr %5, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 80, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #5
  %22 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %22, ptr noundef %14)
  call void @llvm.memset.p0.i64(ptr align 8 %15, i8 0, i64 80, i1 false)
  %23 = load ptr, ptr %8, align 8, !tbaa !5
  %24 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl19ae_matrix_init_copyEPNS_9ae_matrixEPKS0_PNS_8ae_stateEb(ptr noundef %15, ptr noundef %23, ptr noundef %24, i1 noundef zeroext true)
  %25 = load i64, ptr %9, align 8, !tbaa !9
  %26 = icmp sgt i64 %25, 0
  %27 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %26, ptr noundef @.str.309, ptr noundef %27)
  %28 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %15, i32 0, i32 0
  %29 = load i64, ptr %28, align 8, !tbaa !13
  %30 = load i64, ptr %9, align 8, !tbaa !9
  %31 = icmp sge i64 %29, %30
  %32 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %31, ptr noundef @.str.310, ptr noundef %32)
  %33 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %15, i32 0, i32 1
  %34 = load i64, ptr %33, align 8, !tbaa !16
  %35 = load i64, ptr %9, align 8, !tbaa !9
  %36 = icmp sge i64 %34, %35
  %37 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %36, ptr noundef @.str.311, ptr noundef %37)
  %38 = load ptr, ptr %11, align 8, !tbaa !5
  %39 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %38, i32 0, i32 0
  %40 = load i64, ptr %39, align 8, !tbaa !13
  %41 = load i64, ptr %9, align 8, !tbaa !9
  %42 = icmp sge i64 %40, %41
  %43 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %42, ptr noundef @.str.312, ptr noundef %43)
  %44 = load ptr, ptr %11, align 8, !tbaa !5
  %45 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %44, i32 0, i32 1
  %46 = load i64, ptr %45, align 8, !tbaa !16
  %47 = load i64, ptr %12, align 8, !tbaa !9
  %48 = icmp sge i64 %46, %47
  %49 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %48, ptr noundef @.str.313, ptr noundef %49)
  %50 = load i64, ptr %9, align 8, !tbaa !9
  %51 = load i8, ptr %10, align 1, !tbaa !11, !range !17, !noundef !18
  %52 = trunc i8 %51 to i1
  %53 = load ptr, ptr %13, align 8, !tbaa !5
  %54 = call noundef zeroext i1 @_ZN11alglib_impl17isfinitectrmatrixEPKNS_9ae_matrixElbPNS_8ae_stateE(ptr noundef %15, i64 noundef %50, i1 noundef zeroext %52, ptr noundef %53)
  %55 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %54, ptr noundef @.str.314, ptr noundef %55)
  %56 = load ptr, ptr %11, align 8, !tbaa !5
  %57 = load i64, ptr %9, align 8, !tbaa !9
  %58 = load i64, ptr %12, align 8, !tbaa !9
  %59 = load ptr, ptr %13, align 8, !tbaa !5
  %60 = call noundef zeroext i1 @_ZN11alglib_impl15isfinitecmatrixEPKNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %56, i64 noundef %57, i64 noundef %58, ptr noundef %59)
  %61 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %60, ptr noundef @.str.315, ptr noundef %61)
  store i8 1, ptr %18, align 1, !tbaa !11
  %62 = load i64, ptr %9, align 8, !tbaa !9
  %63 = load i8, ptr %10, align 1, !tbaa !11, !range !17, !noundef !18
  %64 = trunc i8 %63 to i1
  %65 = load ptr, ptr %13, align 8, !tbaa !5
  %66 = call noundef zeroext i1 @_ZN11alglib_impl17hpdmatrixcholeskyEPNS_9ae_matrixElbPNS_8ae_stateE(ptr noundef %15, i64 noundef %62, i1 noundef zeroext %64, ptr noundef %65)
  br i1 %66, label %104, label %67

67:                                               ; preds = %6
  store i64 0, ptr %16, align 8, !tbaa !9
  br label %68

68:                                               ; preds = %97, %67
  %69 = load i64, ptr %16, align 8, !tbaa !9
  %70 = load i64, ptr %9, align 8, !tbaa !9
  %71 = sub nsw i64 %70, 1
  %72 = icmp sle i64 %69, %71
  br i1 %72, label %73, label %100

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

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

79:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #5
  %80 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef 0.000000e+00)
  %81 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 0
  %82 = extractvalue { double, double } %80, 0
  store double %82, ptr %81, align 8
  %83 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 1
  %84 = extractvalue { double, double } %80, 1
  store double %84, ptr %83, align 8
  %85 = load ptr, ptr %11, align 8, !tbaa !5
  %86 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %85, i32 0, i32 6
  %87 = load ptr, ptr %86, align 8, !tbaa !19
  %88 = load i64, ptr %16, align 8, !tbaa !9
  %89 = getelementptr inbounds ptr, ptr %87, i64 %88
  %90 = load ptr, ptr %89, align 8, !tbaa !5
  %91 = load i64, ptr %17, align 8, !tbaa !9
  %92 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %90, i64 %91
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %92, ptr align 8 %19, i64 16, i1 false), !tbaa.struct !20
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #5
  br label %93

93:                                               ; preds = %79
  %94 = load i64, ptr %17, align 8, !tbaa !9
  %95 = add nsw i64 %94, 1
  store i64 %95, ptr %17, align 8, !tbaa !9
  br label %74, !llvm.loop !23

96:                                               ; preds = %74
  br label %97

97:                                               ; preds = %96
  %98 = load i64, ptr %16, align 8, !tbaa !9
  %99 = add nsw i64 %98, 1
  store i64 %99, ptr %16, align 8, !tbaa !9
  br label %68, !llvm.loop !25

100:                                              ; preds = %68
  store i8 0, ptr %18, align 1, !tbaa !11
  %101 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %101)
  %102 = load i8, ptr %18, align 1, !tbaa !11, !range !17, !noundef !18
  %103 = trunc i8 %102 to i1
  store i1 %103, ptr %7, align 1
  store i32 1, ptr %20, align 4
  br label %129

104:                                              ; preds = %6
  %105 = load i8, ptr %10, align 1, !tbaa !11, !range !17, !noundef !18
  %106 = trunc i8 %105 to i1
  br i1 %106, label %107, label %116

107:                                              ; preds = %104
  %108 = load i64, ptr %9, align 8, !tbaa !9
  %109 = load i64, ptr %12, align 8, !tbaa !9
  %110 = load ptr, ptr %11, align 8, !tbaa !5
  %111 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl15cmatrixlefttrsmEllPKNS_9ae_matrixEllbblPS0_llPNS_8ae_stateE(i64 noundef %108, i64 noundef %109, ptr noundef %15, i64 noundef 0, i64 noundef 0, i1 noundef zeroext true, i1 noundef zeroext false, i64 noundef 2, ptr noundef %110, i64 noundef 0, i64 noundef 0, ptr noundef %111)
  %112 = load i64, ptr %9, align 8, !tbaa !9
  %113 = load i64, ptr %12, align 8, !tbaa !9
  %114 = load ptr, ptr %11, align 8, !tbaa !5
  %115 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl15cmatrixlefttrsmEllPKNS_9ae_matrixEllbblPS0_llPNS_8ae_stateE(i64 noundef %112, i64 noundef %113, ptr noundef %15, i64 noundef 0, i64 noundef 0, i1 noundef zeroext true, i1 noundef zeroext false, i64 noundef 0, ptr noundef %114, i64 noundef 0, i64 noundef 0, ptr noundef %115)
  br label %125

116:                                              ; preds = %104
  %117 = load i64, ptr %9, align 8, !tbaa !9
  %118 = load i64, ptr %12, align 8, !tbaa !9
  %119 = load ptr, ptr %11, align 8, !tbaa !5
  %120 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl15cmatrixlefttrsmEllPKNS_9ae_matrixEllbblPS0_llPNS_8ae_stateE(i64 noundef %117, i64 noundef %118, ptr noundef %15, i64 noundef 0, i64 noundef 0, i1 noundef zeroext false, i1 noundef zeroext false, i64 noundef 0, ptr noundef %119, i64 noundef 0, i64 noundef 0, ptr noundef %120)
  %121 = load i64, ptr %9, align 8, !tbaa !9
  %122 = load i64, ptr %12, align 8, !tbaa !9
  %123 = load ptr, ptr %11, align 8, !tbaa !5
  %124 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl15cmatrixlefttrsmEllPKNS_9ae_matrixEllbblPS0_llPNS_8ae_stateE(i64 noundef %121, i64 noundef %122, ptr noundef %15, i64 noundef 0, i64 noundef 0, i1 noundef zeroext false, i1 noundef zeroext false, i64 noundef 2, ptr noundef %123, i64 noundef 0, i64 noundef 0, ptr noundef %124)
  br label %125

125:                                              ; preds = %116, %107
  %126 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %126)
  %127 = load i8, ptr %18, align 1, !tbaa !11, !range !17, !noundef !18
  %128 = trunc i8 %127 to i1
  store i1 %128, ptr %7, align 1
  store i32 1, ptr %20, align 4
  br label %129

129:                                              ; preds = %125, %100
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #5
  %130 = load i1, ptr %7, align 1
  ret i1 %130
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #2

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

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

declare { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef) #2

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

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

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

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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !10, i64 0}
!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 8}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = !{!7, !7, i64 0}
!20 = !{i64 0, i64 8, !21, i64 8, i64 8, !21}
!21 = !{!22, !22, i64 0}
!22 = !{!"double", !7, i64 0}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.mustprogress"}
!25 = distinct !{!25, !24}


; 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_complex" = type { double, double }

@.str.309 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.310 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.311 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.312 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.313 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.314 = external hidden unnamed_addr constant [56 x i8], align 1
@.str.315 = external hidden unnamed_addr constant [56 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 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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN11alglib_impl19hpdmatrixsolvemfastEPKNS_9ae_matrixElbPS0_lPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i1 noundef zeroext %2, ptr noundef %3, i64 noundef %4, ptr noundef %5) local_unnamed_addr #3 {
  %7 = alloca %"struct.alglib_impl::ae_frame", align 8
  %8 = alloca %"struct.alglib_impl::ae_matrix", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %8) #4
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %5, ptr noundef nonnull %7)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %8, i8 0, i64 80, i1 false)
  call void @_ZN11alglib_impl19ae_matrix_init_copyEPNS_9ae_matrixEPKS0_PNS_8ae_stateEb(ptr noundef nonnull %8, ptr noundef %0, ptr noundef %5, i1 noundef zeroext true)
  %9 = icmp sgt i64 %1, 0
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %9, ptr noundef nonnull @.str.309, ptr noundef %5)
  %10 = load i64, ptr %8, 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.310, ptr noundef %5)
  %12 = getelementptr inbounds i8, ptr %8, i64 8
  %13 = load i64, ptr %12, align 8, !tbaa !13
  %14 = icmp sge i64 %13, %1
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %14, ptr noundef nonnull @.str.311, ptr noundef %5)
  %15 = load i64, ptr %3, align 8, !tbaa !5
  %16 = icmp sge i64 %15, %1
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %16, ptr noundef nonnull @.str.312, ptr noundef %5)
  %17 = getelementptr inbounds i8, ptr %3, i64 8
  %18 = load i64, ptr %17, align 8, !tbaa !13
  %19 = icmp sge i64 %18, %4
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %19, ptr noundef nonnull @.str.313, ptr noundef %5)
  %20 = call noundef zeroext i1 @_ZN11alglib_impl17isfinitectrmatrixEPKNS_9ae_matrixElbPNS_8ae_stateE(ptr noundef nonnull %8, i64 noundef %1, i1 noundef zeroext %2, ptr noundef %5)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %20, ptr noundef nonnull @.str.314, ptr noundef %5)
  %21 = call noundef zeroext i1 @_ZN11alglib_impl15isfinitecmatrixEPKNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %3, i64 noundef %1, i64 noundef %4, ptr noundef %5)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %21, ptr noundef nonnull @.str.315, ptr noundef %5)
  %22 = call noundef zeroext i1 @_ZN11alglib_impl17hpdmatrixcholeskyEPNS_9ae_matrixElbPNS_8ae_stateE(ptr noundef nonnull %8, i64 noundef %1, i1 noundef zeroext %2, ptr noundef %5)
  br i1 %22, label %34, label %.preheader60

.preheader60:                                     ; preds = %6
  br i1 %9, label %.preheader.lr.ph, label %._crit_edge65

.preheader.lr.ph:                                 ; preds = %.preheader60
  %.not.not5961 = icmp sgt i64 %4, 0
  %23 = getelementptr inbounds i8, ptr %3, i64 72
  br i1 %.not.not5961, label %.preheader.us, label %._crit_edge65

.preheader.us:                                    ; preds = %.preheader.lr.ph, %._crit_edge.us
  %.05764.us = phi i64 [ %33, %._crit_edge.us ], [ 0, %.preheader.lr.ph ]
  br label %24

24:                                               ; preds = %.preheader.us, %24
  %.05862.us = phi i64 [ 0, %.preheader.us ], [ %32, %24 ]
  %25 = call { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef 0.000000e+00)
  %26 = extractvalue { double, double } %25, 0
  %27 = extractvalue { double, double } %25, 1
  %28 = load ptr, ptr %23, align 8, !tbaa !14
  %29 = getelementptr inbounds ptr, ptr %28, i64 %.05764.us
  %30 = load ptr, ptr %29, align 8, !tbaa !15
  %31 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %30, i64 %.05862.us
  store double %26, ptr %31, align 8, !tbaa !16
  %.sroa.4.0..sroa_idx.us = getelementptr inbounds i8, ptr %31, i64 8
  store double %27, ptr %.sroa.4.0..sroa_idx.us, align 8, !tbaa !16
  %32 = add nuw nsw i64 %.05862.us, 1
  %exitcond.not = icmp eq i64 %32, %4
  br i1 %exitcond.not, label %._crit_edge.us, label %24, !llvm.loop !18

._crit_edge.us:                                   ; preds = %24
  %33 = add nuw nsw i64 %.05764.us, 1
  %exitcond67.not = icmp eq i64 %33, %1
  br i1 %exitcond67.not, label %._crit_edge65, label %.preheader.us, !llvm.loop !20

34:                                               ; preds = %6
  br i1 %2, label %35, label %36

35:                                               ; preds = %34
  call void @_ZN11alglib_impl15cmatrixlefttrsmEllPKNS_9ae_matrixEllbblPS0_llPNS_8ae_stateE(i64 noundef %1, i64 noundef %4, ptr noundef nonnull %8, i64 noundef 0, i64 noundef 0, i1 noundef zeroext true, i1 noundef zeroext false, i64 noundef 2, ptr noundef nonnull %3, i64 noundef 0, i64 noundef 0, ptr noundef %5)
  call void @_ZN11alglib_impl15cmatrixlefttrsmEllPKNS_9ae_matrixEllbblPS0_llPNS_8ae_stateE(i64 noundef %1, i64 noundef %4, ptr noundef nonnull %8, i64 noundef 0, i64 noundef 0, i1 noundef zeroext true, i1 noundef zeroext false, i64 noundef 0, ptr noundef nonnull %3, i64 noundef 0, i64 noundef 0, ptr noundef %5)
  br label %._crit_edge65

36:                                               ; preds = %34
  call void @_ZN11alglib_impl15cmatrixlefttrsmEllPKNS_9ae_matrixEllbblPS0_llPNS_8ae_stateE(i64 noundef %1, i64 noundef %4, ptr noundef nonnull %8, i64 noundef 0, i64 noundef 0, i1 noundef zeroext false, i1 noundef zeroext false, i64 noundef 0, ptr noundef nonnull %3, i64 noundef 0, i64 noundef 0, ptr noundef %5)
  call void @_ZN11alglib_impl15cmatrixlefttrsmEllPKNS_9ae_matrixEllbblPS0_llPNS_8ae_stateE(i64 noundef %1, i64 noundef %4, ptr noundef nonnull %8, i64 noundef 0, i64 noundef 0, i1 noundef zeroext false, i1 noundef zeroext false, i64 noundef 2, ptr noundef nonnull %3, i64 noundef 0, i64 noundef 0, ptr noundef %5)
  br label %._crit_edge65

._crit_edge65:                                    ; preds = %._crit_edge.us, %35, %36, %.preheader60, %.preheader.lr.ph
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %5)
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #4
  ret i1 %22
}

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #2

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

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

declare { double, double } @_ZN11alglib_impl17ae_complex_from_dEd(double noundef) local_unnamed_addr #2

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

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

declare noundef zeroext i1 @_ZN11alglib_impl17hpdmatrixcholeskyEPNS_9ae_matrixElbPNS_8ae_stateE(ptr noundef, i64 noundef, i1 noundef zeroext, 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 = { "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 0}
!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 8}
!14 = !{!8, !8, i64 0}
!15 = !{!12, !12, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"double", !8, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}


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