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

@.str.71 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.72 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.73 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.74 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.75 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.76 = external hidden unnamed_addr constant [39 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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl22sparsecholeskysolvesksEPNS_12sparsematrixElbPNS_9ae_vectorEPNS_18sparsesolverreportES3_PNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i1 noundef zeroext %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) #2 {
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca i8, align 1
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store i64 %1, ptr %9, align 8, !tbaa !9
  %17 = zext i1 %2 to i8
  store i8 %17, ptr %10, align 1, !tbaa !11
  store ptr %3, ptr %11, align 8, !tbaa !5
  store ptr %4, ptr %12, align 8, !tbaa !5
  store ptr %5, ptr %13, align 8, !tbaa !5
  store ptr %6, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  %18 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl25_sparsesolverreport_clearEPv(ptr noundef %18)
  %19 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %19)
  %20 = load i64, ptr %9, align 8, !tbaa !9
  %21 = icmp sgt i64 %20, 0
  %22 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %21, ptr noundef @.str.71, ptr noundef %22)
  %23 = load ptr, ptr %8, align 8, !tbaa !5
  %24 = load ptr, ptr %14, align 8, !tbaa !5
  %25 = call noundef i64 @_ZN11alglib_impl14sparsegetnrowsEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %23, ptr noundef %24)
  %26 = load i64, ptr %9, align 8, !tbaa !9
  %27 = icmp eq i64 %25, %26
  %28 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %27, ptr noundef @.str.72, ptr noundef %28)
  %29 = load ptr, ptr %8, align 8, !tbaa !5
  %30 = load ptr, ptr %14, align 8, !tbaa !5
  %31 = call noundef i64 @_ZN11alglib_impl14sparsegetncolsEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %29, ptr noundef %30)
  %32 = load i64, ptr %9, align 8, !tbaa !9
  %33 = icmp eq i64 %31, %32
  %34 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %33, ptr noundef @.str.73, ptr noundef %34)
  %35 = load ptr, ptr %8, align 8, !tbaa !5
  %36 = load ptr, ptr %14, align 8, !tbaa !5
  %37 = call noundef zeroext i1 @_ZN11alglib_impl11sparseissksEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %35, ptr noundef %36)
  %38 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %37, ptr noundef @.str.76, ptr noundef %38)
  %39 = load ptr, ptr %11, align 8, !tbaa !5
  %40 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %39, i32 0, i32 0
  %41 = load i64, ptr %40, align 8, !tbaa !13
  %42 = load i64, ptr %9, align 8, !tbaa !9
  %43 = icmp sge i64 %41, %42
  %44 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %43, ptr noundef @.str.74, ptr noundef %44)
  %45 = load ptr, ptr %11, align 8, !tbaa !5
  %46 = load i64, ptr %9, align 8, !tbaa !9
  %47 = load ptr, ptr %14, align 8, !tbaa !5
  %48 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %45, i64 noundef %46, ptr noundef %47)
  %49 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %48, ptr noundef @.str.75, ptr noundef %49)
  %50 = load ptr, ptr %12, align 8, !tbaa !5
  %51 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_implL30directsparsesolvers_initreportEPNS_18sparsesolverreportEPNS_8ae_stateE(ptr noundef %50, ptr noundef %51)
  %52 = load ptr, ptr %13, align 8, !tbaa !5
  %53 = load i64, ptr %9, align 8, !tbaa !9
  %54 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %52, i64 noundef %53, ptr noundef %54)
  store i64 0, ptr %15, align 8, !tbaa !9
  br label %55

55:                                               ; preds = %86, %7
  %56 = load i64, ptr %15, align 8, !tbaa !9
  %57 = load i64, ptr %9, align 8, !tbaa !9
  %58 = sub nsw i64 %57, 1
  %59 = icmp sle i64 %56, %58
  br i1 %59, label %60, label %89

