; LLVM IR from yangfengzzz/Arche-webgpu :: vox.geometry (point_hash_grid_searcher2)

; 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.vox::Vector" = type { double, double }
%"class.vox::PointHashGridSearcher2" = type { %"class.vox::PointNeighborSearcher2", double, %"struct.vox::Point", %"class.std::vector", %"class.std::vector.0" }
%"class.vox::PointNeighborSearcher2" = type { ptr }
%"struct.vox::Point" = type { i64, i64 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<vox::Point<double, 2>, std::allocator<vox::Point<double, 2>>>::_Vector_impl" }
%"struct.std::_Vector_base<vox::Point<double, 2>, std::allocator<vox::Point<double, 2>>>::_Vector_impl" = type { %"struct.std::_Vector_base<vox::Point<double, 2>, std::allocator<vox::Point<double, 2>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<vox::Point<double, 2>, std::allocator<vox::Point<double, 2>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<std::vector<unsigned long>, std::allocator<std::vector<unsigned long>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<unsigned long>, std::allocator<std::vector<unsigned long>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<unsigned long>, std::allocator<std::vector<unsigned long>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<unsigned long>, std::allocator<std::vector<unsigned long>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6vectorIS_ImSaImEESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3vox22PointHashGridSearcher213getNearbyKeysERKNS_5PointIdLm2EEEPm(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_ImSaImEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorImSaImEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3voxmiIdEENS_6VectorIT_Lm2EEERKNS_5PointIS2_Lm2EEES7_(ptr dead_on_unwind noalias writable sret(%"struct.vox::Vector") align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN3vox5PointIdLm2EEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK3vox6VectorIdLm2EE13lengthSquaredEv(ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK3vox22PointHashGridSearcher214hasNearbyPointERKNS_5PointIdLm2EEEd(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, double noundef %2) unnamed_addr #2 align 2 {
  %4 = alloca i1, align 1
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca double, align 8
  %8 = alloca [4 x i64], align 16
  %9 = alloca double, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca double, align 8
  %20 = alloca %"struct.vox::Vector", align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store double %2, ptr %7, align 8, !tbaa !9
  %21 = load ptr, ptr %5, align 8
  %22 = getelementptr inbounds %"class.vox::PointHashGridSearcher2", ptr %21, i32 0, i32 4
  %23 = call noundef zeroext i1 @_ZNKSt6vectorIS_ImSaImEESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %22) #3
  br i1 %23, label %24, label %25

24:                                               ; preds = %3
  store i1 false, ptr %4, align 1
  br label %91

25:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #3
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  %27 = getelementptr inbounds [4 x i64], ptr %8, i64 0, i64 0
  call void @_ZNK3vox22PointHashGridSearcher213getNearbyKeysERKNS_5PointIdLm2EEEPm(ptr noundef nonnull align 8 dereferenceable(80) %21, ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef %27)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  %28 = load double, ptr %7, align 8, !tbaa !9
  %29 = load double, ptr %7, align 8, !tbaa !9
  %30 = fmul double %28, %29
  store double %30, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  store ptr %8, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %31 = load ptr, ptr %10, align 8, !tbaa !5
  %32 = getelementptr inbounds [4 x i64], ptr %31, i64 0, i64 0
  store ptr %32, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %33 = load ptr, ptr %10, align 8, !tbaa !5
  %34 = getelementptr inbounds [4 x i64], ptr %33, i64 0, i64 0
  %35 = getelementptr inbounds i64, ptr %34, i64 4
  store ptr %35, ptr %12, align 8, !tbaa !5
  br label %36

36:                                               ; preds = %84, %25
  %37 = load ptr, ptr %11, align 8, !tbaa !5
  %38 = load ptr, ptr %12, align 8, !tbaa !5
  %39 = icmp ne ptr %37, %38
  br i1 %39, label %41, label %40

40:                                               ; preds = %36
  store i32 2, ptr %13, align 4
  br label %87

41:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  %42 = load ptr, ptr %11, align 8, !tbaa !5
  %43 = load i64, ptr %42, align 8, !tbaa !11
  store i64 %43, ptr %14, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  %44 = getelementptr inbounds %"class.vox::PointHashGridSearcher2", ptr %21, i32 0, i32 4
  %45 = load i64, ptr %14, align 8, !tbaa !11
  %46 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_ImSaImEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %44, i64 noundef %45) #3
  store ptr %46, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  %47 = load ptr, ptr %15, align 8, !tbaa !5
  %48 = call noundef i64 @_ZNKSt6vectorImSaImEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %47) #3
  store i64 %48, ptr %16, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  store i64 0, ptr %17, align 8, !tbaa !11
  br label %49

