; LLVM IR from Dimandragon/non-parametric-dsp :: alglib-cpp/src (linalg)

; 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::eigsubspacestate" = type { i64, i64, i64, i64, double, i64, i64, i8, i8, %"struct.alglib_impl::hqrndstate", i8, %"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_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", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::apbuffers", %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_matrix", i64, i64, i64, %"struct.alglib_impl::rcommstate" }
%"struct.alglib_impl::hqrndstate" = type { i64, i64, i64 }
%"struct.alglib_impl::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.1 }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%union.anon.1 = type { ptr }
%"struct.alglib_impl::apbuffers" = 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", %"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" = type { i64, i64, i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = 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::eigsubspacereport" = type { i64 }

@.str.315 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.316 = external hidden unnamed_addr constant [49 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
declare dso_local void @_ZN11alglib_impl9sparsesmmEPKNS_12sparsematrixEbPKNS_9ae_matrixElPS3_PNS_8ae_stateE(ptr noundef, i1 noundef zeroext, ptr noundef, i64 noundef, ptr noundef, ptr noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl23eigsubspacesolvesparsesEPNS_16eigsubspacestateEPKNS_12sparsematrixEbPNS_9ae_vectorEPNS_9ae_matrixEPNS_17eigsubspacereportEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, i1 noundef zeroext %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) #2 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i8, align 1
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  %20 = zext i1 %2 to i8
  store i8 %20, ptr %10, align 1, !tbaa !9
  store ptr %3, ptr %11, align 8, !tbaa !5
  store ptr %4, ptr %12, align 8, !tbaa !5
  store ptr %5, ptr %13, align 8, !tbaa !5
  store ptr %6, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  %21 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %21)
  %22 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef %22)
  %23 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN11alglib_impl24_eigsubspacereport_clearEPv(ptr noundef %23)
  %24 = load ptr, ptr %8, align 8, !tbaa !5
  %25 = getelementptr inbounds %"struct.alglib_impl::eigsubspacestate", ptr %24, i32 0, i32 10
  %26 = load i8, ptr %25, align 8, !tbaa !11, !range !22, !noundef !23
  %27 = trunc i8 %26 to i1
  %28 = xor i1 %27, true
  %29 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %28, ptr noundef @.str.316, ptr noundef %29)
  %30 = load ptr, ptr %8, align 8, !tbaa !5
  %31 = getelementptr inbounds %"struct.alglib_impl::eigsubspacestate", ptr %30, i32 0, i32 0
  %32 = load i64, ptr %31, align 8, !tbaa !24
  store i64 %32, ptr %15, align 8, !tbaa !25
  %33 = load ptr, ptr %8, align 8, !tbaa !5
  %34 = getelementptr inbounds %"struct.alglib_impl::eigsubspacestate", ptr %33, i32 0, i32 6
  %35 = load i64, ptr %34, align 8, !tbaa !26
  store i64 %35, ptr %19, align 8, !tbaa !25
  %36 = load ptr, ptr %8, align 8, !tbaa !5
  %37 = getelementptr inbounds %"struct.alglib_impl::eigsubspacestate", ptr %36, i32 0, i32 6
  store i64 0, ptr %37, align 8, !tbaa !26
  %38 = load ptr, ptr %8, align 8, !tbaa !5
  %39 = getelementptr inbounds %"struct.alglib_impl::eigsubspacestate", ptr %38, i32 0, i32 33
  %40 = getelementptr inbounds %"struct.alglib_impl::rcommstate", ptr %39, i32 0, i32 1
  %41 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %40, i64 noundef 9, ptr noundef %41)
  %42 = load ptr, ptr %8, align 8, !tbaa !5
  %43 = getelementptr inbounds %"struct.alglib_impl::eigsubspacestate", ptr %42, i32 0, i32 33
  %44 = getelementptr inbounds %"struct.alglib_impl::rcommstate", ptr %43, i32 0, i32 3
  %45 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %44, i64 noundef 2, ptr noundef %45)
  %46 = load ptr, ptr %8, align 8, !tbaa !5
  %47 = getelementptr inbounds %"struct.alglib_impl::eigsubspacestate", ptr %46, i32 0, i32 33
  %48 = getelementptr inbounds %"struct.alglib_impl::rcommstate", ptr %47, i32 0, i32 0
  store i32 -1, ptr %48, align 8, !tbaa !27
  %49 = load ptr, ptr %8, align 8, !tbaa !5
  %50 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_implL16evd_clearrfieldsEPNS_16eigsubspacestateEPNS_8ae_stateE(ptr noundef %49, ptr noundef %50)
  br label %51

