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

40:                                               ; preds = %4
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = load ptr, ptr %5, align 8, !tbaa !5
  %43 = getelementptr inbounds %"struct.alglib_impl::sparsesolverstate", ptr %42, i32 0, i32 20
  %44 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl18sparsecopytocrsbufEPKNS_12sparsematrixEPS0_PNS_8ae_stateE(ptr noundef %41, ptr noundef %43, ptr noundef %44)
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = getelementptr inbounds %"struct.alglib_impl::sparsesolverstate", ptr %46, i32 0, i32 20
  %48 = load ptr, ptr %7, align 8, !tbaa !5
  %49 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl17sparsesolversolveEPNS_17sparsesolverstateEPKNS_12sparsematrixEPKNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %45, ptr noundef %47, ptr noundef %48, ptr noundef %49)
  store i32 1, ptr %10, align 4
  br label %77

50:                                               ; preds = %4
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = load ptr, ptr %7, align 8, !tbaa !5
  %53 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl20sparsesolveroocstartEPNS_17sparsesolverstateEPKNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %51, ptr noundef %52, ptr noundef %53)
  br label %54

54:                                               ; preds = %64, %63, %50
  %55 = load ptr, ptr %5, align 8, !tbaa !5
  %56 = load ptr, ptr %8, align 8, !tbaa !5
  %57 = call noundef zeroext i1 @_ZN11alglib_impl23sparsesolverooccontinueEPNS_17sparsesolverstateEPNS_8ae_stateE(ptr noundef %55, ptr noundef %56)
  br i1 %57, label %58, label %76

58:                                               ; preds = %54
  %59 = load ptr, ptr %5, align 8, !tbaa !5
  %60 = getelementptr inbounds %"struct.alglib_impl::sparsesolverstate", ptr %59, i32 0, i32 15
  %61 = load i64, ptr %60, align 8, !tbaa !23
  %62 = icmp eq i64 %61, -1
  br i1 %62, label %63, label %64

63:                                               ; preds = %58
  br label %54, !llvm.loop !24

64:                                               ; preds = %58
  %65 = load ptr, ptr %5, align 8, !tbaa !5
  %66 = getelementptr inbounds %"struct.alglib_impl::sparsesolverstate", ptr %65, i32 0, i32 15
  %67 = load i64, ptr %66, align 8, !tbaa !23
  %68 = icmp eq i64 %67, 0
  %69 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %68, ptr noundef @.str.391, ptr noundef %69)
  %70 = load ptr, ptr %6, align 8, !tbaa !5
  %71 = load ptr, ptr %5, align 8, !tbaa !5
  %72 = getelementptr inbounds %"struct.alglib_impl::sparsesolverstate", ptr %71, i32 0, i32 16
  %73 = load ptr, ptr %5, align 8, !tbaa !5
  %74 = getelementptr inbounds %"struct.alglib_impl::sparsesolverstate", ptr %73, i32 0, i32 17
  %75 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl8sparsemvEPKNS_12sparsematrixEPKNS_9ae_vectorEPS3_PNS_8ae_stateE(ptr noundef %70, ptr noundef %72, ptr noundef %74, ptr noundef %75)
  br label %54, !llvm.loop !24

76:                                               ; preds = %54
  store i32 0, ptr %10, align 4
  br label %77

77:                                               ; preds = %76, %40
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  %78 = load i32, ptr %10, align 4
  switch i32 %78, label %80 [
    i32 0, label %79
    i32 1, label %79
  ]

79:                                               ; preds = %77, %77
  ret void

80:                                               ; preds = %77
  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_impl8sparsemvEPKNS_12sparsematrixEPKNS_9ae_vectorEPS3_PNS_8ae_stateE(ptr noundef, 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, !11, i64 0}
