; LLVM IR from venumb/ZSPACE :: cpp/depends/alglib/cpp/src (dataanalysis)

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

@.str.447 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.448 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.449 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.450 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.451 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.452 = external hidden unnamed_addr constant [60 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
define dso_local void @_ZN11alglib_impl23knnbuildersetdatasetregEPNS_10knnbuilderEPNS_9ae_matrixElllPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, i64 noundef %2, i64 noundef %3, i64 noundef %4, ptr noundef %5) #2 {
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store i64 %2, ptr %9, align 8, !tbaa !9
  store i64 %3, ptr %10, align 8, !tbaa !9
  store i64 %4, ptr %11, align 8, !tbaa !9
  store ptr %5, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  %15 = load i64, ptr %9, align 8, !tbaa !9
  %16 = icmp sge i64 %15, 1
  %17 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %16, ptr noundef @.str.447, ptr noundef %17)
  %18 = load i64, ptr %10, align 8, !tbaa !9
  %19 = icmp sge i64 %18, 1
  %20 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %19, ptr noundef @.str.448, ptr noundef %20)
  %21 = load i64, ptr %11, align 8, !tbaa !9
  %22 = icmp sge i64 %21, 1
  %23 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %22, ptr noundef @.str.449, ptr noundef %23)
  %24 = load ptr, ptr %8, align 8, !tbaa !5
  %25 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %24, i32 0, i32 0
  %26 = load i64, ptr %25, align 8, !tbaa !11
  %27 = load i64, ptr %9, align 8, !tbaa !9
  %28 = icmp sge i64 %26, %27
  %29 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %28, ptr noundef @.str.450, ptr noundef %29)
  %30 = load ptr, ptr %8, align 8, !tbaa !5
  %31 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %30, i32 0, i32 1
  %32 = load i64, ptr %31, align 8, !tbaa !15
  %33 = load i64, ptr %10, align 8, !tbaa !9
  %34 = load i64, ptr %11, align 8, !tbaa !9
  %35 = add nsw i64 %33, %34
  %36 = icmp sge i64 %32, %35
  %37 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %36, ptr noundef @.str.451, ptr noundef %37)
  %38 = load ptr, ptr %8, align 8, !tbaa !5
  %39 = load i64, ptr %9, align 8, !tbaa !9
  %40 = load i64, ptr %10, align 8, !tbaa !9
  %41 = load i64, ptr %11, align 8, !tbaa !9
  %42 = add nsw i64 %40, %41
  %43 = load ptr, ptr %12, align 8, !tbaa !5
  %44 = call noundef zeroext i1 @_ZN11alglib_impl20apservisfinitematrixEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %38, i64 noundef %39, i64 noundef %42, ptr noundef %43)
  %45 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %44, ptr noundef @.str.452, ptr noundef %45)
  %46 = load ptr, ptr %7, align 8, !tbaa !5
  %47 = getelementptr inbounds %"struct.alglib_impl::knnbuilder", ptr %46, i32 0, i32 0
  store i64 0, ptr %47, align 8, !tbaa !16
  %48 = load ptr, ptr %7, align 8, !tbaa !5
  %49 = getelementptr inbounds %"struct.alglib_impl::knnbuilder", ptr %48, i32 0, i32 3
  store i8 0, ptr %49, align 8, !tbaa !19
  %50 = load i64, ptr %9, align 8, !tbaa !9
  %51 = load ptr, ptr %7, align 8, !tbaa !5
  %52 = getelementptr inbounds %"struct.alglib_impl::knnbuilder", ptr %51, i32 0, i32 1
  store i64 %50, ptr %52, align 8, !tbaa !20
  %53 = load i64, ptr %10, align 8, !tbaa !9
  %54 = load ptr, ptr %7, align 8, !tbaa !5
  %55 = getelementptr inbounds %"struct.alglib_impl::knnbuilder", ptr %54, i32 0, i32 2
  store i64 %53, ptr %55, align 8, !tbaa !21
  %56 = load i64, ptr %11, align 8, !tbaa !9
  %57 = load ptr, ptr %7, align 8, !tbaa !5
  %58 = getelementptr inbounds %"struct.alglib_impl::knnbuilder", ptr %57, i32 0, i32 4
  store i64 %56, ptr %58, align 8, !tbaa !22
  %59 = load ptr, ptr %7, align 8, !tbaa !5
  %60 = getelementptr inbounds %"struct.alglib_impl::knnbuilder", ptr %59, i32 0, i32 5
  %61 = load i64, ptr %9, align 8, !tbaa !9
  %62 = load i64, ptr %10, align 8, !tbaa !9
  %63 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl23rmatrixsetlengthatleastEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %60, i64 noundef %61, i64 noundef %62, ptr noundef %63)
  store i64 0, ptr %13, align 8, !tbaa !9
  br label %64

