; LLVM IR from venumb/ZSPACE :: cpp/depends/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.0 }
%union.anon.0 = type { ptr }
%"struct.alglib_impl::ae_complex" = type { double, double }
%"struct.alglib_impl::densesolverreport" = type { double, double }

@.str.34 = external hidden unnamed_addr constant [2 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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl15hpdmatrixsolvemEPNS_9ae_matrixElbS1_lPlPNS_17densesolverreportES1_PNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i1 noundef zeroext %2, ptr noundef %3, i64 noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8) #2 {
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca i8, align 1
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca %"struct.alglib_impl::ae_frame", align 8
  %20 = alloca %"struct.alglib_impl::ae_matrix", align 8
  %21 = alloca i64, align 8
  %22 = alloca i64, align 8
  %23 = alloca i64, align 8
  %24 = alloca i64, align 8
  %25 = alloca i32, align 4
  %26 = alloca %"struct.alglib_impl::ae_complex", align 8
  store ptr %0, ptr %10, align 8, !tbaa !5
  store i64 %1, ptr %11, align 8, !tbaa !9
  %27 = zext i1 %2 to i8
  store i8 %27, ptr %12, align 1, !tbaa !11
  store ptr %3, ptr %13, align 8, !tbaa !5
  store i64 %4, ptr %14, align 8, !tbaa !9
  store ptr %5, ptr %15, align 8, !tbaa !5
  store ptr %6, ptr %16, align 8, !tbaa !5
  store ptr %7, ptr %17, align 8, !tbaa !5
  store ptr %8, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 80, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  %28 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %28, ptr noundef %19)
  call void @llvm.memset.p0.i64(ptr align 8 %20, i8 0, i64 80, i1 false)
  %29 = load ptr, ptr %15, align 8, !tbaa !5
  store i64 0, ptr %29, align 8, !tbaa !9
  %30 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl24_densesolverreport_clearEPv(ptr noundef %30)
  %31 = load ptr, ptr %17, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef %31)
  %32 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef %20, i64 noundef 0, i64 noundef 0, i64 noundef 4, ptr noundef %32, i1 noundef zeroext true)
  %33 = load i64, ptr %11, align 8, !tbaa !9
  %34 = icmp sle i64 %33, 0
  br i1 %34, label %38, label %35

35:                                               ; preds = %9
  %36 = load i64, ptr %14, align 8, !tbaa !9
  %37 = icmp sle i64 %36, 0
  br i1 %37, label %38, label %41

38:                                               ; preds = %35, %9
  %39 = load ptr, ptr %15, align 8, !tbaa !5
  store i64 -1, ptr %39, align 8, !tbaa !9
  %40 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %40)
  store i32 1, ptr %25, align 4
  br label %144

41:                                               ; preds = %35
  %42 = load i64, ptr %11, align 8, !tbaa !9
  %43 = load i64, ptr %11, align 8, !tbaa !9
  %44 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %20, i64 noundef %42, i64 noundef %43, ptr noundef %44)
  store i64 0, ptr %21, align 8, !tbaa !9
  br label %45

45:                                               ; preds = %78, %41
  %46 = load i64, ptr %21, align 8, !tbaa !9
  %47 = load i64, ptr %11, align 8, !tbaa !9
  %48 = sub nsw i64 %47, 1
  %49 = icmp sle i64 %46, %48
  br i1 %49, label %50, label %81

50:                                               ; preds = %45
  %51 = load i8, ptr %12, align 1, !tbaa !11, !range !13, !noundef !14
  %52 = trunc i8 %51 to i1
  br i1 %52, label %53, label %57

53:                                               ; preds = %50
  %54 = load i64, ptr %21, align 8, !tbaa !9
  store i64 %54, ptr %23, align 8, !tbaa !9
  %55 = load i64, ptr %11, align 8, !tbaa !9
  %56 = sub nsw i64 %55, 1
  store i64 %56, ptr %24, align 8, !tbaa !9
  br label %59

57:                                               ; preds = %50
  store i64 0, ptr %23, align 8, !tbaa !9
  %58 = load i64, ptr %21, align 8, !tbaa !9
  store i64 %58, ptr %24, align 8, !tbaa !9
  br label %59

