; LLVM IR from robinrodricks/InspiritImage :: Inspirit.Assurf/clib/kdtree (kdtree)

; 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._VlKDForest = type { i32, ptr, i32, ptr, i32, ptr, ptr, i32, i32, [5 x %struct._VlKDTreeSplitDimension], i32, i32, ptr, i32, i32, ptr, i32, i32, i32, i32 }
%struct._VlKDTreeSplitDimension = type { i32, double, double }
%struct._VlKDTree = type { ptr, i32, i32, ptr, i32 }
%struct._VlKDTreeDataIndexEntry = type { i32, double }

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nounwind uwtable
define dso_local void @vl_kdforest_build(ptr noundef %0, i32 noundef %1, ptr noundef %2) #2 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  %9 = load ptr, ptr %6, align 8, !tbaa !5
  %10 = load ptr, ptr %4, align 8, !tbaa !5
  %11 = getelementptr inbounds %struct._VlKDForest, ptr %10, i32 0, i32 3
  store ptr %9, ptr %11, align 8, !tbaa !11
  %12 = load i32, ptr %5, align 4, !tbaa !9
  %13 = load ptr, ptr %4, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct._VlKDForest, ptr %13, i32 0, i32 4
  store i32 %12, ptr %14, align 8, !tbaa !13
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct._VlKDForest, ptr %15, i32 0, i32 7
  %17 = load i32, ptr %16, align 8, !tbaa !14
  %18 = zext i32 %17 to i64
  %19 = mul i64 8, %18
  %20 = call noalias ptr @malloc(i64 noundef %19) #4
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct._VlKDForest, ptr %21, i32 0, i32 6
  store ptr %20, ptr %22, align 8, !tbaa !15
  store i32 0, ptr %8, align 4, !tbaa !9
  br label %23

23:                                               ; preds = %144, %3
  %24 = load i32, ptr %8, align 4, !tbaa !9
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct._VlKDForest, ptr %25, i32 0, i32 7
  %27 = load i32, ptr %26, align 8, !tbaa !14
  %28 = icmp ult i32 %24, %27
  br i1 %28, label %29, label %147

29:                                               ; preds = %23
  %30 = call noalias ptr @malloc(i64 noundef 32) #4
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct._VlKDForest, ptr %31, i32 0, i32 6
  %33 = load ptr, ptr %32, align 8, !tbaa !15
  %34 = load i32, ptr %8, align 4, !tbaa !9
  %35 = zext i32 %34 to i64
  %36 = getelementptr inbounds ptr, ptr %33, i64 %35
  store ptr %30, ptr %36, align 8, !tbaa !5
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct._VlKDForest, ptr %37, i32 0, i32 4
  %39 = load i32, ptr %38, align 8, !tbaa !13
  %40 = zext i32 %39 to i64
  %41 = mul i64 16, %40
  %42 = call noalias ptr @malloc(i64 noundef %41) #4
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct._VlKDForest, ptr %43, i32 0, i32 6
  %45 = load ptr, ptr %44, align 8, !tbaa !15
  %46 = load i32, ptr %8, align 4, !tbaa !9
  %47 = zext i32 %46 to i64
  %48 = getelementptr inbounds ptr, ptr %45, i64 %47
  %49 = load ptr, ptr %48, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct._VlKDTree, ptr %49, i32 0, i32 3
  store ptr %42, ptr %50, align 8, !tbaa !16
  store i32 0, ptr %7, align 4, !tbaa !9
  br label %51

51:                                               ; preds = %72, %29
  %52 = load i32, ptr %7, align 4, !tbaa !9
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct._VlKDForest, ptr %53, i32 0, i32 4
  %55 = load i32, ptr %54, align 8, !tbaa !13
  %56 = icmp ult i32 %52, %55
  br i1 %56, label %57, label %75

57:                                               ; preds = %51
  %58 = load i32, ptr %7, align 4, !tbaa !9
  %59 = load ptr, ptr %4, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct._VlKDForest, ptr %59, i32 0, i32 6
  %61 = load ptr, ptr %60, align 8, !tbaa !15
  %62 = load i32, ptr %8, align 4, !tbaa !9
  %63 = zext i32 %62 to i64
  %64 = getelementptr inbounds ptr, ptr %61, i64 %63
  %65 = load ptr, ptr %64, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct._VlKDTree, ptr %65, i32 0, i32 3
  %67 = load ptr, ptr %66, align 8, !tbaa !16
  %68 = load i32, ptr %7, align 4, !tbaa !9
  %69 = zext i32 %68 to i64
  %70 = getelementptr inbounds %struct._VlKDTreeDataIndexEntry, ptr %67, i64 %69
  %71 = getelementptr inbounds %struct._VlKDTreeDataIndexEntry, ptr %70, i32 0, i32 0
  store i32 %58, ptr %71, align 8, !tbaa !18
  br label %72

