; 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::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.1 }
%union.anon.1 = type { ptr }

; 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

; 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: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN11alglib_impl12rmatrixbdsvdEPNS_9ae_vectorEPKS0_lbbPNS_9ae_matrixElS5_lS5_lPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, i64 noundef %2, i1 noundef zeroext %3, i1 noundef zeroext %4, ptr noundef %5, i64 noundef %6, ptr noundef %7, i64 noundef %8, ptr noundef %9, i64 noundef %10, ptr noundef %11) #2 {
  %13 = alloca i1, align 1
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i64, align 8
  %17 = alloca i8, align 1
  %18 = alloca i8, align 1
  %19 = alloca ptr, align 8
  %20 = alloca i64, align 8
  %21 = alloca ptr, align 8
  %22 = alloca i64, align 8
  %23 = alloca ptr, align 8
  %24 = alloca i64, align 8
  %25 = alloca ptr, align 8
  %26 = alloca %"struct.alglib_impl::ae_frame", align 8
  %27 = alloca %"struct.alglib_impl::ae_vector", align 8
  %28 = alloca i64, align 8
  %29 = alloca %"struct.alglib_impl::ae_vector", align 8
  %30 = alloca %"struct.alglib_impl::ae_vector", align 8
  %31 = alloca %"struct.alglib_impl::ae_vector", align 8
  %32 = alloca i8, align 1
  %33 = alloca i32, align 4
  store ptr %0, ptr %14, align 8, !tbaa !5
  store ptr %1, ptr %15, align 8, !tbaa !5
  store i64 %2, ptr %16, align 8, !tbaa !9
  %34 = zext i1 %3 to i8
  store i8 %34, ptr %17, align 1, !tbaa !11
  %35 = zext i1 %4 to i8
  store i8 %35, ptr %18, align 1, !tbaa !11
  store ptr %5, ptr %19, align 8, !tbaa !5
  store i64 %6, ptr %20, align 8, !tbaa !9
  store ptr %7, ptr %21, align 8, !tbaa !5
  store i64 %8, ptr %22, align 8, !tbaa !9
  store ptr %9, ptr %23, align 8, !tbaa !5
  store i64 %10, ptr %24, align 8, !tbaa !9
  store ptr %11, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %26) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %27) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %29) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %30) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr %31) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %32) #4
  %36 = load ptr, ptr %25, align 8, !tbaa !5
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %36, ptr noundef %26)
  call void @llvm.memset.p0.i64(ptr align 8 %27, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %29, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %30, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr align 8 %31, i8 0, i64 64, i1 false)
  %37 = load ptr, ptr %15, align 8, !tbaa !5
  %38 = load ptr, ptr %25, align 8, !tbaa !5
  call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorEPKS0_PNS_8ae_stateEb(ptr noundef %27, ptr noundef %37, ptr noundef %38, i1 noundef zeroext true)
  %39 = load ptr, ptr %25, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %29, i64 noundef 0, i64 noundef 3, ptr noundef %39, i1 noundef zeroext true)
  %40 = load ptr, ptr %25, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %30, i64 noundef 0, i64 noundef 3, ptr noundef %40, i1 noundef zeroext true)
  %41 = load ptr, ptr %25, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef %31, i64 noundef 0, i64 noundef 3, ptr noundef %41, i1 noundef zeroext true)
  store i8 0, ptr %32, align 1, !tbaa !11
  %42 = load i64, ptr %16, align 8, !tbaa !9
  %43 = load ptr, ptr %25, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %29, i64 noundef %42, ptr noundef %43)
  store i64 0, ptr %28, align 8, !tbaa !9
  br label %44

44:                                               ; preds = %59, %12
  %45 = load i64, ptr %28, align 8, !tbaa !9
  %46 = load i64, ptr %16, align 8, !tbaa !9
  %47 = sub nsw i64 %46, 2
  %48 = icmp sle i64 %45, %47
  br i1 %48, label %49, label %62

