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

; 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::Point" = type { i64, i64, i64 }
%"class.vox::PointHashGridSearcher3" = type { %"class.vox::PointNeighborSearcher3", double, %"struct.vox::Point", %"class.std::vector", %"class.std::vector.0" }
%"class.vox::PointNeighborSearcher3" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<vox::Point<double, 3>, std::allocator<vox::Point<double, 3>>>::_Vector_impl" }
%"struct.std::_Vector_base<vox::Point<double, 3>, std::allocator<vox::Point<double, 3>>>::_Vector_impl" = type { %"struct.std::_Vector_base<vox::Point<double, 3>, std::allocator<vox::Point<double, 3>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<vox::Point<double, 3>, std::allocator<vox::Point<double, 3>>>::_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 }
%"struct.vox::Point.5" = type { double, double, double }

; 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 void @_ZNK3vox22PointHashGridSearcher313getNearbyKeysERKNS_5PointIdLm3EEEPm(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef %2) #1 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"struct.vox::Point", align 8
  %8 = alloca [8 x %"struct.vox::Point"], align 16
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %14 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #3
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZNK3vox22PointHashGridSearcher314getBucketIndexERKNS_5PointIdLm3EEE(ptr dead_on_unwind writable sret(%"struct.vox::Point") align 8 %7, ptr noundef nonnull align 8 dereferenceable(88) %14, ptr noundef nonnull align 8 dereferenceable(24) %15)
  call void @llvm.lifetime.start.p0(i64 192, ptr %8) #3
  %16 = getelementptr inbounds [8 x %"struct.vox::Point"], ptr %8, i32 0, i32 0
  %17 = getelementptr inbounds %"struct.vox::Point", ptr %16, i64 8
  br label %18

18:                                               ; preds = %18, %3
  %19 = phi ptr [ %16, %3 ], [ %20, %18 ]
  call void @_ZN3vox5PointIlLm3EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19)
  %20 = getelementptr inbounds %"struct.vox::Point", ptr %19, i64 1
  %21 = icmp eq ptr %20, %17
  br i1 %21, label %22, label %18

22:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  store ptr %8, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %23 = load ptr, ptr %9, align 8, !tbaa !5
  %24 = getelementptr inbounds [8 x %"struct.vox::Point"], ptr %23, i64 0, i64 0
  store ptr %24, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  %25 = load ptr, ptr %9, align 8, !tbaa !5
  %26 = getelementptr inbounds [8 x %"struct.vox::Point"], ptr %25, i64 0, i64 0
  %27 = getelementptr inbounds %"struct.vox::Point", ptr %26, i64 8
  store ptr %27, ptr %11, align 8, !tbaa !5
  br label %28

28:                                               ; preds = %37, %22
  %29 = load ptr, ptr %10, align 8, !tbaa !5
  %30 = load ptr, ptr %11, align 8, !tbaa !5
  %31 = icmp ne ptr %29, %30
  br i1 %31, label %33, label %32

32:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  br label %40

33:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %34 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %34, ptr %12, align 8, !tbaa !5
  %35 = load ptr, ptr %12, align 8, !tbaa !5
  %36 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3vox5PointIlLm3EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %35, ptr noundef nonnull align 8 dereferenceable(24) %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  br label %37

37:                                               ; preds = %33
  %38 = load ptr, ptr %10, align 8, !tbaa !5
  %39 = getelementptr inbounds %"struct.vox::Point", ptr %38, i32 1
  store ptr %39, ptr %10, align 8, !tbaa !5
  br label %28

