; 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.369 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.370 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.371 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.372 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.373 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.374 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.375 = external hidden unnamed_addr constant [27 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_impl16sparsesolvegmresEPKNS_12sparsematrixEPKNS_9ae_vectorEldlPS3_PNS_18sparsesolverreportEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, i64 noundef %2, double noundef %3, i64 noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7) #3 {
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca double, align 8
  %13 = alloca i64, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca %"struct.alglib_impl::ae_frame", align 8
  %18 = alloca i64, align 8
  %19 = alloca %"struct.alglib_impl::sparsematrix", align 8
  %20 = alloca %"struct.alglib_impl::sparsesolverstate", align 8
  %21 = alloca i32, align 4
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store i64 %2, ptr %11, align 8, !tbaa !9
  store double %3, ptr %12, align 8, !tbaa !11
  store i64 %4, ptr %13, align 8, !tbaa !9
  store ptr %5, ptr %14, align 8, !tbaa !5
  store ptr %6, ptr %15, align 8, !tbaa !5
  store ptr %7, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 368, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 2360, ptr %20) #4
  %22 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %22, ptr noundef %17)
  call void @llvm.memset.p0.i64(ptr align 8 %19, i8 0, i64 368, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %20, i8 0, i64 2360, i1 false)
  %23 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %23)
  %24 = load ptr, ptr %15, align 8, !tbaa !5
  call void @_ZN11alglib_impl25_sparsesolverreport_clearEPv(ptr noundef %24)
  %25 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl18_sparsematrix_initEPvPNS_8ae_stateEb(ptr noundef %19, ptr noundef %25, i1 noundef zeroext true)
  %26 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl23_sparsesolverstate_initEPvPNS_8ae_stateEb(ptr noundef %20, ptr noundef %26, i1 noundef zeroext true)
  %27 = load ptr, ptr %9, align 8, !tbaa !5
  %28 = load ptr, ptr %16, align 8, !tbaa !5
  %29 = call noundef i64 @_ZN11alglib_impl14sparsegetnrowsEPKNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %27, ptr noundef %28)
  store i64 %29, ptr %18, align 8, !tbaa !9
  %30 = load i64, ptr %18, align 8, !tbaa !9
  %31 = icmp sge i64 %30, 1
  %32 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %31, ptr noundef @.str.369, ptr noundef %32)
  %33 = load ptr, ptr %9, align 8, !tbaa !5
  %34 = load ptr, ptr %16, align 8, !tbaa !5
  %35 = call noundef i64 @_ZN11alglib_impl14sparsegetnrowsEPKNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %33, ptr noundef %34)
  %36 = load i64, ptr %18, align 8, !tbaa !9
  %37 = icmp eq i64 %35, %36
  %38 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %37, ptr noundef @.str.370, ptr noundef %38)
  %39 = load ptr, ptr %9, align 8, !tbaa !5
  %40 = load ptr, ptr %16, align 8, !tbaa !5
  %41 = call noundef i64 @_ZN11alglib_impl14sparsegetncolsEPKNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %39, ptr noundef %40)
  %42 = load i64, ptr %18, align 8, !tbaa !9
  %43 = icmp eq i64 %41, %42
  %44 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %43, ptr noundef @.str.371, ptr noundef %44)
  %45 = load ptr, ptr %10, align 8, !tbaa !5
  %46 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %45, i32 0, i32 0
  %47 = load i64, ptr %46, align 8, !tbaa !13
  %48 = load i64, ptr %18, align 8, !tbaa !9
  %49 = icmp sge i64 %47, %48
  %50 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %49, ptr noundef @.str.372, ptr noundef %50)
  %51 = load ptr, ptr %10, align 8, !tbaa !5
  %52 = load i64, ptr %18, align 8, !tbaa !9
  %53 = load ptr, ptr %16, align 8, !tbaa !5
  %54 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %51, i64 noundef %52, ptr noundef %53)
  %55 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %54, ptr noundef @.str.373, ptr noundef %55)
  %56 = load double, ptr %12, align 8, !tbaa !11
  %57 = load ptr, ptr %16, align 8, !tbaa !5
  %58 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %56, ptr noundef %57)
  br i1 %58, label %59, label %62

59:                                               ; preds = %8
  %60 = load double, ptr %12, align 8, !tbaa !11
  %61 = call noundef zeroext i1 @_ZN11alglib_impl16ae_fp_greater_eqEdd(double noundef %60, double noundef 0.000000e+00)
  br label %62

62:                                               ; preds = %59, %8
  %63 = phi i1 [ false, %8 ], [ %61, %59 ]
  %64 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %63, ptr noundef @.str.374, ptr noundef %64)
  %65 = load i64, ptr %13, align 8, !tbaa !9
  %66 = icmp sge i64 %65, 0
  %67 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %66, ptr noundef @.str.375, ptr noundef %67)
  %68 = load double, ptr %12, align 8, !tbaa !11
  %69 = call noundef zeroext i1 @_ZN11alglib_impl8ae_fp_eqEdd(double noundef %68, double noundef 0.000000e+00)
  br i1 %69, label %70, label %74