49:                                               ; preds = %44
  %50 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %27, i32 0, i32 4
  %51 = load ptr, ptr %50, align 8, !tbaa !13
  %52 = load i64, ptr %28, align 8, !tbaa !9
  %53 = getelementptr inbounds double, ptr %51, i64 %52
  %54 = load double, ptr %53, align 8, !tbaa !14
  %55 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %29, i32 0, i32 4
  %56 = load ptr, ptr %55, align 8, !tbaa !13
  %57 = load i64, ptr %28, align 8, !tbaa !9
  %58 = getelementptr inbounds double, ptr %56, i64 %57
  store double %54, ptr %58, align 8, !tbaa !14
  br label %59

59:                                               ; preds = %49
  %60 = load i64, ptr %28, align 8, !tbaa !9
  %61 = add nsw i64 %60, 1
  store i64 %61, ptr %28, align 8, !tbaa !9
  br label %44, !llvm.loop !16

62:                                               ; preds = %44
  %63 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %29, i32 0, i32 4
  %64 = load ptr, ptr %63, align 8, !tbaa !13
  %65 = load i64, ptr %16, align 8, !tbaa !9
  %66 = sub nsw i64 %65, 1
  %67 = getelementptr inbounds double, ptr %64, i64 %66
  store double 0.000000e+00, ptr %67, align 8, !tbaa !14
  %68 = load ptr, ptr %14, align 8, !tbaa !5
  %69 = load i64, ptr %16, align 8, !tbaa !9
  %70 = load i8, ptr %17, align 1, !tbaa !11, !range !18, !noundef !19
  %71 = trunc i8 %70 to i1
  %72 = load ptr, ptr %19, align 8, !tbaa !5
  %73 = load i64, ptr %20, align 8, !tbaa !9
  %74 = load ptr, ptr %21, align 8, !tbaa !5
  %75 = load i64, ptr %22, align 8, !tbaa !9
  %76 = load ptr, ptr %23, align 8, !tbaa !5
  %77 = load i64, ptr %24, align 8, !tbaa !9
  %78 = load ptr, ptr %25, align 8, !tbaa !5
  %79 = call noundef zeroext i1 @_ZN11alglib_impl15rmatrixbdsvdmklEPNS_9ae_vectorES1_lbPNS_9ae_matrixElS3_lS3_lPbPNS_8ae_stateE(ptr noundef %68, ptr noundef %29, i64 noundef %69, i1 noundef zeroext %71, ptr noundef %72, i64 noundef %73, ptr noundef %74, i64 noundef %75, ptr noundef %76, i64 noundef %77, ptr noundef %32, ptr noundef %78)
  br i1 %79, label %80, label %84

80:                                               ; preds = %62
  %81 = load ptr, ptr %25, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %81)
  %82 = load i8, ptr %32, align 1, !tbaa !11, !range !18, !noundef !19
  %83 = trunc i8 %82 to i1
  store i1 %83, ptr %13, align 1
  store i32 1, ptr %33, align 4
  br label %141

84:                                               ; preds = %62
  %85 = load i64, ptr %16, align 8, !tbaa !9
  %86 = add nsw i64 %85, 1
  %87 = load ptr, ptr %25, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %30, i64 noundef %86, ptr noundef %87)
  %88 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %30, i32 0, i32 4
  %89 = load ptr, ptr %88, align 8, !tbaa !13
  %90 = getelementptr inbounds double, ptr %89, i64 1
  %91 = load ptr, ptr %14, align 8, !tbaa !5
  %92 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %91, i32 0, i32 4
  %93 = load ptr, ptr %92, align 8, !tbaa !13
  %94 = getelementptr inbounds double, ptr %93, i64 0
  %95 = load i64, ptr %16, align 8, !tbaa !9
  %96 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 1, i64 noundef %95)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %90, i64 noundef 1, ptr noundef %94, i64 noundef 1, i64 noundef %96)
  %97 = load i64, ptr %16, align 8, !tbaa !9
  %98 = icmp sgt i64 %97, 1
  br i1 %98, label %99, label %113