59:                                               ; preds = %57, %53
  %60 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %20, i32 0, i32 6
  %61 = load ptr, ptr %60, align 8, !tbaa !15
  %62 = load i64, ptr %21, align 8, !tbaa !9
  %63 = getelementptr inbounds ptr, ptr %61, i64 %62
  %64 = load ptr, ptr %63, align 8, !tbaa !5
  %65 = load i64, ptr %23, align 8, !tbaa !9
  %66 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %64, i64 %65
  %67 = load ptr, ptr %10, align 8, !tbaa !5
  %68 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %67, i32 0, i32 6
  %69 = load ptr, ptr %68, align 8, !tbaa !15
  %70 = load i64, ptr %21, align 8, !tbaa !9
  %71 = getelementptr inbounds ptr, ptr %69, i64 %70
  %72 = load ptr, ptr %71, align 8, !tbaa !5
  %73 = load i64, ptr %23, align 8, !tbaa !9
  %74 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %72, i64 %73
  %75 = load i64, ptr %23, align 8, !tbaa !9
  %76 = load i64, ptr %24, align 8, !tbaa !9
  %77 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %75, i64 noundef %76)
  call void @_ZN11alglib_impl10ae_v_cmoveEPNS_10ae_complexElPKS0_lPKcl(ptr noundef %66, i64 noundef 1, ptr noundef %74, i64 noundef 1, ptr noundef @.str.34, i64 noundef %77)
  br label %78

78:                                               ; preds = %59
  %79 = load i64, ptr %21, align 8, !tbaa !9
  %80 = add nsw i64 %79, 1
  store i64 %80, ptr %21, align 8, !tbaa !9
  br label %45, !llvm.loop !16

81:                                               ; preds = %45
  %82 = load i64, ptr %11, align 8, !tbaa !9
  %83 = load i8, ptr %12, align 1, !tbaa !11, !range !13, !noundef !14
  %84 = trunc i8 %83 to i1
  %85 = load ptr, ptr %18, align 8, !tbaa !5
  %86 = call noundef zeroext i1 @_ZN11alglib_impl17hpdmatrixcholeskyEPNS_9ae_matrixElbPNS_8ae_stateE(ptr noundef %20, i64 noundef %82, i1 noundef zeroext %84, ptr noundef %85)
  br i1 %86, label %131, label %87

87:                                               ; preds = %81
  %88 = load ptr, ptr %17, align 8, !tbaa !5
  %89 = load i64, ptr %11, align 8, !tbaa !9
  %90 = load i64, ptr %14, align 8, !tbaa !9
  %91 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %88, i64 noundef %89, i64 noundef %90, ptr noundef %91)
  store i64 0, ptr %21, align 8, !tbaa !9
  br label %92

92:                                               ; preds = %121, %87
  %93 = load i64, ptr %21, align 8, !tbaa !9
  %94 = load i64, ptr %11, align 8, !tbaa !9
  %95 = sub nsw i64 %94, 1
  %96 = icmp sle i64 %93, %95
  br i1 %96, label %97, label %124

97:                                               ; preds = %92
  store i64 0, ptr %22, align 8, !tbaa !9
  br label %98

98:                                               ; preds = %117, %97
  %99 = load i64, ptr %22, align 8, !tbaa !9
  %100 = load i64, ptr %14, align 8, !tbaa !9
  %101 = sub nsw i64 %100, 1
  %102 = icmp sle i64 %99, %101
  br i1 %102, label %103, label %120

103:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #5
  %104 = call { double, double } @_ZN11alglib_impl17ae_complex_from_iEl(i64 noundef 0)
  %105 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 0
  %106 = extractvalue { double, double } %104, 0
  store double %106, ptr %105, align 8
  %107 = getelementptr inbounds { double, double }, ptr %26, i32 0, i32 1
  %108 = extractvalue { double, double } %104, 1
  store double %108, ptr %107, align 8
  %109 = load ptr, ptr %17, align 8, !tbaa !5
  %110 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %109, i32 0, i32 6
  %111 = load ptr, ptr %110, align 8, !tbaa !15
  %112 = load i64, ptr %21, align 8, !tbaa !9
  %113 = getelementptr inbounds ptr, ptr %111, i64 %112
  %114 = load ptr, ptr %113, align 8, !tbaa !5
  %115 = load i64, ptr %22, align 8, !tbaa !9
  %116 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %114, i64 %115
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %116, ptr align 8 %26, i64 16, i1 false), !tbaa.struct !18
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #5
  br label %117