70:                                               ; preds = %62
  %71 = load i64, ptr %13, align 8, !tbaa !9
  %72 = icmp eq i64 %71, 0
  br i1 %72, label %73, label %74

73:                                               ; preds = %70
  store double 0x3EB0C6F7A0B5ED8D, ptr %12, align 8, !tbaa !11
  br label %74

74:                                               ; preds = %73, %70, %62
  %75 = load ptr, ptr %9, align 8, !tbaa !5
  %76 = load ptr, ptr %16, align 8, !tbaa !5
  %77 = call noundef zeroext i1 @_ZN11alglib_impl11sparseiscrsEPKNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %75, ptr noundef %76)
  br i1 %77, label %89, label %78

78:                                               ; preds = %74
  %79 = load ptr, ptr %9, align 8, !tbaa !5
  %80 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl18sparsecopytocrsbufEPKNS_12sparsematrixEPS0_PNS_8ae_stateE(ptr noundef %79, ptr noundef %19, ptr noundef %80)
  %81 = load ptr, ptr %10, align 8, !tbaa !5
  %82 = load i64, ptr %11, align 8, !tbaa !9
  %83 = load double, ptr %12, align 8, !tbaa !11
  %84 = load i64, ptr %13, align 8, !tbaa !9
  %85 = load ptr, ptr %14, align 8, !tbaa !5
  %86 = load ptr, ptr %15, align 8, !tbaa !5
  %87 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl16sparsesolvegmresEPKNS_12sparsematrixEPKNS_9ae_vectorEldlPS3_PNS_18sparsesolverreportEPNS_8ae_stateE(ptr noundef %19, ptr noundef %81, i64 noundef %82, double noundef %83, i64 noundef %84, ptr noundef %85, ptr noundef %86, ptr noundef %87)
  %88 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %88)
  store i32 1, ptr %21, align 4
  br label %104

89:                                               ; preds = %74
  %90 = load i64, ptr %18, align 8, !tbaa !9
  %91 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl18sparsesolvercreateElPNS_17sparsesolverstateEPNS_8ae_stateE(i64 noundef %90, ptr noundef %20, ptr noundef %91)
  %92 = load i64, ptr %11, align 8, !tbaa !9
  %93 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl24sparsesolversetalgogmresEPNS_17sparsesolverstateElPNS_8ae_stateE(ptr noundef %20, i64 noundef %92, ptr noundef %93)
  %94 = load double, ptr %12, align 8, !tbaa !11
  %95 = load i64, ptr %13, align 8, !tbaa !9
  %96 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl19sparsesolversetcondEPNS_17sparsesolverstateEdlPNS_8ae_stateE(ptr noundef %20, double noundef %94, i64 noundef %95, ptr noundef %96)
  %97 = load ptr, ptr %9, align 8, !tbaa !5
  %98 = load ptr, ptr %10, align 8, !tbaa !5
  %99 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl17sparsesolversolveEPNS_17sparsesolverstateEPKNS_12sparsematrixEPKNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %20, ptr noundef %97, ptr noundef %98, ptr noundef %99)
  %100 = load ptr, ptr %14, align 8, !tbaa !5
  %101 = load ptr, ptr %15, align 8, !tbaa !5
  %102 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl19sparsesolverresultsEPNS_17sparsesolverstateEPNS_9ae_vectorEPNS_18sparsesolverreportEPNS_8ae_stateE(ptr noundef %20, ptr noundef %100, ptr noundef %101, ptr noundef %102)
  %103 = load ptr, ptr %16, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %103)
  store i32 0, ptr %21, align 4
  br label %104

104:                                              ; preds = %89, %78
  call void @llvm.lifetime.end.p0(i64 2360, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 368, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #4
  %105 = load i32, ptr %21, align 4
  switch i32 %105, label %107 [
    i32 0, label %106
    i32 1, label %106
  ]

106:                                              ; preds = %104, %104
  ret void

107:                                              ; preds = %104
  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_impl17sparsesolversolveEPNS_17sparsesolverstateEPKNS_12sparsematrixEPKNS_9ae_vectorEPNS_8ae_stateE(ptr noundef, ptr noundef, 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 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !10, i64 0}
!14 = !{!"_ZTSN11alglib_impl9ae_vectorE", !10, i64 0, !10, i64 8, !15, i64 16, !16, i64 24, !7, i64 56}
!15 = !{!"bool", !7, i64 0}
!16 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, 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"

%"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.369 = external hidden unnamed_addr constant [87 x i8], align 1
@.str.370 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.371 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.372 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.373 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.374 = external hidden unnamed_addr constant [37 x i8], align 1
@.str.375 = external hidden unnamed_addr constant [27 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_impl16sparsesolvegmresEPKNS_12sparsematrixEPKNS_9ae_vectorEldlPS3_PNS_18sparsesolverreportEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, i64 noundef %2, double noundef %3, i64 noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7) local_unnamed_addr #3 {
  %9 = alloca %"struct.alglib_impl::ae_frame", align 8
  %10 = alloca %"struct.alglib_impl::sparsematrix", align 8
  %11 = alloca %"struct.alglib_impl::sparsesolverstate", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 368, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 2360, ptr nonnull %11) #4
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %7, ptr noundef nonnull %9)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(368) %10, i8 0, i64 368, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(2360) %11, i8 0, i64 2360, i1 false)
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %5)
  call void @_ZN11alglib_impl25_sparsesolverreport_clearEPv(ptr noundef %6)
  call void @_ZN11alglib_impl18_sparsematrix_initEPvPNS_8ae_stateEb(ptr noundef nonnull %10, ptr noundef %7, i1 noundef zeroext true)
  call void @_ZN11alglib_impl23_sparsesolverstate_initEPvPNS_8ae_stateEb(ptr noundef nonnull %11, ptr noundef %7, i1 noundef zeroext true)
  %12 = call noundef i64 @_ZN11alglib_impl14sparsegetnrowsEPKNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %0, ptr noundef %7)
  %13 = icmp sgt i64 %12, 0
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %13, ptr noundef nonnull @.str.369, ptr noundef %7)
  %14 = call noundef i64 @_ZN11alglib_impl14sparsegetnrowsEPKNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %0, ptr noundef %7)
  %15 = icmp eq i64 %14, %12
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %15, ptr noundef nonnull @.str.370, ptr noundef %7)
  %16 = call noundef i64 @_ZN11alglib_impl14sparsegetncolsEPKNS_12sparsematrixEPNS_8ae_stateE(ptr noundef %0, ptr noundef %7)
  %17 = icmp eq i64 %16, %12
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %17, ptr noundef nonnull @.str.371, ptr noundef %7)
  %18 = load i64, ptr %1, align 8, !tbaa !5
  %19 = icmp sge i64 %18, %12
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %19, ptr noundef nonnull @.str.372, ptr noundef %7)
  %20 = call noundef zeroext i1 @_ZN11alglib_impl14isfinitevectorEPKNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %1, i64 noundef %12, ptr noundef %7)
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %20, ptr noundef nonnull @.str.373, ptr noundef %7)
  %21 = call noundef zeroext i1 @_ZN11alglib_impl11ae_isfiniteEdPNS_8ae_stateE(double noundef %3, ptr noundef %7)
  br i1 %21, label %22, label %24

22:                                               ; preds = %8
  %23 = call noundef zeroext i1 @_ZN11alglib_impl16ae_fp_greater_eqEdd(double noundef %3, double noundef 0.000000e+00)
  br label %24

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

30:                                               ; preds = %24
  call void @_ZN11alglib_impl18sparsecopytocrsbufEPKNS_12sparsematrixEPS0_PNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %10, ptr noundef %7)
  call void @_ZN11alglib_impl16sparsesolvegmresEPKNS_12sparsematrixEPKNS_9ae_vectorEldlPS3_PNS_18sparsesolverreportEPNS_8ae_stateE(ptr noundef nonnull %10, ptr noundef nonnull %1, i64 noundef %2, double noundef %.0, i64 noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7)
  br label %32

31:                                               ; preds = %24
  call void @_ZN11alglib_impl18sparsesolvercreateElPNS_17sparsesolverstateEPNS_8ae_stateE(i64 noundef %12, ptr noundef nonnull %11, ptr noundef %7)
  call void @_ZN11alglib_impl24sparsesolversetalgogmresEPNS_17sparsesolverstateElPNS_8ae_stateE(ptr noundef nonnull %11, i64 noundef %2, ptr noundef %7)
  call void @_ZN11alglib_impl19sparsesolversetcondEPNS_17sparsesolverstateEdlPNS_8ae_stateE(ptr noundef nonnull %11, double noundef %.0, i64 noundef %4, ptr noundef %7)
  call void @_ZN11alglib_impl17sparsesolversolveEPNS_17sparsesolverstateEPKNS_12sparsematrixEPKNS_9ae_vectorEPNS_8ae_stateE(ptr noundef nonnull %11, ptr noundef %0, ptr noundef nonnull %1, ptr noundef %7)
  call void @_ZN11alglib_impl19sparsesolverresultsEPNS_17sparsesolverstateEPNS_9ae_vectorEPNS_18sparsesolverreportEPNS_8ae_stateE(ptr noundef nonnull %11, ptr noundef %5, ptr noundef %6, ptr noundef %7)
  br label %32

32:                                               ; preds = %31, %30
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %7)
  call void @llvm.lifetime.end.p0(i64 2360, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 368, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %9) #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_impl17sparsesolversolveEPNS_17sparsesolverstateEPKNS_12sparsematrixEPKNS_9ae_vectorEPNS_8ae_stateE(ptr noundef, ptr noundef, 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