72:                                               ; preds = %57
  %73 = load i32, ptr %7, align 4, !tbaa !9
  %74 = add i32 %73, 1
  store i32 %74, ptr %7, align 4, !tbaa !9
  br label %51, !llvm.loop !21

75:                                               ; preds = %51
  %76 = load ptr, ptr %4, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct._VlKDForest, ptr %76, i32 0, i32 6
  %78 = load ptr, ptr %77, align 8, !tbaa !15
  %79 = load i32, ptr %8, align 4, !tbaa !9
  %80 = zext i32 %79 to i64
  %81 = getelementptr inbounds ptr, ptr %78, i64 %80
  %82 = load ptr, ptr %81, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct._VlKDTree, ptr %82, i32 0, i32 1
  store i32 0, ptr %83, align 8, !tbaa !23
  %84 = load ptr, ptr %4, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct._VlKDForest, ptr %84, i32 0, i32 4
  %86 = load i32, ptr %85, align 8, !tbaa !13
  %87 = mul i32 2, %86
  %88 = sub i32 %87, 1
  %89 = load ptr, ptr %4, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct._VlKDForest, ptr %89, i32 0, i32 6
  %91 = load ptr, ptr %90, align 8, !tbaa !15
  %92 = load i32, ptr %8, align 4, !tbaa !9
  %93 = zext i32 %92 to i64
  %94 = getelementptr inbounds ptr, ptr %91, i64 %93
  %95 = load ptr, ptr %94, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct._VlKDTree, ptr %95, i32 0, i32 2
  store i32 %88, ptr %96, align 4, !tbaa !24
  %97 = load ptr, ptr %4, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct._VlKDForest, ptr %97, i32 0, i32 6
  %99 = load ptr, ptr %98, align 8, !tbaa !15
  %100 = load i32, ptr %8, align 4, !tbaa !9
  %101 = zext i32 %100 to i64
  %102 = getelementptr inbounds ptr, ptr %99, i64 %101
  %103 = load ptr, ptr %102, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct._VlKDTree, ptr %103, i32 0, i32 2
  %105 = load i32, ptr %104, align 4, !tbaa !24
  %106 = zext i32 %105 to i64
  %107 = mul i64 40, %106
  %108 = call noalias ptr @malloc(i64 noundef %107) #4
  %109 = load ptr, ptr %4, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct._VlKDForest, ptr %109, i32 0, i32 6
  %111 = load ptr, ptr %110, align 8, !tbaa !15
  %112 = load i32, ptr %8, align 4, !tbaa !9
  %113 = zext i32 %112 to i64
  %114 = getelementptr inbounds ptr, ptr %111, i64 %113
  %115 = load ptr, ptr %114, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct._VlKDTree, ptr %115, i32 0, i32 0
  store ptr %108, ptr %116, align 8, !tbaa !25
  %117 = load ptr, ptr %4, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct._VlKDForest, ptr %117, i32 0, i32 6
  %119 = load ptr, ptr %118, align 8, !tbaa !15
  %120 = load i32, ptr %8, align 4, !tbaa !9
  %121 = zext i32 %120 to i64
  %122 = getelementptr inbounds ptr, ptr %119, i64 %121
  %123 = load ptr, ptr %122, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct._VlKDTree, ptr %123, i32 0, i32 4
  store i32 0, ptr %124, align 8, !tbaa !26
  %125 = load ptr, ptr %4, align 8, !tbaa !5
  %126 = load ptr, ptr %4, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct._VlKDForest, ptr %126, i32 0, i32 6
  %128 = load ptr, ptr %127, align 8, !tbaa !15
  %129 = load i32, ptr %8, align 4, !tbaa !9
  %130 = zext i32 %129 to i64
  %131 = getelementptr inbounds ptr, ptr %128, i64 %130
  %132 = load ptr, ptr %131, align 8, !tbaa !5
  %133 = load ptr, ptr %4, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct._VlKDForest, ptr %133, i32 0, i32 6
  %135 = load ptr, ptr %134, align 8, !tbaa !15
  %136 = load i32, ptr %8, align 4, !tbaa !9
  %137 = zext i32 %136 to i64
  %138 = getelementptr inbounds ptr, ptr %135, i64 %137
  %139 = load ptr, ptr %138, align 8, !tbaa !5
  %140 = call i32 @vl_kdtree_node_new(ptr noundef %139, i32 noundef 0)
  %141 = load ptr, ptr %4, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct._VlKDForest, ptr %141, i32 0, i32 4
  %143 = load i32, ptr %142, align 8, !tbaa !13
  call void @vl_kdtree_build_recursively(ptr noundef %125, ptr noundef %132, i32 noundef %140, i32 noundef 0, i32 noundef %143, i32 noundef 0)
  br label %144