117:                                              ; preds = %103
  %118 = load i64, ptr %22, align 8, !tbaa !9
  %119 = add nsw i64 %118, 1
  store i64 %119, ptr %22, align 8, !tbaa !9
  br label %98, !llvm.loop !21

120:                                              ; preds = %98
  br label %121

121:                                              ; preds = %120
  %122 = load i64, ptr %21, align 8, !tbaa !9
  %123 = add nsw i64 %122, 1
  store i64 %123, ptr %21, align 8, !tbaa !9
  br label %92, !llvm.loop !22

124:                                              ; preds = %92
  %125 = load ptr, ptr %16, align 8, !tbaa !5
  %126 = getelementptr inbounds %"struct.alglib_impl::densesolverreport", ptr %125, i32 0, i32 0
  store double 0.000000e+00, ptr %126, align 8, !tbaa !23
  %127 = load ptr, ptr %16, align 8, !tbaa !5
  %128 = getelementptr inbounds %"struct.alglib_impl::densesolverreport", ptr %127, i32 0, i32 1
  store double 0.000000e+00, ptr %128, align 8, !tbaa !25
  %129 = load ptr, ptr %15, align 8, !tbaa !5
  store i64 -3, ptr %129, align 8, !tbaa !9
  %130 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %130)
  store i32 1, ptr %25, align 4
  br label %144

131:                                              ; preds = %81
  %132 = load ptr, ptr %15, align 8, !tbaa !5
  store i64 1, ptr %132, align 8, !tbaa !9
  %133 = load i64, ptr %11, align 8, !tbaa !9
  %134 = load i8, ptr %12, align 1, !tbaa !11, !range !13, !noundef !14
  %135 = trunc i8 %134 to i1
  %136 = load ptr, ptr %10, align 8, !tbaa !5
  %137 = load ptr, ptr %13, align 8, !tbaa !5
  %138 = load i64, ptr %14, align 8, !tbaa !9
  %139 = load ptr, ptr %15, align 8, !tbaa !5
  %140 = load ptr, ptr %16, align 8, !tbaa !5
  %141 = load ptr, ptr %17, align 8, !tbaa !5
  %142 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_implL49directdensesolvers_hpdmatrixcholeskysolveinternalEPNS_9ae_matrixElbS1_bS1_lPlPNS_17densesolverreportES1_PNS_8ae_stateE(ptr noundef %20, i64 noundef %133, i1 noundef zeroext %135, ptr noundef %136, i1 noundef zeroext true, ptr noundef %137, i64 noundef %138, ptr noundef %139, ptr noundef %140, ptr noundef %141, ptr noundef %142)
  %143 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %143)
  store i32 0, ptr %25, align 4
  br label %144

144:                                              ; preds = %131, %124, %38
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #5
  %145 = load i32, ptr %25, align 4
  switch i32 %145, label %147 [
    i32 0, label %146
    i32 1, label %146
  ]

146:                                              ; preds = %144, %144
  ret void

147:                                              ; preds = %144
  unreachable
}

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

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

declare void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef, i64 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_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #3

declare noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef, i64 noundef) #3

declare void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef) #3

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

; 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 noundef zeroext i1 @_ZN11alglib_impl17hpdmatrixcholeskyEPNS_9ae_matrixElbPNS_8ae_stateE(ptr noundef, i64 noundef, i1 noundef zeroext, ptr noundef) #3

