; 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::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::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.362 = external hidden unnamed_addr constant [96 x i8], align 1
@.str.363 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.364 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.365 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.366 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.367 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.368 = external hidden unnamed_addr constant [36 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
declare dso_local void @_ZN11alglib_impl23_sparsesolverstate_initEPvPNS_8ae_stateEb(ptr noundef, ptr noundef, i1 noundef zeroext) #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl25sparsesolvesymmetricgmresEPKNS_12sparsematrixEbPKNS_9ae_vectorEldlPS3_PNS_18sparsesolverreportEPNS_8ae_stateE(ptr noundef %0, i1 noundef zeroext %1, ptr noundef %2, i64 noundef %3, double noundef %4, i64 noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8) #3 {
  %10 = alloca ptr, align 8
  %11 = alloca i8, align 1
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca double, align 8
  %15 = alloca i64, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca %"struct.alglib_impl::ae_frame", align 8
  %20 = alloca i64, align 8
  %21 = alloca %"struct.alglib_impl::sparsematrix", align 8
  %22 = alloca %"struct.alglib_impl::sparsesolverstate", align 8
  %23 = alloca i32, align 4
  store ptr %0, ptr %10, align 8, !tbaa !5
  %24 = zext i1 %1 to i8
  store i8 %24, ptr %11, align 1, !tbaa !9
  store ptr %2, ptr %12, align 8, !tbaa !5
  store i64 %3, ptr %13, align 8, !tbaa !11
  store double %4, ptr %14, align 8, !tbaa !13
  store i64 %5, ptr %15, align 8, !tbaa !11
  store ptr %6, ptr %16, align 8, !tbaa !5
  store ptr %7, ptr %17, align 8, !tbaa !5
  store ptr %8, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 368, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 2360, ptr %22) #4
  %25 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %25, ptr noundef %19)
  call void @llvm.memset.p0.i64(ptr align 8 %21, i8 0, i64 368, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %22, i8 0, i64 2360, i1 false)
  %26 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %26)
  %27 = load ptr, ptr %17, align 8, !tbaa !5
  call void @_ZN11alglib_impl25_sparsesolverreport_clearEPv(ptr noundef %27)
  %28 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl18_sparsematrix_initEPvPNS_8ae_stateEb(ptr noundef %21, ptr noundef %28, i1 noundef zeroext true)
  %29 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl23_sparsesolverstate_initEPvPNS_8ae_stateEb(ptr noundef %22, ptr noundef %29, i1 noundef zeroext true)
  %30 = load ptr, ptr %10, align 8, !tbaa !5
  %31 = load ptr, ptr %18, align 8, !tbaa !5
  %32 = call noundef i64 @_ZN11alglib_impl14sparsegetnrowsEPKNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %30, ptr noundef %31)
  store i64 %32, ptr %20, align 8, !tbaa !11
  %33 = load i64, ptr %20, align 8, !tbaa !11
  %34 = icmp sge i64 %33, 1
  %35 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %34, ptr noundef @.str.362, ptr noundef %35)
  %36 = load ptr, ptr %10, align 8, !tbaa !5
  %37 = load ptr, ptr %18, align 8, !tbaa !5
  %38 = call noundef i64 @_ZN11alglib_impl14sparsegetnrowsEPKNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %36, ptr noundef %37)
  %39 = load i64, ptr %20, align 8, !tbaa !11
  %40 = icmp eq i64 %38, %39
  %41 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %40, ptr noundef @.str.363, ptr noundef %41)
  %42 = load ptr, ptr %10, align 8, !tbaa !5
  %43 = load ptr, ptr %18, align 8, !tbaa !5
  %44 = call noundef i64 @_ZN11alglib_impl14sparsegetncolsEPKNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %42, ptr noundef %43)
  %45 = load i64, ptr %20, align 8, !tbaa !11
  %46 = icmp eq i64 %44, %45
  %47 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %46, ptr noundef @.str.364, ptr noundef %47)
  %48 = load ptr, ptr %12, align 8, !tbaa !5
  %49 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %48, i32 0, i32 0
  %50 = load i64, ptr %49, align 8, !tbaa !15
  %51 = load i64, ptr %20, align 8, !tbaa !11
  %52 = icmp sge i64 %50, %51
  %53 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %52, ptr noundef @.str.365, ptr noundef %53)
  %54 = load ptr, ptr %12, align 8, !tbaa !5
  %55 = load i64, ptr %20, align 8, !tbaa !11
  %56 = load ptr, ptr %18, align 8, !tbaa !5
  %57 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %54, i64 noundef %55, ptr noundef %56)
  %58 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %57, ptr noundef @.str.366, ptr noundef %58)
  %59 = load double, ptr %14, align 8, !tbaa !13
  %60 = load ptr, ptr %18, align 8, !tbaa !5
  %61 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %59, ptr noundef %60)
  br i1 %61, label %62, label %65

62:                                               ; preds = %9
  %63 = load double, ptr %14, align 8, !tbaa !13
  %64 = call noundef zeroext i1 @_ZN11alglib_impl16ae_fp_greater_eqEdd(double noundef %63, double noundef 0.000000e+00)
  br label %65

65:                                               ; preds = %62, %9
  %66 = phi i1 [ false, %9 ], [ %64, %62 ]
  %67 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %66, ptr noundef @.str.367, ptr noundef %67)
  %68 = load i64, ptr %15, align 8, !tbaa !11
  %69 = icmp sge i64 %68, 0
  %70 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %69, ptr noundef @.str.368, ptr noundef %70)
  %71 = load double, ptr %14, align 8, !tbaa !13
  %72 = call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %71, double noundef 0.000000e+00)
  br i1 %72, label %73, label %77

73:                                               ; preds = %65
  %74 = load i64, ptr %15, align 8, !tbaa !11
  %75 = icmp eq i64 %74, 0
  br i1 %75, label %76, label %77

76:                                               ; preds = %73
  store double 0x3EB0C6F7A0B5ED8D, ptr %14, align 8, !tbaa !13
  br label %77

77:                                               ; preds = %76, %73, %65
  %78 = load ptr, ptr %10, align 8, !tbaa !5
  %79 = load ptr, ptr %18, align 8, !tbaa !5
  %80 = call noundef zeroext i1 @_ZN11alglib_impl11sparseiscrsEPKNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %78, ptr noundef %79)
  br i1 %80, label %94, label %81

81:                                               ; preds = %77
  %82 = load ptr, ptr %10, align 8, !tbaa !5
  %83 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl18sparsecopytocrsbufEPKNS_12sparsematrixEPS0_PNS_8ae_stateE(ptr noundef %82, ptr noundef %21, ptr noundef %83)
  %84 = load i8, ptr %11, align 1, !tbaa !9, !range !18, !noundef !19
  %85 = trunc i8 %84 to i1
  %86 = load ptr, ptr %12, align 8, !tbaa !5
  %87 = load i64, ptr %13, align 8, !tbaa !11
  %88 = load double, ptr %14, align 8, !tbaa !13
  %89 = load i64, ptr %15, align 8, !tbaa !11
  %90 = load ptr, ptr %16, align 8, !tbaa !5
  %91 = load ptr, ptr %17, align 8, !tbaa !5
  %92 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl25sparsesolvesymmetricgmresEPKNS_12sparsematrixEbPKNS_9ae_vectorEldlPS3_PNS_18sparsesolverreportEPNS_8ae_stateE(ptr noundef %21, i1 noundef zeroext %85, ptr noundef %86, i64 noundef %87, double noundef %88, i64 noundef %89, ptr noundef %90, ptr noundef %91, ptr noundef %92)
  %93 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %93)
  store i32 1, ptr %23, align 4
  br label %111

94:                                               ; preds = %77
  %95 = load i64, ptr %20, align 8, !tbaa !11
  %96 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl18sparsesolvercreateElPNS_17sparsesolverstateEPNS_8ae_stateE(i64 noundef %95, ptr noundef %22, ptr noundef %96)
  %97 = load i64, ptr %13, align 8, !tbaa !11
  %98 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl24sparsesolversetalgogmresEPNS_17sparsesolverstateElPNS_8ae_stateE(ptr noundef %22, i64 noundef %97, ptr noundef %98)
  %99 = load double, ptr %14, align 8, !tbaa !13
  %100 = load i64, ptr %15, align 8, !tbaa !11
  %101 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl19sparsesolversetcondEPNS_17sparsesolverstateEdlPNS_8ae_stateE(ptr noundef %22, double noundef %99, i64 noundef %100, ptr noundef %101)
  %102 = load ptr, ptr %10, align 8, !tbaa !5
  %103 = load i8, ptr %11, align 1, !tbaa !9, !range !18, !noundef !19
  %104 = trunc i8 %103 to i1
  %105 = load ptr, ptr %12, align 8, !tbaa !5
  %106 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl26sparsesolversolvesymmetricEPNS_17sparsesolverstateEPKNS_12sparsematrixEbPKNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %22, ptr noundef %102, i1 noundef zeroext %104, ptr noundef %105, ptr noundef %106)
  %107 = load ptr, ptr %16, align 8, !tbaa !5
  %108 = load ptr, ptr %17, align 8, !tbaa !5
  %109 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl19sparsesolverresultsEPNS_17sparsesolverstateEPNS_9ae_vectorEPNS_18sparsesolverreportEPNS_8ae_stateE(ptr noundef %22, ptr noundef %107, ptr noundef %108, ptr noundef %109)
  %110 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %110)
  store i32 0, ptr %23, align 4
  br label %111