99:                                               ; preds = %84
  %100 = load i64, ptr %16, align 8, !tbaa !9
  %101 = sub nsw i64 %100, 1
  %102 = add nsw i64 %101, 1
  %103 = load ptr, ptr %25, align 8, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %31, i64 noundef %102, ptr noundef %103)
  %104 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %31, i32 0, i32 4
  %105 = load ptr, ptr %104, align 8, !tbaa !13
  %106 = getelementptr inbounds double, ptr %105, i64 1
  %107 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %27, i32 0, i32 4
  %108 = load ptr, ptr %107, align 8, !tbaa !13
  %109 = getelementptr inbounds double, ptr %108, i64 0
  %110 = load i64, ptr %16, align 8, !tbaa !9
  %111 = sub nsw i64 %110, 1
  %112 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 1, i64 noundef %111)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %106, i64 noundef 1, ptr noundef %109, i64 noundef 1, i64 noundef %112)
  br label %113

113:                                              ; preds = %99, %84
  %114 = load i64, ptr %16, align 8, !tbaa !9
  %115 = load i8, ptr %17, align 1, !tbaa !11, !range !18, !noundef !19
  %116 = trunc i8 %115 to i1
  %117 = load i8, ptr %18, align 1, !tbaa !11, !range !18, !noundef !19
  %118 = trunc i8 %117 to i1
  %119 = load ptr, ptr %19, align 8, !tbaa !5
  %120 = load i64, ptr %20, align 8, !tbaa !9
  %121 = load ptr, ptr %21, align 8, !tbaa !5
  %122 = load i64, ptr %22, align 8, !tbaa !9
  %123 = load ptr, ptr %23, align 8, !tbaa !5
  %124 = load i64, ptr %24, align 8, !tbaa !9
  %125 = load ptr, ptr %25, align 8, !tbaa !5
  %126 = call noundef zeroext i1 @_ZN11alglib_implL40bdsvd_bidiagonalsvddecompositioninternalEPNS_9ae_vectorEPKS0_lbbPNS_9ae_matrixEllS5_llS5_llPNS_8ae_stateE(ptr noundef %30, ptr noundef %31, i64 noundef %114, i1 noundef zeroext %116, i1 noundef zeroext %118, ptr noundef %119, i64 noundef 0, i64 noundef %120, ptr noundef %121, i64 noundef 0, i64 noundef %122, ptr noundef %123, i64 noundef 0, i64 noundef %124, ptr noundef %125)
  %127 = zext i1 %126 to i8
  store i8 %127, ptr %32, align 1, !tbaa !11
  %128 = load ptr, ptr %14, align 8, !tbaa !5
  %129 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %128, i32 0, i32 4
  %130 = load ptr, ptr %129, align 8, !tbaa !13
  %131 = getelementptr inbounds double, ptr %130, i64 0
  %132 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %30, i32 0, i32 4
  %133 = load ptr, ptr %132, align 8, !tbaa !13
  %134 = getelementptr inbounds double, ptr %133, i64 1
  %135 = load i64, ptr %16, align 8, !tbaa !9
  %136 = sub nsw i64 %135, 1
  %137 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %136)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %131, i64 noundef 1, ptr noundef %134, i64 noundef 1, i64 noundef %137)
  %138 = load ptr, ptr %25, align 8, !tbaa !5
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %138)
  %139 = load i8, ptr %32, align 1, !tbaa !11, !range !18, !noundef !19
  %140 = trunc i8 %139 to i1
  store i1 %140, ptr %13, align 1
  store i32 1, ptr %33, align 4
  br label %141

141:                                              ; preds = %113, %80
  call void @llvm.lifetime.end.p0(i64 1, ptr %32) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %31) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %30) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %26) #4
  %142 = load i1, ptr %13, align 1
  ret i1 %142
}

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

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

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

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #3

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