60:                                               ; preds = %55
  %61 = load ptr, ptr %8, align 8, !tbaa !5
  %62 = load i64, ptr %15, align 8, !tbaa !9
  %63 = load i64, ptr %15, align 8, !tbaa !9
  %64 = load ptr, ptr %14, align 8, !tbaa !5
  %65 = call noundef double @_ZN11alglib_impl9sparsegetEPNS_12sparsematrixEllPNS_8ae_stateE(ptr noundef %61, i64 noundef %62, i64 noundef %63, ptr noundef %64)
  %66 = call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %65, double noundef 0.000000e+00)
  br i1 %66, label %67, label %85

67:                                               ; preds = %60
  %68 = load ptr, ptr %12, align 8, !tbaa !5
  %69 = getelementptr inbounds %"struct.alglib_impl::sparsesolverreport", ptr %68, i32 0, i32 0
  store i64 -3, ptr %69, align 8, !tbaa !16
  store i64 0, ptr %15, align 8, !tbaa !9
  br label %70

70:                                               ; preds = %81, %67
  %71 = load i64, ptr %15, align 8, !tbaa !9
  %72 = load i64, ptr %9, align 8, !tbaa !9
  %73 = sub nsw i64 %72, 1
  %74 = icmp sle i64 %71, %73
  br i1 %74, label %75, label %84

75:                                               ; preds = %70
  %76 = load ptr, ptr %13, align 8, !tbaa !5
  %77 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %76, i32 0, i32 4
  %78 = load ptr, ptr %77, align 8, !tbaa !18
  %79 = load i64, ptr %15, align 8, !tbaa !9
  %80 = getelementptr inbounds double, ptr %78, i64 %79
  store double 0.000000e+00, ptr %80, align 8, !tbaa !19
  br label %81

81:                                               ; preds = %75
  %82 = load i64, ptr %15, align 8, !tbaa !9
  %83 = add nsw i64 %82, 1
  store i64 %83, ptr %15, align 8, !tbaa !9
  br label %70, !llvm.loop !21

84:                                               ; preds = %70
  store i32 1, ptr %16, align 4
  br label %138

85:                                               ; preds = %60
  br label %86

86:                                               ; preds = %85
  %87 = load i64, ptr %15, align 8, !tbaa !9
  %88 = add nsw i64 %87, 1
  store i64 %88, ptr %15, align 8, !tbaa !9
  br label %55, !llvm.loop !23

89:                                               ; preds = %55
  store i64 0, ptr %15, align 8, !tbaa !9
  br label %90

90:                                               ; preds = %107, %89
  %91 = load i64, ptr %15, align 8, !tbaa !9
  %92 = load i64, ptr %9, align 8, !tbaa !9
  %93 = sub nsw i64 %92, 1
  %94 = icmp sle i64 %91, %93
  br i1 %94, label %95, label %110

95:                                               ; preds = %90
  %96 = load ptr, ptr %11, align 8, !tbaa !5
  %97 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %96, i32 0, i32 4
  %98 = load ptr, ptr %97, align 8, !tbaa !18
  %99 = load i64, ptr %15, align 8, !tbaa !9
  %100 = getelementptr inbounds double, ptr %98, i64 %99
  %101 = load double, ptr %100, align 8, !tbaa !19
  %102 = load ptr, ptr %13, align 8, !tbaa !5
  %103 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %102, i32 0, i32 4
  %104 = load ptr, ptr %103, align 8, !tbaa !18
  %105 = load i64, ptr %15, align 8, !tbaa !9
  %106 = getelementptr inbounds double, ptr %104, i64 %105
  store double %101, ptr %106, align 8, !tbaa !19
  br label %107

107:                                              ; preds = %95
  %108 = load i64, ptr %15, align 8, !tbaa !9
  %109 = add nsw i64 %108, 1
  store i64 %109, ptr %15, align 8, !tbaa !9
  br label %90, !llvm.loop !24

110:                                              ; preds = %90
  %111 = load i8, ptr %10, align 1, !tbaa !11, !range !25, !noundef !26
  %112 = trunc i8 %111 to i1
  br i1 %112, label %113, label %124