64:                                               ; preds = %98, %6
  %65 = load i64, ptr %13, align 8, !tbaa !9
  %66 = load i64, ptr %9, align 8, !tbaa !9
  %67 = sub nsw i64 %66, 1
  %68 = icmp sle i64 %65, %67
  br i1 %68, label %69, label %101

69:                                               ; preds = %64
  store i64 0, ptr %14, align 8, !tbaa !9
  br label %70

70:                                               ; preds = %94, %69
  %71 = load i64, ptr %14, align 8, !tbaa !9
  %72 = load i64, ptr %10, align 8, !tbaa !9
  %73 = sub nsw i64 %72, 1
  %74 = icmp sle i64 %71, %73
  br i1 %74, label %75, label %97

75:                                               ; preds = %70
  %76 = load ptr, ptr %8, align 8, !tbaa !5
  %77 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %76, i32 0, i32 6
  %78 = load ptr, ptr %77, align 8, !tbaa !23
  %79 = load i64, ptr %13, align 8, !tbaa !9
  %80 = getelementptr inbounds ptr, ptr %78, i64 %79
  %81 = load ptr, ptr %80, align 8, !tbaa !5
  %82 = load i64, ptr %14, align 8, !tbaa !9
  %83 = getelementptr inbounds double, ptr %81, i64 %82
  %84 = load double, ptr %83, align 8, !tbaa !24
  %85 = load ptr, ptr %7, align 8, !tbaa !5
  %86 = getelementptr inbounds %"struct.alglib_impl::knnbuilder", ptr %85, i32 0, i32 5
  %87 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %86, i32 0, i32 6
  %88 = load ptr, ptr %87, align 8, !tbaa !23
  %89 = load i64, ptr %13, align 8, !tbaa !9
  %90 = getelementptr inbounds ptr, ptr %88, i64 %89
  %91 = load ptr, ptr %90, align 8, !tbaa !5
  %92 = load i64, ptr %14, align 8, !tbaa !9
  %93 = getelementptr inbounds double, ptr %91, i64 %92
  store double %84, ptr %93, align 8, !tbaa !24
  br label %94

94:                                               ; preds = %75
  %95 = load i64, ptr %14, align 8, !tbaa !9
  %96 = add nsw i64 %95, 1
  store i64 %96, ptr %14, align 8, !tbaa !9
  br label %70, !llvm.loop !26

97:                                               ; preds = %70
  br label %98

98:                                               ; preds = %97
  %99 = load i64, ptr %13, align 8, !tbaa !9
  %100 = add nsw i64 %99, 1
  store i64 %100, ptr %13, align 8, !tbaa !9
  br label %64, !llvm.loop !28

101:                                              ; preds = %64
  %102 = load ptr, ptr %7, align 8, !tbaa !5
  %103 = getelementptr inbounds %"struct.alglib_impl::knnbuilder", ptr %102, i32 0, i32 6
  %104 = load i64, ptr %9, align 8, !tbaa !9
  %105 = load i64, ptr %11, align 8, !tbaa !9
  %106 = mul nsw i64 %104, %105
  %107 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %103, i64 noundef %106, ptr noundef %107)
  store i64 0, ptr %13, align 8, !tbaa !9
  br label %108

108:                                              ; preds = %145, %101
  %109 = load i64, ptr %13, align 8, !tbaa !9
  %110 = load i64, ptr %9, align 8, !tbaa !9
  %111 = sub nsw i64 %110, 1
  %112 = icmp sle i64 %109, %111
  br i1 %112, label %113, label %148

113:                                              ; preds = %108
  store i64 0, ptr %14, align 8, !tbaa !9
  br label %114

114:                                              ; preds = %141, %113
  %115 = load i64, ptr %14, align 8, !tbaa !9
  %116 = load i64, ptr %11, align 8, !tbaa !9
  %117 = sub nsw i64 %116, 1
  %118 = icmp sle i64 %115, %117
  br i1 %118, label %119, label %144