declare { double, double } @_ZN11alglib_impl17ae_complex_from_iEl(i64 noundef) #3

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL49directdensesolvers_hpdmatrixcholeskysolveinternalEPNS_9ae_matrixElbS1_bS1_lPlPNS_17densesolverreportES1_PNS_8ae_stateE(ptr noundef, i64 noundef, i1 noundef zeroext, ptr noundef, i1 noundef zeroext, ptr noundef, i64 noundef, ptr noundef, ptr 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 = { 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 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!7, !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{i64 0, i64 8, !19, i64 8, i64 8, !19}
!19 = !{!20, !20, i64 0}
!20 = !{!"double", !7, i64 0}
!21 = distinct !{!21, !17}
!22 = distinct !{!22, !17}
!23 = !{!24, !20, i64 0}
!24 = !{!"_ZTSN11alglib_impl17densesolverreportE", !20, i64 0, !20, i64 8}
!25 = !{!24, !20, i64 8}


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

@.str.34 = external hidden unnamed_addr constant [2 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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl15hpdmatrixsolvemEPNS_9ae_matrixElbS1_lPlPNS_17densesolverreportES1_PNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i1 noundef zeroext %2, ptr noundef %3, i64 noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8) local_unnamed_addr #2 {
  %10 = alloca %"struct.alglib_impl::ae_frame", align 8
  %11 = alloca %"struct.alglib_impl::ae_matrix", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %11) #4
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %8, ptr noundef nonnull %10)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %11, i8 0, i64 80, i1 false)
  store i64 0, ptr %5, align 8, !tbaa !5
  call void @_ZN11alglib_impl24_densesolverreport_clearEPv(ptr noundef %6)
  call void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef %7)
  call void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef nonnull %11, i64 noundef 0, i64 noundef 0, i64 noundef 4, ptr noundef %8, i1 noundef zeroext true)
  %12 = icmp slt i64 %1, 1
  %13 = icmp slt i64 %4, 1
  %or.cond = or i1 %12, %13
  br i1 %or.cond, label %14, label %15

14:                                               ; preds = %9
  store i64 -1, ptr %5, align 8, !tbaa !5
  br label %51

15:                                               ; preds = %9
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %11, i64 noundef %1, i64 noundef %1, ptr noundef %8)
  %16 = add nsw i64 %1, -1
  %17 = getelementptr inbounds i8, ptr %11, i64 72
  %18 = getelementptr inbounds i8, ptr %0, i64 72
  br i1 %2, label %.split.us, label %.split

.split.us:                                        ; preds = %15, %.split.us
  %.066.us = phi i64 [ %28, %.split.us ], [ 0, %15 ]
  %19 = load ptr, ptr %17, align 8, !tbaa !9
  %20 = getelementptr inbounds ptr, ptr %19, i64 %.066.us
  %21 = load ptr, ptr %20, align 8, !tbaa !10
  %22 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %21, i64 %.066.us
  %23 = load ptr, ptr %18, align 8, !tbaa !9
  %24 = getelementptr inbounds ptr, ptr %23, i64 %.066.us
  %25 = load ptr, ptr %24, align 8, !tbaa !10
  %26 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %25, i64 %.066.us
  %27 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %.066.us, i64 noundef %16)
  call void @_ZN11alglib_impl10ae_v_cmoveEPNS_10ae_complexElPKS0_lPKcl(ptr noundef %22, i64 noundef 1, ptr noundef %26, i64 noundef 1, ptr noundef nonnull @.str.34, i64 noundef %27)
  %28 = add nuw nsw i64 %.066.us, 1
  %exitcond76.not = icmp eq i64 %28, %1
  br i1 %exitcond76.not, label %.split68.us, label %.split.us, !llvm.loop !12

.split:                                           ; preds = %15, %.split
  %.066 = phi i64 [ %36, %.split ], [ 0, %15 ]
  %29 = load ptr, ptr %17, align 8, !tbaa !9
  %30 = getelementptr inbounds ptr, ptr %29, i64 %.066
  %31 = load ptr, ptr %30, align 8, !tbaa !10
  %32 = load ptr, ptr %18, align 8, !tbaa !9
  %33 = getelementptr inbounds ptr, ptr %32, i64 %.066
  %34 = load ptr, ptr %33, align 8, !tbaa !10
  %35 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %.066)
  call void @_ZN11alglib_impl10ae_v_cmoveEPNS_10ae_complexElPKS0_lPKcl(ptr noundef %31, i64 noundef 1, ptr noundef %34, i64 noundef 1, ptr noundef nonnull @.str.34, i64 noundef %35)
  %36 = add nuw nsw i64 %.066, 1
  %exitcond.not = icmp eq i64 %36, %1
  br i1 %exitcond.not, label %.split68.us, label %.split, !llvm.loop !12

.split68.us:                                      ; preds = %.split, %.split.us
  %37 = call noundef zeroext i1 @_ZN11alglib_impl17hpdmatrixcholeskyEPNS_9ae_matrixElbPNS_8ae_stateE(ptr noundef nonnull %11, i64 noundef %1, i1 noundef zeroext %2, ptr noundef %8)
  br i1 %37, label %50, label %38

38:                                               ; preds = %.split68.us
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %7, i64 noundef %1, i64 noundef %4, ptr noundef %8)
  %.not.not6471 = icmp sgt i64 %1, 0
  br i1 %.not.not6471, label %.preheader.lr.ph, label %._crit_edge73

.preheader.lr.ph:                                 ; preds = %38
  %.not.not6569 = icmp sgt i64 %4, 0
  %39 = getelementptr inbounds i8, ptr %7, i64 72
  br i1 %.not.not6569, label %.preheader.us, label %._crit_edge73

.preheader.us:                                    ; preds = %.preheader.lr.ph, %._crit_edge.us
  %.172.us = phi i64 [ %49, %._crit_edge.us ], [ 0, %.preheader.lr.ph ]
  br label %40

40:                                               ; preds = %.preheader.us, %40
  %.05770.us = phi i64 [ 0, %.preheader.us ], [ %48, %40 ]
  %41 = call { double, double } @_ZN11alglib_impl17ae_complex_from_iEl(i64 noundef 0)
  %42 = extractvalue { double, double } %41, 0
  %43 = extractvalue { double, double } %41, 1
  %44 = load ptr, ptr %39, align 8, !tbaa !9
  %45 = getelementptr inbounds ptr, ptr %44, i64 %.172.us
  %46 = load ptr, ptr %45, align 8, !tbaa !10
  %47 = getelementptr inbounds %"struct.alglib_impl::ae_complex", ptr %46, i64 %.05770.us
  store double %42, ptr %47, align 8, !tbaa !14
  %.sroa.4.0..sroa_idx.us = getelementptr inbounds i8, ptr %47, i64 8
  store double %43, ptr %.sroa.4.0..sroa_idx.us, align 8, !tbaa !14
  %48 = add nuw nsw i64 %.05770.us, 1
  %exitcond77.not = icmp eq i64 %48, %4
  br i1 %exitcond77.not, label %._crit_edge.us, label %40, !llvm.loop !16

._crit_edge.us:                                   ; preds = %40
  %49 = add nuw nsw i64 %.172.us, 1
  %exitcond78.not = icmp eq i64 %49, %1
  br i1 %exitcond78.not, label %._crit_edge73, label %.preheader.us, !llvm.loop !17

._crit_edge73:                                    ; preds = %._crit_edge.us, %.preheader.lr.ph, %38
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %6, i8 0, i64 16, i1 false)
  store i64 -3, ptr %5, align 8, !tbaa !5
  br label %51

50:                                               ; preds = %.split68.us
  store i64 1, ptr %5, align 8, !tbaa !5
  call void @_ZN11alglib_implL49directdensesolvers_hpdmatrixcholeskysolveinternalEPNS_9ae_matrixElbS1_bS1_lPlPNS_17densesolverreportES1_PNS_8ae_stateE(ptr noundef nonnull %11, i64 noundef %1, i1 noundef zeroext %2, ptr noundef nonnull %0, i1 noundef zeroext true, ptr noundef %3, i64 noundef %4, ptr noundef nonnull %5, ptr noundef %6, ptr noundef %7, ptr noundef %8)
  br label %51

51:                                               ; preds = %50, %._crit_edge73, %14
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %8)
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #4
  ret void
}

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

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

declare void @_ZN11alglib_impl14ae_matrix_initEPNS_9ae_matrixElllPNS_8ae_stateEb(ptr noundef, i64 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_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #3

declare noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef, i64 noundef) local_unnamed_addr #3

declare void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef) local_unnamed_addr #3

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

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

declare { double, double } @_ZN11alglib_impl17ae_complex_from_iEl(i64 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL49directdensesolvers_hpdmatrixcholeskysolveinternalEPNS_9ae_matrixElbS1_bS1_lPlPNS_17densesolverreportES1_PNS_8ae_stateE(ptr noundef, i64 noundef, i1 noundef zeroext, ptr noundef, i1 noundef zeroext, ptr noundef, i64 noundef, ptr noundef, ptr 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = !{!15, !15, i64 0}
!15 = !{!"double", !7, i64 0}
!16 = distinct !{!16, !13}
!17 = distinct !{!17, !13}


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