113:                                              ; preds = %110
  %114 = load ptr, ptr %8, align 8, !tbaa !5
  %115 = load i8, ptr %10, align 1, !tbaa !11, !range !25, !noundef !26
  %116 = trunc i8 %115 to i1
  %117 = load ptr, ptr %13, align 8, !tbaa !5
  %118 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl10sparsetrsvEPNS_12sparsematrixEbblPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %114, i1 noundef zeroext %116, i1 noundef zeroext false, i64 noundef 1, ptr noundef %117, ptr noundef %118)
  %119 = load ptr, ptr %8, align 8, !tbaa !5
  %120 = load i8, ptr %10, align 1, !tbaa !11, !range !25, !noundef !26
  %121 = trunc i8 %120 to i1
  %122 = load ptr, ptr %13, align 8, !tbaa !5
  %123 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl10sparsetrsvEPNS_12sparsematrixEbblPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %119, i1 noundef zeroext %121, i1 noundef zeroext false, i64 noundef 0, ptr noundef %122, ptr noundef %123)
  br label %135

124:                                              ; preds = %110
  %125 = load ptr, ptr %8, align 8, !tbaa !5
  %126 = load i8, ptr %10, align 1, !tbaa !11, !range !25, !noundef !26
  %127 = trunc i8 %126 to i1
  %128 = load ptr, ptr %13, align 8, !tbaa !5
  %129 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl10sparsetrsvEPNS_12sparsematrixEbblPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %125, i1 noundef zeroext %127, i1 noundef zeroext false, i64 noundef 0, ptr noundef %128, ptr noundef %129)
  %130 = load ptr, ptr %8, align 8, !tbaa !5
  %131 = load i8, ptr %10, align 1, !tbaa !11, !range !25, !noundef !26
  %132 = trunc i8 %131 to i1
  %133 = load ptr, ptr %13, align 8, !tbaa !5
  %134 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl10sparsetrsvEPNS_12sparsematrixEbblPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %130, i1 noundef zeroext %132, i1 noundef zeroext false, i64 noundef 1, ptr noundef %133, ptr noundef %134)
  br label %135

135:                                              ; preds = %124, %113
  %136 = load ptr, ptr %12, align 8, !tbaa !5
  %137 = getelementptr inbounds %"struct.alglib_impl::sparsesolverreport", ptr %136, i32 0, i32 0
  store i64 1, ptr %137, align 8, !tbaa !16
  store i32 0, ptr %16, align 4
  br label %138

138:                                              ; preds = %135, %84
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  %139 = load i32, ptr %16, align 4
  switch i32 %139, label %141 [
    i32 0, label %140
    i32 1, label %140
  ]

140:                                              ; preds = %138, %138
  ret void

141:                                              ; preds = %138
  unreachable
}

declare void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef) #1

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

declare noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef, double noundef) #1

declare noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) #1

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

declare noundef i64 @_ZN11alglib_impl14sparsegetnrowsEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef, ptr noundef) #1

declare noundef i64 @_ZN11alglib_impl14sparsegetncolsEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL30directsparsesolvers_initreportEPNS_18sparsesolverreportEPNS_8ae_stateE(ptr noundef, ptr noundef) #2

declare void @_ZN11alglib_impl10sparsetrsvEPNS_12sparsematrixEbblPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef, i1 noundef zeroext, i1 noundef zeroext, i64 noundef, ptr noundef, ptr noundef) #1

declare noundef zeroext i1 @_ZN11alglib_impl11sparseissksEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef, ptr noundef) #1

