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

@.str.435 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.436 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.437 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.438 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.439 = external hidden unnamed_addr constant [49 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 void @_ZN11alglib_impl17sparsespdsolvesksEPKNS_12sparsematrixEbPKNS_9ae_vectorEPS3_PNS_18sparsesolverreportEPNS_8ae_stateE(ptr noundef %0, i1 noundef zeroext %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5) #3 {
  %7 = alloca ptr, align 8
  %8 = alloca i8, align 1
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca %"struct.alglib_impl::ae_frame", align 8
  %14 = alloca i64, align 8
  %15 = alloca %"struct.alglib_impl::sparsematrix", align 8
  %16 = alloca i64, align 8
  %17 = alloca i32, align 4
  store ptr %0, ptr %7, align 8, !tbaa !5
  %18 = zext i1 %1 to i8
  store i8 %18, ptr %8, align 1, !tbaa !9
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  store ptr %5, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 368, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %19 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %19, ptr noundef %13)
  call void @llvm.memset.p0.i64(ptr align 8 %15, i8 0, i64 368, i1 false)
  %20 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %20)
  %21 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZN11alglib_impl25_sparsesolverreport_clearEPv(ptr noundef %21)
  %22 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl18_sparsematrix_initEPvPNS_8ae_stateEb(ptr noundef %15, ptr noundef %22, i1 noundef zeroext true)
  %23 = load ptr, ptr %7, align 8, !tbaa !5
  %24 = load ptr, ptr %12, align 8, !tbaa !5
  %25 = call noundef i64 @_ZN11alglib_impl14sparsegetnrowsEPKNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %23, ptr noundef %24)
  store i64 %25, ptr %16, align 8, !tbaa !11
  %26 = load i64, ptr %16, align 8, !tbaa !11
  %27 = icmp sgt i64 %26, 0
  %28 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %27, ptr noundef @.str.435, ptr noundef %28)
  %29 = load ptr, ptr %7, align 8, !tbaa !5
  %30 = load ptr, ptr %12, align 8, !tbaa !5
  %31 = call noundef i64 @_ZN11alglib_impl14sparsegetnrowsEPKNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %29, ptr noundef %30)
  %32 = load i64, ptr %16, align 8, !tbaa !11
  %33 = icmp eq i64 %31, %32
  %34 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %33, ptr noundef @.str.436, ptr noundef %34)
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  %36 = load ptr, ptr %12, align 8, !tbaa !5
  %37 = call noundef i64 @_ZN11alglib_impl14sparsegetncolsEPKNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %35, ptr noundef %36)
  %38 = load i64, ptr %16, align 8, !tbaa !11
  %39 = icmp eq i64 %37, %38
  %40 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %39, ptr noundef @.str.437, ptr noundef %40)
  %41 = load ptr, ptr %9, align 8, !tbaa !5
  %42 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %41, i32 0, i32 0
  %43 = load i64, ptr %42, align 8, !tbaa !13
  %44 = load i64, ptr %16, align 8, !tbaa !11
  %45 = icmp sge i64 %43, %44
  %46 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %45, ptr noundef @.str.438, ptr noundef %46)
  %47 = load ptr, ptr %9, align 8, !tbaa !5
  %48 = load i64, ptr %16, align 8, !tbaa !11
  %49 = load ptr, ptr %12, align 8, !tbaa !5
  %50 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %47, i64 noundef %48, ptr noundef %49)
  %51 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %50, ptr noundef @.str.439, ptr noundef %51)
  %52 = load ptr, ptr %11, align 8, !tbaa !5
  %53 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl22initsparsesolverreportEPNS_18sparsesolverreportEPNS_8ae_stateE(ptr noundef %52, ptr noundef %53)
  %54 = load ptr, ptr %10, align 8, !tbaa !5
  %55 = load i64, ptr %16, align 8, !tbaa !11
  %56 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %54, i64 noundef %55, ptr noundef %56)
  %57 = load ptr, ptr %7, align 8, !tbaa !5
  %58 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl15sparsecopytosksEPKNS_12sparsematrixEPS0_PNS_8ae_stateE(ptr noundef %57, ptr noundef %15, ptr noundef %58)
  %59 = load i64, ptr %16, align 8, !tbaa !11
  %60 = load i8, ptr %8, align 1, !tbaa !9, !range !16, !noundef !17
  %61 = trunc i8 %60 to i1
  %62 = load ptr, ptr %12, align 8, !tbaa !5
  %63 = call noundef zeroext i1 @_ZN11alglib_impl21sparsecholeskyskylineEPNS_12sparsematrixElbPNS_8ae_stateE(ptr noundef %15, i64 noundef %59, i1 noundef zeroext %61, ptr noundef %62)
  br i1 %63, label %83, label %64

