; 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::knnmodel" = type { i64, i64, i64, double, i8, i8, %"struct.alglib_impl::kdtree", %"struct.alglib_impl::knnbuffer" }
%"struct.alglib_impl::kdtree" = type { i64, i64, i64, i64, %"struct.alglib_impl::ae_matrix", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::kdtreerequestbuffer", i64 }
%"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::ae_vector" = type { i64, i64, i8, %"struct.alglib_impl::ae_dyn_block", %union.anon.1 }
%union.anon.1 = type { ptr }
%"struct.alglib_impl::kdtreerequestbuffer" = type { %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", i64, double, i8, double, i64, %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", double }
%"struct.alglib_impl::knnbuffer" = type { %"struct.alglib_impl::kdtreerequestbuffer", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_vector", %"struct.alglib_impl::ae_matrix" }

; 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: mustprogress uwtable
define dso_local noundef i64 @_ZN11alglib_impl11knnclassifyEPNS_8knnmodelEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %0, ptr noundef %1, ptr noundef %2) #1 {
  %4 = alloca i64, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #2
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #2
  %13 = load ptr, ptr %5, align 8, !tbaa !5
  %14 = getelementptr inbounds %"struct.alglib_impl::knnmodel", ptr %13, i32 0, i32 4
  %15 = load i8, ptr %14, align 8, !tbaa !9, !range !20, !noundef !21
  %16 = trunc i8 %15 to i1
  br i1 %16, label %19, label %17

17:                                               ; preds = %3
  store i64 -1, ptr %11, align 8, !tbaa !22
  %18 = load i64, ptr %11, align 8, !tbaa !22
  store i64 %18, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %84

19:                                               ; preds = %3
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  %21 = getelementptr inbounds %"struct.alglib_impl::knnmodel", ptr %20, i32 0, i32 0
  %22 = load i64, ptr %21, align 8, !tbaa !23
  store i64 %22, ptr %9, align 8, !tbaa !22
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = getelementptr inbounds %"struct.alglib_impl::knnmodel", ptr %23, i32 0, i32 1
  %25 = load i64, ptr %24, align 8, !tbaa !24
  store i64 %25, ptr %10, align 8, !tbaa !22
  store i64 0, ptr %8, align 8, !tbaa !22
  br label %26

26:                                               ; preds = %45, %19
  %27 = load i64, ptr %8, align 8, !tbaa !22
  %28 = load i64, ptr %9, align 8, !tbaa !22
  %29 = sub nsw i64 %28, 1
  %30 = icmp sle i64 %27, %29
  br i1 %30, label %31, label %48

31:                                               ; preds = %26
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  %33 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %32, i32 0, i32 4
  %34 = load ptr, ptr %33, align 8, !tbaa !25
  %35 = load i64, ptr %8, align 8, !tbaa !22
  %36 = getelementptr inbounds double, ptr %34, i64 %35
  %37 = load double, ptr %36, align 8, !tbaa !26
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  %39 = getelementptr inbounds %"struct.alglib_impl::knnmodel", ptr %38, i32 0, i32 7
  %40 = getelementptr inbounds %"struct.alglib_impl::knnbuffer", ptr %39, i32 0, i32 1
  %41 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %40, i32 0, i32 4
  %42 = load ptr, ptr %41, align 8, !tbaa !25
  %43 = load i64, ptr %8, align 8, !tbaa !22
  %44 = getelementptr inbounds double, ptr %42, i64 %43
  store double %37, ptr %44, align 8, !tbaa !26
  br label %45

45:                                               ; preds = %31
  %46 = load i64, ptr %8, align 8, !tbaa !22
  %47 = add nsw i64 %46, 1
  store i64 %47, ptr %8, align 8, !tbaa !22
  br label %26, !llvm.loop !27

48:                                               ; preds = %26
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = getelementptr inbounds %"struct.alglib_impl::knnmodel", ptr %50, i32 0, i32 7
  %52 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN11alglib_implL19knn_processinternalEPNS_8knnmodelEPNS_9knnbufferEPNS_8ae_stateE(ptr noundef %49, ptr noundef %51, ptr noundef %52)
  store i64 0, ptr %11, align 8, !tbaa !22
  store i64 1, ptr %8, align 8, !tbaa !22
  br label %53

53:                                               ; preds = %79, %48
  %54 = load i64, ptr %8, align 8, !tbaa !22
  %55 = load i64, ptr %10, align 8, !tbaa !22
  %56 = sub nsw i64 %55, 1
  %57 = icmp sle i64 %54, %56
  br i1 %57, label %58, label %82

58:                                               ; preds = %53
  %59 = load ptr, ptr %5, align 8, !tbaa !5
  %60 = getelementptr inbounds %"struct.alglib_impl::knnmodel", ptr %59, i32 0, i32 7
  %61 = getelementptr inbounds %"struct.alglib_impl::knnbuffer", ptr %60, i32 0, i32 2
  %62 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %61, i32 0, i32 4
  %63 = load ptr, ptr %62, align 8, !tbaa !25
  %64 = load i64, ptr %8, align 8, !tbaa !22
  %65 = getelementptr inbounds double, ptr %63, i64 %64
  %66 = load double, ptr %65, align 8, !tbaa !26
  %67 = load ptr, ptr %5, align 8, !tbaa !5
  %68 = getelementptr inbounds %"struct.alglib_impl::knnmodel", ptr %67, i32 0, i32 7
  %69 = getelementptr inbounds %"struct.alglib_impl::knnbuffer", ptr %68, i32 0, i32 2
  %70 = getelementptr inbounds %"struct.alglib_impl::ae_vector", ptr %69, i32 0, i32 4
  %71 = load ptr, ptr %70, align 8, !tbaa !25
  %72 = load i64, ptr %11, align 8, !tbaa !22
  %73 = getelementptr inbounds double, ptr %71, i64 %72
  %74 = load double, ptr %73, align 8, !tbaa !26
  %75 = fcmp ogt double %66, %74
  br i1 %75, label %76, label %78

76:                                               ; preds = %58
  %77 = load i64, ptr %8, align 8, !tbaa !22
  store i64 %77, ptr %11, align 8, !tbaa !22
  br label %78

78:                                               ; preds = %76, %58
  br label %79

79:                                               ; preds = %78
  %80 = load i64, ptr %8, align 8, !tbaa !22
  %81 = add nsw i64 %80, 1
  store i64 %81, ptr %8, align 8, !tbaa !22
  br label %53, !llvm.loop !29

82:                                               ; preds = %53
  %83 = load i64, ptr %11, align 8, !tbaa !22
  store i64 %83, ptr %4, align 8
  store i32 1, ptr %12, align 4
  br label %84

84:                                               ; preds = %82, %17
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #2
  %85 = load i64, ptr %4, align 8
  ret i64 %85
}

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL19knn_processinternalEPNS_8knnmodelEPNS_9knnbufferEPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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" }
attributes #2 = { 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, !13, i64 32}
!10 = !{!"_ZTSN11alglib_impl8knnmodelE", !11, i64 0, !11, i64 8, !11, i64 16, !12, i64 24, !13, i64 32, !13, i64 33, !14, i64 40, !19, i64 1040}
!11 = !{!"long", !7, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!"bool", !7, i64 0}
!14 = !{!"_ZTSN11alglib_impl6kdtreeE", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !15, i64 32, !17, i64 112, !17, i64 176, !17, i64 240, !17, i64 304, !17, i64 368, !18, i64 432, !11, i64 992}
!15 = !{!"_ZTSN11alglib_impl9ae_matrixE", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !13, i64 32, !16, i64 40, !7, i64 72}
!16 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!17 = !{!"_ZTSN11alglib_impl9ae_vectorE", !11, i64 0, !11, i64 8, !13, i64 16, !16, i64 24, !7, i64 56}
!18 = !{!"_ZTSN11alglib_impl19kdtreerequestbufferE", !17, i64 0, !17, i64 64, !17, i64 128, !11, i64 192, !12, i64 200, !13, i64 208, !12, i64 216, !11, i64 224, !17, i64 232, !17, i64 296, !17, i64 360, !17, i64 424, !17, i64 488, !12, i64 552}
!19 = !{!"_ZTSN11alglib_impl9knnbufferE", !18, i64 0, !17, i64 560, !17, i64 624, !17, i64 688, !15, i64 752}
!20 = !{i8 0, i8 2}
!21 = !{}
!22 = !{!11, !11, i64 0}
!23 = !{!10, !11, i64 0}
!24 = !{!10, !11, i64 8}
!25 = !{!7, !7, i64 0}
!26 = !{!12, !12, i64 0}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.mustprogress"}
!29 = distinct !{!29, !28}


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