declare void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorEPKS0_PNS_8ae_stateEb(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) #3

declare noundef zeroext i1 @_ZN11alglib_impl15rmatrixbdsvdmklEPNS_9ae_vectorES1_lbPNS_9ae_matrixElS3_lS3_lPbPNS_8ae_stateE(ptr noundef, ptr noundef, i64 noundef, i1 noundef zeroext, ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZN11alglib_implL40bdsvd_bidiagonalsvddecompositioninternalEPNS_9ae_vectorEPKS0_lbbPNS_9ae_matrixEllS5_llS5_llPNS_8ae_stateE(ptr noundef, ptr noundef, i64 noundef, i1 noundef zeroext, i1 noundef zeroext, ptr noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef, i64 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 = { 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 = { "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 = !{!"bool", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"double", !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!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::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.1 }
%union.anon.1 = type { ptr }

; 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 nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.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 uwtable
define dso_local noundef zeroext i1 @_ZN11alglib_impl12rmatrixbdsvdEPNS_9ae_vectorEPKS0_lbbPNS_9ae_matrixElS5_lS5_lPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, i64 noundef %2, i1 noundef zeroext %3, i1 noundef zeroext %4, ptr noundef %5, i64 noundef %6, ptr noundef %7, i64 noundef %8, ptr noundef %9, i64 noundef %10, ptr noundef %11) local_unnamed_addr #2 {
  %13 = alloca %"struct.alglib_impl::ae_frame", align 8
  %14 = alloca %"struct.alglib_impl::ae_vector", align 8
  %15 = alloca %"struct.alglib_impl::ae_vector", align 8
  %16 = alloca %"struct.alglib_impl::ae_vector", align 8
  %17 = alloca %"struct.alglib_impl::ae_vector", align 8
  %18 = alloca i8, align 1
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %13) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %14) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %15) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %16) #4
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %17) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %18) #4
  call void @_ZN11alglib_impl13ae_frame_makeEPNS_8ae_stateEPNS_8ae_frameE(ptr noundef %11, ptr noundef nonnull %13)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %14, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %15, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %16, i8 0, i64 64, i1 false)
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(64) %17, i8 0, i64 64, i1 false)
  call void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorEPKS0_PNS_8ae_stateEb(ptr noundef nonnull %14, ptr noundef %1, ptr noundef %11, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %15, i64 noundef 0, i64 noundef 3, ptr noundef %11, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %16, i64 noundef 0, i64 noundef 3, ptr noundef %11, i1 noundef zeroext true)
  call void @_ZN11alglib_impl14ae_vector_initEPNS_9ae_vectorEllPNS_8ae_stateEb(ptr noundef nonnull %17, i64 noundef 0, i64 noundef 3, ptr noundef %11, i1 noundef zeroext true)
  store i8 0, ptr %18, align 1, !tbaa !5
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %15, i64 noundef %2, ptr noundef %11)
  %.not48 = icmp slt i64 %2, 2
  br i1 %.not48, label %.._crit_edge_crit_edge, label %.lr.ph

.._crit_edge_crit_edge:                           ; preds = %12
  %.pre = add nsw i64 %2, -1
  br label %._crit_edge

.lr.ph:                                           ; preds = %12
  %19 = getelementptr inbounds i8, ptr %14, i64 56
  %20 = getelementptr inbounds i8, ptr %15, i64 56
  %21 = add nsw i64 %2, -1
  %22 = add nsw i64 %2, -2
  %xtraiter = and i64 %21, 3
  %23 = icmp ult i64 %22, 3
  br i1 %23, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %21, -4
  br label %24