64:                                               ; preds = %6
  %65 = load ptr, ptr %11, align 8, !tbaa !5
  %66 = getelementptr inbounds %"struct.alglib_impl::sparsesolverreport", ptr %65, i32 0, i32 0
  store i64 -3, ptr %66, align 8, !tbaa !18
  store i64 0, ptr %14, align 8, !tbaa !11
  br label %67

67:                                               ; preds = %78, %64
  %68 = load i64, ptr %14, align 8, !tbaa !11
  %69 = load i64, ptr %16, align 8, !tbaa !11
  %70 = sub nsw i64 %69, 1
  %71 = icmp sle i64 %68, %70
  br i1 %71, label %72, label %81

72:                                               ; preds = %67
  %73 = load ptr, ptr %10, align 8, !tbaa !5
  %74 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %73, i32 0, i32 4
  %75 = load ptr, ptr %74, align 8, !tbaa !21
  %76 = load i64, ptr %14, align 8, !tbaa !11
  %77 = getelementptr inbounds double, ptr %75, i64 %76
  store double 0.000000e+00, ptr %77, align 8, !tbaa !22
  br label %78

78:                                               ; preds = %72
  %79 = load i64, ptr %14, align 8, !tbaa !11
  %80 = add nsw i64 %79, 1
  store i64 %80, ptr %14, align 8, !tbaa !11
  br label %67, !llvm.loop !23

81:                                               ; preds = %67
  %82 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %82)
  store i32 1, ptr %17, align 4
  br label %129

83:                                               ; preds = %6
  store i64 0, ptr %14, align 8, !tbaa !11
  br label %84

84:                                               ; preds = %101, %83
  %85 = load i64, ptr %14, align 8, !tbaa !11
  %86 = load i64, ptr %16, align 8, !tbaa !11
  %87 = sub nsw i64 %86, 1
  %88 = icmp sle i64 %85, %87
  br i1 %88, label %89, label %104

89:                                               ; preds = %84
  %90 = load ptr, ptr %9, align 8, !tbaa !5
  %91 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %90, i32 0, i32 4
  %92 = load ptr, ptr %91, align 8, !tbaa !21
  %93 = load i64, ptr %14, align 8, !tbaa !11
  %94 = getelementptr inbounds double, ptr %92, i64 %93
  %95 = load double, ptr %94, align 8, !tbaa !22
  %96 = load ptr, ptr %10, 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 !21
  %99 = load i64, ptr %14, align 8, !tbaa !11
  %100 = getelementptr inbounds double, ptr %98, i64 %99
  store double %95, ptr %100, align 8, !tbaa !22
  br label %101

101:                                              ; preds = %89
  %102 = load i64, ptr %14, align 8, !tbaa !11
  %103 = add nsw i64 %102, 1
  store i64 %103, ptr %14, align 8, !tbaa !11
  br label %84, !llvm.loop !25

104:                                              ; preds = %84
  %105 = load i8, ptr %8, align 1, !tbaa !9, !range !16, !noundef !17
  %106 = trunc i8 %105 to i1
  br i1 %106, label %107, label %116