111:                                              ; preds = %94, %81
  call void @llvm.lifetime.end.p0(i64 2360, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 368, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #4
  %112 = load i32, ptr %23, align 4
  switch i32 %112, label %114 [
    i32 0, label %113
    i32 1, label %113
  ]

113:                                              ; preds = %111, %111
  ret void

114:                                              ; preds = %111
  unreachable
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl19sparsesolversetcondEPNS_17sparsesolverstateEdlPNS_8ae_stateE(ptr noundef, double noundef, i64 noundef, ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl26sparsesolversolvesymmetricEPNS_17sparsesolverstateEPKNS_12sparsematrixEbPKNS_9ae_vectorEPNS_8ae_stateE(ptr noundef, ptr noundef, i1 noundef zeroext, ptr noundef, ptr noundef) #3

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

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 noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef, double noundef) #2

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #2

declare noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef, ptr noundef) #2

declare noundef zeroext i1 @_ZN11alglib_impl16ae_fp_greater_eqEdd(double noundef, double 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

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

declare void @_ZN11alglib_impl18sparsecopytocrsbufEPKNS_12sparsematrixEPS0_PNS_8ae_stateE(ptr 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 = { 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, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{!16, !12, i64 0}
!16 = !{!"_ZTSN11alglib_impl9ae_vectorE", !12, i64 0, !12, i64 8, !10, i64 16, !17, i64 24, !7, i64 56}
!17 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!18 = !{i8 0, i8 2}
!19 = !{}


; 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 }
%"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::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.362 = external hidden unnamed_addr constant [96 x i8], align 1
@.str.363 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.364 = external hidden unnamed_addr constant [38 x i8], align 1
@.str.365 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.366 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.367 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.368 = external hidden unnamed_addr constant [36 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
declare dso_local void @_ZN11alglib_impl23_sparsesolverstate_initEPvPNS_8ae_stateEb(ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl25sparsesolvesymmetricgmresEPKNS_12sparsematrixEbPKNS_9ae_vectorEldlPS3_PNS_18sparsesolverreportEPNS_8ae_stateE(ptr noundef %0, i1 noundef zeroext %1, ptr noundef %2, i64 noundef %3, double noundef %4, i64 noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8) local_unnamed_addr #3 {
  %10 = alloca %"struct.alglib_impl::ae_frame", align 8
  %11 = alloca %"struct.alglib_impl::sparsematrix", align 8
  %12 = alloca %"struct.alglib_impl::sparsesolverstate", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 368, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 2360, ptr nonnull %12) #4
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %8, ptr noundef nonnull %10)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(368) %11, i8 0, i64 368, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(2360) %12, i8 0, i64 2360, i1 false)
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %6)
  call void @_ZN11alglib_impl25_sparsesolverreport_clearEPv(ptr noundef %7)
  call void @_ZN11alglib_impl18_sparsematrix_initEPvPNS_8ae_stateEb(ptr noundef nonnull %11, ptr noundef %8, i1 noundef zeroext true)
  call void @_ZN11alglib_impl23_sparsesolverstate_initEPvPNS_8ae_stateEb(ptr noundef nonnull %12, ptr noundef %8, i1 noundef zeroext true)
  %13 = call noundef i64 @_ZN11alglib_impl14sparsegetnrowsEPKNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %0, ptr noundef %8)
  %14 = icmp sgt i64 %13, 0
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %14, ptr noundef nonnull @.str.362, ptr noundef %8)
  %15 = call noundef i64 @_ZN11alglib_impl14sparsegetnrowsEPKNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %0, ptr noundef %8)
  %16 = icmp eq i64 %15, %13
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %16, ptr noundef nonnull @.str.363, ptr noundef %8)
  %17 = call noundef i64 @_ZN11alglib_impl14sparsegetncolsEPKNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %0, ptr noundef %8)
  %18 = icmp eq i64 %17, %13
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %18, ptr noundef nonnull @.str.364, ptr noundef %8)
  %19 = load i64, ptr %2, align 8, !tbaa !5
  %20 = icmp sge i64 %19, %13
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %20, ptr noundef nonnull @.str.365, ptr noundef %8)
  %21 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %2, i64 noundef %13, ptr noundef %8)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %21, ptr noundef nonnull @.str.366, ptr noundef %8)
  %22 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %4, ptr noundef %8)
  br i1 %22, label %23, label %25