!10 = !{!"_ZTSN11alglib_impl17sparsesolverstateE", !11, i64 0, !12, i64 8, !15, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !13, i64 104, !13, i64 105, !13, i64 106, !12, i64 112, !12, i64 176, !11, i64 240, !11, i64 248, !11, i64 256, !15, i64 264, !11, i64 272, !12, i64 280, !12, i64 344, !15, i64 408, !12, i64 416, !16, i64 480, !17, i64 848, !19, i64 2096}
!11 = !{!"long", !7, i64 0}
!12 = !{!"_ZTSN11alglib_impl9ae_vectorE", !11, i64 0, !11, i64 8, !13, i64 16, !14, i64 24, !7, i64 56}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!15 = !{!"double", !7, i64 0}
!16 = !{!"_ZTSN11alglib_impl12sparsematrixE", !12, i64 0, !12, i64 64, !12, i64 128, !12, i64 192, !12, i64 256, !11, i64 320, !11, i64 328, !11, i64 336, !11, i64 344, !11, i64 352, !11, i64 360}
!17 = !{!"_ZTSN11alglib_impl14fblsgmresstateE", !12, i64 0, !12, i64 64, !12, i64 128, !12, i64 192, !18, i64 256, !18, i64 336, !18, i64 416, !18, i64 496, !18, i64 576, !12, i64 656, !12, i64 720, !12, i64 784, !12, i64 848, !11, i64 912, !11, i64 920, !15, i64 928, !15, i64 936, !15, i64 944, !15, i64 952, !11, i64 960, !11, i64 968, !15, i64 976, !19, i64 984}
!18 = !{!"_ZTSN11alglib_impl9ae_matrixE", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !13, i64 32, !14, i64 40, !7, i64 72}
!19 = !{!"_ZTSN11alglib_impl10rcommstateE", !20, i64 0, !12, i64 8, !12, i64 72, !12, i64 136, !12, i64 200}
!20 = !{!"int", !7, i64 0}
!21 = !{!11, !11, i64 0}
!22 = !{!12, !11, i64 0}
!23 = !{!10, !11, i64 272}
!24 = distinct !{!24, !25}
!25 = !{!"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.387 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.388 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.389 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.390 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.391 = external hidden unnamed_addr constant [47 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_impl17sparsesolversolveEPNS_17sparsesolverstateEPKNS_12sparsematrixEPKNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #1 {
tailrecurse.peel.begin:
  %4 = getelementptr inbounds i8, ptr %0, i64 480
  %5 = load i64, ptr %0, align 8, !tbaa !5
  %6 = tail call noundef i64 @_ZN11alglib_impl14sparsegetnrowsEPKNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %1, ptr noundef %3)
  %7 = icmp eq i64 %6, %5
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %7, ptr noundef nonnull @.str.387, ptr noundef %3)
  %8 = tail call noundef i64 @_ZN11alglib_impl14sparsegetncolsEPKNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %1, ptr noundef %3)
  %9 = icmp eq i64 %8, %5
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %9, ptr noundef nonnull @.str.388, ptr noundef %3)
  %10 = load i64, ptr %2, align 8, !tbaa !20
  %11 = icmp sge i64 %10, %5
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %11, ptr noundef nonnull @.str.389, ptr noundef %3)
  %12 = tail call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %2, i64 noundef %5, ptr noundef %3)
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %12, ptr noundef nonnull @.str.390, ptr noundef %3)
  %13 = tail call noundef zeroext i1 @_ZN11alglib_impl11sparseiscrsEPKNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %1, ptr noundef %3)
  br i1 %13, 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 %4, ptr noundef %3)
  br label %tailrecurse

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

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

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

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

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

31:                                               ; preds = %28
  %32 = icmp eq i64 %29, 0
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %32, ptr noundef nonnull @.str.391, ptr noundef %3)
  tail call void @_ZN11alglib_impl8sparsemvEPKNS_12sparsematrixEPKNS_9ae_vectorEPS3_PNS_8ae_stateE(ptr noundef %.tr36.lcssa, ptr noundef nonnull %26, ptr noundef nonnull %27, ptr noundef %3)
  br label %.backedge

.backedge:                                        ; preds = %31, %28
  %33 = tail call noundef zeroext i1 @_ZN11alglib_impl23sparsesolverooccontinueEPNS_17sparsesolverstateEPNS_8ae_stateE(ptr noundef nonnull %0, ptr noundef %3)
  br i1 %33, label %28, 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_impl8sparsemvEPKNS_12sparsematrixEPKNS_9ae_vectorEPS3_PNS_8ae_stateE(ptr noundef, 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