declare noundef double @_ZN11alglib_impl9sparsegetEPNS_12sparsematrixEllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 #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 = { 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_vectorE", !10, i64 0, !10, i64 8, !12, i64 16, !15, i64 24, !7, i64 56}
!15 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!16 = !{!17, !10, i64 0}
!17 = !{!"_ZTSN11alglib_impl18sparsesolverreportE", !10, i64 0}
!18 = !{!7, !7, i64 0}
!19 = !{!20, !20, i64 0}
!20 = !{!"double", !7, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = distinct !{!23, !22}
!24 = distinct !{!24, !22}
!25 = !{i8 0, i8 2}
!26 = !{}


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

@.str.71 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.72 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.73 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.74 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.75 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.76 = external hidden unnamed_addr constant [39 x i8], align 1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl22sparsecholeskysolvesksEPNS_12sparsematrixElbPNS_9ae_vectorEPNS_18sparsesolverreportES3_PNS_8ae_stateE(ptr noundef %0, i64 noundef %1, i1 noundef zeroext %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) local_unnamed_addr #1 {
  tail call void @_ZN11alglib_impl25_sparsesolverreport_clearEPv(ptr noundef %4)
  tail call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %5)
  %8 = icmp sgt i64 %1, 0
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %8, ptr noundef nonnull @.str.71, ptr noundef %6)
  %9 = tail call noundef i64 @_ZN11alglib_impl14sparsegetnrowsEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %0, ptr noundef %6)
  %10 = icmp eq i64 %9, %1
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %10, ptr noundef nonnull @.str.72, ptr noundef %6)
  %11 = tail call noundef i64 @_ZN11alglib_impl14sparsegetncolsEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %0, ptr noundef %6)
  %12 = icmp eq i64 %11, %1
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %12, ptr noundef nonnull @.str.73, ptr noundef %6)
  %13 = tail call noundef zeroext i1 @_ZN11alglib_impl11sparseissksEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %0, ptr noundef %6)
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %13, ptr noundef nonnull @.str.76, ptr noundef %6)
  %14 = load i64, ptr %3, align 8, !tbaa !5
  %15 = icmp sge i64 %14, %1
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %15, ptr noundef nonnull @.str.74, ptr noundef %6)
  %16 = tail call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %3, i64 noundef %1, ptr noundef %6)
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %16, ptr noundef nonnull @.str.75, ptr noundef %6)
  tail call void @_ZN11alglib_implL30directsparsesolvers_initreportEPNS_18sparsesolverreportEPNS_8ae_stateE(ptr noundef %4, ptr noundef %6)
  tail call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %5, i64 noundef %1, ptr noundef %6)
  br i1 %8, label %.lr.ph, label %._crit_edge

17:                                               ; preds = %.lr.ph
  %18 = add nuw nsw i64 %.071, 1
  %exitcond.not = icmp eq i64 %18, %1
  br i1 %exitcond.not, label %.preheader, label %.lr.ph, !llvm.loop !13

.preheader:                                       ; preds = %17
  br i1 %8, label %.lr.ph74, label %._crit_edge

.lr.ph74:                                         ; preds = %.preheader
  %19 = getelementptr inbounds i8, ptr %3, i64 56
  %20 = getelementptr inbounds i8, ptr %5, i64 56
  %xtraiter = and i64 %1, 3
  %21 = icmp ult i64 %1, 4
  br i1 %21, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph74.new

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

.lr.ph:                                           ; preds = %7, %17
  %.071 = phi i64 [ %18, %17 ], [ 0, %7 ]
  %22 = tail call noundef double @_ZN11alglib_impl9sparsegetEPNS_12sparsematrixEllPNS_8ae_stateE(ptr noundef %0, i64 noundef %.071, i64 noundef %.071, ptr noundef %6)
  %23 = tail call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %22, double noundef 0.000000e+00)
  br i1 %23, label %.lr.ph78, label %17

.lr.ph78:                                         ; preds = %.lr.ph
  store i64 -3, ptr %4, align 8, !tbaa !15
  %24 = getelementptr inbounds i8, ptr %5, i64 56
  %xtraiter82 = and i64 %1, 3
  %25 = icmp ult i64 %1, 4
  br i1 %25, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph78.new

.lr.ph78.new:                                     ; preds = %.lr.ph78
  %unroll_iter85 = and i64 %1, 9223372036854775804
  br label %26