23:                                               ; preds = %9
  %24 = call noundef zeroext i1 @_ZN11alglib_impl16ae_fp_greater_eqEdd(double noundef %4, double noundef 0.000000e+00)
  br label %25

25:                                               ; preds = %23, %9
  %26 = phi i1 [ false, %9 ], [ %24, %23 ]
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %26, ptr noundef nonnull @.str.367, ptr noundef %8)
  %27 = icmp sgt i64 %5, -1
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %27, ptr noundef nonnull @.str.368, ptr noundef %8)
  %28 = call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %4, double noundef 0.000000e+00)
  %29 = icmp eq i64 %5, 0
  %or.cond = and i1 %29, %28
  %.0 = select i1 %or.cond, double 0x3EB0C6F7A0B5ED8D, double %4
  %30 = call noundef zeroext i1 @_ZN11alglib_impl11sparseiscrsEPKNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %0, ptr noundef %8)
  br i1 %30, label %32, label %31

31:                                               ; preds = %25
  call void @_ZN11alglib_impl18sparsecopytocrsbufEPKNS_12sparsematrixEPS0_PNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %11, ptr noundef %8)
  call void @_ZN11alglib_impl25sparsesolvesymmetricgmresEPKNS_12sparsematrixEbPKNS_9ae_vectorEldlPS3_PNS_18sparsesolverreportEPNS_8ae_stateE(ptr noundef nonnull %11, i1 noundef zeroext %1, ptr noundef nonnull %2, i64 noundef %3, double noundef %.0, i64 noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8)
  br label %33

32:                                               ; preds = %25
  call void @_ZN11alglib_impl18sparsesolvercreateElPNS_17sparsesolverstateEPNS_8ae_stateE(i64 noundef %13, ptr noundef nonnull %12, ptr noundef %8)
  call void @_ZN11alglib_impl24sparsesolversetalgogmresEPNS_17sparsesolverstateElPNS_8ae_stateE(ptr noundef nonnull %12, i64 noundef %3, ptr noundef %8)
  call void @_ZN11alglib_impl19sparsesolversetcondEPNS_17sparsesolverstateEdlPNS_8ae_stateE(ptr noundef nonnull %12, double noundef %.0, i64 noundef %5, ptr noundef %8)
  call void @_ZN11alglib_impl26sparsesolversolvesymmetricEPNS_17sparsesolverstateEPKNS_12sparsematrixEbPKNS_9ae_vectorEPNS_8ae_stateE(ptr noundef nonnull %12, ptr noundef %0, i1 noundef zeroext %1, ptr noundef nonnull %2, ptr noundef %8)
  call void @_ZN11alglib_impl19sparsesolverresultsEPNS_17sparsesolverstateEPNS_9ae_vectorEPNS_18sparsesolverreportEPNS_8ae_stateE(ptr noundef nonnull %12, ptr noundef %6, ptr noundef %7, ptr noundef %8)
  br label %33

33:                                               ; preds = %32, %31
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %8)
  call void @llvm.lifetime.end.p0(i64 2360, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 368, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #4
  ret void
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl19sparsesolversetcondEPNS_17sparsesolverstateEdlPNS_8ae_stateE(ptr noundef, double noundef, i64 noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11alglib_impl26sparsesolversolvesymmetricEPNS_17sparsesolverstateEPKNS_12sparsematrixEbPKNS_9ae_vectorEPNS_8ae_stateE(ptr noundef, ptr noundef, i1 noundef zeroext, ptr noundef, ptr noundef) local_unnamed_addr #3

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

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 noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef, double noundef) local_unnamed_addr #2

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #2

declare noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef, ptr noundef) local_unnamed_addr #2

declare noundef zeroext i1 @_ZN11alglib_impl16ae_fp_greater_eqEdd(double noundef, double 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

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

declare void @_ZN11alglib_impl18sparsecopytocrsbufEPKNS_12sparsematrixEPS0_PNS_8ae_stateE(ptr 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 = { 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}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SROAPass,SimplifyCFGPass