; Function Attrs: mustprogress uwtable
define dso_local noundef i64 @_ZN11alglib_impl11knnclassifyEPNS_8knnmodelEPNS_9ae_vectorEPNS_8ae_stateE(ptr noundef %0, ptr nocapture noundef readonly %1, ptr noundef %2) local_unnamed_addr #0 {
  %4 = getelementptr inbounds i8, ptr %0, i64 32
  %5 = load i8, ptr %4, align 8, !tbaa !5, !range !19, !noundef !20
  %6 = trunc nuw i8 %5 to i1
  br i1 %6, label %7, label %.loopexit

7:                                                ; preds = %3
  %8 = load i64, ptr %0, align 8, !tbaa !21
  %9 = getelementptr inbounds i8, ptr %0, i64 8
  %10 = load i64, ptr %9, align 8, !tbaa !22
  %.not.not27 = icmp sgt i64 %8, 0
  br i1 %.not.not27, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %7
  %11 = getelementptr inbounds i8, ptr %1, i64 56
  %12 = getelementptr inbounds i8, ptr %0, i64 1656
  %xtraiter = and i64 %8, 3
  %13 = icmp ult i64 %8, 4
  br i1 %13, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %8, 9223372036854775804
  br label %14

14:                                               ; preds = %14, %.lr.ph.new
  %.02428 = phi i64 [ 0, %.lr.ph.new ], [ %38, %14 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.3, %14 ]
  %15 = load ptr, ptr %11, align 8, !tbaa !23
  %16 = getelementptr inbounds double, ptr %15, i64 %.02428
  %17 = load double, ptr %16, align 8, !tbaa !24
  %18 = load ptr, ptr %12, align 8, !tbaa !23
  %19 = getelementptr inbounds double, ptr %18, i64 %.02428
  store double %17, ptr %19, align 8, !tbaa !24
  %20 = or disjoint i64 %.02428, 1
  %21 = load ptr, ptr %11, align 8, !tbaa !23
  %22 = getelementptr inbounds double, ptr %21, i64 %20
  %23 = load double, ptr %22, align 8, !tbaa !24
  %24 = load ptr, ptr %12, align 8, !tbaa !23
  %25 = getelementptr inbounds double, ptr %24, i64 %20
  store double %23, ptr %25, align 8, !tbaa !24
  %26 = or disjoint i64 %.02428, 2
  %27 = load ptr, ptr %11, align 8, !tbaa !23
  %28 = getelementptr inbounds double, ptr %27, i64 %26
  %29 = load double, ptr %28, align 8, !tbaa !24
  %30 = load ptr, ptr %12, align 8, !tbaa !23
  %31 = getelementptr inbounds double, ptr %30, i64 %26
  store double %29, ptr %31, align 8, !tbaa !24
  %32 = or disjoint i64 %.02428, 3
  %33 = load ptr, ptr %11, align 8, !tbaa !23
  %34 = getelementptr inbounds double, ptr %33, i64 %32
  %35 = load double, ptr %34, align 8, !tbaa !24
  %36 = load ptr, ptr %12, align 8, !tbaa !23
  %37 = getelementptr inbounds double, ptr %36, i64 %32
  store double %35, ptr %37, align 8, !tbaa !24
  %38 = add nuw nsw i64 %.02428, 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 %14, !llvm.loop !25

._crit_edge.loopexit.unr-lcssa:                   ; preds = %14, %.lr.ph
  %.02428.unr = phi i64 [ 0, %.lr.ph ], [ %38, %14 ]
  %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
  %.02428.epil = phi i64 [ %44, %.epil.preheader ], [ %.02428.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %39 = load ptr, ptr %11, align 8, !tbaa !23
  %40 = getelementptr inbounds double, ptr %39, i64 %.02428.epil
  %41 = load double, ptr %40, align 8, !tbaa !24
  %42 = load ptr, ptr %12, align 8, !tbaa !23
  %43 = getelementptr inbounds double, ptr %42, i64 %.02428.epil
  store double %41, ptr %43, align 8, !tbaa !24
  %44 = add nuw nsw i64 %.02428.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 !27

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader, %7
  %45 = getelementptr inbounds i8, ptr %0, i64 1040
  tail call void @_ZN11alglib_implL19knn_processinternalEPNS_8knnmodelEPNS_9knnbufferEPNS_8ae_stateE(ptr noundef nonnull %0, ptr noundef nonnull %45, ptr noundef %2)
  %.not.not2629 = icmp sgt i64 %10, 1
  br i1 %.not.not2629, label %.lr.ph33, label %.loopexit

.lr.ph33:                                         ; preds = %._crit_edge
  %46 = getelementptr inbounds i8, ptr %0, i64 1720
  %47 = load ptr, ptr %46, align 8, !tbaa !23
  %48 = add nsw i64 %10, -1
  %49 = add nsw i64 %10, -2
  %xtraiter36 = and i64 %48, 3
  %50 = icmp ult i64 %49, 3
  br i1 %50, label %.loopexit.loopexit.unr-lcssa, label %.lr.ph33.new

.lr.ph33.new:                                     ; preds = %.lr.ph33
  %unroll_iter40 = and i64 %48, -4
  br label %51

51:                                               ; preds = %51, %.lr.ph33.new
  %.031 = phi i64 [ 0, %.lr.ph33.new ], [ %.1.3, %51 ]
  %.12530 = phi i64 [ 1, %.lr.ph33.new ], [ %75, %51 ]
  %niter41 = phi i64 [ 0, %.lr.ph33.new ], [ %niter41.next.3, %51 ]
  %52 = getelementptr inbounds double, ptr %47, i64 %.12530
  %53 = load double, ptr %52, align 8, !tbaa !24
  %54 = getelementptr inbounds double, ptr %47, i64 %.031
  %55 = load double, ptr %54, align 8, !tbaa !24
  %56 = fcmp ogt double %53, %55
  %.1 = select i1 %56, i64 %.12530, i64 %.031
  %57 = add nuw nsw i64 %.12530, 1
  %58 = getelementptr inbounds double, ptr %47, i64 %57
  %59 = load double, ptr %58, align 8, !tbaa !24
  %60 = getelementptr inbounds double, ptr %47, i64 %.1
  %61 = load double, ptr %60, align 8, !tbaa !24
  %62 = fcmp ogt double %59, %61
  %.1.1 = select i1 %62, i64 %57, i64 %.1
  %63 = add nuw nsw i64 %.12530, 2
  %64 = getelementptr inbounds double, ptr %47, i64 %63
  %65 = load double, ptr %64, align 8, !tbaa !24
  %66 = getelementptr inbounds double, ptr %47, i64 %.1.1
  %67 = load double, ptr %66, align 8, !tbaa !24
  %68 = fcmp ogt double %65, %67
  %.1.2 = select i1 %68, i64 %63, i64 %.1.1
  %69 = add nuw nsw i64 %.12530, 3
  %70 = getelementptr inbounds double, ptr %47, i64 %69
  %71 = load double, ptr %70, align 8, !tbaa !24
  %72 = getelementptr inbounds double, ptr %47, i64 %.1.2
  %73 = load double, ptr %72, align 8, !tbaa !24
  %74 = fcmp ogt double %71, %73
  %.1.3 = select i1 %74, i64 %69, i64 %.1.2
  %75 = add nuw nsw i64 %.12530, 4
  %niter41.next.3 = add i64 %niter41, 4
  %niter41.ncmp.3 = icmp eq i64 %niter41.next.3, %unroll_iter40
  br i1 %niter41.ncmp.3, label %.loopexit.loopexit.unr-lcssa, label %51, !llvm.loop !29

.loopexit.loopexit.unr-lcssa:                     ; preds = %51, %.lr.ph33
  %.1.lcssa.ph = phi i64 [ poison, %.lr.ph33 ], [ %.1.3, %51 ]
  %.031.unr = phi i64 [ 0, %.lr.ph33 ], [ %.1.3, %51 ]
  %.12530.unr = phi i64 [ 1, %.lr.ph33 ], [ %75, %51 ]
  %lcmp.mod38.not = icmp eq i64 %xtraiter36, 0
  br i1 %lcmp.mod38.not, label %.loopexit, label %.epil.preheader35

.epil.preheader35:                                ; preds = %.loopexit.loopexit.unr-lcssa, %.epil.preheader35
  %.031.epil = phi i64 [ %.1.epil, %.epil.preheader35 ], [ %.031.unr, %.loopexit.loopexit.unr-lcssa ]
  %.12530.epil = phi i64 [ %81, %.epil.preheader35 ], [ %.12530.unr, %.loopexit.loopexit.unr-lcssa ]
  %epil.iter37 = phi i64 [ %epil.iter37.next, %.epil.preheader35 ], [ 0, %.loopexit.loopexit.unr-lcssa ]
  %76 = getelementptr inbounds double, ptr %47, i64 %.12530.epil
  %77 = load double, ptr %76, align 8, !tbaa !24
  %78 = getelementptr inbounds double, ptr %47, i64 %.031.epil
  %79 = load double, ptr %78, align 8, !tbaa !24
  %80 = fcmp ogt double %77, %79
  %.1.epil = select i1 %80, i64 %.12530.epil, i64 %.031.epil
  %81 = add nuw nsw i64 %.12530.epil, 1
  %epil.iter37.next = add i64 %epil.iter37, 1
  %epil.iter37.cmp.not = icmp eq i64 %epil.iter37.next, %xtraiter36
  br i1 %epil.iter37.cmp.not, label %.loopexit, label %.epil.preheader35, !llvm.loop !30

.loopexit:                                        ; preds = %.loopexit.loopexit.unr-lcssa, %.epil.preheader35, %._crit_edge, %3
  %.023 = phi i64 [ -1, %3 ], [ 0, %._crit_edge ], [ %.1.lcssa.ph, %.loopexit.loopexit.unr-lcssa ], [ %.1.epil, %.epil.preheader35 ]
  ret i64 %.023
}

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN11alglib_implL19knn_processinternalEPNS_8knnmodelEPNS_9knnbufferEPNS_8ae_stateE(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

attributes #0 = { 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, !11, i64 32}
!6 = !{!"_ZTSN11alglib_impl8knnmodelE", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !11, i64 32, !11, i64 33, !12, i64 40, !18, i64 1040}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"double", !8, i64 0}
!11 = !{!"bool", !8, i64 0}
!12 = !{!"_ZTSN11alglib_impl6kdtreeE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !13, i64 32, !16, i64 112, !16, i64 176, !16, i64 240, !16, i64 304, !16, i64 368, !17, i64 432, !7, i64 992}
!13 = !{!"_ZTSN11alglib_impl9ae_matrixE", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !11, i64 32, !14, i64 40, !8, i64 72}
!14 = !{!"_ZTSN11alglib_impl12ae_dyn_blockE", !15, i64 0, !15, i64 8, !15, i64 16, !15, i64 24}
!15 = !{!"any pointer", !8, i64 0}
!16 = !{!"_ZTSN11alglib_impl9ae_vectorE", !7, i64 0, !7, i64 8, !11, i64 16, !14, i64 24, !8, i64 56}
!17 = !{!"_ZTSN11alglib_impl19kdtreerequestbufferE", !16, i64 0, !16, i64 64, !16, i64 128, !7, i64 192, !10, i64 200, !11, i64 208, !10, i64 216, !7, i64 224, !16, i64 232, !16, i64 296, !16, i64 360, !16, i64 424, !16, i64 488, !10, i64 552}
!18 = !{!"_ZTSN11alglib_impl9knnbufferE", !17, i64 0, !16, i64 560, !16, i64 624, !16, i64 688, !13, i64 752}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{!6, !7, i64 0}
!22 = !{!6, !7, i64 8}
!23 = !{!8, !8, i64 0}
!24 = !{!10, !10, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = distinct !{!27, !28}
!28 = !{!"llvm.loop.unroll.disable"}
!29 = distinct !{!29, !26}
!30 = distinct !{!30, !28}


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