119:                                              ; preds = %114
  %120 = load ptr, ptr %8, align 8, !tbaa !5
  %121 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %120, i32 0, i32 6
  %122 = load ptr, ptr %121, align 8, !tbaa !23
  %123 = load i64, ptr %13, align 8, !tbaa !9
  %124 = getelementptr inbounds ptr, ptr %122, i64 %123
  %125 = load ptr, ptr %124, align 8, !tbaa !5
  %126 = load i64, ptr %10, align 8, !tbaa !9
  %127 = load i64, ptr %14, align 8, !tbaa !9
  %128 = add nsw i64 %126, %127
  %129 = getelementptr inbounds double, ptr %125, i64 %128
  %130 = load double, ptr %129, align 8, !tbaa !24
  %131 = load ptr, ptr %7, align 8, !tbaa !5
  %132 = getelementptr inbounds %"struct.alglib_impl::knnbuilder", ptr %131, i32 0, i32 6
  %133 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %132, i32 0, i32 4
  %134 = load ptr, ptr %133, align 8, !tbaa !23
  %135 = load i64, ptr %13, align 8, !tbaa !9
  %136 = load i64, ptr %11, align 8, !tbaa !9
  %137 = mul nsw i64 %135, %136
  %138 = load i64, ptr %14, align 8, !tbaa !9
  %139 = add nsw i64 %137, %138
  %140 = getelementptr inbounds double, ptr %134, i64 %139
  store double %130, ptr %140, align 8, !tbaa !24
  br label %141

141:                                              ; preds = %119
  %142 = load i64, ptr %14, align 8, !tbaa !9
  %143 = add nsw i64 %142, 1
  store i64 %143, ptr %14, align 8, !tbaa !9
  br label %114, !llvm.loop !29

144:                                              ; preds = %114
  br label %145

145:                                              ; preds = %144
  %146 = load i64, ptr %13, align 8, !tbaa !9
  %147 = add nsw i64 %146, 1
  store i64 %147, ptr %13, align 8, !tbaa !9
  br label %108, !llvm.loop !30

148:                                              ; preds = %108
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  ret void
}

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

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

declare noundef zeroext i1 @_ZN11alglib_impl20apservisfinitematrixEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #1

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 = { 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, !10, i64 0}
!12 = !{!"_ZTSN11alglib_impl9ae_matrixE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !13, i64 32, !14, i64 40, !7, i64 72}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!15 = !{!12, !10, i64 8}
!16 = !{!17, !10, i64 0}
!17 = !{!"_ZTSN11alglib_impl10knnbuilderE", !10, i64 0, !10, i64 8, !10, i64 16, !13, i64 24, !10, i64 32, !12, i64 40, !18, i64 120, !18, i64 184, !10, i64 248}
!18 = !{!"_ZTSN11alglib_impl9ae_vectorE", !10, i64 0, !10, i64 8, !13, i64 16, !14, i64 24, !7, i64 56}
!19 = !{!17, !13, i64 24}
!20 = !{!17, !10, i64 8}
!21 = !{!17, !10, i64 16}
!22 = !{!17, !10, i64 32}
!23 = !{!7, !7, i64 0}
!24 = !{!25, !25, i64 0}
!25 = !{!"double", !7, i64 0}
!26 = distinct !{!26, !27}
!27 = !{!"llvm.loop.mustprogress"}
!28 = distinct !{!28, !27}
!29 = distinct !{!29, !27}
!30 = distinct !{!30, !27}


; 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.447 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.448 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.449 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.450 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.451 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.452 = external hidden unnamed_addr constant [60 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
define dso_local void @_ZN11alglib_impl23knnbuildersetdatasetregEPNS_10knnbuilderEPNS_9ae_matrixElllPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, i64 noundef %2, i64 noundef %3, i64 noundef %4, ptr noundef %5) local_unnamed_addr #1 {
  %7 = icmp sgt i64 %2, 0
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %7, ptr noundef nonnull @.str.447, ptr noundef %5)
  %8 = icmp sgt i64 %3, 0
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %8, ptr noundef nonnull @.str.448, ptr noundef %5)
  %9 = icmp sgt i64 %4, 0
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %9, ptr noundef nonnull @.str.449, ptr noundef %5)
  %10 = load i64, ptr %1, align 8, !tbaa !5
  %11 = icmp sge i64 %10, %2
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %11, ptr noundef nonnull @.str.450, ptr noundef %5)
  %12 = getelementptr inbounds i8, ptr %1, i64 8
  %13 = load i64, ptr %12, align 8, !tbaa !13
  %14 = add nsw i64 %4, %3
  %15 = icmp sge i64 %13, %14
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %15, ptr noundef nonnull @.str.451, ptr noundef %5)
  %16 = tail call noundef zeroext i1 @_ZN11alglib_impl20apservisfinitematrixEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %1, i64 noundef %2, i64 noundef %14, ptr noundef %5)
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %16, ptr noundef nonnull @.str.452, ptr noundef %5)
  store i64 0, ptr %0, align 8, !tbaa !14
  %17 = getelementptr inbounds i8, ptr %0, i64 24
  store i8 0, ptr %17, align 8, !tbaa !17
  %18 = getelementptr inbounds i8, ptr %0, i64 8
  store i64 %2, ptr %18, align 8, !tbaa !18
  %19 = getelementptr inbounds i8, ptr %0, i64 16
  store i64 %3, ptr %19, align 8, !tbaa !19
  %20 = getelementptr inbounds i8, ptr %0, i64 32
  store i64 %4, ptr %20, align 8, !tbaa !20
  %21 = getelementptr inbounds i8, ptr %0, i64 40
  tail call void @_ZN11alglib_impl23rmatrixsetlengthatleastEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %21, i64 noundef %2, i64 noundef %3, ptr noundef %5)
  br i1 %7, label %.preheader66.lr.ph, label %._crit_edge71.thread83

._crit_edge71.thread83:                           ; preds = %6
  %22 = getelementptr inbounds i8, ptr %0, i64 120
  %23 = mul nsw i64 %4, %2
  tail call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %22, i64 noundef %23, ptr noundef %5)
  br label %._crit_edge76

.preheader66.lr.ph:                               ; preds = %6
  %24 = getelementptr inbounds i8, ptr %1, i64 72
  %25 = getelementptr inbounds i8, ptr %0, i64 112
  br i1 %8, label %.preheader66.us.preheader, label %._crit_edge71.thread

.preheader66.us.preheader:                        ; preds = %.preheader66.lr.ph
  %xtraiter = and i64 %3, 1
  %26 = icmp eq i64 %3, 1
  %unroll_iter = and i64 %3, 9223372036854775806
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader66.us

._crit_edge71.thread:                             ; preds = %.preheader66.lr.ph
  %27 = getelementptr inbounds i8, ptr %0, i64 120
  %28 = mul nsw i64 %4, %2
  tail call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %27, i64 noundef %28, ptr noundef %5)
  br label %.preheader.lr.ph

.preheader66.us:                                  ; preds = %.preheader66.us.preheader, %._crit_edge.us
  %.06070.us = phi i64 [ %58, %._crit_edge.us ], [ 0, %.preheader66.us.preheader ]
  br i1 %26, label %._crit_edge.us.unr-lcssa, label %.preheader66.us.new

.preheader66.us.new:                              ; preds = %.preheader66.us, %.preheader66.us.new
  %.068.us = phi i64 [ %48, %.preheader66.us.new ], [ 0, %.preheader66.us ]
  %niter = phi i64 [ %niter.next.1, %.preheader66.us.new ], [ 0, %.preheader66.us ]
  %29 = load ptr, ptr %24, align 8, !tbaa !21
  %30 = getelementptr inbounds ptr, ptr %29, i64 %.06070.us
  %31 = load ptr, ptr %30, align 8, !tbaa !22
  %32 = getelementptr inbounds double, ptr %31, i64 %.068.us
  %33 = load double, ptr %32, align 8, !tbaa !23
  %34 = load ptr, ptr %25, align 8, !tbaa !21
  %35 = getelementptr inbounds ptr, ptr %34, i64 %.06070.us
  %36 = load ptr, ptr %35, align 8, !tbaa !22
  %37 = getelementptr inbounds double, ptr %36, i64 %.068.us
  store double %33, ptr %37, align 8, !tbaa !23
  %38 = or disjoint i64 %.068.us, 1
  %39 = load ptr, ptr %24, align 8, !tbaa !21
  %40 = getelementptr inbounds ptr, ptr %39, i64 %.06070.us
  %41 = load ptr, ptr %40, align 8, !tbaa !22
  %42 = getelementptr inbounds double, ptr %41, i64 %38
  %43 = load double, ptr %42, align 8, !tbaa !23
  %44 = load ptr, ptr %25, align 8, !tbaa !21
  %45 = getelementptr inbounds ptr, ptr %44, i64 %.06070.us
  %46 = load ptr, ptr %45, align 8, !tbaa !22
  %47 = getelementptr inbounds double, ptr %46, i64 %38
  store double %43, ptr %47, align 8, !tbaa !23
  %48 = add nuw nsw i64 %.068.us, 2
  %niter.next.1 = add i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.us.unr-lcssa, label %.preheader66.us.new, !llvm.loop !25

._crit_edge.us.unr-lcssa:                         ; preds = %.preheader66.us.new, %.preheader66.us
  %.068.us.unr = phi i64 [ 0, %.preheader66.us ], [ %48, %.preheader66.us.new ]
  br i1 %lcmp.mod.not, label %._crit_edge.us, label %._crit_edge.us.epilog-lcssa

._crit_edge.us.epilog-lcssa:                      ; preds = %._crit_edge.us.unr-lcssa
  %49 = load ptr, ptr %24, align 8, !tbaa !21
  %50 = getelementptr inbounds ptr, ptr %49, i64 %.06070.us
  %51 = load ptr, ptr %50, align 8, !tbaa !22
  %52 = getelementptr inbounds double, ptr %51, i64 %.068.us.unr
  %53 = load double, ptr %52, align 8, !tbaa !23
  %54 = load ptr, ptr %25, align 8, !tbaa !21
  %55 = getelementptr inbounds ptr, ptr %54, i64 %.06070.us
  %56 = load ptr, ptr %55, align 8, !tbaa !22
  %57 = getelementptr inbounds double, ptr %56, i64 %.068.us.unr
  store double %53, ptr %57, align 8, !tbaa !23
  br label %._crit_edge.us

._crit_edge.us:                                   ; preds = %._crit_edge.us.unr-lcssa, %._crit_edge.us.epilog-lcssa
  %58 = add nuw nsw i64 %.06070.us, 1
  %exitcond80.not = icmp eq i64 %58, %2
  br i1 %exitcond80.not, label %._crit_edge71, label %.preheader66.us, !llvm.loop !27

._crit_edge71:                                    ; preds = %._crit_edge.us
  %59 = getelementptr inbounds i8, ptr %0, i64 120
  %60 = mul nsw i64 %4, %2
  tail call void @_ZN11alglib_impl23rvectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %59, i64 noundef %60, ptr noundef %5)
  br i1 %7, label %.preheader.lr.ph, label %._crit_edge76

.preheader.lr.ph:                                 ; preds = %._crit_edge71.thread, %._crit_edge71
  %61 = getelementptr inbounds i8, ptr %1, i64 72
  %62 = getelementptr inbounds i8, ptr %0, i64 176
  br i1 %9, label %.preheader.us.preheader, label %._crit_edge76

.preheader.us.preheader:                          ; preds = %.preheader.lr.ph
  %xtraiter85 = and i64 %4, 1
  %63 = icmp eq i64 %4, 1
  %unroll_iter87 = and i64 %4, 9223372036854775806
  %lcmp.mod86.not = icmp eq i64 %xtraiter85, 0
  br label %.preheader.us

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge.us77
  %.16175.us = phi i64 [ %94, %._crit_edge.us77 ], [ 0, %.preheader.us.preheader ]
  %64 = mul nuw nsw i64 %.16175.us, %4
  br i1 %63, label %._crit_edge.us77.unr-lcssa, label %.preheader.us.new

.preheader.us.new:                                ; preds = %.preheader.us, %.preheader.us.new
  %.173.us = phi i64 [ %84, %.preheader.us.new ], [ 0, %.preheader.us ]
  %niter88 = phi i64 [ %niter88.next.1, %.preheader.us.new ], [ 0, %.preheader.us ]
  %65 = load ptr, ptr %61, align 8, !tbaa !21
  %66 = getelementptr inbounds ptr, ptr %65, i64 %.16175.us
  %67 = load ptr, ptr %66, align 8, !tbaa !22
  %68 = getelementptr double, ptr %67, i64 %.173.us
  %69 = getelementptr double, ptr %68, i64 %3
  %70 = load double, ptr %69, align 8, !tbaa !23
  %71 = load ptr, ptr %62, align 8, !tbaa !21
  %72 = getelementptr double, ptr %71, i64 %64
  %73 = getelementptr double, ptr %72, i64 %.173.us
  store double %70, ptr %73, align 8, !tbaa !23
  %74 = or disjoint i64 %.173.us, 1
  %75 = load ptr, ptr %61, align 8, !tbaa !21
  %76 = getelementptr inbounds ptr, ptr %75, i64 %.16175.us
  %77 = load ptr, ptr %76, align 8, !tbaa !22
  %78 = getelementptr double, ptr %77, i64 %74
  %79 = getelementptr double, ptr %78, i64 %3
  %80 = load double, ptr %79, align 8, !tbaa !23
  %81 = load ptr, ptr %62, align 8, !tbaa !21
  %82 = getelementptr double, ptr %81, i64 %64
  %83 = getelementptr double, ptr %82, i64 %74
  store double %80, ptr %83, align 8, !tbaa !23
  %84 = add nuw nsw i64 %.173.us, 2
  %niter88.next.1 = add i64 %niter88, 2
  %niter88.ncmp.1 = icmp eq i64 %niter88.next.1, %unroll_iter87
  br i1 %niter88.ncmp.1, label %._crit_edge.us77.unr-lcssa, label %.preheader.us.new, !llvm.loop !28

._crit_edge.us77.unr-lcssa:                       ; preds = %.preheader.us.new, %.preheader.us
  %.173.us.unr = phi i64 [ 0, %.preheader.us ], [ %84, %.preheader.us.new ]
  br i1 %lcmp.mod86.not, label %._crit_edge.us77, label %._crit_edge.us77.epilog-lcssa

._crit_edge.us77.epilog-lcssa:                    ; preds = %._crit_edge.us77.unr-lcssa
  %85 = load ptr, ptr %61, align 8, !tbaa !21
  %86 = getelementptr inbounds ptr, ptr %85, i64 %.16175.us
  %87 = load ptr, ptr %86, align 8, !tbaa !22
  %88 = getelementptr double, ptr %87, i64 %.173.us.unr
  %89 = getelementptr double, ptr %88, i64 %3
  %90 = load double, ptr %89, align 8, !tbaa !23
  %91 = load ptr, ptr %62, align 8, !tbaa !21
  %92 = getelementptr double, ptr %91, i64 %64
  %93 = getelementptr double, ptr %92, i64 %.173.us.unr
  store double %90, ptr %93, align 8, !tbaa !23
  br label %._crit_edge.us77

._crit_edge.us77:                                 ; preds = %._crit_edge.us77.unr-lcssa, %._crit_edge.us77.epilog-lcssa
  %94 = add nuw nsw i64 %.16175.us, 1
  %exitcond82.not = icmp eq i64 %94, %2
  br i1 %exitcond82.not, label %._crit_edge76, label %.preheader.us, !llvm.loop !29

._crit_edge76:                                    ; preds = %._crit_edge.us77, %.preheader.lr.ph, %._crit_edge71.thread83, %._crit_edge71
  ret void
}

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

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

declare noundef zeroext i1 @_ZN11alglib_impl20apservisfinitematrixEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef, i64 noundef, i64 noundef, ptr noundef) local_unnamed_addr #0

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

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_ZTSN11alglib_impl9ae_matrixE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !11, i64 40, !8, i64 72}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!6, !7, i64 8}
!14 = !{!15, !7, i64 0}
!15 = !{!"_ZTSN11alglib_impl10knnbuilderE", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !7, i64 32, !6, i64 40, !16, i64 120, !16, i64 184, !7, i64 248}
!16 = !{!"_ZTSN11alglib_impl9ae_vectorE", !7, i64 0, !7, i64 8, !10, i64 16, !11, i64 24, !8, i64 56}
!17 = !{!15, !10, i64 24}
!18 = !{!15, !7, i64 8}
!19 = !{!15, !7, i64 16}
!20 = !{!15, !7, i64 32}
!21 = !{!8, !8, i64 0}
!22 = !{!12, !12, i64 0}
!23 = !{!24, !24, i64 0}
!24 = !{!"double", !8, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = distinct !{!27, !26}
!28 = distinct !{!28, !26}
!29 = distinct !{!29, !26}


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