26:                                               ; preds = %26, %.lr.ph78.new
  %.176 = phi i64 [ 0, %.lr.ph78.new ], [ %38, %26 ]
  %niter86 = phi i64 [ 0, %.lr.ph78.new ], [ %niter86.next.3, %26 ]
  %27 = load ptr, ptr %24, align 8, !tbaa !17
  %28 = getelementptr inbounds double, ptr %27, i64 %.176
  store double 0.000000e+00, ptr %28, align 8, !tbaa !18
  %29 = or disjoint i64 %.176, 1
  %30 = load ptr, ptr %24, align 8, !tbaa !17
  %31 = getelementptr inbounds double, ptr %30, i64 %29
  store double 0.000000e+00, ptr %31, align 8, !tbaa !18
  %32 = or disjoint i64 %.176, 2
  %33 = load ptr, ptr %24, align 8, !tbaa !17
  %34 = getelementptr inbounds double, ptr %33, i64 %32
  store double 0.000000e+00, ptr %34, align 8, !tbaa !18
  %35 = or disjoint i64 %.176, 3
  %36 = load ptr, ptr %24, align 8, !tbaa !17
  %37 = getelementptr inbounds double, ptr %36, i64 %35
  store double 0.000000e+00, ptr %37, align 8, !tbaa !18
  %38 = add nuw nsw i64 %.176, 4
  %niter86.next.3 = add i64 %niter86, 4
  %niter86.ncmp.3 = icmp eq i64 %niter86.next.3, %unroll_iter85
  br i1 %niter86.ncmp.3, label %.loopexit.loopexit.unr-lcssa, label %26, !llvm.loop !20

39:                                               ; preds = %39, %.lr.ph74.new
  %.273 = phi i64 [ 0, %.lr.ph74.new ], [ %63, %39 ]
  %niter = phi i64 [ 0, %.lr.ph74.new ], [ %niter.next.3, %39 ]
  %40 = load ptr, ptr %19, align 8, !tbaa !17
  %41 = getelementptr inbounds double, ptr %40, i64 %.273
  %42 = load double, ptr %41, align 8, !tbaa !18
  %43 = load ptr, ptr %20, align 8, !tbaa !17
  %44 = getelementptr inbounds double, ptr %43, i64 %.273
  store double %42, ptr %44, align 8, !tbaa !18
  %45 = or disjoint i64 %.273, 1
  %46 = load ptr, ptr %19, align 8, !tbaa !17
  %47 = getelementptr inbounds double, ptr %46, i64 %45
  %48 = load double, ptr %47, align 8, !tbaa !18
  %49 = load ptr, ptr %20, align 8, !tbaa !17
  %50 = getelementptr inbounds double, ptr %49, i64 %45
  store double %48, ptr %50, align 8, !tbaa !18
  %51 = or disjoint i64 %.273, 2
  %52 = load ptr, ptr %19, align 8, !tbaa !17
  %53 = getelementptr inbounds double, ptr %52, i64 %51
  %54 = load double, ptr %53, align 8, !tbaa !18
  %55 = load ptr, ptr %20, align 8, !tbaa !17
  %56 = getelementptr inbounds double, ptr %55, i64 %51
  store double %54, ptr %56, align 8, !tbaa !18
  %57 = or disjoint i64 %.273, 3
  %58 = load ptr, ptr %19, align 8, !tbaa !17
  %59 = getelementptr inbounds double, ptr %58, i64 %57
  %60 = load double, ptr %59, align 8, !tbaa !18
  %61 = load ptr, ptr %20, align 8, !tbaa !17
  %62 = getelementptr inbounds double, ptr %61, i64 %57
  store double %60, ptr %62, align 8, !tbaa !18
  %63 = add nuw nsw i64 %.273, 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 %._crit_edge.loopexit.unr-lcssa, label %39, !llvm.loop !21

._crit_edge.loopexit.unr-lcssa:                   ; preds = %39, %.lr.ph74
  %.273.unr = phi i64 [ 0, %.lr.ph74 ], [ %63, %39 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader
  %.273.epil = phi i64 [ %69, %.epil.preheader ], [ %.273.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %64 = load ptr, ptr %19, align 8, !tbaa !17
  %65 = getelementptr inbounds double, ptr %64, i64 %.273.epil
  %66 = load double, ptr %65, align 8, !tbaa !18
  %67 = load ptr, ptr %20, align 8, !tbaa !17
  %68 = getelementptr inbounds double, ptr %67, i64 %.273.epil
  store double %66, ptr %68, align 8, !tbaa !18
  %69 = add nuw nsw i64 %.273.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 %._crit_edge, label %.epil.preheader, !llvm.loop !22

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader, %7, %.preheader
  br i1 %2, label %70, label %71

70:                                               ; preds = %._crit_edge
  tail call void @_ZN11alglib_impl10sparsetrsvEPNS_12sparsematrixEbblPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %0, i1 noundef zeroext true, i1 noundef zeroext false, i64 noundef 1, ptr noundef %5, ptr noundef %6)
  tail call void @_ZN11alglib_impl10sparsetrsvEPNS_12sparsematrixEbblPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %0, i1 noundef zeroext true, i1 noundef zeroext false, i64 noundef 0, ptr noundef %5, ptr noundef %6)
  br label %72