40:                                               ; preds = %32
  %41 = getelementptr inbounds %"struct.vox::Point", ptr %7, i32 0, i32 0
  %42 = load i64, ptr %41, align 8, !tbaa !9
  %43 = sitofp i64 %42 to float
  %44 = fadd float %43, 5.000000e-01
  %45 = fpext float %44 to double
  %46 = getelementptr inbounds %"class.vox::PointHashGridSearcher3", ptr %14, i32 0, i32 1
  %47 = load double, ptr %46, align 8, !tbaa !12
  %48 = fmul double %45, %47
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = getelementptr inbounds %"struct.vox::Point.5", ptr %49, i32 0, i32 0
  %51 = load double, ptr %50, align 8, !tbaa !24
  %52 = fcmp ole double %48, %51
  br i1 %52, label %53, label %70

53:                                               ; preds = %40
  %54 = getelementptr inbounds [8 x %"struct.vox::Point"], ptr %8, i64 0, i64 4
  %55 = getelementptr inbounds %"struct.vox::Point", ptr %54, i32 0, i32 0
  %56 = load i64, ptr %55, align 16, !tbaa !9
  %57 = add nsw i64 %56, 1
  store i64 %57, ptr %55, align 16, !tbaa !9
  %58 = getelementptr inbounds [8 x %"struct.vox::Point"], ptr %8, i64 0, i64 5
  %59 = getelementptr inbounds %"struct.vox::Point", ptr %58, i32 0, i32 0
  %60 = load i64, ptr %59, align 8, !tbaa !9
  %61 = add nsw i64 %60, 1
  store i64 %61, ptr %59, align 8, !tbaa !9
  %62 = getelementptr inbounds [8 x %"struct.vox::Point"], ptr %8, i64 0, i64 6
  %63 = getelementptr inbounds %"struct.vox::Point", ptr %62, i32 0, i32 0
  %64 = load i64, ptr %63, align 16, !tbaa !9
  %65 = add nsw i64 %64, 1
  store i64 %65, ptr %63, align 16, !tbaa !9
  %66 = getelementptr inbounds [8 x %"struct.vox::Point"], ptr %8, i64 0, i64 7
  %67 = getelementptr inbounds %"struct.vox::Point", ptr %66, i32 0, i32 0
  %68 = load i64, ptr %67, align 8, !tbaa !9
  %69 = add nsw i64 %68, 1
  store i64 %69, ptr %67, align 8, !tbaa !9
  br label %87

70:                                               ; preds = %40
  %71 = getelementptr inbounds [8 x %"struct.vox::Point"], ptr %8, i64 0, i64 4
  %72 = getelementptr inbounds %"struct.vox::Point", ptr %71, i32 0, i32 0
  %73 = load i64, ptr %72, align 16, !tbaa !9
  %74 = sub nsw i64 %73, 1
  store i64 %74, ptr %72, align 16, !tbaa !9
  %75 = getelementptr inbounds [8 x %"struct.vox::Point"], ptr %8, i64 0, i64 5
  %76 = getelementptr inbounds %"struct.vox::Point", ptr %75, i32 0, i32 0
  %77 = load i64, ptr %76, align 8, !tbaa !9
  %78 = sub nsw i64 %77, 1
  store i64 %78, ptr %76, align 8, !tbaa !9
  %79 = getelementptr inbounds [8 x %"struct.vox::Point"], ptr %8, i64 0, i64 6
  %80 = getelementptr inbounds %"struct.vox::Point", ptr %79, i32 0, i32 0
  %81 = load i64, ptr %80, align 16, !tbaa !9
  %82 = sub nsw i64 %81, 1
  store i64 %82, ptr %80, align 16, !tbaa !9
  %83 = getelementptr inbounds [8 x %"struct.vox::Point"], ptr %8, i64 0, i64 7
  %84 = getelementptr inbounds %"struct.vox::Point", ptr %83, i32 0, i32 0
  %85 = load i64, ptr %84, align 8, !tbaa !9
  %86 = sub nsw i64 %85, 1
  store i64 %86, ptr %84, align 8, !tbaa !9
  br label %87