24:                                               ; preds = %24, %.lr.ph.new
  %.049 = phi i64 [ 0, %.lr.ph.new ], [ %48, %24 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.3, %24 ]
  %25 = load ptr, ptr %19, align 8, !tbaa !9
  %26 = getelementptr inbounds double, ptr %25, i64 %.049
  %27 = load double, ptr %26, align 8, !tbaa !10
  %28 = load ptr, ptr %20, align 8, !tbaa !9
  %29 = getelementptr inbounds double, ptr %28, i64 %.049
  store double %27, ptr %29, align 8, !tbaa !10
  %30 = or disjoint i64 %.049, 1
  %31 = load ptr, ptr %19, align 8, !tbaa !9
  %32 = getelementptr inbounds double, ptr %31, i64 %30
  %33 = load double, ptr %32, align 8, !tbaa !10
  %34 = load ptr, ptr %20, align 8, !tbaa !9
  %35 = getelementptr inbounds double, ptr %34, i64 %30
  store double %33, ptr %35, align 8, !tbaa !10
  %36 = or disjoint i64 %.049, 2
  %37 = load ptr, ptr %19, align 8, !tbaa !9
  %38 = getelementptr inbounds double, ptr %37, i64 %36
  %39 = load double, ptr %38, align 8, !tbaa !10
  %40 = load ptr, ptr %20, align 8, !tbaa !9
  %41 = getelementptr inbounds double, ptr %40, i64 %36
  store double %39, ptr %41, align 8, !tbaa !10
  %42 = or disjoint i64 %.049, 3
  %43 = load ptr, ptr %19, align 8, !tbaa !9
  %44 = getelementptr inbounds double, ptr %43, i64 %42
  %45 = load double, ptr %44, align 8, !tbaa !10
  %46 = load ptr, ptr %20, align 8, !tbaa !9
  %47 = getelementptr inbounds double, ptr %46, i64 %42
  store double %45, ptr %47, align 8, !tbaa !10
  %48 = add nuw i64 %.049, 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 %._crit_edge.loopexit.unr-lcssa, label %24, !llvm.loop !12

._crit_edge.loopexit.unr-lcssa:                   ; preds = %24, %.lr.ph
  %.049.unr = phi i64 [ 0, %.lr.ph ], [ %48, %24 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader
  %.049.epil = phi i64 [ %54, %.epil.preheader ], [ %.049.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %49 = load ptr, ptr %19, align 8, !tbaa !9
  %50 = getelementptr inbounds double, ptr %49, i64 %.049.epil
  %51 = load double, ptr %50, align 8, !tbaa !10
  %52 = load ptr, ptr %20, align 8, !tbaa !9
  %53 = getelementptr inbounds double, ptr %52, i64 %.049.epil
  store double %51, ptr %53, align 8, !tbaa !10
  %54 = add nuw i64 %.049.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 %._crit_edge, label %.epil.preheader, !llvm.loop !14

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader, %.._crit_edge_crit_edge
  %.pre-phi = phi i64 [ %.pre, %.._crit_edge_crit_edge ], [ %21, %.epil.preheader ], [ %21, %._crit_edge.loopexit.unr-lcssa ]
  %55 = getelementptr inbounds i8, ptr %15, i64 56
  %56 = load ptr, ptr %55, align 8, !tbaa !9
  %57 = getelementptr inbounds double, ptr %56, i64 %.pre-phi
  store double 0.000000e+00, ptr %57, align 8, !tbaa !10
  %58 = call noundef zeroext i1 @_ZN11alglib_impl15rmatrixbdsvdmklEPNS_9ae_vectorES1_lbPNS_9ae_matrixElS3_lS3_lPbPNS_8ae_stateE(ptr noundef %0, ptr noundef nonnull %15, i64 noundef %2, i1 noundef zeroext %3, ptr noundef %5, i64 noundef %6, ptr noundef %7, i64 noundef %8, ptr noundef %9, i64 noundef %10, ptr noundef nonnull %18, ptr noundef %11)
  br i1 %58, label %82, label %59

59:                                               ; preds = %._crit_edge
  %60 = add nsw i64 %2, 1
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %16, i64 noundef %60, ptr noundef %11)
  %61 = getelementptr inbounds i8, ptr %16, i64 56
  %62 = load ptr, ptr %61, align 8, !tbaa !9
  %63 = getelementptr inbounds i8, ptr %62, i64 8
  %64 = getelementptr inbounds i8, ptr %0, i64 56
  %65 = load ptr, ptr %64, align 8, !tbaa !9
  %66 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 1, i64 noundef %2)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef nonnull %63, i64 noundef 1, ptr noundef %65, i64 noundef 1, i64 noundef %66)
  %67 = icmp sgt i64 %2, 1
  br i1 %67, label %68, label %75