51:                                               ; preds = %55, %7
  %52 = load ptr, ptr %8, align 8, !tbaa !5
  %53 = load ptr, ptr %14, align 8, !tbaa !5
  %54 = call noundef zeroext i1 @_ZN11alglib_impl20eigsubspaceiterationEPNS_16eigsubspacestateEPNS_8ae_stateE(ptr noundef %52, ptr noundef %53)
  br i1 %54, label %55, label %77

55:                                               ; preds = %51
  %56 = load ptr, ptr %8, align 8, !tbaa !5
  %57 = getelementptr inbounds %"struct.alglib_impl::eigsubspacestate", ptr %56, i32 0, i32 30
  %58 = load i64, ptr %57, align 8, !tbaa !28
  %59 = icmp eq i64 %58, 0
  %60 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %59, ptr noundef @.str.315, ptr noundef %60)
  %61 = load ptr, ptr %8, align 8, !tbaa !5
  %62 = getelementptr inbounds %"struct.alglib_impl::eigsubspacestate", ptr %61, i32 0, i32 31
  %63 = load i64, ptr %62, align 8, !tbaa !29
  %64 = icmp sgt i64 %63, 0
  %65 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %64, ptr noundef @.str.315, ptr noundef %65)
  %66 = load ptr, ptr %9, align 8, !tbaa !5
  %67 = load i8, ptr %10, align 1, !tbaa !9, !range !22, !noundef !23
  %68 = trunc i8 %67 to i1
  %69 = load ptr, ptr %8, align 8, !tbaa !5
  %70 = getelementptr inbounds %"struct.alglib_impl::eigsubspacestate", ptr %69, i32 0, i32 28
  %71 = load ptr, ptr %8, align 8, !tbaa !5
  %72 = getelementptr inbounds %"struct.alglib_impl::eigsubspacestate", ptr %71, i32 0, i32 31
  %73 = load i64, ptr %72, align 8, !tbaa !29
  %74 = load ptr, ptr %8, align 8, !tbaa !5
  %75 = getelementptr inbounds %"struct.alglib_impl::eigsubspacestate", ptr %74, i32 0, i32 29
  %76 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl9sparsesmmEPKNS_12sparsematrixEbPKNS_9ae_matrixElPS3_PNS_8ae_stateE(ptr noundef %66, i1 noundef zeroext %68, ptr noundef %70, i64 noundef %73, ptr noundef %75, ptr noundef %76)
  br label %51, !llvm.loop !30

77:                                               ; preds = %51
  %78 = load i64, ptr %19, align 8, !tbaa !25
  %79 = load ptr, ptr %8, align 8, !tbaa !5
  %80 = getelementptr inbounds %"struct.alglib_impl::eigsubspacestate", ptr %79, i32 0, i32 6
  store i64 %78, ptr %80, align 8, !tbaa !26
  %81 = load ptr, ptr %8, align 8, !tbaa !5
  %82 = getelementptr inbounds %"struct.alglib_impl::eigsubspacestate", ptr %81, i32 0, i32 1
  %83 = load i64, ptr %82, align 8, !tbaa !32
  store i64 %83, ptr %18, align 8, !tbaa !25
  %84 = load ptr, ptr %11, align 8, !tbaa !5
  %85 = load i64, ptr %18, align 8, !tbaa !25
  %86 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %84, i64 noundef %85, ptr noundef %86)
  %87 = load ptr, ptr %12, align 8, !tbaa !5
  %88 = load i64, ptr %15, align 8, !tbaa !25
  %89 = load i64, ptr %18, align 8, !tbaa !25
  %90 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %87, i64 noundef %88, i64 noundef %89, ptr noundef %90)
  store i64 0, ptr %16, align 8, !tbaa !25
  br label %91