71:                                               ; preds = %._crit_edge
  tail call void @_ZN11alglib_impl10sparsetrsvEPNS_12sparsematrixEbblPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %0, i1 noundef zeroext false, i1 noundef zeroext false, i64 noundef 0, ptr noundef %5, ptr noundef %6)
  tail call void @_ZN11alglib_impl10sparsetrsvEPNS_12sparsematrixEbblPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %0, i1 noundef zeroext false, i1 noundef zeroext false, i64 noundef 1, ptr noundef %5, ptr noundef %6)
  br label %72

72:                                               ; preds = %71, %70
  store i64 1, ptr %4, align 8, !tbaa !15
  br label %.loopexit

.loopexit.loopexit.unr-lcssa:                     ; preds = %26, %.lr.ph78
  %.176.unr = phi i64 [ 0, %.lr.ph78 ], [ %38, %26 ]
  %lcmp.mod84.not = icmp eq i64 %xtraiter82, 0
  br i1 %lcmp.mod84.not, label %.loopexit, label %.epil.preheader81

.epil.preheader81:                                ; preds = %.loopexit.loopexit.unr-lcssa, %.epil.preheader81
  %.176.epil = phi i64 [ %75, %.epil.preheader81 ], [ %.176.unr, %.loopexit.loopexit.unr-lcssa ]
  %epil.iter83 = phi i64 [ %epil.iter83.next, %.epil.preheader81 ], [ 0, %.loopexit.loopexit.unr-lcssa ]
  %73 = load ptr, ptr %24, align 8, !tbaa !17
  %74 = getelementptr inbounds double, ptr %73, i64 %.176.epil
  store double 0.000000e+00, ptr %74, align 8, !tbaa !18
  %75 = add nuw nsw i64 %.176.epil, 1
  %epil.iter83.next = add i64 %epil.iter83, 1
  %epil.iter83.cmp.not = icmp eq i64 %epil.iter83.next, %xtraiter82
  br i1 %epil.iter83.cmp.not, label %.loopexit, label %.epil.preheader81, !llvm.loop !24

.loopexit:                                        ; preds = %.loopexit.loopexit.unr-lcssa, %.epil.preheader81, %72
  ret void
}

declare void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef) local_unnamed_addr #0

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

declare noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef, double noundef) local_unnamed_addr #0

declare noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #0

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

declare noundef i64 @_ZN11alglib_impl14sparsegetnrowsEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef, ptr noundef) local_unnamed_addr #0

declare noundef i64 @_ZN11alglib_impl14sparsegetncolsEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL30directsparsesolvers_initreportEPNS_18sparsesolverreportEPNS_8ae_stateE(ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @_ZN11alglib_impl10sparsetrsvEPNS_12sparsematrixEbblPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef, i1 noundef zeroext, i1 noundef zeroext, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare noundef zeroext i1 @_ZN11alglib_impl11sparseissksEPNS_12sparsematrixEPNS_8ae_stateE(ptr noundef, ptr noundef) local_unnamed_addr #0

declare noundef double @_ZN11alglib_impl9sparsegetEPNS_12sparsematrixEllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #0

attributes #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 #1 = { 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" }

!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_vectorE", !7, i64 0, !7, i64 8, !10, i64 16, !11, i64 24, !8, i64 56}
!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 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{!16, !7, i64 0}
!16 = !{!"_ZTSN11alglib_impl18sparsesolverreportE", !7, i64 0}
!17 = !{!8, !8, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"double", !8, i64 0}
!20 = distinct !{!20, !14}
!21 = distinct !{!21, !14}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.unroll.disable"}
!24 = distinct !{!24, !23}


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