49:                                               ; preds = %72, %41
  %50 = load i64, ptr %17, align 8, !tbaa !11
  %51 = load i64, ptr %16, align 8, !tbaa !11
  %52 = icmp ult i64 %50, %51
  br i1 %52, label %54, label %53

53:                                               ; preds = %49
  store i32 4, ptr %13, align 4
  br label %75

54:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  %55 = load ptr, ptr %15, align 8, !tbaa !5
  %56 = load i64, ptr %17, align 8, !tbaa !11
  %57 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %55, i64 noundef %56) #3
  %58 = load i64, ptr %57, align 8, !tbaa !11
  store i64 %58, ptr %18, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #3
  %59 = getelementptr inbounds %"class.vox::PointHashGridSearcher2", ptr %21, i32 0, i32 3
  %60 = load i64, ptr %18, align 8, !tbaa !11
  %61 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN3vox5PointIdLm2EEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %59, i64 noundef %60) #3
  %62 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN3voxmiIdEENS_6VectorIT_Lm2EEERKNS_5PointIS2_Lm2EEES7_(ptr dead_on_unwind writable sret(%"struct.vox::Vector") align 8 %20, ptr noundef nonnull align 8 dereferenceable(16) %61, ptr noundef nonnull align 8 dereferenceable(16) %62)
  %63 = call noundef double @_ZNK3vox6VectorIdLm2EE13lengthSquaredEv(ptr noundef nonnull align 8 dereferenceable(16) %20)
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #3
  store double %63, ptr %19, align 8, !tbaa !9
  %64 = load double, ptr %19, align 8, !tbaa !9
  %65 = load double, ptr %9, align 8, !tbaa !9
  %66 = fcmp ole double %64, %65
  br i1 %66, label %67, label %68

67:                                               ; preds = %54
  store i1 true, ptr %4, align 1
  store i32 1, ptr %13, align 4
  br label %69

68:                                               ; preds = %54
  store i32 0, ptr %13, align 4
  br label %69

69:                                               ; preds = %68, %67
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  %70 = load i32, ptr %13, align 4
  switch i32 %70, label %75 [
    i32 0, label %71
  ]

71:                                               ; preds = %69
  br label %72

72:                                               ; preds = %71
  %73 = load i64, ptr %17, align 8, !tbaa !11
  %74 = add i64 %73, 1
  store i64 %74, ptr %17, align 8, !tbaa !11
  br label %49, !llvm.loop !13

75:                                               ; preds = %69, %53
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  %76 = load i32, ptr %13, align 4
  switch i32 %76, label %78 [
    i32 4, label %77
  ]

77:                                               ; preds = %75
  store i32 0, ptr %13, align 4
  br label %78

78:                                               ; preds = %77, %75
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  %79 = load i32, ptr %13, align 4
  switch i32 %79, label %81 [
    i32 0, label %80
  ]

80:                                               ; preds = %78
  store i32 0, ptr %13, align 4
  br label %81

81:                                               ; preds = %80, %78
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  %82 = load i32, ptr %13, align 4
  switch i32 %82, label %87 [
    i32 0, label %83
  ]

83:                                               ; preds = %81
  br label %84

84:                                               ; preds = %83
  %85 = load ptr, ptr %11, align 8, !tbaa !5
  %86 = getelementptr inbounds i64, ptr %85, i32 1
  store ptr %86, ptr %11, align 8, !tbaa !5
  br label %36

87:                                               ; preds = %81, %40
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  %88 = load i32, ptr %13, align 4
  switch i32 %88, label %90 [
    i32 2, label %89
  ]

89:                                               ; preds = %87
  store i1 false, ptr %4, align 1
  store i32 1, ptr %13, align 4
  br label %90

90:                                               ; preds = %89, %87
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #3
  br label %91