91:                                               ; preds = %109, %77
  %92 = load i64, ptr %16, align 8, !tbaa !25
  %93 = load i64, ptr %18, align 8, !tbaa !25
  %94 = sub nsw i64 %93, 1
  %95 = icmp sle i64 %92, %94
  br i1 %95, label %96, label %112

96:                                               ; preds = %91
  %97 = load ptr, ptr %8, align 8, !tbaa !5
  %98 = getelementptr inbounds %"struct.alglib_impl::eigsubspacestate", ptr %97, i32 0, i32 21
  %99 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %98, i32 0, i32 4
  %100 = load ptr, ptr %99, align 8, !tbaa !33
  %101 = load i64, ptr %16, align 8, !tbaa !25
  %102 = getelementptr inbounds double, ptr %100, i64 %101
  %103 = load double, ptr %102, align 8, !tbaa !34
  %104 = load ptr, ptr %11, align 8, !tbaa !5
  %105 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %104, i32 0, i32 4
  %106 = load ptr, ptr %105, align 8, !tbaa !33
  %107 = load i64, ptr %16, align 8, !tbaa !25
  %108 = getelementptr inbounds double, ptr %106, i64 %107
  store double %103, ptr %108, align 8, !tbaa !34
  br label %109

109:                                              ; preds = %96
  %110 = load i64, ptr %16, align 8, !tbaa !25
  %111 = add nsw i64 %110, 1
  store i64 %111, ptr %16, align 8, !tbaa !25
  br label %91, !llvm.loop !35

112:                                              ; preds = %91
  store i64 0, ptr %16, align 8, !tbaa !25
  br label %113

113:                                              ; preds = %147, %112
  %114 = load i64, ptr %16, align 8, !tbaa !25
  %115 = load i64, ptr %15, align 8, !tbaa !25
  %116 = sub nsw i64 %115, 1
  %117 = icmp sle i64 %114, %116
  br i1 %117, label %118, label %150

118:                                              ; preds = %113
  store i64 0, ptr %17, align 8, !tbaa !25
  br label %119

119:                                              ; preds = %143, %118
  %120 = load i64, ptr %17, align 8, !tbaa !25
  %121 = load i64, ptr %18, align 8, !tbaa !25
  %122 = sub nsw i64 %121, 1
  %123 = icmp sle i64 %120, %122
  br i1 %123, label %124, label %146

124:                                              ; preds = %119
  %125 = load ptr, ptr %8, align 8, !tbaa !5
  %126 = getelementptr inbounds %"struct.alglib_impl::eigsubspacestate", ptr %125, i32 0, i32 19
  %127 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %126, i32 0, i32 6
  %128 = load ptr, ptr %127, align 8, !tbaa !33
  %129 = load i64, ptr %16, align 8, !tbaa !25
  %130 = getelementptr inbounds ptr, ptr %128, i64 %129
  %131 = load ptr, ptr %130, align 8, !tbaa !5
  %132 = load i64, ptr %17, align 8, !tbaa !25
  %133 = getelementptr inbounds double, ptr %131, i64 %132
  %134 = load double, ptr %133, align 8, !tbaa !34
  %135 = load ptr, ptr %12, align 8, !tbaa !5
  %136 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %135, i32 0, i32 6
  %137 = load ptr, ptr %136, align 8, !tbaa !33
  %138 = load i64, ptr %16, align 8, !tbaa !25
  %139 = getelementptr inbounds ptr, ptr %137, i64 %138
  %140 = load ptr, ptr %139, align 8, !tbaa !5
  %141 = load i64, ptr %17, align 8, !tbaa !25
  %142 = getelementptr inbounds double, ptr %140, i64 %141
  store double %134, ptr %142, align 8, !tbaa !34
  br label %143