144:                                              ; preds = %75
  %145 = load i32, ptr %8, align 4, !tbaa !9
  %146 = add i32 %145, 1
  store i32 %146, ptr %8, align 4, !tbaa !9
  br label %23, !llvm.loop !27

147:                                              ; preds = %23
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  ret void
}

; Function Attrs: nounwind uwtable
declare hidden void @vl_kdtree_build_recursively(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #2

; Function Attrs: nounwind uwtable
declare hidden i32 @vl_kdtree_node_new(ptr noundef, i32 noundef) #2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind allocsize(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 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 }
attributes #4 = { nounwind allocsize(0) }

!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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 24}
!12 = !{!"_VlKDForest", !10, i64 0, !6, i64 8, !10, i64 16, !6, i64 24, !10, i64 32, !6, i64 40, !6, i64 48, !10, i64 56, !10, i64 60, !7, i64 64, !10, i64 184, !10, i64 188, !6, i64 192, !10, i64 200, !10, i64 204, !6, i64 208, !10, i64 216, !10, i64 220, !10, i64 224, !10, i64 228}
!13 = !{!12, !10, i64 32}
!14 = !{!12, !10, i64 56}
!15 = !{!12, !6, i64 48}
!16 = !{!17, !6, i64 16}
!17 = !{!"_VlKDTree", !6, i64 0, !10, i64 8, !10, i64 12, !6, i64 16, !10, i64 24}
!18 = !{!19, !10, i64 0}
!19 = !{!"_VlKDTreeDataIndexEntry", !10, i64 0, !20, i64 8}
!20 = !{!"double", !7, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!17, !10, i64 8}
!24 = !{!17, !10, i64 12}
!25 = !{!17, !6, i64 0}
!26 = !{!17, !10, i64 24}
!27 = distinct !{!27, !22}


; 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._VlKDTreeDataIndexEntry = type { i32, double }

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @vl_kdforest_build(ptr noundef %0, i32 noundef %1, ptr noundef %2) local_unnamed_addr #1 {
  %4 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr %2, ptr %4, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %0, i64 32
  store i32 %1, ptr %5, align 8, !tbaa !11
  %6 = getelementptr inbounds i8, ptr %0, i64 56
  %7 = load i32, ptr %6, align 8, !tbaa !12
  %8 = zext i32 %7 to i64
  %9 = shl nuw nsw i64 %8, 3
  %10 = tail call noalias ptr @malloc(i64 noundef %9) #2
  %11 = getelementptr inbounds i8, ptr %0, i64 48
  store ptr %10, ptr %11, align 8, !tbaa !13
  %.not = icmp eq i32 %7, 0
  br i1 %.not, label %._crit_edge42, label %.lr.ph41

.lr.ph41:                                         ; preds = %3, %._crit_edge
  %indvars.iv45 = phi i64 [ %indvars.iv.next46, %._crit_edge ], [ 0, %3 ]
  %12 = tail call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #2
  %13 = load ptr, ptr %11, align 8, !tbaa !13
  %14 = getelementptr inbounds ptr, ptr %13, i64 %indvars.iv45
  store ptr %12, ptr %14, align 8, !tbaa !14
  %15 = load i32, ptr %5, align 8, !tbaa !11
  %16 = zext i32 %15 to i64
  %17 = shl nuw nsw i64 %16, 4
  %18 = tail call noalias ptr @malloc(i64 noundef %17) #2
  %19 = load ptr, ptr %11, align 8, !tbaa !13
  %20 = getelementptr inbounds ptr, ptr %19, i64 %indvars.iv45
  %21 = load ptr, ptr %20, align 8, !tbaa !14
  %22 = getelementptr inbounds i8, ptr %21, i64 16
  store ptr %18, ptr %22, align 8, !tbaa !15
  %.not43 = icmp eq i32 %15, 0
  %.pre = load ptr, ptr %20, align 8, !tbaa !14
  br i1 %.not43, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph41
  %23 = getelementptr inbounds i8, ptr %.pre, i64 16
  %24 = load ptr, ptr %23, align 8, !tbaa !15
  %xtraiter = and i64 %16, 3
  %25 = icmp ult i32 %15, 4
  br i1 %25, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %16, 4294967292
  br label %26

26:                                               ; preds = %26, %.lr.ph.new
  %indvars.iv = phi i64 [ 0, %.lr.ph.new ], [ %indvars.iv.next.3, %26 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.3, %26 ]
  %27 = getelementptr inbounds %struct._VlKDTreeDataIndexEntry, ptr %24, i64 %indvars.iv
  %28 = trunc nuw i64 %indvars.iv to i32
  store i32 %28, ptr %27, align 8, !tbaa !17
  %indvars.iv.next = or disjoint i64 %indvars.iv, 1
  %29 = getelementptr inbounds %struct._VlKDTreeDataIndexEntry, ptr %24, i64 %indvars.iv.next
  %30 = trunc nuw i64 %indvars.iv.next to i32
  store i32 %30, ptr %29, align 8, !tbaa !17
  %indvars.iv.next.1 = or disjoint i64 %indvars.iv, 2
  %31 = getelementptr inbounds %struct._VlKDTreeDataIndexEntry, ptr %24, i64 %indvars.iv.next.1
  %32 = trunc nuw i64 %indvars.iv.next.1 to i32
  store i32 %32, ptr %31, align 8, !tbaa !17
  %indvars.iv.next.2 = or disjoint i64 %indvars.iv, 3
  %33 = getelementptr inbounds %struct._VlKDTreeDataIndexEntry, ptr %24, i64 %indvars.iv.next.2
  %34 = trunc nuw i64 %indvars.iv.next.2 to i32
  store i32 %34, ptr %33, align 8, !tbaa !17
  %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 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 %26, !llvm.loop !20

._crit_edge.loopexit.unr-lcssa:                   ; preds = %26, %.lr.ph
  %indvars.iv.unr = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next.3, %26 ]
  %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
  %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %.epil.preheader ], [ %indvars.iv.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %35 = getelementptr inbounds %struct._VlKDTreeDataIndexEntry, ptr %24, i64 %indvars.iv.epil
  %36 = trunc nuw i64 %indvars.iv.epil to i32
  store i32 %36, ptr %35, align 8, !tbaa !17
  %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.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 !22

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader, %.lr.ph41
  %37 = getelementptr inbounds i8, ptr %.pre, i64 8
  store i32 0, ptr %37, align 8, !tbaa !24
  %38 = shl i32 %15, 1
  %39 = add i32 %38, -1
  %40 = getelementptr inbounds i8, ptr %.pre, i64 12
  store i32 %39, ptr %40, align 4, !tbaa !25
  %41 = zext i32 %39 to i64
  %42 = mul nuw nsw i64 %41, 40
  %43 = tail call noalias ptr @malloc(i64 noundef %42) #2
  store ptr %43, ptr %.pre, align 8, !tbaa !26
  %44 = load ptr, ptr %20, align 8, !tbaa !14
  %45 = getelementptr inbounds i8, ptr %44, i64 24
  store i32 0, ptr %45, align 8, !tbaa !27
  %46 = tail call i32 @vl_kdtree_node_new(ptr noundef %44, i32 noundef 0)
  %47 = load i32, ptr %5, align 8, !tbaa !11
  tail call void @vl_kdtree_build_recursively(ptr noundef %0, ptr noundef %44, i32 noundef %46, i32 noundef 0, i32 noundef %47, i32 noundef 0)
  %indvars.iv.next46 = add nuw nsw i64 %indvars.iv45, 1
  %48 = load i32, ptr %6, align 8, !tbaa !12
  %49 = zext i32 %48 to i64
  %50 = icmp ult i64 %indvars.iv.next46, %49
  br i1 %50, label %.lr.ph41, label %._crit_edge42, !llvm.loop !28

._crit_edge42:                                    ; preds = %._crit_edge, %3
  ret void
}

; Function Attrs: nounwind uwtable
declare hidden void @vl_kdtree_build_recursively(ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden i32 @vl_kdtree_node_new(ptr noundef, i32 noundef) local_unnamed_addr #1

attributes #0 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { nounwind 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 allocsize(0) }

!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, !10, i64 24}
!6 = !{!"_VlKDForest", !7, i64 0, !10, i64 8, !7, i64 16, !10, i64 24, !7, i64 32, !10, i64 40, !10, i64 48, !7, i64 56, !7, i64 60, !8, i64 64, !7, i64 184, !7, i64 188, !10, i64 192, !7, i64 200, !7, i64 204, !10, i64 208, !7, i64 216, !7, i64 220, !7, i64 224, !7, i64 228}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !7, i64 32}
!12 = !{!6, !7, i64 56}
!13 = !{!6, !10, i64 48}
!14 = !{!10, !10, i64 0}
!15 = !{!16, !10, i64 16}
!16 = !{!"_VlKDTree", !10, i64 0, !7, i64 8, !7, i64 12, !10, i64 16, !7, i64 24}
!17 = !{!18, !7, i64 0}
!18 = !{!"_VlKDTreeDataIndexEntry", !7, i64 0, !19, i64 8}
!19 = !{!"double", !8, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.unroll.disable"}
!24 = !{!16, !7, i64 8}
!25 = !{!16, !7, i64 12}
!26 = !{!16, !10, i64 0}
!27 = !{!16, !7, i64 24}
!28 = distinct !{!28, !21}


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