107:                                              ; preds = %104
  %108 = load i8, ptr %8, align 1, !tbaa !9, !range !16, !noundef !17
  %109 = trunc i8 %108 to i1
  %110 = load ptr, ptr %10, align 8, !tbaa !5
  %111 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl10sparsetrsvEPKNS_12sparsematrixEbblPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %15, i1 noundef zeroext %109, i1 noundef zeroext false, i64 noundef 1, ptr noundef %110, ptr noundef %111)
  %112 = load i8, ptr %8, align 1, !tbaa !9, !range !16, !noundef !17
  %113 = trunc i8 %112 to i1
  %114 = load ptr, ptr %10, align 8, !tbaa !5
  %115 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl10sparsetrsvEPKNS_12sparsematrixEbblPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %15, i1 noundef zeroext %113, i1 noundef zeroext false, i64 noundef 0, ptr noundef %114, ptr noundef %115)
  br label %125

116:                                              ; preds = %104
  %117 = load i8, ptr %8, align 1, !tbaa !9, !range !16, !noundef !17
  %118 = trunc i8 %117 to i1
  %119 = load ptr, ptr %10, align 8, !tbaa !5
  %120 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl10sparsetrsvEPKNS_12sparsematrixEbblPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %15, i1 noundef zeroext %118, i1 noundef zeroext false, i64 noundef 0, ptr noundef %119, ptr noundef %120)
  %121 = load i8, ptr %8, align 1, !tbaa !9, !range !16, !noundef !17
  %122 = trunc i8 %121 to i1
  %123 = load ptr, ptr %10, align 8, !tbaa !5
  %124 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl10sparsetrsvEPKNS_12sparsematrixEbblPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %15, i1 noundef zeroext %122, i1 noundef zeroext false, i64 noundef 1, ptr noundef %123, ptr noundef %124)
  br label %125

125:                                              ; preds = %116, %107
  %126 = load ptr, ptr %11, align 8, !tbaa !5
  %127 = getelementptr inbounds %"struct.alglib_impl::sparsesolverreport", ptr %126, i32 0, i32 0
  store i64 1, ptr %127, align 8, !tbaa !18
  %128 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %128)
  store i32 0, ptr %17, align 4
  br label %129

129:                                              ; preds = %125, %81
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 368, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #5
  %130 = load i32, ptr %17, align 4
  switch i32 %130, label %132 [
    i32 0, label %131
    i32 1, label %131
  ]

131:                                              ; preds = %129, %129
  ret void

132:                                              ; preds = %129
  unreachable
}

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

declare void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef) #2

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

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #2

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

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

declare noundef i64 @_ZN11alglib_impl14sparsegetnrowsEPKNS_12sparsematrixEPNS_8ae_stateE(ptr noundef, ptr noundef) #2

declare noundef i64 @_ZN11alglib_impl14sparsegetncolsEPKNS_12sparsematrixEPNS_8ae_stateE(ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11alglib_impl22initsparsesolverreportEPNS_18sparsesolverreportEPNS_8ae_stateE(ptr noundef, ptr noundef) #4

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

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

declare void @_ZN11alglib_impl10sparsetrsvEPKNS_12sparsematrixEbblPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef, i1 noundef zeroext, i1 noundef zeroext, i64 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 = { "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 = { mustprogress nounwind 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 #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 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !12, i64 0}
!14 = !{!"_ZTSN11alglib_impl9ae_vectorE", !12, i64 0, !12, i64 8, !10, 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 = !{i8 0, i8 2}
!17 = !{}
!18 = !{!19, !12, i64 0}
!19 = !{!"_ZTSN11alglib_impl18sparsesolverreportE", !12, i64 0, !12, i64 8, !12, i64 16, !20, i64 24}
!20 = !{!"double", !7, i64 0}
!21 = !{!7, !7, i64 0}
!22 = !{!20, !20, 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::sparsematrix" = type { %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", i64, i64, i64, i64, i64, i64 }
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = type { ptr }

@.str.435 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.436 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.437 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.438 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.439 = external hidden unnamed_addr constant [49 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 void @_ZN11alglib_impl17sparsespdsolvesksEPKNS_12sparsematrixEbPKNS_9ae_vectorEPS3_PNS_18sparsesolverreportEPNS_8ae_stateE(ptr noundef %0, i1 noundef zeroext %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5) local_unnamed_addr #3 {
  %7 = alloca %"struct.alglib_impl::ae_frame", align 8
  %8 = alloca %"struct.alglib_impl::sparsematrix", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 368, ptr nonnull %8) #5
  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(368) %8, i8 0, i64 368, i1 false)
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %3)
  call void @_ZN11alglib_impl25_sparsesolverreport_clearEPv(ptr noundef %4)
  call void @_ZN11alglib_impl18_sparsematrix_initEPvPNS_8ae_stateEb(ptr noundef nonnull %8, ptr noundef %5, i1 noundef zeroext true)
  %9 = call noundef i64 @_ZN11alglib_impl14sparsegetnrowsEPKNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %0, ptr noundef %5)
  %10 = icmp sgt i64 %9, 0
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %10, ptr noundef nonnull @.str.435, ptr noundef %5)
  %11 = call noundef i64 @_ZN11alglib_impl14sparsegetnrowsEPKNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %0, ptr noundef %5)
  %12 = icmp eq i64 %11, %9
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %12, ptr noundef nonnull @.str.436, ptr noundef %5)
  %13 = call noundef i64 @_ZN11alglib_impl14sparsegetncolsEPKNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %0, ptr noundef %5)
  %14 = icmp eq i64 %13, %9
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %14, ptr noundef nonnull @.str.437, ptr noundef %5)
  %15 = load i64, ptr %2, align 8, !tbaa !5
  %16 = icmp sge i64 %15, %9
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %16, ptr noundef nonnull @.str.438, ptr noundef %5)
  %17 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %2, i64 noundef %9, ptr noundef %5)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %17, ptr noundef nonnull @.str.439, ptr noundef %5)
  call void @_ZN11alglib_impl22initsparsesolverreportEPNS_18sparsesolverreportEPNS_8ae_stateE(ptr noundef %4, ptr noundef %5)
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %3, i64 noundef %9, ptr noundef %5)
  call void @_ZN11alglib_impl15sparsecopytosksEPKNS_12sparsematrixEPS0_PNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %8, ptr noundef %5)
  %18 = call noundef zeroext i1 @_ZN11alglib_impl21sparsecholeskyskylineEPNS_12sparsematrixElbPNS_8ae_stateE(ptr noundef nonnull %8, i64 noundef %9, i1 noundef zeroext %1, ptr noundef %5)
  br i1 %18, label %.preheader, label %22

.preheader:                                       ; preds = %6
  br i1 %10, label %.lr.ph68, label %._crit_edge69

.lr.ph68:                                         ; preds = %.preheader
  %19 = getelementptr inbounds i8, ptr %2, i64 56
  %20 = getelementptr inbounds i8, ptr %3, i64 56
  %xtraiter72 = and i64 %9, 3
  %21 = icmp ult i64 %9, 4
  br i1 %21, label %._crit_edge69.loopexit.unr-lcssa, label %.lr.ph68.new

.lr.ph68.new:                                     ; preds = %.lr.ph68
  %unroll_iter75 = and i64 %9, 9223372036854775804
  br label %38

22:                                               ; preds = %6
  store i64 -3, ptr %4, align 8, !tbaa !13
  br i1 %10, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %22
  %23 = getelementptr inbounds i8, ptr %3, i64 56
  %xtraiter = and i64 %9, 3
  %24 = icmp ult i64 %9, 4
  br i1 %24, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.new

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

25:                                               ; preds = %25, %.lr.ph.new
  %.065 = phi i64 [ 0, %.lr.ph.new ], [ %37, %25 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.3, %25 ]
  %26 = load ptr, ptr %23, align 8, !tbaa !16
  %27 = getelementptr inbounds double, ptr %26, i64 %.065
  store double 0.000000e+00, ptr %27, align 8, !tbaa !17
  %28 = or disjoint i64 %.065, 1
  %29 = load ptr, ptr %23, align 8, !tbaa !16
  %30 = getelementptr inbounds double, ptr %29, i64 %28
  store double 0.000000e+00, ptr %30, align 8, !tbaa !17
  %31 = or disjoint i64 %.065, 2
  %32 = load ptr, ptr %23, align 8, !tbaa !16
  %33 = getelementptr inbounds double, ptr %32, i64 %31
  store double 0.000000e+00, ptr %33, align 8, !tbaa !17
  %34 = or disjoint i64 %.065, 3
  %35 = load ptr, ptr %23, align 8, !tbaa !16
  %36 = getelementptr inbounds double, ptr %35, i64 %34
  store double 0.000000e+00, ptr %36, align 8, !tbaa !17
  %37 = add nuw nsw i64 %.065, 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 %25, !llvm.loop !18

38:                                               ; preds = %38, %.lr.ph68.new
  %.167 = phi i64 [ 0, %.lr.ph68.new ], [ %62, %38 ]
  %niter76 = phi i64 [ 0, %.lr.ph68.new ], [ %niter76.next.3, %38 ]
  %39 = load ptr, ptr %19, align 8, !tbaa !16
  %40 = getelementptr inbounds double, ptr %39, i64 %.167
  %41 = load double, ptr %40, align 8, !tbaa !17
  %42 = load ptr, ptr %20, align 8, !tbaa !16
  %43 = getelementptr inbounds double, ptr %42, i64 %.167
  store double %41, ptr %43, align 8, !tbaa !17
  %44 = or disjoint i64 %.167, 1
  %45 = load ptr, ptr %19, align 8, !tbaa !16
  %46 = getelementptr inbounds double, ptr %45, i64 %44
  %47 = load double, ptr %46, align 8, !tbaa !17
  %48 = load ptr, ptr %20, align 8, !tbaa !16
  %49 = getelementptr inbounds double, ptr %48, i64 %44
  store double %47, ptr %49, align 8, !tbaa !17
  %50 = or disjoint i64 %.167, 2
  %51 = load ptr, ptr %19, align 8, !tbaa !16
  %52 = getelementptr inbounds double, ptr %51, i64 %50
  %53 = load double, ptr %52, align 8, !tbaa !17
  %54 = load ptr, ptr %20, align 8, !tbaa !16
  %55 = getelementptr inbounds double, ptr %54, i64 %50
  store double %53, ptr %55, align 8, !tbaa !17
  %56 = or disjoint i64 %.167, 3
  %57 = load ptr, ptr %19, align 8, !tbaa !16
  %58 = getelementptr inbounds double, ptr %57, i64 %56
  %59 = load double, ptr %58, align 8, !tbaa !17
  %60 = load ptr, ptr %20, align 8, !tbaa !16
  %61 = getelementptr inbounds double, ptr %60, i64 %56
  store double %59, ptr %61, align 8, !tbaa !17
  %62 = add nuw nsw i64 %.167, 4
  %niter76.next.3 = add i64 %niter76, 4
  %niter76.ncmp.3 = icmp eq i64 %niter76.next.3, %unroll_iter75
  br i1 %niter76.ncmp.3, label %._crit_edge69.loopexit.unr-lcssa, label %38, !llvm.loop !20

._crit_edge69.loopexit.unr-lcssa:                 ; preds = %38, %.lr.ph68
  %.167.unr = phi i64 [ 0, %.lr.ph68 ], [ %62, %38 ]
  %lcmp.mod74.not = icmp eq i64 %xtraiter72, 0
  br i1 %lcmp.mod74.not, label %._crit_edge69, label %.epil.preheader71

.epil.preheader71:                                ; preds = %._crit_edge69.loopexit.unr-lcssa, %.epil.preheader71
  %.167.epil = phi i64 [ %68, %.epil.preheader71 ], [ %.167.unr, %._crit_edge69.loopexit.unr-lcssa ]
  %epil.iter73 = phi i64 [ %epil.iter73.next, %.epil.preheader71 ], [ 0, %._crit_edge69.loopexit.unr-lcssa ]
  %63 = load ptr, ptr %19, align 8, !tbaa !16
  %64 = getelementptr inbounds double, ptr %63, i64 %.167.epil
  %65 = load double, ptr %64, align 8, !tbaa !17
  %66 = load ptr, ptr %20, align 8, !tbaa !16
  %67 = getelementptr inbounds double, ptr %66, i64 %.167.epil
  store double %65, ptr %67, align 8, !tbaa !17
  %68 = add nuw nsw i64 %.167.epil, 1
  %epil.iter73.next = add i64 %epil.iter73, 1
  %epil.iter73.cmp.not = icmp eq i64 %epil.iter73.next, %xtraiter72
  br i1 %epil.iter73.cmp.not, label %._crit_edge69, label %.epil.preheader71, !llvm.loop !21

._crit_edge69:                                    ; preds = %._crit_edge69.loopexit.unr-lcssa, %.epil.preheader71, %.preheader
  br i1 %1, label %69, label %70

69:                                               ; preds = %._crit_edge69
  call void @_ZN11alglib_impl10sparsetrsvEPKNS_12sparsematrixEbblPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef nonnull %8, i1 noundef zeroext true, i1 noundef zeroext false, i64 noundef 1, ptr noundef %3, ptr noundef %5)
  call void @_ZN11alglib_impl10sparsetrsvEPKNS_12sparsematrixEbblPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef nonnull %8, i1 noundef zeroext true, i1 noundef zeroext false, i64 noundef 0, ptr noundef %3, ptr noundef %5)
  br label %71

70:                                               ; preds = %._crit_edge69
  call void @_ZN11alglib_impl10sparsetrsvEPKNS_12sparsematrixEbblPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef nonnull %8, i1 noundef zeroext false, i1 noundef zeroext false, i64 noundef 0, ptr noundef %3, ptr noundef %5)
  call void @_ZN11alglib_impl10sparsetrsvEPKNS_12sparsematrixEbblPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef nonnull %8, i1 noundef zeroext false, i1 noundef zeroext false, i64 noundef 1, ptr noundef %3, ptr noundef %5)
  br label %71

71:                                               ; preds = %70, %69
  store i64 1, ptr %4, align 8, !tbaa !13
  br label %._crit_edge

._crit_edge.loopexit.unr-lcssa:                   ; preds = %25, %.lr.ph
  %.065.unr = phi i64 [ 0, %.lr.ph ], [ %37, %25 ]
  %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
  %.065.epil = phi i64 [ %74, %.epil.preheader ], [ %.065.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %72 = load ptr, ptr %23, align 8, !tbaa !16
  %73 = getelementptr inbounds double, ptr %72, i64 %.065.epil
  store double 0.000000e+00, ptr %73, align 8, !tbaa !17
  %74 = add nuw nsw i64 %.065.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 !23

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader, %22, %71
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %5)
  call void @llvm.lifetime.end.p0(i64 368, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  ret void
}

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

declare void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef) local_unnamed_addr #2

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

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #2

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

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

declare noundef i64 @_ZN11alglib_impl14sparsegetnrowsEPKNS_12sparsematrixEPNS_8ae_stateE(ptr noundef, ptr noundef) local_unnamed_addr #2

declare noundef i64 @_ZN11alglib_impl14sparsegetncolsEPKNS_12sparsematrixEPNS_8ae_stateE(ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11alglib_impl22initsparsesolverreportEPNS_18sparsesolverreportEPNS_8ae_stateE(ptr noundef, ptr noundef) local_unnamed_addr #4

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

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

declare void @_ZN11alglib_impl10sparsetrsvEPKNS_12sparsematrixEbblPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef, i1 noundef zeroext, i1 noundef zeroext, i64 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 = { "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 = { mustprogress nounwind 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 #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, !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 = !{!14, !7, i64 0}
!14 = !{!"_ZTSN11alglib_impl18sparsesolverreportE", !7, i64 0, !7, i64 8, !7, i64 16, !15, i64 24}
!15 = !{!"double", !8, i64 0}
!16 = !{!8, !8, i64 0}
!17 = !{!15, !15, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.unroll.disable"}
!23 = distinct !{!23, !22}


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