; 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 }

; 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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN11alglib_impl12rmatrixbdsvdEPNS_9ae_vectorES1_lbbPNS_9ae_matrixElS3_lS3_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_vectorES1_PNS_8ae_stateEb(ptr noundef %27, ptr noundef %37, ptr noundef %38, i1 noundef zeroext true)
  store ptr %27, ptr %15, align 8, !tbaa !5
  %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 = %60, %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 %63

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

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

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

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

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

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

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

143:                                              ; preds = %115, %81
  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
  %144 = load i1, ptr %13, align 1
  ret i1 %144
}

declare noundef i64 @_ZN11alglib_impl8ae_v_lenEll(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_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) #3

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) #3

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

declare void @_ZN11alglib_impl9ae_v_moveEPdlPKdll(ptr noundef, i64 noundef, ptr noundef, i64 noundef, i64 noundef) #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_vectorES1_lbbPNS_9ae_matrixEllS3_llS3_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.0 }
%union.anon.0 = 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 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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN11alglib_impl12rmatrixbdsvdEPNS_9ae_vectorES1_lbbPNS_9ae_matrixElS3_lS3_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_vectorES1_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)
  %.not50 = icmp slt i64 %2, 2
  br i1 %.not50, 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
  %.051 = 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 %.051
  %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 %.051
  store double %27, ptr %29, align 8, !tbaa !10
  %30 = or disjoint i64 %.051, 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 %.051, 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 %.051, 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 %.051, 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
  %.051.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
  %.051.epil = phi i64 [ %54, %.epil.preheader ], [ %.051.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 %.051.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 %.051.epil
  store double %51, ptr %53, align 8, !tbaa !10
  %54 = add nuw i64 %.051.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_vectorES1_lbbPNS_9ae_matrixEllS3_llS3_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)
  %.048.in = load i8, ptr %18, align 1, !tbaa !5, !range !16, !noundef !17
  %.048 = trunc nuw i8 %.048.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 %.048
}

declare noundef i64 @_ZN11alglib_impl8ae_v_lenEll(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_impl20ae_vector_set_lengthEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #3

declare void @_ZN11alglib_impl14ae_frame_leaveEPNS_8ae_stateE(ptr noundef) local_unnamed_addr #3

declare void @_ZN11alglib_impl19ae_vector_init_copyEPNS_9ae_vectorES1_PNS_8ae_stateEb(ptr noundef, ptr noundef, ptr noundef, i1 noundef zeroext) 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 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_vectorES1_lbbPNS_9ae_matrixEllS3_llS3_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