; 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" }
%"struct.alglib_impl::sparsesolverreport" = type { i64, i64, i64, double }

@.str.396 = external hidden unnamed_addr constant [49 x i8], align 1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl19sparsesolveroocstopEPNS_17sparsesolverstateEPNS_9ae_vectorEPNS_18sparsesolverreportEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #1 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  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
  %9 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %9)
  %10 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN11alglib_impl25_sparsesolverreport_clearEPv(ptr noundef %10)
  %11 = load ptr, ptr %5, align 8, !tbaa !5
  %12 = getelementptr inbounds %"struct.alglib_impl::sparsesolverstate", ptr %11, i32 0, i32 7
  %13 = load i8, ptr %12, align 1, !tbaa !9, !range !21, !noundef !22
  %14 = trunc i8 %13 to i1
  %15 = xor i1 %14, true
  %16 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %15, ptr noundef @.str.396, ptr noundef %16)
  %17 = load ptr, ptr %6, align 8, !tbaa !5
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = getelementptr inbounds %"struct.alglib_impl::sparsesolverstate", ptr %18, i32 0, i32 0
  %20 = load i64, ptr %19, align 8, !tbaa !23
  %21 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %17, i64 noundef %20, ptr noundef %21)
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = getelementptr inbounds %"struct.alglib_impl::sparsesolverstate", ptr %22, i32 0, i32 0
  %24 = load i64, ptr %23, align 8, !tbaa !23
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = getelementptr inbounds %"struct.alglib_impl::sparsesolverstate", ptr %25, i32 0, i32 10
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl6rcopyvElPKNS_9ae_vectorEPS0_PNS_8ae_stateE(i64 noundef %24, ptr noundef %26, ptr noundef %27, ptr noundef %28)
  %29 = load ptr, ptr %7, align 8, !tbaa !5
  %30 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl22initsparsesolverreportEPNS_18sparsesolverreportEPNS_8ae_stateE(ptr noundef %29, ptr noundef %30)
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  %32 = getelementptr inbounds %"struct.alglib_impl::sparsesolverstate", ptr %31, i32 0, i32 11
  %33 = load i64, ptr %32, align 8, !tbaa !24
  %34 = load ptr, ptr %7, align 8, !tbaa !5
  %35 = getelementptr inbounds %"struct.alglib_impl::sparsesolverreport", ptr %34, i32 0, i32 2
  store i64 %33, ptr %35, align 8, !tbaa !25
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = getelementptr inbounds %"struct.alglib_impl::sparsesolverstate", ptr %36, i32 0, i32 12
  %38 = load i64, ptr %37, align 8, !tbaa !27
  %39 = load ptr, ptr %7, align 8, !tbaa !5
  %40 = getelementptr inbounds %"struct.alglib_impl::sparsesolverreport", ptr %39, i32 0, i32 1
  store i64 %38, ptr %40, align 8, !tbaa !28
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = getelementptr inbounds %"struct.alglib_impl::sparsesolverstate", ptr %41, i32 0, i32 13
  %43 = load i64, ptr %42, align 8, !tbaa !29
  %44 = load ptr, ptr %7, align 8, !tbaa !5
  %45 = getelementptr inbounds %"struct.alglib_impl::sparsesolverreport", ptr %44, i32 0, i32 0
  store i64 %43, ptr %45, align 8, !tbaa !30
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = getelementptr inbounds %"struct.alglib_impl::sparsesolverstate", ptr %46, i32 0, i32 14
  %48 = load double, ptr %47, align 8, !tbaa !31
  %49 = load ptr, ptr %7, align 8, !tbaa !5
  %50 = getelementptr inbounds %"struct.alglib_impl::sparsesolverreport", ptr %49, i32 0, i32 3
  store double %48, ptr %50, align 8, !tbaa !32
  ret void
}

declare void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef) #0

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

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

declare void @_ZN11alglib_impl6rcopyvElPKNS_9ae_vectorEPS0_PNS_8ae_stateE(i64 noundef, ptr noundef, ptr noundef, ptr noundef) #0

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

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

!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, !13, i64 105}
!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 = !{i8 0, i8 2}
!22 = !{}
!23 = !{!10, !11, i64 0}
!24 = !{!10, !11, i64 240}
!25 = !{!26, !11, i64 16}
!26 = !{!"_ZTSN11alglib_impl18sparsesolverreportE", !11, i64 0, !11, i64 8, !11, i64 16, !15, i64 24}
!27 = !{!10, !11, i64 248}
!28 = !{!26, !11, i64 8}
!29 = !{!10, !11, i64 256}
!30 = !{!26, !11, i64 0}
!31 = !{!10, !15, i64 264}
!32 = !{!26, !15, i64 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"

@.str.396 = external hidden unnamed_addr constant [49 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_impl19sparsesolveroocstopEPNS_17sparsesolverstateEPNS_9ae_vectorEPNS_18sparsesolverreportEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #1 {
  tail call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %1)
  tail call void @_ZN11alglib_impl25_sparsesolverreport_clearEPv(ptr noundef %2)
  %5 = getelementptr inbounds i8, ptr %0, i64 105
  %6 = load i8, ptr %5, align 1, !tbaa !5, !range !20, !noundef !21
  %7 = trunc nuw i8 %6 to i1
  %8 = xor i1 %7, true
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %8, ptr noundef nonnull @.str.396, ptr noundef %3)
  %9 = load i64, ptr %0, align 8, !tbaa !22
  tail call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %1, i64 noundef %9, ptr noundef %3)
  %10 = load i64, ptr %0, align 8, !tbaa !22
  %11 = getelementptr inbounds i8, ptr %0, i64 176
  tail call void @_ZN11alglib_impl6rcopyvElPKNS_9ae_vectorEPS0_PNS_8ae_stateE(i64 noundef %10, ptr noundef nonnull %11, ptr noundef %1, ptr noundef %3)
  tail call void @_ZN11alglib_impl22initsparsesolverreportEPNS_18sparsesolverreportEPNS_8ae_stateE(ptr noundef %2, ptr noundef %3)
  %12 = getelementptr inbounds i8, ptr %0, i64 240
  %13 = load i64, ptr %12, align 8, !tbaa !23
  %14 = getelementptr inbounds i8, ptr %2, i64 16
  store i64 %13, ptr %14, align 8, !tbaa !24
  %15 = getelementptr inbounds i8, ptr %0, i64 248
  %16 = load <2 x i64>, ptr %15, align 8, !tbaa !26
  %17 = shufflevector <2 x i64> %16, <2 x i64> poison, <2 x i32> <i32 1, i32 0>
  store <2 x i64> %17, ptr %2, align 8, !tbaa !26
  %18 = getelementptr inbounds i8, ptr %0, i64 264
  %19 = load double, ptr %18, align 8, !tbaa !27
  %20 = getelementptr inbounds i8, ptr %2, i64 24
  store double %19, ptr %20, align 8, !tbaa !28
  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

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

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

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

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

!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, !11, i64 105}
!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 = !{i8 0, i8 2}
!21 = !{}
!22 = !{!6, !7, i64 0}
!23 = !{!6, !7, i64 240}
!24 = !{!25, !7, i64 16}
!25 = !{!"_ZTSN11alglib_impl18sparsesolverreportE", !7, i64 0, !7, i64 8, !7, i64 16, !14, i64 24}
!26 = !{!7, !7, i64 0}
!27 = !{!6, !14, i64 264}
!28 = !{!25, !14, i64 24}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InstCombinePass,SLPVectorizerPass,SROAPass,TailCallElimPass