143:                                              ; preds = %124
  %144 = load i64, ptr %17, align 8, !tbaa !25
  %145 = add nsw i64 %144, 1
  store i64 %145, ptr %17, align 8, !tbaa !25
  br label %119, !llvm.loop !36

146:                                              ; preds = %119
  br label %147

147:                                              ; preds = %146
  %148 = load i64, ptr %16, align 8, !tbaa !25
  %149 = add nsw i64 %148, 1
  store i64 %149, ptr %16, align 8, !tbaa !25
  br label %113, !llvm.loop !37

150:                                              ; preds = %113
  %151 = load ptr, ptr %8, align 8, !tbaa !5
  %152 = getelementptr inbounds %"struct.alglib_impl::eigsubspacestate", ptr %151, i32 0, i32 32
  %153 = load i64, ptr %152, align 8, !tbaa !38
  %154 = load ptr, ptr %13, align 8, !tbaa !5
  %155 = getelementptr inbounds %"struct.alglib_impl::eigsubspacereport", ptr %154, i32 0, i32 0
  store i64 %153, ptr %155, align 8, !tbaa !39
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  ret void
}

declare void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef) #1

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

declare void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #1

declare void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef) #1

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZN11alglib_implL16evd_clearrfieldsEPNS_16eigsubspacestateEPNS_8ae_stateE(ptr noundef, ptr noundef) #3

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

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

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 = { 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" }
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, !10, i64 88}
!12 = !{!"_ZTSN11alglib_impl16eigsubspacestateE", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24, !14, i64 32, !13, i64 40, !13, i64 48, !10, i64 56, !10, i64 57, !15, i64 64, !10, i64 88, !16, i64 96, !18, i64 160, !18, i64 240, !18, i64 320, !18, i64 400, !18, i64 480, !18, i64 560, !18, i64 640, !18, i64 720, !18, i64 800, !16, i64 880, !16, i64 944, !16, i64 1008, !16, i64 1072, !16, i64 1136, !16, i64 1200, !19, i64 1264, !18, i64 2000, !18, i64 2080, !13, i64 2160, !13, i64 2168, !13, i64 2176, !20, i64 2184}
!13 = !{!"long", !7, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{!"_ZTSN11alglib_impl10hqrndstateE", !13, i64 0, !13, i64 8, !13, i64 16}
!16 = !{!"_ZTSN11alglib_impl9ae_vectorE", !13, i64 0, !13, 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 = !{!"_ZTSN11alglib_impl9ae_matrixE", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24, !10, i64 32, !17, i64 40, !7, i64 72}
!19 = !{!"_ZTSN11alglib_impl9apbuffersE", !16, i64 0, !16, i64 64, !16, i64 128, !16, i64 192, !16, i64 256, !16, i64 320, !16, i64 384, !16, i64 448, !16, i64 512, !18, i64 576, !18, i64 656}
!20 = !{!"_ZTSN11alglib_impl10rcommstateE", !21, i64 0, !16, i64 8, !16, i64 72, !16, i64 136, !16, i64 200}
!21 = !{!"int", !7, i64 0}
!22 = !{i8 0, i8 2}
!23 = !{}
!24 = !{!12, !13, i64 0}
!25 = !{!13, !13, i64 0}
!26 = !{!12, !13, i64 48}
!27 = !{!12, !21, i64 2184}
!28 = !{!12, !13, i64 2160}
!29 = !{!12, !13, i64 2168}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = !{!12, !13, i64 8}
!33 = !{!7, !7, i64 0}
!34 = !{!14, !14, i64 0}
!35 = distinct !{!35, !31}
!36 = distinct !{!36, !31}
!37 = distinct !{!37, !31}
!38 = !{!12, !13, i64 2176}
!39 = !{!40, !13, i64 0}
!40 = !{!"_ZTSN11alglib_impl17eigsubspacereportE", !13, i64 0}


; 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.315 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.316 = 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
declare dso_local void @_ZN11alglib_impl9sparsesmmEPKNS_12sparsematrixEbPKNS_9ae_matrixElPS3_PNS_8ae_stateE(ptr noundef, i1 noundef zeroext, ptr noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11alglib_impl23eigsubspacesolvesparsesEPNS_16eigsubspacestateEPKNS_12sparsematrixEbPNS_9ae_vectorEPNS_9ae_matrixEPNS_17eigsubspacereportEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, i1 noundef zeroext %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) local_unnamed_addr #1 {
  tail call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %3)
  tail call void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef %4)
  tail call void @_ZN11alglib_impl24_eigsubspacereport_clearEPv(ptr noundef %5)
  %8 = getelementptr inbounds i8, ptr %0, i64 88
  %9 = load i8, ptr %8, align 8, !tbaa !5, !range !20, !noundef !21
  %10 = trunc nuw i8 %9 to i1
  %11 = xor i1 %10, true
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %11, ptr noundef nonnull @.str.316, ptr noundef %6)
  %12 = load i64, ptr %0, align 8, !tbaa !22
  %13 = getelementptr inbounds i8, ptr %0, i64 48
  %14 = load i64, ptr %13, align 8, !tbaa !23
  store i64 0, ptr %13, align 8, !tbaa !23
  %15 = getelementptr inbounds i8, ptr %0, i64 2184
  %16 = getelementptr inbounds i8, ptr %0, i64 2192
  tail call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %16, i64 noundef 9, ptr noundef %6)
  %17 = getelementptr inbounds i8, ptr %0, i64 2320
  tail call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %17, i64 noundef 2, ptr noundef %6)
  store i32 -1, ptr %15, align 8, !tbaa !24
  tail call void @_ZN11alglib_implL16evd_clearrfieldsEPNS_16eigsubspacestateEPNS_8ae_stateE(ptr noundef nonnull %0, ptr noundef %6)
  %18 = tail call noundef zeroext i1 @_ZN11alglib_impl20eigsubspaceiterationEPNS_16eigsubspacestateEPNS_8ae_stateE(ptr noundef nonnull %0, ptr noundef %6)
  br i1 %18, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %7
  %19 = getelementptr inbounds i8, ptr %0, i64 2160
  %20 = getelementptr inbounds i8, ptr %0, i64 2168
  %21 = getelementptr inbounds i8, ptr %0, i64 2000
  %22 = getelementptr inbounds i8, ptr %0, i64 2080
  br label %23

