; LLVM IR from venumb/ZSPACE :: cpp/depends/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::ae_frame" = type { %"struct.alglib_impl::ae_dyn_block" }
%"struct.alglib_impl::ae_dyn_block" = type { ptr, ptr, ptr, ptr }
%"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::ae_matrix" = type { i64, i64, i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.1 }
%union.anon.1 = type { ptr }

@.str.331 = external hidden unnamed_addr constant [32 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
define dso_local void @_ZN11alglib_impl17rmatrixhessenbergEPNS_9ae_matrixElPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, ptr noundef %2, ptr noundef %3) #3 {
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"struct.alglib_impl::ae_frame", align 8
  %10 = alloca i64, align 8
  %11 = alloca double, align 8
  %12 = alloca %"struct.alglib_impl::ae_vector", align 8
  %13 = alloca %"struct.alglib_impl::ae_vector", align 8
  %14 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i64 %1, ptr %6, align 8, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %13) #4
  %15 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %15, ptr noundef %9)
  call void @llvm.memset.p0.i64(ptr align 8 %12, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %13, i8 0, i64 64, i1 false)
  %16 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %16)
  %17 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %12, i64 noundef 0, i64 noundef 3, ptr noundef %17, i1 noundef zeroext true)
  %18 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %13, i64 noundef 0, i64 noundef 3, ptr noundef %18, i1 noundef zeroext true)
  %19 = load i64, ptr %6, align 8, !tbaa !9
  %20 = icmp sge i64 %19, 0
  %21 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %20, ptr noundef @.str.331, ptr noundef %21)
  %22 = load i64, ptr %6, align 8, !tbaa !9
  %23 = icmp sle i64 %22, 1
  br i1 %23, label %24, label %26

24:                                               ; preds = %4
  %25 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %25)
  store i32 1, ptr %14, align 4
  br label %132

26:                                               ; preds = %4
  %27 = load ptr, ptr %7, align 8, !tbaa !5
  %28 = load i64, ptr %6, align 8, !tbaa !9
  %29 = sub nsw i64 %28, 2
  %30 = add nsw i64 %29, 1
  %31 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %27, i64 noundef %30, ptr noundef %31)
  %32 = load i64, ptr %6, align 8, !tbaa !9
  %33 = add nsw i64 %32, 1
  %34 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %12, i64 noundef %33, ptr noundef %34)
  %35 = load i64, ptr %6, align 8, !tbaa !9
  %36 = sub nsw i64 %35, 1
  %37 = add nsw i64 %36, 1
  %38 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %13, i64 noundef %37, ptr noundef %38)
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  %40 = load i64, ptr %6, align 8, !tbaa !9
  %41 = load ptr, ptr %7, align 8, !tbaa !5
  %42 = load ptr, ptr %8, align 8, !tbaa !5
  %43 = call noundef zeroext i1 @_ZN11alglib_impl20rmatrixhessenbergmklEPNS_9ae_matrixElPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %39, i64 noundef %40, ptr noundef %41, ptr noundef %42)
  br i1 %43, label %44, label %46

44:                                               ; preds = %26
  %45 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %45)
  store i32 1, ptr %14, align 4
  br label %132

46:                                               ; preds = %26
  store i64 0, ptr %10, align 8, !tbaa !9
  br label %47

47:                                               ; preds = %127, %46
  %48 = load i64, ptr %10, align 8, !tbaa !9
  %49 = load i64, ptr %6, align 8, !tbaa !9
  %50 = sub nsw i64 %49, 2
  %51 = icmp sle i64 %48, %50
  br i1 %51, label %52, label %130

52:                                               ; preds = %47
  %53 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %12, i32 0, i32 4
  %54 = load ptr, ptr %53, align 8, !tbaa !11
  %55 = getelementptr inbounds double, ptr %54, i64 1
  %56 = load ptr, ptr %5, align 8, !tbaa !5
  %57 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %56, i32 0, i32 6
  %58 = load ptr, ptr %57, align 8, !tbaa !11
  %59 = load i64, ptr %10, align 8, !tbaa !9
  %60 = add nsw i64 %59, 1
  %61 = getelementptr inbounds ptr, ptr %58, i64 %60
  %62 = load ptr, ptr %61, align 8, !tbaa !5
  %63 = load i64, ptr %10, align 8, !tbaa !9
  %64 = getelementptr inbounds double, ptr %62, i64 %63
  %65 = load ptr, ptr %5, align 8, !tbaa !5
  %66 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %65, i32 0, i32 2
  %67 = load i64, ptr %66, align 8, !tbaa !12
  %68 = load i64, ptr %6, align 8, !tbaa !9
  %69 = load i64, ptr %10, align 8, !tbaa !9
  %70 = sub nsw i64 %68, %69
  %71 = sub nsw i64 %70, 1
  %72 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 1, i64 noundef %71)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %55, i64 noundef 1, ptr noundef %64, i64 noundef %67, i64 noundef %72)
  %73 = load i64, ptr %6, align 8, !tbaa !9
  %74 = load i64, ptr %10, align 8, !tbaa !9
  %75 = sub nsw i64 %73, %74
  %76 = sub nsw i64 %75, 1
  %77 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl18generatereflectionEPNS_9ae_vectorElPdPNS_8ae_stateE(ptr noundef %12, i64 noundef %76, ptr noundef %11, ptr noundef %77)
  %78 = load ptr, ptr %5, align 8, !tbaa !5
  %79 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %78, i32 0, i32 6
  %80 = load ptr, ptr %79, align 8, !tbaa !11
  %81 = load i64, ptr %10, align 8, !tbaa !9
  %82 = add nsw i64 %81, 1
  %83 = getelementptr inbounds ptr, ptr %80, i64 %82
  %84 = load ptr, ptr %83, align 8, !tbaa !5
  %85 = load i64, ptr %10, align 8, !tbaa !9
  %86 = getelementptr inbounds double, ptr %84, i64 %85
  %87 = load ptr, ptr %5, align 8, !tbaa !5
  %88 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %87, i32 0, i32 2
  %89 = load i64, ptr %88, align 8, !tbaa !12
  %90 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %12, i32 0, i32 4
  %91 = load ptr, ptr %90, align 8, !tbaa !11
  %92 = getelementptr inbounds double, ptr %91, i64 1
  %93 = load i64, ptr %10, align 8, !tbaa !9
  %94 = add nsw i64 %93, 1
  %95 = load i64, ptr %6, align 8, !tbaa !9
  %96 = sub nsw i64 %95, 1
  %97 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %94, i64 noundef %96)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %86, i64 noundef %89, ptr noundef %92, i64 noundef 1, i64 noundef %97)
  %98 = load double, ptr %11, align 8, !tbaa !16
  %99 = load ptr, ptr %7, align 8, !tbaa !5
  %100 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %99, i32 0, i32 4
  %101 = load ptr, ptr %100, align 8, !tbaa !11
  %102 = load i64, ptr %10, align 8, !tbaa !9
  %103 = getelementptr inbounds double, ptr %101, i64 %102
  store double %98, ptr %103, align 8, !tbaa !16
  %104 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %12, i32 0, i32 4
  %105 = load ptr, ptr %104, align 8, !tbaa !11
  %106 = getelementptr inbounds double, ptr %105, i64 1
  store double 1.000000e+00, ptr %106, align 8, !tbaa !16
  %107 = load ptr, ptr %5, align 8, !tbaa !5
  %108 = load double, ptr %11, align 8, !tbaa !16
  %109 = load i64, ptr %6, align 8, !tbaa !9
  %110 = sub nsw i64 %109, 1
  %111 = load i64, ptr %10, align 8, !tbaa !9
  %112 = add nsw i64 %111, 1
  %113 = load i64, ptr %6, align 8, !tbaa !9
  %114 = sub nsw i64 %113, 1
  %115 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl27applyreflectionfromtherightEPNS_9ae_matrixEdPNS_9ae_vectorEllllS3_PNS_8ae_stateE(ptr noundef %107, double noundef %108, ptr noundef %12, i64 noundef 0, i64 noundef %110, i64 noundef %112, i64 noundef %114, ptr noundef %13, ptr noundef %115)
  %116 = load ptr, ptr %5, align 8, !tbaa !5
  %117 = load double, ptr %11, align 8, !tbaa !16
  %118 = load i64, ptr %10, align 8, !tbaa !9
  %119 = add nsw i64 %118, 1
  %120 = load i64, ptr %6, align 8, !tbaa !9
  %121 = sub nsw i64 %120, 1
  %122 = load i64, ptr %10, align 8, !tbaa !9
  %123 = add nsw i64 %122, 1
  %124 = load i64, ptr %6, align 8, !tbaa !9
  %125 = sub nsw i64 %124, 1
  %126 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl26applyreflectionfromtheleftEPNS_9ae_matrixEdPNS_9ae_vectorEllllS3_PNS_8ae_stateE(ptr noundef %116, double noundef %117, ptr noundef %12, i64 noundef %119, i64 noundef %121, i64 noundef %123, i64 noundef %125, ptr noundef %13, ptr noundef %126)
  br label %127

127:                                              ; preds = %52
  %128 = load i64, ptr %10, align 8, !tbaa !9
  %129 = add nsw i64 %128, 1
  store i64 %129, ptr %10, align 8, !tbaa !9
  br label %47, !llvm.loop !18

130:                                              ; preds = %47
  %131 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %131)
  store i32 0, ptr %14, align 4
  br label %132

132:                                              ; preds = %130, %44, %24
  call void @llvm.lifetime.end.p0(i64 64, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %9) #4
  %133 = load i32, ptr %14, align 4
  switch i32 %133, label %135 [
    i32 0, label %134
    i32 1, label %134
  ]

134:                                              ; preds = %132, %132
  ret void

135:                                              ; preds = %132
  unreachable
}

declare noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef, i64 noundef) #2

declare void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef, ptr noundef) #2

declare void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef, i64 noundef, i64 noundef, ptr noundef, i1 noundef zeroext) #2

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #2

declare void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef) #2

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

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

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

declare void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef) #2

declare noundef zeroext i1 @_ZN11alglib_impl20rmatrixhessenbergmklEPNS_9ae_matrixElPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef, i64 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 = !{!7, !7, i64 0}
!12 = !{!13, !10, i64 16}
!13 = !{!"_ZTSN11alglib_impl9ae_matrixE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !14, i64 32, !15, i64 40, !7, i64 72}
!14 = !{!"bool", !7, i64 0}
!15 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!16 = !{!17, !17, i64 0}
!17 = !{!"double", !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"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::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.0 }
%union.anon.0 = type { ptr }

@.str.331 = external hidden unnamed_addr constant [32 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
define dso_local void @_ZN11alglib_impl17rmatrixhessenbergEPNS_9ae_matrixElPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #3 {
  %5 = alloca %"struct.alglib_impl::ae_frame", align 8
  %6 = alloca double, align 8
  %7 = alloca %"struct.alglib_impl::ae_vector", align 8
  %8 = alloca %"struct.alglib_impl::ae_vector", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %8) #4
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %3, ptr noundef nonnull %5)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %7, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %8, i8 0, i64 64, i1 false)
  call void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef %2)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %7, i64 noundef 0, i64 noundef 3, ptr noundef %3, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %8, i64 noundef 0, i64 noundef 3, ptr noundef %3, i1 noundef zeroext true)
  %9 = icmp sgt i64 %1, -1
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %9, ptr noundef nonnull @.str.331, ptr noundef %3)
  %10 = icmp slt i64 %1, 2
  br i1 %10, label %._crit_edge, label %11

11:                                               ; preds = %4
  %12 = add nsw i64 %1, -1
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %2, i64 noundef %12, ptr noundef %3)
  %13 = add nuw nsw i64 %1, 1
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %7, i64 noundef %13, ptr noundef %3)
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %8, i64 noundef %1, ptr noundef %3)
  %14 = call noundef zeroext i1 @_ZN11alglib_impl20rmatrixhessenbergmklEPNS_9ae_matrixElPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %0, i64 noundef %1, ptr noundef %2, ptr noundef %3)
  br i1 %14, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %11
  %15 = getelementptr inbounds i8, ptr %7, i64 56
  %16 = getelementptr inbounds i8, ptr %0, i64 72
  %17 = getelementptr inbounds i8, ptr %0, i64 16
  %18 = getelementptr inbounds i8, ptr %2, i64 56
  br label %19

19:                                               ; preds = %.lr.ph, %19
  %.053 = phi i64 [ 0, %.lr.ph ], [ %23, %19 ]
  %20 = load ptr, ptr %15, align 8, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %20, i64 8
  %22 = load ptr, ptr %16, align 8, !tbaa !5
  %23 = add nuw nsw i64 %.053, 1
  %24 = getelementptr inbounds ptr, ptr %22, i64 %23
  %25 = load ptr, ptr %24, align 8, !tbaa !8
  %26 = getelementptr inbounds double, ptr %25, i64 %.053
  %27 = load i64, ptr %17, align 8, !tbaa !10
  %28 = xor i64 %.053, -1
  %29 = add nsw i64 %28, %1
  %30 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 1, i64 noundef %29)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef nonnull %21, i64 noundef 1, ptr noundef %26, i64 noundef %27, i64 noundef %30)
  call void @_ZN11alglib_impl18generatereflectionEPNS_9ae_vectorElPdPNS_8ae_stateE(ptr noundef nonnull %7, i64 noundef %29, ptr noundef nonnull %6, ptr noundef %3)
  %31 = load ptr, ptr %16, align 8, !tbaa !5
  %32 = getelementptr inbounds ptr, ptr %31, i64 %23
  %33 = load ptr, ptr %32, align 8, !tbaa !8
  %34 = getelementptr inbounds double, ptr %33, i64 %.053
  %35 = load i64, ptr %17, align 8, !tbaa !10
  %36 = load ptr, ptr %15, align 8, !tbaa !5
  %37 = getelementptr inbounds i8, ptr %36, i64 8
  %38 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef %23, i64 noundef %12)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %34, i64 noundef %35, ptr noundef nonnull %37, i64 noundef 1, i64 noundef %38)
  %39 = load double, ptr %6, align 8, !tbaa !15
  %40 = load ptr, ptr %18, align 8, !tbaa !5
  %41 = getelementptr inbounds double, ptr %40, i64 %.053
  store double %39, ptr %41, align 8, !tbaa !15
  %42 = load ptr, ptr %15, align 8, !tbaa !5
  %43 = getelementptr inbounds i8, ptr %42, i64 8
  store double 1.000000e+00, ptr %43, align 8, !tbaa !15
  call void @_ZN11alglib_impl27applyreflectionfromtherightEPNS_9ae_matrixEdPNS_9ae_vectorEllllS3_PNS_8ae_stateE(ptr noundef %0, double noundef %39, ptr noundef nonnull %7, i64 noundef 0, i64 noundef %12, i64 noundef %23, i64 noundef %12, ptr noundef nonnull %8, ptr noundef %3)
  %44 = load double, ptr %6, align 8, !tbaa !15
  call void @_ZN11alglib_impl26applyreflectionfromtheleftEPNS_9ae_matrixEdPNS_9ae_vectorEllllS3_PNS_8ae_stateE(ptr noundef %0, double noundef %44, ptr noundef nonnull %7, i64 noundef %23, i64 noundef %12, i64 noundef %23, i64 noundef %12, ptr noundef nonnull %8, ptr noundef %3)
  %exitcond.not = icmp eq i64 %23, %12
  br i1 %exitcond.not, label %._crit_edge, label %19, !llvm.loop !17

._crit_edge:                                      ; preds = %19, %11, %4
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %3)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #4
  ret void
}

declare noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef, i64 noundef) local_unnamed_addr #2

declare void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef, i64 noundef, i64 noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #2

declare void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #2

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #2

declare void @_ZN11alglib_impl15ae_vector_clearEPNS_9ae_vectorE(ptr noundef) local_unnamed_addr #2

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

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

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

declare void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #2

declare noundef zeroext i1 @_ZN11alglib_impl20rmatrixhessenbergmklEPNS_9ae_matrixElPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef, i64 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, !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"any pointer", !6, i64 0}
!10 = !{!11, !12, i64 16}
!11 = !{!"_ZTSN11alglib_impl9ae_matrixE", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24, !13, i64 32, !14, i64 40, !6, i64 72}
!12 = !{!"long", !6, i64 0}
!13 = !{!"bool", !6, i64 0}
!14 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !9, i64 0, !9, i64 8, !9, i64 16, !9, i64 24}
!15 = !{!16, !16, i64 0}
!16 = !{!"double", !6, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SCCPPass,SROAPass,SimplifyCFGPass