91:                                               ; preds = %90, %24
  %92 = load i1, ptr %4, align 1
  ret i1 %92
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress 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 = { 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 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


; 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.vox::Vector" = type { double, double }

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt6vectorIS_ImSaImEESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3vox22PointHashGridSearcher213getNearbyKeysERKNS_5PointIdLm2EEEPm(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_ImSaImEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorImSaImEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3voxmiIdEENS_6VectorIT_Lm2EEERKNS_5PointIS2_Lm2EEES7_(ptr dead_on_unwind noalias writable sret(%"struct.vox::Vector") align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN3vox5PointIdLm2EEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK3vox6VectorIdLm2EE13lengthSquaredEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK3vox22PointHashGridSearcher214hasNearbyPointERKNS_5PointIdLm2EEEd(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, double noundef %2) unnamed_addr #2 align 2 {
  %4 = alloca [4 x i64], align 16
  %5 = alloca %"struct.vox::Vector", align 8
  %6 = getelementptr inbounds i8, ptr %0, i64 56
  %7 = tail call noundef zeroext i1 @_ZNKSt6vectorIS_ImSaImEESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #3
  br i1 %7, label %50, label %8

8:                                                ; preds = %3
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %4) #3
  call void @_ZNK3vox22PointHashGridSearcher213getNearbyKeysERKNS_5PointIdLm2EEEPm(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull %4)
  %9 = fmul double %2, %2
  %10 = getelementptr inbounds i8, ptr %0, i64 32
  %11 = load i64, ptr %4, align 16, !tbaa !5
  %12 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_ImSaImEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %11) #3
  %13 = call noundef i64 @_ZNKSt6vectorImSaImEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12) #3
  %.not3642.not = icmp eq i64 %13, 0
  br i1 %.not3642.not, label %.critedge, label %.lr.ph

14:                                               ; preds = %.lr.ph
  %15 = add nuw i64 %.03243, 1
  %exitcond.not = icmp eq i64 %15, %13
  br i1 %exitcond.not, label %.critedge, label %.lr.ph, !llvm.loop !9

.lr.ph:                                           ; preds = %8, %14
  %.03243 = phi i64 [ %15, %14 ], [ 0, %8 ]
  %16 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %.03243) #3
  %17 = load i64, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #3
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN3vox5PointIdLm2EEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %17) #3
  call void @_ZN3voxmiIdEENS_6VectorIT_Lm2EEERKNS_5PointIS2_Lm2EEES7_(ptr dead_on_unwind nonnull writable sret(%"struct.vox::Vector") align 8 %5, ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(16) %1)
  %19 = call noundef double @_ZNK3vox6VectorIdLm2EE13lengthSquaredEv(ptr noundef nonnull align 8 dereferenceable(16) %5)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #3
  %20 = fcmp ugt double %19, %9
  br i1 %20, label %14, label %.critedge38

.critedge:                                        ; preds = %14, %8
  %.031.ptr.1 = getelementptr inbounds i8, ptr %4, i64 8
  %21 = load i64, ptr %.031.ptr.1, align 8, !tbaa !5
  %22 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_ImSaImEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %21) #3
  %23 = call noundef i64 @_ZNKSt6vectorImSaImEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %22) #3
  %.not3642.not.1 = icmp eq i64 %23, 0
  br i1 %.not3642.not.1, label %.critedge.1, label %.lr.ph.1

.lr.ph.1:                                         ; preds = %.critedge, %29
  %.03243.1 = phi i64 [ %30, %29 ], [ 0, %.critedge ]
  %24 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef %.03243.1) #3
  %25 = load i64, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #3
  %26 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN3vox5PointIdLm2EEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %25) #3
  call void @_ZN3voxmiIdEENS_6VectorIT_Lm2EEERKNS_5PointIS2_Lm2EEES7_(ptr dead_on_unwind nonnull writable sret(%"struct.vox::Vector") align 8 %5, ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 8 dereferenceable(16) %1)
  %27 = call noundef double @_ZNK3vox6VectorIdLm2EE13lengthSquaredEv(ptr noundef nonnull align 8 dereferenceable(16) %5)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #3
  %28 = fcmp ugt double %27, %9
  br i1 %28, label %29, label %.critedge38

29:                                               ; preds = %.lr.ph.1
  %30 = add nuw i64 %.03243.1, 1
  %exitcond.1.not = icmp eq i64 %30, %23
  br i1 %exitcond.1.not, label %.critedge.1, label %.lr.ph.1, !llvm.loop !9

.critedge.1:                                      ; preds = %29, %.critedge
  %.031.ptr.2 = getelementptr inbounds i8, ptr %4, i64 16
  %31 = load i64, ptr %.031.ptr.2, align 16, !tbaa !5
  %32 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_ImSaImEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %31) #3
  %33 = call noundef i64 @_ZNKSt6vectorImSaImEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %32) #3
  %.not3642.not.2 = icmp eq i64 %33, 0
  br i1 %.not3642.not.2, label %.critedge.2, label %.lr.ph.2

.lr.ph.2:                                         ; preds = %.critedge.1, %39
  %.03243.2 = phi i64 [ %40, %39 ], [ 0, %.critedge.1 ]
  %34 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %32, i64 noundef %.03243.2) #3
  %35 = load i64, ptr %34, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #3
  %36 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN3vox5PointIdLm2EEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %35) #3
  call void @_ZN3voxmiIdEENS_6VectorIT_Lm2EEERKNS_5PointIS2_Lm2EEES7_(ptr dead_on_unwind nonnull writable sret(%"struct.vox::Vector") align 8 %5, ptr noundef nonnull align 8 dereferenceable(16) %36, ptr noundef nonnull align 8 dereferenceable(16) %1)
  %37 = call noundef double @_ZNK3vox6VectorIdLm2EE13lengthSquaredEv(ptr noundef nonnull align 8 dereferenceable(16) %5)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #3
  %38 = fcmp ugt double %37, %9
  br i1 %38, label %39, label %.critedge38

39:                                               ; preds = %.lr.ph.2
  %40 = add nuw i64 %.03243.2, 1
  %exitcond.2.not = icmp eq i64 %40, %33
  br i1 %exitcond.2.not, label %.critedge.2, label %.lr.ph.2, !llvm.loop !9

.critedge.2:                                      ; preds = %39, %.critedge.1
  %.031.ptr.3 = getelementptr inbounds i8, ptr %4, i64 24
  %41 = load i64, ptr %.031.ptr.3, align 8, !tbaa !5
  %42 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_ImSaImEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %41) #3
  %43 = call noundef i64 @_ZNKSt6vectorImSaImEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %42) #3
  %.not3642.not.3 = icmp eq i64 %43, 0
  br i1 %.not3642.not.3, label %.critedge38, label %.lr.ph.3

.lr.ph.3:                                         ; preds = %.critedge.2, %.lr.ph.3
  %.03243.3 = phi i64 [ %49, %.lr.ph.3 ], [ 0, %.critedge.2 ]
  %44 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %42, i64 noundef %.03243.3) #3
  %45 = load i64, ptr %44, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #3
  %46 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN3vox5PointIdLm2EEESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %45) #3
  call void @_ZN3voxmiIdEENS_6VectorIT_Lm2EEERKNS_5PointIS2_Lm2EEES7_(ptr dead_on_unwind nonnull writable sret(%"struct.vox::Vector") align 8 %5, ptr noundef nonnull align 8 dereferenceable(16) %46, ptr noundef nonnull align 8 dereferenceable(16) %1)
  %47 = call noundef double @_ZNK3vox6VectorIdLm2EE13lengthSquaredEv(ptr noundef nonnull align 8 dereferenceable(16) %5)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #3
  %48 = fcmp ole double %47, %9
  %49 = add nuw i64 %.03243.3, 1
  %exitcond.3.not = icmp eq i64 %49, %43
  %or.cond = select i1 %48, i1 true, i1 %exitcond.3.not
  br i1 %or.cond, label %.critedge38, label %.lr.ph.3, !llvm.loop !9

.critedge38:                                      ; preds = %.lr.ph, %.lr.ph.1, %.lr.ph.2, %.lr.ph.3, %.critedge.2
  %.not41 = phi i1 [ false, %.critedge.2 ], [ %48, %.lr.ph.3 ], [ true, %.lr.ph.2 ], [ true, %.lr.ph.1 ], [ true, %.lr.ph ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %4) #3
  br label %50

50:                                               ; preds = %3, %.critedge38
  %.6 = phi i1 [ %.not41, %.critedge38 ], [ false, %3 ]
  ret i1 %.6
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress 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 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


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