23:                                               ; preds = %.lr.ph, %23
  %24 = load i64, ptr %19, align 8, !tbaa !25
  %25 = icmp eq i64 %24, 0
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %25, ptr noundef nonnull @.str.315, ptr noundef %6)
  %26 = load i64, ptr %20, align 8, !tbaa !26
  %27 = icmp sgt i64 %26, 0
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %27, ptr noundef nonnull @.str.315, ptr noundef %6)
  %28 = load i64, ptr %20, align 8, !tbaa !26
  tail call void @_ZN11alglib_impl9sparsesmmEPKNS_12sparsematrixEbPKNS_9ae_matrixElPS3_PNS_8ae_stateE(ptr noundef %1, i1 noundef zeroext %2, ptr noundef nonnull %21, i64 noundef %28, ptr noundef nonnull %22, ptr noundef %6)
  %29 = tail call noundef zeroext i1 @_ZN11alglib_impl20eigsubspaceiterationEPNS_16eigsubspacestateEPNS_8ae_stateE(ptr noundef nonnull %0, ptr noundef %6)
  br i1 %29, label %23, label %._crit_edge, !llvm.loop !27

._crit_edge:                                      ; preds = %23, %7
  store i64 %14, ptr %13, align 8, !tbaa !23
  %30 = getelementptr inbounds i8, ptr %0, i64 8
  %31 = load i64, ptr %30, align 8, !tbaa !29
  tail call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %3, i64 noundef %31, ptr noundef %6)
  tail call void @_ZN11alglib_impl20ae_matrix_set_lengthEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %4, i64 noundef %12, i64 noundef %31, ptr noundef %6)
  %.not.not62 = icmp sgt i64 %31, 0
  br i1 %.not.not62, label %.lr.ph65, label %._crit_edge72

.lr.ph65:                                         ; preds = %._crit_edge
  %32 = getelementptr inbounds i8, ptr %0, i64 936
  %33 = getelementptr inbounds i8, ptr %3, i64 56
  %xtraiter = and i64 %31, 3
  %34 = icmp ult i64 %31, 4
  br i1 %34, label %.preheader61.unr-lcssa, label %.lr.ph65.new

.lr.ph65.new:                                     ; preds = %.lr.ph65
  %unroll_iter = and i64 %31, 9223372036854775804
  br label %74

.preheader61.unr-lcssa:                           ; preds = %74, %.lr.ph65
  %.063.unr = phi i64 [ 0, %.lr.ph65 ], [ %98, %74 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.preheader61, label %.epil.preheader

.epil.preheader:                                  ; preds = %.preheader61.unr-lcssa, %.epil.preheader
  %.063.epil = phi i64 [ %40, %.epil.preheader ], [ %.063.unr, %.preheader61.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %.preheader61.unr-lcssa ]
  %35 = load ptr, ptr %32, align 8, !tbaa !30
  %36 = getelementptr inbounds double, ptr %35, i64 %.063.epil
  %37 = load double, ptr %36, align 8, !tbaa !31
  %38 = load ptr, ptr %33, align 8, !tbaa !30
  %39 = getelementptr inbounds double, ptr %38, i64 %.063.epil
  store double %37, ptr %39, align 8, !tbaa !31
  %40 = add nuw nsw i64 %.063.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.preheader61, label %.epil.preheader, !llvm.loop !32

.preheader61:                                     ; preds = %.epil.preheader, %.preheader61.unr-lcssa
  %.not.not5970 = icmp sgt i64 %12, 0
  br i1 %.not.not5970, label %.preheader.lr.ph, label %._crit_edge72

.preheader.lr.ph:                                 ; preds = %.preheader61
  %41 = getelementptr inbounds i8, ptr %0, i64 792
  %42 = getelementptr inbounds i8, ptr %4, i64 72
  br i1 %.not.not62, label %.preheader.us.preheader, label %._crit_edge72

.preheader.us.preheader:                          ; preds = %.preheader.lr.ph
  %xtraiter78 = and i64 %31, 1
  %43 = icmp eq i64 %31, 1
  %unroll_iter81 = and i64 %31, 9223372036854775806
  %lcmp.mod80.not = icmp eq i64 %xtraiter78, 0
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge69.us
  %.171.us = phi i64 [ %73, %._crit_edge69.us ], [ 0, %.preheader.us.preheader ]
  br i1 %43, label %._crit_edge69.us.unr-lcssa, label %.preheader.us.new

.preheader.us.new:                                ; preds = %.preheader.us, %.preheader.us.new
  %.05767.us = phi i64 [ %63, %.preheader.us.new ], [ 0, %.preheader.us ]
  %niter82 = phi i64 [ %niter82.next.1, %.preheader.us.new ], [ 0, %.preheader.us ]
  %44 = load ptr, ptr %41, align 8, !tbaa !30
  %45 = getelementptr inbounds ptr, ptr %44, i64 %.171.us
  %46 = load ptr, ptr %45, align 8, !tbaa !34
  %47 = getelementptr inbounds double, ptr %46, i64 %.05767.us
  %48 = load double, ptr %47, align 8, !tbaa !31
  %49 = load ptr, ptr %42, align 8, !tbaa !30
  %50 = getelementptr inbounds ptr, ptr %49, i64 %.171.us
  %51 = load ptr, ptr %50, align 8, !tbaa !34
  %52 = getelementptr inbounds double, ptr %51, i64 %.05767.us
  store double %48, ptr %52, align 8, !tbaa !31
  %53 = or disjoint i64 %.05767.us, 1
  %54 = load ptr, ptr %41, align 8, !tbaa !30
  %55 = getelementptr inbounds ptr, ptr %54, i64 %.171.us
  %56 = load ptr, ptr %55, align 8, !tbaa !34
  %57 = getelementptr inbounds double, ptr %56, i64 %53
  %58 = load double, ptr %57, align 8, !tbaa !31
  %59 = load ptr, ptr %42, align 8, !tbaa !30
  %60 = getelementptr inbounds ptr, ptr %59, i64 %.171.us
  %61 = load ptr, ptr %60, align 8, !tbaa !34
  %62 = getelementptr inbounds double, ptr %61, i64 %53
  store double %58, ptr %62, align 8, !tbaa !31
  %63 = add nuw nsw i64 %.05767.us, 2
  %niter82.next.1 = add i64 %niter82, 2
  %niter82.ncmp.1 = icmp eq i64 %niter82.next.1, %unroll_iter81
  br i1 %niter82.ncmp.1, label %._crit_edge69.us.unr-lcssa, label %.preheader.us.new, !llvm.loop !35

._crit_edge69.us.unr-lcssa:                       ; preds = %.preheader.us.new, %.preheader.us
  %.05767.us.unr = phi i64 [ 0, %.preheader.us ], [ %63, %.preheader.us.new ]
  br i1 %lcmp.mod80.not, label %._crit_edge69.us, label %._crit_edge69.us.epilog-lcssa

._crit_edge69.us.epilog-lcssa:                    ; preds = %._crit_edge69.us.unr-lcssa
  %64 = load ptr, ptr %41, align 8, !tbaa !30
  %65 = getelementptr inbounds ptr, ptr %64, i64 %.171.us
  %66 = load ptr, ptr %65, align 8, !tbaa !34
  %67 = getelementptr inbounds double, ptr %66, i64 %.05767.us.unr
  %68 = load double, ptr %67, align 8, !tbaa !31
  %69 = load ptr, ptr %42, align 8, !tbaa !30
  %70 = getelementptr inbounds ptr, ptr %69, i64 %.171.us
  %71 = load ptr, ptr %70, align 8, !tbaa !34
  %72 = getelementptr inbounds double, ptr %71, i64 %.05767.us.unr
  store double %68, ptr %72, align 8, !tbaa !31
  br label %._crit_edge69.us

._crit_edge69.us:                                 ; preds = %._crit_edge69.us.unr-lcssa, %._crit_edge69.us.epilog-lcssa
  %73 = add nuw nsw i64 %.171.us, 1
  %exitcond75.not = icmp eq i64 %73, %12
  br i1 %exitcond75.not, label %._crit_edge72, label %.preheader.us, !llvm.loop !36

74:                                               ; preds = %74, %.lr.ph65.new
  %.063 = phi i64 [ 0, %.lr.ph65.new ], [ %98, %74 ]
  %niter = phi i64 [ 0, %.lr.ph65.new ], [ %niter.next.3, %74 ]
  %75 = load ptr, ptr %32, align 8, !tbaa !30
  %76 = getelementptr inbounds double, ptr %75, i64 %.063
  %77 = load double, ptr %76, align 8, !tbaa !31
  %78 = load ptr, ptr %33, align 8, !tbaa !30
  %79 = getelementptr inbounds double, ptr %78, i64 %.063
  store double %77, ptr %79, align 8, !tbaa !31
  %80 = or disjoint i64 %.063, 1
  %81 = load ptr, ptr %32, align 8, !tbaa !30
  %82 = getelementptr inbounds double, ptr %81, i64 %80
  %83 = load double, ptr %82, align 8, !tbaa !31
  %84 = load ptr, ptr %33, align 8, !tbaa !30
  %85 = getelementptr inbounds double, ptr %84, i64 %80
  store double %83, ptr %85, align 8, !tbaa !31
  %86 = or disjoint i64 %.063, 2
  %87 = load ptr, ptr %32, align 8, !tbaa !30
  %88 = getelementptr inbounds double, ptr %87, i64 %86
  %89 = load double, ptr %88, align 8, !tbaa !31
  %90 = load ptr, ptr %33, align 8, !tbaa !30
  %91 = getelementptr inbounds double, ptr %90, i64 %86
  store double %89, ptr %91, align 8, !tbaa !31
  %92 = or disjoint i64 %.063, 3
  %93 = load ptr, ptr %32, align 8, !tbaa !30
  %94 = getelementptr inbounds double, ptr %93, i64 %92
  %95 = load double, ptr %94, align 8, !tbaa !31
  %96 = load ptr, ptr %33, align 8, !tbaa !30
  %97 = getelementptr inbounds double, ptr %96, i64 %92
  store double %95, ptr %97, align 8, !tbaa !31
  %98 = add nuw nsw i64 %.063, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.preheader61.unr-lcssa, label %74, !llvm.loop !37

._crit_edge72:                                    ; preds = %._crit_edge69.us, %._crit_edge, %.preheader.lr.ph, %.preheader61
  %99 = getelementptr inbounds i8, ptr %0, i64 2176
  %100 = load i64, ptr %99, align 8, !tbaa !38
  store i64 %100, ptr %5, align 8, !tbaa !39
  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

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

declare void @_ZN11alglib_impl15ae_matrix_clearEPNS_9ae_matrixE(ptr noundef) local_unnamed_addr #0

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

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

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

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 88}
!6 = !{!"_ZTSN11alglib_impl16eigsubspacestateE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !7, i64 40, !7, i64 48, !11, i64 56, !11, i64 57, !12, i64 64, !11, i64 88, !13, i64 96, !16, i64 160, !16, i64 240, !16, i64 320, !16, i64 400, !16, i64 480, !16, i64 560, !16, i64 640, !16, i64 720, !16, i64 800, !13, i64 880, !13, i64 944, !13, i64 1008, !13, i64 1072, !13, i64 1136, !13, i64 1200, !17, i64 1264, !16, i64 2000, !16, i64 2080, !7, i64 2160, !7, i64 2168, !7, i64 2176, !18, i64 2184}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!"bool", !8, i64 0}
!12 = !{!"_ZTSN11alglib_impl10hqrndstateE", !7, i64 0, !7, i64 8, !7, i64 16}
!13 = !{!"_ZTSN11alglib_impl9ae_vectorE", !7, i64 0, !7, i64 8, !11, i64 16, !14, i64 24, !8, i64 56}
!14 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !15, i64 0, !15, i64 8, !15, i64 16, !15, i64 24}
!15 = !{!"any pointer", !8, i64 0}
!16 = !{!"_ZTSN11alglib_impl9ae_matrixE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !11, i64 32, !14, i64 40, !8, i64 72}
!17 = !{!"_ZTSN11alglib_impl9apbuffersE", !13, i64 0, !13, i64 64, !13, i64 128, !13, i64 192, !13, i64 256, !13, i64 320, !13, i64 384, !13, i64 448, !13, i64 512, !16, i64 576, !16, i64 656}
!18 = !{!"_ZTSN11alglib_impl10rcommstateE", !19, i64 0, !13, i64 8, !13, i64 72, !13, i64 136, !13, i64 200}
!19 = !{!"int", !8, i64 0}
!20 = !{i8 0, i8 2}
!21 = !{}
!22 = !{!6, !7, i64 0}
!23 = !{!6, !7, i64 48}
!24 = !{!6, !19, i64 2184}
!25 = !{!6, !7, i64 2160}
!26 = !{!6, !7, i64 2168}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = !{!6, !7, i64 8}
!30 = !{!8, !8, i64 0}
!31 = !{!10, !10, i64 0}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.unroll.disable"}
!34 = !{!15, !15, i64 0}
!35 = distinct !{!35, !28}
!36 = distinct !{!36, !28}
!37 = distinct !{!37, !28}
!38 = !{!6, !7, i64 2176}
!39 = !{!40, !7, i64 0}
!40 = !{!"_ZTSN11alglib_impl17eigsubspacereportE", !7, i64 0}


; Effective O3 passes: ADCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass