; 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.453 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.454 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.455 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.456 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.457 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.458 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.459 = external hidden unnamed_addr constant [73 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_impl23knnbuildersetdatasetclsEPNS_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.453, 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.454, ptr noundef %20)
  %21 = load i64, ptr %11, align 8, !tbaa !9
  %22 = icmp sge i64 %21, 2
  %23 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %22, ptr noundef @.str.455, 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.456, 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 = add nsw i64 %33, 1
  %35 = icmp sge i64 %32, %34
  %36 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %35, ptr noundef @.str.457, ptr noundef %36)
  %37 = load ptr, ptr %8, align 8, !tbaa !5
  %38 = load i64, ptr %9, align 8, !tbaa !9
  %39 = load i64, ptr %10, align 8, !tbaa !9
  %40 = add nsw i64 %39, 1
  %41 = load ptr, ptr %12, align 8, !tbaa !5
  %42 = call noundef zeroext i1 @_ZN11alglib_impl20apservisfinitematrixEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %37, i64 noundef %38, i64 noundef %40, ptr noundef %41)
  %43 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %42, ptr noundef @.str.458, ptr noundef %43)
  store i64 0, ptr %13, align 8, !tbaa !9
  br label %44

44:                                               ; preds = %70, %6
  %45 = load i64, ptr %13, align 8, !tbaa !9
  %46 = load i64, ptr %9, align 8, !tbaa !9
  %47 = sub nsw i64 %46, 1
  %48 = icmp sle i64 %45, %47
  br i1 %48, label %49, label %73

49:                                               ; preds = %44
  %50 = load ptr, ptr %8, align 8, !tbaa !5
  %51 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %50, i32 0, i32 6
  %52 = load ptr, ptr %51, align 8, !tbaa !16
  %53 = load i64, ptr %13, align 8, !tbaa !9
  %54 = getelementptr inbounds ptr, ptr %52, i64 %53
  %55 = load ptr, ptr %54, align 8, !tbaa !5
  %56 = load i64, ptr %10, align 8, !tbaa !9
  %57 = getelementptr inbounds double, ptr %55, i64 %56
  %58 = load double, ptr %57, align 8, !tbaa !17
  %59 = load ptr, ptr %12, align 8, !tbaa !5
  %60 = call noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double noundef %58, ptr noundef %59)
  store i64 %60, ptr %14, align 8, !tbaa !9
  %61 = load i64, ptr %14, align 8, !tbaa !9
  %62 = icmp sge i64 %61, 0
  br i1 %62, label %63, label %67

63:                                               ; preds = %49
  %64 = load i64, ptr %14, align 8, !tbaa !9
  %65 = load i64, ptr %11, align 8, !tbaa !9
  %66 = icmp slt i64 %64, %65
  br label %67

67:                                               ; preds = %63, %49
  %68 = phi i1 [ false, %49 ], [ %66, %63 ]
  %69 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %68, ptr noundef @.str.459, ptr noundef %69)
  br label %70

70:                                               ; preds = %67
  %71 = load i64, ptr %13, align 8, !tbaa !9
  %72 = add nsw i64 %71, 1
  store i64 %72, ptr %13, align 8, !tbaa !9
  br label %44, !llvm.loop !19

73:                                               ; preds = %44
  %74 = load ptr, ptr %7, align 8, !tbaa !5
  %75 = getelementptr inbounds %"struct.alglib_impl::knnbuilder", ptr %74, i32 0, i32 3
  store i8 1, ptr %75, align 8, !tbaa !21
  %76 = load ptr, ptr %7, align 8, !tbaa !5
  %77 = getelementptr inbounds %"struct.alglib_impl::knnbuilder", ptr %76, i32 0, i32 0
  store i64 0, ptr %77, align 8, !tbaa !24
  %78 = load i64, ptr %9, align 8, !tbaa !9
  %79 = load ptr, ptr %7, align 8, !tbaa !5
  %80 = getelementptr inbounds %"struct.alglib_impl::knnbuilder", ptr %79, i32 0, i32 1
  store i64 %78, ptr %80, align 8, !tbaa !25
  %81 = load i64, ptr %10, align 8, !tbaa !9
  %82 = load ptr, ptr %7, align 8, !tbaa !5
  %83 = getelementptr inbounds %"struct.alglib_impl::knnbuilder", ptr %82, i32 0, i32 2
  store i64 %81, ptr %83, align 8, !tbaa !26
  %84 = load i64, ptr %11, align 8, !tbaa !9
  %85 = load ptr, ptr %7, align 8, !tbaa !5
  %86 = getelementptr inbounds %"struct.alglib_impl::knnbuilder", ptr %85, i32 0, i32 4
  store i64 %84, ptr %86, align 8, !tbaa !27
  %87 = load ptr, ptr %7, align 8, !tbaa !5
  %88 = getelementptr inbounds %"struct.alglib_impl::knnbuilder", ptr %87, i32 0, i32 5
  %89 = load i64, ptr %9, align 8, !tbaa !9
  %90 = load i64, ptr %10, align 8, !tbaa !9
  %91 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl23rmatrixsetlengthatleastEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef %88, i64 noundef %89, i64 noundef %90, ptr noundef %91)
  store i64 0, ptr %13, align 8, !tbaa !9
  br label %92

92:                                               ; preds = %126, %73
  %93 = load i64, ptr %13, align 8, !tbaa !9
  %94 = load i64, ptr %9, align 8, !tbaa !9
  %95 = sub nsw i64 %94, 1
  %96 = icmp sle i64 %93, %95
  br i1 %96, label %97, label %129

97:                                               ; preds = %92
  store i64 0, ptr %14, align 8, !tbaa !9
  br label %98

98:                                               ; preds = %122, %97
  %99 = load i64, ptr %14, align 8, !tbaa !9
  %100 = load i64, ptr %10, align 8, !tbaa !9
  %101 = sub nsw i64 %100, 1
  %102 = icmp sle i64 %99, %101
  br i1 %102, label %103, label %125

103:                                              ; preds = %98
  %104 = load ptr, ptr %8, align 8, !tbaa !5
  %105 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %104, i32 0, i32 6
  %106 = load ptr, ptr %105, align 8, !tbaa !16
  %107 = load i64, ptr %13, align 8, !tbaa !9
  %108 = getelementptr inbounds ptr, ptr %106, i64 %107
  %109 = load ptr, ptr %108, align 8, !tbaa !5
  %110 = load i64, ptr %14, align 8, !tbaa !9
  %111 = getelementptr inbounds double, ptr %109, i64 %110
  %112 = load double, ptr %111, align 8, !tbaa !17
  %113 = load ptr, ptr %7, align 8, !tbaa !5
  %114 = getelementptr inbounds %"struct.alglib_impl::knnbuilder", ptr %113, i32 0, i32 5
  %115 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %114, i32 0, i32 6
  %116 = load ptr, ptr %115, align 8, !tbaa !16
  %117 = load i64, ptr %13, align 8, !tbaa !9
  %118 = getelementptr inbounds ptr, ptr %116, i64 %117
  %119 = load ptr, ptr %118, align 8, !tbaa !5
  %120 = load i64, ptr %14, align 8, !tbaa !9
  %121 = getelementptr inbounds double, ptr %119, i64 %120
  store double %112, ptr %121, align 8, !tbaa !17
  br label %122

122:                                              ; preds = %103
  %123 = load i64, ptr %14, align 8, !tbaa !9
  %124 = add nsw i64 %123, 1
  store i64 %124, ptr %14, align 8, !tbaa !9
  br label %98, !llvm.loop !28

125:                                              ; preds = %98
  br label %126

126:                                              ; preds = %125
  %127 = load i64, ptr %13, align 8, !tbaa !9
  %128 = add nsw i64 %127, 1
  store i64 %128, ptr %13, align 8, !tbaa !9
  br label %92, !llvm.loop !29

129:                                              ; preds = %92
  %130 = load ptr, ptr %7, align 8, !tbaa !5
  %131 = getelementptr inbounds %"struct.alglib_impl::knnbuilder", ptr %130, i32 0, i32 7
  %132 = load i64, ptr %9, align 8, !tbaa !9
  %133 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN11alglib_impl23ivectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef %131, i64 noundef %132, ptr noundef %133)
  store i64 0, ptr %13, align 8, !tbaa !9
  br label %134

134:                                              ; preds = %157, %129
  %135 = load i64, ptr %13, align 8, !tbaa !9
  %136 = load i64, ptr %9, align 8, !tbaa !9
  %137 = sub nsw i64 %136, 1
  %138 = icmp sle i64 %135, %137
  br i1 %138, label %139, label %160

139:                                              ; preds = %134
  %140 = load ptr, ptr %8, align 8, !tbaa !5
  %141 = getelementptr inbounds %"struct.alglib_impl::ae_matrix", ptr %140, i32 0, i32 6
  %142 = load ptr, ptr %141, align 8, !tbaa !16
  %143 = load i64, ptr %13, align 8, !tbaa !9
  %144 = getelementptr inbounds ptr, ptr %142, i64 %143
  %145 = load ptr, ptr %144, align 8, !tbaa !5
  %146 = load i64, ptr %10, align 8, !tbaa !9
  %147 = getelementptr inbounds double, ptr %145, i64 %146
  %148 = load double, ptr %147, align 8, !tbaa !17
  %149 = load ptr, ptr %12, align 8, !tbaa !5
  %150 = call noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double noundef %148, ptr noundef %149)
  %151 = load ptr, ptr %7, align 8, !tbaa !5
  %152 = getelementptr inbounds %"struct.alglib_impl::knnbuilder", ptr %151, i32 0, i32 7
  %153 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %152, i32 0, i32 4
  %154 = load ptr, ptr %153, align 8, !tbaa !16
  %155 = load i64, ptr %13, align 8, !tbaa !9
  %156 = getelementptr inbounds i64, ptr %154, i64 %155
  store i64 %150, ptr %156, align 8, !tbaa !9
  br label %157

157:                                              ; preds = %139
  %158 = load i64, ptr %13, align 8, !tbaa !9
  %159 = add nsw i64 %158, 1
  store i64 %159, ptr %13, align 8, !tbaa !9
  br label %134, !llvm.loop !30

160:                                              ; preds = %134
  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 noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double noundef, ptr noundef) #1

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

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


; 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.453 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.454 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.455 = external hidden unnamed_addr constant [36 x i8], align 1
@.str.456 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.457 = external hidden unnamed_addr constant [42 x i8], align 1
@.str.458 = external hidden unnamed_addr constant [60 x i8], align 1
@.str.459 = external hidden unnamed_addr constant [73 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_impl23knnbuildersetdatasetclsEPNS_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.453, 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.454, ptr noundef %5)
  %9 = icmp sgt i64 %4, 1
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %9, ptr noundef nonnull @.str.455, 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.456, ptr noundef %5)
  %12 = getelementptr inbounds i8, ptr %1, i64 8
  %13 = load i64, ptr %12, align 8, !tbaa !13
  %14 = add nsw i64 %3, 1
  %15 = icmp sgt i64 %13, %3
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %15, ptr noundef nonnull @.str.457, 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.458, ptr noundef %5)
  br i1 %7, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %6
  %17 = getelementptr inbounds i8, ptr %1, i64 72
  br label %18

18:                                               ; preds = %.lr.ph, %18
  %.06369 = phi i64 [ 0, %.lr.ph ], [ %28, %18 ]
  %19 = load ptr, ptr %17, align 8, !tbaa !14
  %20 = getelementptr inbounds ptr, ptr %19, i64 %.06369
  %21 = load ptr, ptr %20, align 8, !tbaa !15
  %22 = getelementptr inbounds double, ptr %21, i64 %3
  %23 = load double, ptr %22, align 8, !tbaa !16
  %24 = tail call noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double noundef %23, ptr noundef %5)
  %25 = icmp sgt i64 %24, -1
  %26 = icmp slt i64 %24, %4
  %27 = and i1 %25, %26
  tail call void @_ZN11alglib_impl9ae_assertEbPKcPNS_8ae_stateE(i1 noundef zeroext %27, ptr noundef nonnull @.str.459, ptr noundef %5)
  %28 = add nuw nsw i64 %.06369, 1
  %exitcond.not = icmp eq i64 %28, %2
  br i1 %exitcond.not, label %._crit_edge, label %18, !llvm.loop !18

._crit_edge:                                      ; preds = %18, %6
  %29 = getelementptr inbounds i8, ptr %0, i64 24
  store i8 1, ptr %29, align 8, !tbaa !20
  store i64 0, ptr %0, align 8, !tbaa !23
  %30 = getelementptr inbounds i8, ptr %0, i64 8
  store i64 %2, ptr %30, align 8, !tbaa !24
  %31 = getelementptr inbounds i8, ptr %0, i64 16
  store i64 %3, ptr %31, align 8, !tbaa !25
  %32 = getelementptr inbounds i8, ptr %0, i64 32
  store i64 %4, ptr %32, align 8, !tbaa !26
  %33 = getelementptr inbounds i8, ptr %0, i64 40
  tail call void @_ZN11alglib_impl23rmatrixsetlengthatleastEPNS_9ae_matrixEllPNS_8ae_stateE(ptr noundef nonnull %33, i64 noundef %2, i64 noundef %3, ptr noundef %5)
  br i1 %7, label %.preheader.lr.ph, label %._crit_edge76.thread86

._crit_edge76.thread86:                           ; preds = %._crit_edge
  %34 = getelementptr inbounds i8, ptr %0, i64 184
  tail call void @_ZN11alglib_impl23ivectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %34, i64 noundef %2, ptr noundef %5)
  br label %._crit_edge81

.preheader.lr.ph:                                 ; preds = %._crit_edge
  %35 = getelementptr inbounds i8, ptr %1, i64 72
  %36 = getelementptr inbounds i8, ptr %0, i64 112
  br i1 %8, label %.preheader.us.preheader, label %._crit_edge76.thread

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

._crit_edge76.thread:                             ; preds = %.preheader.lr.ph
  %38 = getelementptr inbounds i8, ptr %0, i64 184
  tail call void @_ZN11alglib_impl23ivectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %38, i64 noundef %2, ptr noundef %5)
  br label %.lr.ph80

.preheader.us:                                    ; preds = %.preheader.us.preheader, %._crit_edge73.us
  %.175.us = phi i64 [ %68, %._crit_edge73.us ], [ 0, %.preheader.us.preheader ]
  br i1 %37, label %._crit_edge73.us.unr-lcssa, label %.preheader.us.new

.preheader.us.new:                                ; preds = %.preheader.us, %.preheader.us.new
  %.071.us = phi i64 [ %58, %.preheader.us.new ], [ 0, %.preheader.us ]
  %niter = phi i64 [ %niter.next.1, %.preheader.us.new ], [ 0, %.preheader.us ]
  %39 = load ptr, ptr %35, align 8, !tbaa !14
  %40 = getelementptr inbounds ptr, ptr %39, i64 %.175.us
  %41 = load ptr, ptr %40, align 8, !tbaa !15
  %42 = getelementptr inbounds double, ptr %41, i64 %.071.us
  %43 = load double, ptr %42, align 8, !tbaa !16
  %44 = load ptr, ptr %36, align 8, !tbaa !14
  %45 = getelementptr inbounds ptr, ptr %44, i64 %.175.us
  %46 = load ptr, ptr %45, align 8, !tbaa !15
  %47 = getelementptr inbounds double, ptr %46, i64 %.071.us
  store double %43, ptr %47, align 8, !tbaa !16
  %48 = or disjoint i64 %.071.us, 1
  %49 = load ptr, ptr %35, align 8, !tbaa !14
  %50 = getelementptr inbounds ptr, ptr %49, i64 %.175.us
  %51 = load ptr, ptr %50, align 8, !tbaa !15
  %52 = getelementptr inbounds double, ptr %51, i64 %48
  %53 = load double, ptr %52, align 8, !tbaa !16
  %54 = load ptr, ptr %36, align 8, !tbaa !14
  %55 = getelementptr inbounds ptr, ptr %54, i64 %.175.us
  %56 = load ptr, ptr %55, align 8, !tbaa !15
  %57 = getelementptr inbounds double, ptr %56, i64 %48
  store double %53, ptr %57, align 8, !tbaa !16
  %58 = add nuw nsw i64 %.071.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_edge73.us.unr-lcssa, label %.preheader.us.new, !llvm.loop !27

._crit_edge73.us.unr-lcssa:                       ; preds = %.preheader.us.new, %.preheader.us
  %.071.us.unr = phi i64 [ 0, %.preheader.us ], [ %58, %.preheader.us.new ]
  br i1 %lcmp.mod.not, label %._crit_edge73.us, label %._crit_edge73.us.epilog-lcssa

._crit_edge73.us.epilog-lcssa:                    ; preds = %._crit_edge73.us.unr-lcssa
  %59 = load ptr, ptr %35, align 8, !tbaa !14
  %60 = getelementptr inbounds ptr, ptr %59, i64 %.175.us
  %61 = load ptr, ptr %60, align 8, !tbaa !15
  %62 = getelementptr inbounds double, ptr %61, i64 %.071.us.unr
  %63 = load double, ptr %62, align 8, !tbaa !16
  %64 = load ptr, ptr %36, align 8, !tbaa !14
  %65 = getelementptr inbounds ptr, ptr %64, i64 %.175.us
  %66 = load ptr, ptr %65, align 8, !tbaa !15
  %67 = getelementptr inbounds double, ptr %66, i64 %.071.us.unr
  store double %63, ptr %67, align 8, !tbaa !16
  br label %._crit_edge73.us

._crit_edge73.us:                                 ; preds = %._crit_edge73.us.unr-lcssa, %._crit_edge73.us.epilog-lcssa
  %68 = add nuw nsw i64 %.175.us, 1
  %exitcond84.not = icmp eq i64 %68, %2
  br i1 %exitcond84.not, label %._crit_edge76, label %.preheader.us, !llvm.loop !28

._crit_edge76:                                    ; preds = %._crit_edge73.us
  %69 = getelementptr inbounds i8, ptr %0, i64 184
  tail call void @_ZN11alglib_impl23ivectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr noundef nonnull %69, i64 noundef %2, ptr noundef %5)
  br i1 %7, label %.lr.ph80, label %._crit_edge81

.lr.ph80:                                         ; preds = %._crit_edge76.thread, %._crit_edge76
  %70 = getelementptr inbounds i8, ptr %1, i64 72
  %71 = getelementptr inbounds i8, ptr %0, i64 240
  br label %72

72:                                               ; preds = %.lr.ph80, %72
  %.278 = phi i64 [ 0, %.lr.ph80 ], [ %81, %72 ]
  %73 = load ptr, ptr %70, align 8, !tbaa !14
  %74 = getelementptr inbounds ptr, ptr %73, i64 %.278
  %75 = load ptr, ptr %74, align 8, !tbaa !15
  %76 = getelementptr inbounds double, ptr %75, i64 %3
  %77 = load double, ptr %76, align 8, !tbaa !16
  %78 = tail call noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double noundef %77, ptr noundef %5)
  %79 = load ptr, ptr %71, align 8, !tbaa !14
  %80 = getelementptr inbounds i64, ptr %79, i64 %.278
  store i64 %78, ptr %80, align 8, !tbaa !29
  %81 = add nuw nsw i64 %.278, 1
  %exitcond85.not = icmp eq i64 %81, %2
  br i1 %exitcond85.not, label %._crit_edge81, label %72, !llvm.loop !30

._crit_edge81:                                    ; preds = %72, %._crit_edge76.thread86, %._crit_edge76
  ret void
}

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

declare noundef i64 @_ZN11alglib_impl8ae_roundEdPNS_8ae_stateE(double 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

declare void @_ZN11alglib_impl23ivectorsetlengthatleastEPNS_9ae_vectorElPNS_8ae_stateE(ptr 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 = !{!8, !8, i64 0}
!15 = !{!12, !12, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"double", !8, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = !{!21, !10, i64 24}
!21 = !{!"_ZTSN11alglib_impl10knnbuilderE", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !7, i64 32, !6, i64 40, !22, i64 120, !22, i64 184, !7, i64 248}
!22 = !{!"_ZTSN11alglib_impl9ae_vectorE", !7, i64 0, !7, i64 8, !10, i64 16, !11, i64 24, !8, i64 56}
!23 = !{!21, !7, i64 0}
!24 = !{!21, !7, i64 8}
!25 = !{!21, !7, i64 16}
!26 = !{!21, !7, i64 32}
!27 = distinct !{!27, !19}
!28 = distinct !{!28, !19}
!29 = !{!7, !7, i64 0}
!30 = distinct !{!30, !19}


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