68:                                               ; preds = %59
  call void @_ZN11alglib_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %17, i64 noundef %2, ptr noundef %11)
  %69 = getelementptr inbounds i8, ptr %17, i64 56
  %70 = load ptr, ptr %69, align 8, !tbaa !9
  %71 = getelementptr inbounds i8, ptr %70, i64 8
  %72 = getelementptr inbounds i8, ptr %14, i64 56
  %73 = load ptr, ptr %72, align 8, !tbaa !9
  %74 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 1, i64 noundef %.pre-phi)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef nonnull %71, i64 noundef 1, ptr noundef %73, i64 noundef 1, i64 noundef %74)
  br label %75

75:                                               ; preds = %68, %59
  %76 = call noundef zeroext i1 @_ZN11alglib_implL40bdsvd_bidiagonalsvddecompositioninternalEPNS_9ae_vectorEPKS0_lbbPNS_9ae_matrixEllS5_llS5_llPNS_8ae_stateE(ptr noundef nonnull %16, ptr noundef nonnull %17, i64 noundef %2, i1 noundef zeroext %3, i1 noundef zeroext %4, ptr noundef %5, i64 noundef 0, i64 noundef %6, ptr noundef %7, i64 noundef 0, i64 noundef %8, ptr noundef %9, i64 noundef 0, i64 noundef %10, ptr noundef %11)
  %77 = zext i1 %76 to i8
  store i8 %77, ptr %18, align 1, !tbaa !5
  %78 = load ptr, ptr %64, align 8, !tbaa !9
  %79 = load ptr, ptr %61, align 8, !tbaa !9
  %80 = getelementptr inbounds i8, ptr %79, i64 8
  %81 = call noundef i64 @_ZN11alglib_impl8ae_v_lenEll(i64 noundef 0, i64 noundef %.pre-phi)
  call void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef %78, i64 noundef 1, ptr noundef nonnull %80, i64 noundef 1, i64 noundef %81)
  br label %82

82:                                               ; preds = %._crit_edge, %75
  call void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef %11)
  %.046.in = load i8, ptr %18, align 1, !tbaa !5, !range !16, !noundef !17
  %.046 = trunc nuw i8 %.046.in to i1
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %18) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %17) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %16) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #4
  ret i1 %.046
}

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

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

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

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

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #3

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

declare void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorEPKS0_PNS_8ae_stateEb(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #3

declare noundef zeroext i1 @_ZN11alglib_impl15rmatrixbdsvdmklEPNS_9ae_vectorES1_lbPNS_9ae_matrixElS3_lS3_lPbPNS_8ae_stateE(ptr noundef, ptr noundef, i64 noundef, i1 noundef zeroext, ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZN11alglib_implL40bdsvd_bidiagonalsvddecompositioninternalEPNS_9ae_vectorEPKS0_lbbPNS_9ae_matrixEllS5_llS5_llPNS_8ae_stateE(ptr noundef, ptr noundef, i64 noundef, i1 noundef zeroext, i1 noundef zeroext, ptr noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef, ptr noundef, i64 noundef, i64 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 = { 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 = { "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 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"double", !7, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.unroll.disable"}
!16 = !{i8 0, i8 2}
!17 = !{}


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