87:                                               ; preds = %70, %53
  %88 = getelementptr inbounds %"struct.vox::Point", ptr %7, i32 0, i32 1
  %89 = load i64, ptr %88, align 8, !tbaa !26
  %90 = sitofp i64 %89 to float
  %91 = fadd float %90, 5.000000e-01
  %92 = fpext float %91 to double
  %93 = getelementptr inbounds %"class.vox::PointHashGridSearcher3", ptr %14, i32 0, i32 1
  %94 = load double, ptr %93, align 8, !tbaa !12
  %95 = fmul double %92, %94
  %96 = load ptr, ptr %5, align 8, !tbaa !5
  %97 = getelementptr inbounds %"struct.vox::Point.5", ptr %96, i32 0, i32 1
  %98 = load double, ptr %97, align 8, !tbaa !27
  %99 = fcmp ole double %95, %98
  br i1 %99, label %100, label %117

100:                                              ; preds = %87
  %101 = getelementptr inbounds [8 x %"struct.vox::Point"], ptr %8, i64 0, i64 2
  %102 = getelementptr inbounds %"struct.vox::Point", ptr %101, i32 0, i32 1
  %103 = load i64, ptr %102, align 8, !tbaa !26
  %104 = add nsw i64 %103, 1
  store i64 %104, ptr %102, align 8, !tbaa !26
  %105 = getelementptr inbounds [8 x %"struct.vox::Point"], ptr %8, i64 0, i64 3
  %106 = getelementptr inbounds %"struct.vox::Point", ptr %105, i32 0, i32 1
  %107 = load i64, ptr %106, align 8, !tbaa !26
  %108 = add nsw i64 %107, 1
  store i64 %108, ptr %106, align 8, !tbaa !26
  %109 = getelementptr inbounds [8 x %"struct.vox::Point"], ptr %8, i64 0, i64 6
  %110 = getelementptr inbounds %"struct.vox::Point", ptr %109, i32 0, i32 1
  %111 = load i64, ptr %110, align 8, !tbaa !26
  %112 = add nsw i64 %111, 1
  store i64 %112, ptr %110, align 8, !tbaa !26
  %113 = getelementptr inbounds [8 x %"struct.vox::Point"], ptr %8, i64 0, i64 7
  %114 = getelementptr inbounds %"struct.vox::Point", ptr %113, i32 0, i32 1
  %115 = load i64, ptr %114, align 8, !tbaa !26
  %116 = add nsw i64 %115, 1
  store i64 %116, ptr %114, align 8, !tbaa !26
  br label %134

117:                                              ; preds = %87
  %118 = getelementptr inbounds [8 x %"struct.vox::Point"], ptr %8, i64 0, i64 2
  %119 = getelementptr inbounds %"struct.vox::Point", ptr %118, i32 0, i32 1
  %120 = load i64, ptr %119, align 8, !tbaa !26
  %121 = sub nsw i64 %120, 1
  store i64 %121, ptr %119, align 8, !tbaa !26
  %122 = getelementptr inbounds [8 x %"struct.vox::Point"], ptr %8, i64 0, i64 3
  %123 = getelementptr inbounds %"struct.vox::Point", ptr %122, i32 0, i32 1
  %124 = load i64, ptr %123, align 8, !tbaa !26
  %125 = sub nsw i64 %124, 1
  store i64 %125, ptr %123, align 8, !tbaa !26
  %126 = getelementptr inbounds [8 x %"struct.vox::Point"], ptr %8, i64 0, i64 6
  %127 = getelementptr inbounds %"struct.vox::Point", ptr %126, i32 0, i32 1
  %128 = load i64, ptr %127, align 8, !tbaa !26
  %129 = sub nsw i64 %128, 1
  store i64 %129, ptr %127, align 8, !tbaa !26
  %130 = getelementptr inbounds [8 x %"struct.vox::Point"], ptr %8, i64 0, i64 7
  %131 = getelementptr inbounds %"struct.vox::Point", ptr %130, i32 0, i32 1
  %132 = load i64, ptr %131, align 8, !tbaa !26
  %133 = sub nsw i64 %132, 1
  store i64 %133, ptr %131, align 8, !tbaa !26
  br label %134

134:                                              ; preds = %117, %100
  %135 = getelementptr inbounds %"struct.vox::Point", ptr %7, i32 0, i32 2
  %136 = load i64, ptr %135, align 8, !tbaa !28
  %137 = sitofp i64 %136 to float
  %138 = fadd float %137, 5.000000e-01
  %139 = fpext float %138 to double
  %140 = getelementptr inbounds %"class.vox::PointHashGridSearcher3", ptr %14, i32 0, i32 1
  %141 = load double, ptr %140, align 8, !tbaa !12
  %142 = fmul double %139, %141
  %143 = load ptr, ptr %5, align 8, !tbaa !5
  %144 = getelementptr inbounds %"struct.vox::Point.5", ptr %143, i32 0, i32 2
  %145 = load double, ptr %144, align 8, !tbaa !29
  %146 = fcmp ole double %142, %145
  br i1 %146, label %147, label %164

147:                                              ; preds = %134
  %148 = getelementptr inbounds [8 x %"struct.vox::Point"], ptr %8, i64 0, i64 1
  %149 = getelementptr inbounds %"struct.vox::Point", ptr %148, i32 0, i32 2
  %150 = load i64, ptr %149, align 8, !tbaa !28
  %151 = add nsw i64 %150, 1
  store i64 %151, ptr %149, align 8, !tbaa !28
  %152 = getelementptr inbounds [8 x %"struct.vox::Point"], ptr %8, i64 0, i64 3
  %153 = getelementptr inbounds %"struct.vox::Point", ptr %152, i32 0, i32 2
  %154 = load i64, ptr %153, align 8, !tbaa !28
  %155 = add nsw i64 %154, 1
  store i64 %155, ptr %153, align 8, !tbaa !28
  %156 = getelementptr inbounds [8 x %"struct.vox::Point"], ptr %8, i64 0, i64 5
  %157 = getelementptr inbounds %"struct.vox::Point", ptr %156, i32 0, i32 2
  %158 = load i64, ptr %157, align 8, !tbaa !28
  %159 = add nsw i64 %158, 1
  store i64 %159, ptr %157, align 8, !tbaa !28
  %160 = getelementptr inbounds [8 x %"struct.vox::Point"], ptr %8, i64 0, i64 7
  %161 = getelementptr inbounds %"struct.vox::Point", ptr %160, i32 0, i32 2
  %162 = load i64, ptr %161, align 8, !tbaa !28
  %163 = add nsw i64 %162, 1
  store i64 %163, ptr %161, align 8, !tbaa !28
  br label %181

164:                                              ; preds = %134
  %165 = getelementptr inbounds [8 x %"struct.vox::Point"], ptr %8, i64 0, i64 1
  %166 = getelementptr inbounds %"struct.vox::Point", ptr %165, i32 0, i32 2
  %167 = load i64, ptr %166, align 8, !tbaa !28
  %168 = sub nsw i64 %167, 1
  store i64 %168, ptr %166, align 8, !tbaa !28
  %169 = getelementptr inbounds [8 x %"struct.vox::Point"], ptr %8, i64 0, i64 3
  %170 = getelementptr inbounds %"struct.vox::Point", ptr %169, i32 0, i32 2
  %171 = load i64, ptr %170, align 8, !tbaa !28
  %172 = sub nsw i64 %171, 1
  store i64 %172, ptr %170, align 8, !tbaa !28
  %173 = getelementptr inbounds [8 x %"struct.vox::Point"], ptr %8, i64 0, i64 5
  %174 = getelementptr inbounds %"struct.vox::Point", ptr %173, i32 0, i32 2
  %175 = load i64, ptr %174, align 8, !tbaa !28
  %176 = sub nsw i64 %175, 1
  store i64 %176, ptr %174, align 8, !tbaa !28
  %177 = getelementptr inbounds [8 x %"struct.vox::Point"], ptr %8, i64 0, i64 7
  %178 = getelementptr inbounds %"struct.vox::Point", ptr %177, i32 0, i32 2
  %179 = load i64, ptr %178, align 8, !tbaa !28
  %180 = sub nsw i64 %179, 1
  store i64 %180, ptr %178, align 8, !tbaa !28
  br label %181

181:                                              ; preds = %164, %147
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  store i32 0, ptr %13, align 4, !tbaa !30
  br label %182

182:                                              ; preds = %195, %181
  %183 = load i32, ptr %13, align 4, !tbaa !30
  %184 = icmp slt i32 %183, 8
  br i1 %184, label %186, label %185

185:                                              ; preds = %182
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  br label %198

186:                                              ; preds = %182
  %187 = load i32, ptr %13, align 4, !tbaa !30
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds [8 x %"struct.vox::Point"], ptr %8, i64 0, i64 %188
  %190 = call noundef i64 @_ZNK3vox22PointHashGridSearcher325getHashKeyFromBucketIndexERKNS_5PointIlLm3EEE(ptr noundef nonnull align 8 dereferenceable(88) %14, ptr noundef nonnull align 8 dereferenceable(24) %189)
  %191 = load ptr, ptr %6, align 8, !tbaa !5
  %192 = load i32, ptr %13, align 4, !tbaa !30
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds i64, ptr %191, i64 %193
  store i64 %190, ptr %194, align 8, !tbaa !32
  br label %195

195:                                              ; preds = %186
  %196 = load i32, ptr %13, align 4, !tbaa !30
  %197 = add nsw i32 %196, 1
  store i32 %197, ptr %13, align 4, !tbaa !30
  br label %182, !llvm.loop !33

198:                                              ; preds = %185
  call void @llvm.lifetime.end.p0(i64 192, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #3
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3vox22PointHashGridSearcher314getBucketIndexERKNS_5PointIdLm3EEE(ptr dead_on_unwind noalias writable sret(%"struct.vox::Point") align 8, ptr noundef nonnull align 8 dereferenceable(88), ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3vox5PointIlLm3EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

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

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

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 = { 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 #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, !11, i64 0}
!10 = !{!"_ZTSN3vox5PointIlLm3EEE", !11, i64 0, !11, i64 8, !11, i64 16}
!11 = !{!"long", !7, i64 0}
!12 = !{!13, !15, i64 8}
!13 = !{!"_ZTSN3vox22PointHashGridSearcher3E", !14, i64 0, !15, i64 8, !10, i64 16, !16, i64 40, !20, i64 64}
!14 = !{!"_ZTSN3vox22PointNeighborSearcher3E"}
!15 = !{!"double", !7, i64 0}
!16 = !{!"_ZTSSt6vectorIN3vox5PointIdLm3EEESaIS2_EE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIN3vox5PointIdLm3EEESaIS2_EE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIN3vox5PointIdLm3EEESaIS2_EE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIN3vox5PointIdLm3EEESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!"_ZTSSt6vectorIS_ImSaImEESaIS1_EE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseISt6vectorImSaImEESaIS2_EE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseISt6vectorImSaImEESaIS2_EE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseISt6vectorImSaImEESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!24 = !{!25, !15, i64 0}
!25 = !{!"_ZTSN3vox5PointIdLm3EEE", !15, i64 0, !15, i64 8, !15, i64 16}
!26 = !{!10, !11, i64 8}
!27 = !{!25, !15, i64 8}
!28 = !{!10, !11, i64 16}
!29 = !{!25, !15, i64 16}
!30 = !{!31, !31, i64 0}
!31 = !{!"int", !7, i64 0}
!32 = !{!11, !11, i64 0}
!33 = distinct !{!33, !34}
!34 = !{!"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::Point" = type { i64, i64, i64 }

; 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 uwtable
define dso_local void @_ZNK3vox22PointHashGridSearcher313getNearbyKeysERKNS_5PointIdLm3EEEPm(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr nocapture noundef writeonly %2) local_unnamed_addr #1 align 2 {
.preheader.preheader:
  %3 = alloca %"struct.vox::Point", align 8
  %4 = alloca [8 x %"struct.vox::Point"], align 16
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #3
  call void @_ZNK3vox22PointHashGridSearcher314getBucketIndexERKNS_5PointIdLm3EEE(ptr dead_on_unwind nonnull writable sret(%"struct.vox::Point") align 8 %3, ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef nonnull align 8 dereferenceable(24) %1)
  call void @llvm.lifetime.start.p0(i64 192, ptr nonnull %4) #3
  call void @_ZN3vox5PointIlLm3EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %.ptr.1 = getelementptr inbounds i8, ptr %4, i64 24
  call void @_ZN3vox5PointIlLm3EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1)
  %.ptr.2 = getelementptr inbounds i8, ptr %4, i64 48
  call void @_ZN3vox5PointIlLm3EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.2)
  %.ptr.3 = getelementptr inbounds i8, ptr %4, i64 72
  call void @_ZN3vox5PointIlLm3EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.3)
  %.ptr.4 = getelementptr inbounds i8, ptr %4, i64 96
  call void @_ZN3vox5PointIlLm3EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.4)
  %.ptr.5 = getelementptr inbounds i8, ptr %4, i64 120
  call void @_ZN3vox5PointIlLm3EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.5)
  %.ptr.6 = getelementptr inbounds i8, ptr %4, i64 144
  call void @_ZN3vox5PointIlLm3EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.6)
  %.ptr.7 = getelementptr inbounds i8, ptr %4, i64 168
  call void @_ZN3vox5PointIlLm3EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.7)
  %5 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3vox5PointIlLm3EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %3)
  %6 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3vox5PointIlLm3EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1, ptr noundef nonnull align 8 dereferenceable(24) %3)
  %7 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3vox5PointIlLm3EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.2, ptr noundef nonnull align 8 dereferenceable(24) %3)
  %8 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3vox5PointIlLm3EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.3, ptr noundef nonnull align 8 dereferenceable(24) %3)
  %9 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3vox5PointIlLm3EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.4, ptr noundef nonnull align 8 dereferenceable(24) %3)
  %10 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3vox5PointIlLm3EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.5, ptr noundef nonnull align 8 dereferenceable(24) %3)
  %11 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3vox5PointIlLm3EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.6, ptr noundef nonnull align 8 dereferenceable(24) %3)
  %12 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3vox5PointIlLm3EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.7, ptr noundef nonnull align 8 dereferenceable(24) %3)
  %13 = load i64, ptr %3, align 8, !tbaa !5
  %14 = sitofp i64 %13 to float
  %15 = fadd float %14, 5.000000e-01
  %16 = fpext float %15 to double
  %17 = getelementptr inbounds i8, ptr %0, i64 8
  %18 = load double, ptr %17, align 8, !tbaa !10
  %19 = fmul double %18, %16
  %20 = load double, ptr %1, align 8, !tbaa !23
  %21 = fcmp ugt double %19, %20
  %22 = load i64, ptr %.ptr.4, align 16, !tbaa !5
  %. = select i1 %21, i64 -1, i64 1
  %23 = add nsw i64 %22, %.
  store i64 %23, ptr %.ptr.4, align 16, !tbaa !5
  %24 = load i64, ptr %.ptr.5, align 8, !tbaa !5
  %25 = add nsw i64 %24, %.
  store i64 %25, ptr %.ptr.5, align 8, !tbaa !5
  %26 = load i64, ptr %.ptr.6, align 16, !tbaa !5
  %27 = add nsw i64 %26, %.
  store i64 %27, ptr %.ptr.6, align 16, !tbaa !5
  %28 = load i64, ptr %.ptr.7, align 8, !tbaa !5
  %29 = add nsw i64 %28, %.
  store i64 %29, ptr %.ptr.7, align 8, !tbaa !5
  %30 = getelementptr inbounds i8, ptr %3, i64 8
  %31 = getelementptr inbounds i8, ptr %1, i64 8
  %32 = getelementptr inbounds i8, ptr %4, i64 56
  %33 = load i64, ptr %32, align 8, !tbaa !25
  %34 = getelementptr inbounds i8, ptr %4, i64 80
  %35 = getelementptr inbounds i8, ptr %4, i64 152
  %36 = load i64, ptr %35, align 8, !tbaa !25
  %37 = getelementptr inbounds i8, ptr %4, i64 176
  %38 = getelementptr inbounds i8, ptr %4, i64 40
  %39 = load i64, ptr %38, align 8, !tbaa !26
  %40 = load <2 x i64>, ptr %30, align 8, !tbaa !27
  %41 = sitofp <2 x i64> %40 to <2 x float>
  %42 = fadd <2 x float> %41, <float 5.000000e-01, float 5.000000e-01>
  %43 = fpext <2 x float> %42 to <2 x double>
  %44 = insertelement <2 x double> poison, double %18, i64 0
  %45 = shufflevector <2 x double> %44, <2 x double> poison, <2 x i32> zeroinitializer
  %46 = fmul <2 x double> %45, %43
  %47 = load <2 x double>, ptr %31, align 8, !tbaa !28
  %48 = fcmp ugt <2 x double> %46, %47
  %49 = select <2 x i1> %48, <2 x i64> <i64 -1, i64 -1>, <2 x i64> <i64 1, i64 1>
  %50 = extractelement <2 x i64> %49, i64 0
  %51 = add nsw i64 %33, %50
  store i64 %51, ptr %32, align 8, !tbaa !25
  %52 = add nsw i64 %36, %50
  store i64 %52, ptr %35, align 8, !tbaa !25
  %53 = extractelement <2 x i64> %49, i64 1
  %54 = add nsw i64 %39, %53
  store i64 %54, ptr %38, align 8, !tbaa !26
  %55 = load <2 x i64>, ptr %34, align 16, !tbaa !27
  %56 = add nsw <2 x i64> %55, %49
  store <2 x i64> %56, ptr %34, align 16, !tbaa !27
  %57 = getelementptr inbounds i8, ptr %4, i64 136
  %58 = load i64, ptr %57, align 8, !tbaa !26
  %59 = add nsw i64 %58, %53
  store i64 %59, ptr %57, align 8, !tbaa !26
  %60 = load <2 x i64>, ptr %37, align 16, !tbaa !27
  %61 = add nsw <2 x i64> %60, %49
  store <2 x i64> %61, ptr %37, align 16, !tbaa !27
  %62 = call noundef i64 @_ZNK3vox22PointHashGridSearcher325getHashKeyFromBucketIndexERKNS_5PointIlLm3EEE(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef nonnull align 8 dereferenceable(24) %4)
  store i64 %62, ptr %2, align 8, !tbaa !27
  %63 = call noundef i64 @_ZNK3vox22PointHashGridSearcher325getHashKeyFromBucketIndexERKNS_5PointIlLm3EEE(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1)
  %64 = getelementptr inbounds i8, ptr %2, i64 8
  store i64 %63, ptr %64, align 8, !tbaa !27
  %65 = call noundef i64 @_ZNK3vox22PointHashGridSearcher325getHashKeyFromBucketIndexERKNS_5PointIlLm3EEE(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef nonnull align 8 dereferenceable(24) %.ptr.2)
  %66 = getelementptr inbounds i8, ptr %2, i64 16
  store i64 %65, ptr %66, align 8, !tbaa !27
  %67 = call noundef i64 @_ZNK3vox22PointHashGridSearcher325getHashKeyFromBucketIndexERKNS_5PointIlLm3EEE(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef nonnull align 8 dereferenceable(24) %.ptr.3)
  %68 = getelementptr inbounds i8, ptr %2, i64 24
  store i64 %67, ptr %68, align 8, !tbaa !27
  %69 = call noundef i64 @_ZNK3vox22PointHashGridSearcher325getHashKeyFromBucketIndexERKNS_5PointIlLm3EEE(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef nonnull align 8 dereferenceable(24) %.ptr.4)
  %70 = getelementptr inbounds i8, ptr %2, i64 32
  store i64 %69, ptr %70, align 8, !tbaa !27
  %71 = call noundef i64 @_ZNK3vox22PointHashGridSearcher325getHashKeyFromBucketIndexERKNS_5PointIlLm3EEE(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef nonnull align 8 dereferenceable(24) %.ptr.5)
  %72 = getelementptr inbounds i8, ptr %2, i64 40
  store i64 %71, ptr %72, align 8, !tbaa !27
  %73 = call noundef i64 @_ZNK3vox22PointHashGridSearcher325getHashKeyFromBucketIndexERKNS_5PointIlLm3EEE(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef nonnull align 8 dereferenceable(24) %.ptr.6)
  %74 = getelementptr inbounds i8, ptr %2, i64 48
  store i64 %73, ptr %74, align 8, !tbaa !27
  %75 = call noundef i64 @_ZNK3vox22PointHashGridSearcher325getHashKeyFromBucketIndexERKNS_5PointIlLm3EEE(ptr noundef nonnull align 8 dereferenceable(88) %0, ptr noundef nonnull align 8 dereferenceable(24) %.ptr.7)
  %76 = getelementptr inbounds i8, ptr %2, i64 56
  store i64 %75, ptr %76, align 8, !tbaa !27
  call void @llvm.lifetime.end.p0(i64 192, ptr nonnull %4) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #3
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3vox22PointHashGridSearcher314getBucketIndexERKNS_5PointIdLm3EEE(ptr dead_on_unwind noalias writable sret(%"struct.vox::Point") align 8, ptr noundef nonnull align 8 dereferenceable(88), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3vox5PointIlLm3EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

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

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

attributes #0 = { mustprogress 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 = { 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 #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, !7, i64 0}
!6 = !{!"_ZTSN3vox5PointIlLm3EEE", !7, i64 0, !7, i64 8, !7, i64 16}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!11, !13, i64 8}
!11 = !{!"_ZTSN3vox22PointHashGridSearcher3E", !12, i64 0, !13, i64 8, !6, i64 16, !14, i64 40, !19, i64 64}
!12 = !{!"_ZTSN3vox22PointNeighborSearcher3E"}
!13 = !{!"double", !8, i64 0}
!14 = !{!"_ZTSSt6vectorIN3vox5PointIdLm3EEESaIS2_EE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseIN3vox5PointIdLm3EEESaIS2_EE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIN3vox5PointIdLm3EEESaIS2_EE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIN3vox5PointIdLm3EEESaIS2_EE17_Vector_impl_dataE", !18, i64 0, !18, i64 8, !18, i64 16}
!18 = !{!"any pointer", !8, i64 0}
!19 = !{!"_ZTSSt6vectorIS_ImSaImEESaIS1_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseISt6vectorImSaImEESaIS2_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseISt6vectorImSaImEESaIS2_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseISt6vectorImSaImEESaIS2_EE17_Vector_impl_dataE", !18, i64 0, !18, i64 8, !18, i64 16}
!23 = !{!24, !13, i64 0}
!24 = !{!"_ZTSN3vox5PointIdLm3EEE", !13, i64 0, !13, i64 8, !13, i64 16}
!25 = !{!6, !7, i64 8}
!26 = !{!6, !7, i64 16}
!27 = !{!7, !7, i64 0}
!28 = !{!13, !13, i64 0}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,LoopSimplifyPass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass