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

@.str.382 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.383 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.384 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.385 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.386 = 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 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_impl26sparsesolversolvesymmetricEPNS_17sparsesolverstateEPKNS_12sparsematrixEbPKNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, i1 noundef zeroext %2, ptr noundef %3, ptr noundef %4) #2 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i8, align 1
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  %13 = zext i1 %2 to i8
  store i8 %13, ptr %8, align 1, !tbaa !9
  store ptr %3, ptr %9, align 8, !tbaa !5
  store ptr %4, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %14 = load ptr, ptr %6, align 8, !tbaa !5
  %15 = getelementptr inbounds %"struct.alglib_impl::sparsesolverstate", ptr %14, i32 0, i32 0
  %16 = load i64, ptr %15, align 8, !tbaa !11
  store i64 %16, ptr %11, align 8, !tbaa !22
  %17 = load ptr, ptr %7, align 8, !tbaa !5
  %18 = load ptr, ptr %10, align 8, !tbaa !5
  %19 = call noundef i64 @_ZN11alglib_impl14sparsegetnrowsEPKNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %17, ptr noundef %18)
  %20 = load i64, ptr %11, align 8, !tbaa !22
  %21 = icmp eq i64 %19, %20
  %22 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %21, ptr noundef @.str.382, ptr noundef %22)
  %23 = load ptr, ptr %7, align 8, !tbaa !5
  %24 = load ptr, ptr %10, align 8, !tbaa !5
  %25 = call noundef i64 @_ZN11alglib_impl14sparsegetncolsEPKNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %23, ptr noundef %24)
  %26 = load i64, ptr %11, align 8, !tbaa !22
  %27 = icmp eq i64 %25, %26
  %28 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %27, ptr noundef @.str.383, ptr noundef %28)
  %29 = load ptr, ptr %9, align 8, !tbaa !5
  %30 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %29, i32 0, i32 0
  %31 = load i64, ptr %30, align 8, !tbaa !23
  %32 = load i64, ptr %11, align 8, !tbaa !22
  %33 = icmp sge i64 %31, %32
  %34 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %33, ptr noundef @.str.384, ptr noundef %34)
  %35 = load ptr, ptr %9, align 8, !tbaa !5
  %36 = load i64, ptr %11, align 8, !tbaa !22
  %37 = load ptr, ptr %10, align 8, !tbaa !5
  %38 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %35, i64 noundef %36, ptr noundef %37)
  %39 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %38, ptr noundef @.str.385, ptr noundef %39)
  %40 = load ptr, ptr %7, align 8, !tbaa !5
  %41 = load ptr, ptr %10, align 8, !tbaa !5
  %42 = call noundef zeroext i1 @_ZN11alglib_impl11sparseiscrsEPKNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %40, ptr noundef %41)
  br i1 %42, label %55, label %43

43:                                               ; preds = %5
  %44 = load ptr, ptr %7, align 8, !tbaa !5
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = getelementptr inbounds %"struct.alglib_impl::sparsesolverstate", ptr %45, i32 0, i32 20
  %47 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl18sparsecopytocrsbufEPKNS_12sparsematrixEPS0_PNS_8ae_stateE(ptr noundef %44, ptr noundef %46, ptr noundef %47)
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  %49 = load ptr, ptr %6, align 8, !tbaa !5
  %50 = getelementptr inbounds %"struct.alglib_impl::sparsesolverstate", ptr %49, i32 0, i32 20
  %51 = load i8, ptr %8, align 1, !tbaa !9, !range !24, !noundef !25
  %52 = trunc i8 %51 to i1
  %53 = load ptr, ptr %9, align 8, !tbaa !5
  %54 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl26sparsesolversolvesymmetricEPNS_17sparsesolverstateEPKNS_12sparsematrixEbPKNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %48, ptr noundef %50, i1 noundef zeroext %52, ptr noundef %53, ptr noundef %54)
  store i32 1, ptr %12, align 4
  br label %84

55:                                               ; preds = %5
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  %57 = load ptr, ptr %9, align 8, !tbaa !5
  %58 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl20sparsesolveroocstartEPNS_17sparsesolverstateEPKNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %56, ptr noundef %57, ptr noundef %58)
  br label %59

59:                                               ; preds = %69, %68, %55
  %60 = load ptr, ptr %6, align 8, !tbaa !5
  %61 = load ptr, ptr %10, align 8, !tbaa !5
  %62 = call noundef zeroext i1 @_ZN11alglib_impl23sparsesolverooccontinueEPNS_17sparsesolverstateEPNS_8ae_stateE(ptr noundef %60, ptr noundef %61)
  br i1 %62, label %63, label %83

63:                                               ; preds = %59
  %64 = load ptr, ptr %6, align 8, !tbaa !5
  %65 = getelementptr inbounds %"struct.alglib_impl::sparsesolverstate", ptr %64, i32 0, i32 15
  %66 = load i64, ptr %65, align 8, !tbaa !26
  %67 = icmp eq i64 %66, -1
  br i1 %67, label %68, label %69

68:                                               ; preds = %63
  br label %59, !llvm.loop !27

69:                                               ; preds = %63
  %70 = load ptr, ptr %6, align 8, !tbaa !5
  %71 = getelementptr inbounds %"struct.alglib_impl::sparsesolverstate", ptr %70, i32 0, i32 15
  %72 = load i64, ptr %71, align 8, !tbaa !26
  %73 = icmp eq i64 %72, 0
  %74 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %73, ptr noundef @.str.386, ptr noundef %74)
  %75 = load ptr, ptr %7, align 8, !tbaa !5
  %76 = load i8, ptr %8, align 1, !tbaa !9, !range !24, !noundef !25
  %77 = trunc i8 %76 to i1
  %78 = load ptr, ptr %6, align 8, !tbaa !5
  %79 = getelementptr inbounds %"struct.alglib_impl::sparsesolverstate", ptr %78, i32 0, i32 16
  %80 = load ptr, ptr %6, align 8, !tbaa !5
  %81 = getelementptr inbounds %"struct.alglib_impl::sparsesolverstate", ptr %80, i32 0, i32 17
  %82 = load ptr, ptr %10, align 8, !tbaa !5
  call void @_ZN11alglib_impl9sparsesmvEPKNS_12sparsematrixEbPKNS_9ae_vectorEPS3_PNS_8ae_stateE(ptr noundef %75, i1 noundef zeroext %77, ptr noundef %79, ptr noundef %81, ptr noundef %82)
  br label %59, !llvm.loop !27

83:                                               ; preds = %59
  store i32 0, ptr %12, align 4
  br label %84

84:                                               ; preds = %83, %43
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  %85 = load i32, ptr %12, align 4
  switch i32 %85, label %87 [
    i32 0, label %86
    i32 1, label %86
  ]

86:                                               ; preds = %84, %84
  ret void

87:                                               ; preds = %84
  unreachable
}

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN11alglib_impl23sparsesolverooccontinueEPNS_17sparsesolverstateEPNS_8ae_stateE(ptr noundef, ptr noundef) #2

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

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

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

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

declare void @_ZN11alglib_impl18sparsecopytocrsbufEPKNS_12sparsematrixEPS0_PNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef) #1

declare void @_ZN11alglib_impl9sparsesmvEPKNS_12sparsematrixEbPKNS_9ae_vectorEPS3_PNS_8ae_stateE(ptr noundef, i1 noundef zeroext, ptr noundef, ptr 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 = !{!"bool", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"_ZTSN11alglib_impl17sparsesolverstateE", !13, i64 0, !14, i64 8, !16, i64 72, !13, i64 80, !13, i64 88, !13, i64 96, !10, i64 104, !10, i64 105, !10, i64 106, !14, i64 112, !14, i64 176, !13, i64 240, !13, i64 248, !13, i64 256, !16, i64 264, !13, i64 272, !14, i64 280, !14, i64 344, !16, i64 408, !14, i64 416, !17, i64 480, !18, i64 848, !20, i64 2096}
!13 = !{!"long", !7, i64 0}
!14 = !{!"_ZTSN11alglib_impl9ae_vectorE", !13, i64 0, !13, 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 = !{!"double", !7, i64 0}
!17 = !{!"_ZTSN11alglib_impl12sparsematrixE", !14, i64 0, !14, i64 64, !14, i64 128, !14, i64 192, !14, i64 256, !13, i64 320, !13, i64 328, !13, i64 336, !13, i64 344, !13, i64 352, !13, i64 360}
!18 = !{!"_ZTSN11alglib_impl14fblsgmresstateE", !14, i64 0, !14, i64 64, !14, i64 128, !14, i64 192, !19, i64 256, !19, i64 336, !19, i64 416, !19, i64 496, !19, i64 576, !14, i64 656, !14, i64 720, !14, i64 784, !14, i64 848, !13, i64 912, !13, i64 920, !16, i64 928, !16, i64 936, !16, i64 944, !16, i64 952, !13, i64 960, !13, i64 968, !16, i64 976, !20, i64 984}
!19 = !{!"_ZTSN11alglib_impl9ae_matrixE", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24, !10, i64 32, !15, i64 40, !7, i64 72}
!20 = !{!"_ZTSN11alglib_impl10rcommstateE", !21, i64 0, !14, i64 8, !14, i64 72, !14, i64 136, !14, i64 200}
!21 = !{!"int", !7, i64 0}
!22 = !{!13, !13, i64 0}
!23 = !{!14, !13, i64 0}
!24 = !{i8 0, i8 2}
!25 = !{}
!26 = !{!12, !13, i64 272}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}


; 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.382 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.383 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.384 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.385 = external hidden unnamed_addr constant [47 x i8], align 1
@.str.386 = external hidden unnamed_addr constant [56 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_impl26sparsesolversolvesymmetricEPNS_17sparsesolverstateEPKNS_12sparsematrixEbPKNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, i1 noundef zeroext %2, ptr noundef %3, ptr noundef %4) local_unnamed_addr #1 {
tailrecurse.peel.begin:
  %5 = getelementptr inbounds i8, ptr %0, i64 480
  %6 = load i64, ptr %0, align 8, !tbaa !5
  %7 = tail call noundef i64 @_ZN11alglib_impl14sparsegetnrowsEPKNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %1, ptr noundef %4)
  %8 = icmp eq i64 %7, %6
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %8, ptr noundef nonnull @.str.382, ptr noundef %4)
  %9 = tail call noundef i64 @_ZN11alglib_impl14sparsegetncolsEPKNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %1, ptr noundef %4)
  %10 = icmp eq i64 %9, %6
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %10, ptr noundef nonnull @.str.383, ptr noundef %4)
  %11 = load i64, ptr %3, align 8, !tbaa !20
  %12 = icmp sge i64 %11, %6
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %12, ptr noundef nonnull @.str.384, ptr noundef %4)
  %13 = tail call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %3, i64 noundef %6, ptr noundef %4)
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %13, ptr noundef nonnull @.str.385, ptr noundef %4)
  %14 = tail call noundef zeroext i1 @_ZN11alglib_impl11sparseiscrsEPKNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %1, ptr noundef %4)
  br i1 %14, label %.loopexit, label %tailrecurse.peel.next

tailrecurse.peel.next:                            ; preds = %tailrecurse.peel.begin
  tail call void @_ZN11alglib_impl18sparsecopytocrsbufEPKNS_12sparsematrixEPS0_PNS_8ae_stateE(ptr noundef %1, ptr noundef nonnull %5, ptr noundef %4)
  br label %tailrecurse

tailrecurse:                                      ; preds = %24, %tailrecurse.peel.next
  %15 = load i64, ptr %0, align 8, !tbaa !5
  %16 = tail call noundef i64 @_ZN11alglib_impl14sparsegetnrowsEPKNS_12sparsematrixEPNS_8ae_stateE(ptr noundef nonnull %5, ptr noundef %4)
  %17 = icmp eq i64 %16, %15
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %17, ptr noundef nonnull @.str.382, ptr noundef %4)
  %18 = tail call noundef i64 @_ZN11alglib_impl14sparsegetncolsEPKNS_12sparsematrixEPNS_8ae_stateE(ptr noundef nonnull %5, ptr noundef %4)
  %19 = icmp eq i64 %18, %15
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %19, ptr noundef nonnull @.str.383, ptr noundef %4)
  %20 = load i64, ptr %3, align 8, !tbaa !20
  %21 = icmp sge i64 %20, %15
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %21, ptr noundef nonnull @.str.384, ptr noundef %4)
  %22 = tail call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %3, i64 noundef %15, ptr noundef %4)
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %22, ptr noundef nonnull @.str.385, ptr noundef %4)
  %23 = tail call noundef zeroext i1 @_ZN11alglib_impl11sparseiscrsEPKNS_12sparsematrixEPNS_8ae_stateE(ptr noundef nonnull %5, ptr noundef %4)
  br i1 %23, label %.loopexit, label %24

24:                                               ; preds = %tailrecurse
  tail call void @_ZN11alglib_impl18sparsecopytocrsbufEPKNS_12sparsematrixEPS0_PNS_8ae_stateE(ptr noundef nonnull %5, ptr noundef nonnull %5, ptr noundef %4)
  br label %tailrecurse, !llvm.loop !21

.loopexit:                                        ; preds = %tailrecurse, %tailrecurse.peel.begin
  %.tr38.lcssa = phi ptr [ %1, %tailrecurse.peel.begin ], [ %5, %tailrecurse ]
  tail call void @_ZN11alglib_impl20sparsesolveroocstartEPNS_17sparsesolverstateEPKNS_9ae_vectorEPNS_8ae_stateE(ptr noundef nonnull %0, ptr noundef nonnull %3, ptr noundef %4)
  %25 = tail call noundef zeroext i1 @_ZN11alglib_impl23sparsesolverooccontinueEPNS_17sparsesolverstateEPNS_8ae_stateE(ptr noundef nonnull %0, ptr noundef %4)
  br i1 %25, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %.loopexit
  %26 = getelementptr inbounds i8, ptr %0, i64 272
  %27 = getelementptr inbounds i8, ptr %0, i64 280
  %28 = getelementptr inbounds i8, ptr %0, i64 344
  br label %29

29:                                               ; preds = %.lr.ph, %.backedge
  %30 = load i64, ptr %26, align 8, !tbaa !23
  %31 = icmp eq i64 %30, -1
  br i1 %31, label %.backedge, label %32

32:                                               ; preds = %29
  %33 = icmp eq i64 %30, 0
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %33, ptr noundef nonnull @.str.386, ptr noundef %4)
  tail call void @_ZN11alglib_impl9sparsesmvEPKNS_12sparsematrixEbPKNS_9ae_vectorEPS3_PNS_8ae_stateE(ptr noundef %.tr38.lcssa, i1 noundef zeroext %2, ptr noundef nonnull %27, ptr noundef nonnull %28, ptr noundef %4)
  br label %.backedge

.backedge:                                        ; preds = %32, %29
  %34 = tail call noundef zeroext i1 @_ZN11alglib_impl23sparsesolverooccontinueEPNS_17sparsesolverstateEPNS_8ae_stateE(ptr noundef nonnull %0, ptr noundef %4)
  br i1 %34, label %29, label %._crit_edge, !llvm.loop !24

._crit_edge:                                      ; preds = %.backedge, %.loopexit
  ret void
}

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN11alglib_impl23sparsesolverooccontinueEPNS_17sparsesolverstateEPNS_8ae_stateE(ptr noundef, ptr noundef) local_unnamed_addr #1

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

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

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

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

declare void @_ZN11alglib_impl18sparsecopytocrsbufEPKNS_12sparsematrixEPS0_PNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

declare void @_ZN11alglib_impl9sparsesmvEPKNS_12sparsematrixEbPKNS_9ae_vectorEPS3_PNS_8ae_stateE(ptr noundef, i1 noundef zeroext, ptr noundef, ptr 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_impl17sparsesolverstateE", !7, i64 0, !10, i64 8, !14, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !11, i64 104, !11, i64 105, !11, i64 106, !10, i64 112, !10, i64 176, !7, i64 240, !7, i64 248, !7, i64 256, !14, i64 264, !7, i64 272, !10, i64 280, !10, i64 344, !14, i64 408, !10, i64 416, !15, i64 480, !16, i64 848, !18, i64 2096}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN11alglib_impl9ae_vectorE", !7, i64 0, !7, i64 8, !11, i64 16, !12, i64 24, !8, i64 56}
!11 = !{!"bool", !8, i64 0}
!12 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24}
!13 = !{!"any pointer", !8, i64 0}
!14 = !{!"double", !8, i64 0}
!15 = !{!"_ZTSN11alglib_impl12sparsematrixE", !10, i64 0, !10, i64 64, !10, i64 128, !10, i64 192, !10, i64 256, !7, i64 320, !7, i64 328, !7, i64 336, !7, i64 344, !7, i64 352, !7, i64 360}
!16 = !{!"_ZTSN11alglib_impl14fblsgmresstateE", !10, i64 0, !10, i64 64, !10, i64 128, !10, i64 192, !17, i64 256, !17, i64 336, !17, i64 416, !17, i64 496, !17, i64 576, !10, i64 656, !10, i64 720, !10, i64 784, !10, i64 848, !7, i64 912, !7, i64 920, !14, i64 928, !14, i64 936, !14, i64 944, !14, i64 952, !7, i64 960, !7, i64 968, !14, i64 976, !18, i64 984}
!17 = !{!"_ZTSN11alglib_impl9ae_matrixE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !11, i64 32, !12, i64 40, !8, i64 72}
!18 = !{!"_ZTSN11alglib_impl10rcommstateE", !19, i64 0, !10, i64 8, !10, i64 72, !10, i64 136, !10, i64 200}
!19 = !{!"int", !8, i64 0}
!20 = !{!10, !7, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.peeled.count", i32 1}
!23 = !{!6, !7, i64 272}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}


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