; LLVM IR from doyubkim/fluid-engine-dev :: src/jet (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"

%"class.jet::Point" = type { i64, i64, i64 }
%"class.jet::PointHashGridSearcher3" = type { %"class.jet::PointNeighborSearcher3", double, %"class.jet::Point", %"class.std::vector", %"class.std::vector.0" }
%"class.jet::PointNeighborSearcher3" = type { %"class.jet::Serializable" }
%"class.jet::Serializable" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<jet::Vector<double, 3>, std::allocator<jet::Vector<double, 3>>>::_Vector_impl" }
%"struct.std::_Vector_base<jet::Vector<double, 3>, std::allocator<jet::Vector<double, 3>>>::_Vector_impl" = type { %"struct.std::_Vector_base<jet::Vector<double, 3>, std::allocator<jet::Vector<double, 3>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<jet::Vector<double, 3>, std::allocator<jet::Vector<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 }
%"class.jet::Vector" = 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 @_ZNK3jet22PointHashGridSearcher313getNearbyKeysERKNS_6VectorIdLm3EEEPm(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 %"class.jet::Point", align 8
  %8 = alloca [8 x %"class.jet::Point"], align 16
  %9 = alloca i32, align 4
  %10 = 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
  %11 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #3
  %12 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZNK3jet22PointHashGridSearcher314getBucketIndexERKNS_6VectorIdLm3EEE(ptr dead_on_unwind writable sret(%"class.jet::Point") align 8 %7, ptr noundef nonnull align 8 dereferenceable(88) %11, ptr noundef nonnull align 8 dereferenceable(24) %12)
  call void @llvm.lifetime.start.p0(i64 192, ptr %8) #3
  %13 = getelementptr inbounds [8 x %"class.jet::Point"], ptr %8, i32 0, i32 0
  %14 = getelementptr inbounds %"class.jet::Point", ptr %13, i64 8
  br label %15

15:                                               ; preds = %15, %3
  %16 = phi ptr [ %13, %3 ], [ %17, %15 ]
  call void @_ZN3jet5PointIlLm3EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16)
  %17 = getelementptr inbounds %"class.jet::Point", ptr %16, i64 1
  %18 = icmp eq ptr %17, %14
  br i1 %18, label %19, label %15

19:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  store i32 0, ptr %9, align 4, !tbaa !9
  br label %20

20:                                               ; preds = %29, %19
  %21 = load i32, ptr %9, align 4, !tbaa !9
  %22 = icmp slt i32 %21, 8
  br i1 %22, label %24, label %23

23:                                               ; preds = %20
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  br label %32

24:                                               ; preds = %20
  %25 = load i32, ptr %9, align 4, !tbaa !9
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds [8 x %"class.jet::Point"], ptr %8, i64 0, i64 %26
  %28 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3jet5PointIlLm3EEaSERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %27, ptr noundef nonnull align 8 dereferenceable(24) %7)
  br label %29

29:                                               ; preds = %24
  %30 = load i32, ptr %9, align 4, !tbaa !9
  %31 = add nsw i32 %30, 1
  store i32 %31, ptr %9, align 4, !tbaa !9
  br label %20, !llvm.loop !11

32:                                               ; preds = %23
  %33 = getelementptr inbounds %"class.jet::Point", ptr %7, i32 0, i32 0
  %34 = load i64, ptr %33, align 8, !tbaa !13
  %35 = sitofp i64 %34 to float
  %36 = fadd float %35, 5.000000e-01
  %37 = fpext float %36 to double
  %38 = getelementptr inbounds %"class.jet::PointHashGridSearcher3", ptr %11, i32 0, i32 1
  %39 = load double, ptr %38, align 8, !tbaa !16
  %40 = fmul double %37, %39
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = getelementptr inbounds %"class.jet::Vector", ptr %41, i32 0, i32 0
  %43 = load double, ptr %42, align 8, !tbaa !29
  %44 = fcmp ole double %40, %43
  br i1 %44, label %45, label %62

45:                                               ; preds = %32
  %46 = getelementptr inbounds [8 x %"class.jet::Point"], ptr %8, i64 0, i64 4
  %47 = getelementptr inbounds %"class.jet::Point", ptr %46, i32 0, i32 0
  %48 = load i64, ptr %47, align 16, !tbaa !13
  %49 = add nsw i64 %48, 1
  store i64 %49, ptr %47, align 16, !tbaa !13
  %50 = getelementptr inbounds [8 x %"class.jet::Point"], ptr %8, i64 0, i64 5
  %51 = getelementptr inbounds %"class.jet::Point", ptr %50, i32 0, i32 0
  %52 = load i64, ptr %51, align 8, !tbaa !13
  %53 = add nsw i64 %52, 1
  store i64 %53, ptr %51, align 8, !tbaa !13
  %54 = getelementptr inbounds [8 x %"class.jet::Point"], ptr %8, i64 0, i64 6
  %55 = getelementptr inbounds %"class.jet::Point", ptr %54, i32 0, i32 0
  %56 = load i64, ptr %55, align 16, !tbaa !13
  %57 = add nsw i64 %56, 1
  store i64 %57, ptr %55, align 16, !tbaa !13
  %58 = getelementptr inbounds [8 x %"class.jet::Point"], ptr %8, i64 0, i64 7
  %59 = getelementptr inbounds %"class.jet::Point", ptr %58, i32 0, i32 0
  %60 = load i64, ptr %59, align 8, !tbaa !13
  %61 = add nsw i64 %60, 1
  store i64 %61, ptr %59, align 8, !tbaa !13
  br label %79

62:                                               ; preds = %32
  %63 = getelementptr inbounds [8 x %"class.jet::Point"], ptr %8, i64 0, i64 4
  %64 = getelementptr inbounds %"class.jet::Point", ptr %63, i32 0, i32 0
  %65 = load i64, ptr %64, align 16, !tbaa !13
  %66 = sub nsw i64 %65, 1
  store i64 %66, ptr %64, align 16, !tbaa !13
  %67 = getelementptr inbounds [8 x %"class.jet::Point"], ptr %8, i64 0, i64 5
  %68 = getelementptr inbounds %"class.jet::Point", ptr %67, i32 0, i32 0
  %69 = load i64, ptr %68, align 8, !tbaa !13
  %70 = sub nsw i64 %69, 1
  store i64 %70, ptr %68, align 8, !tbaa !13
  %71 = getelementptr inbounds [8 x %"class.jet::Point"], ptr %8, i64 0, i64 6
  %72 = getelementptr inbounds %"class.jet::Point", ptr %71, i32 0, i32 0
  %73 = load i64, ptr %72, align 16, !tbaa !13
  %74 = sub nsw i64 %73, 1
  store i64 %74, ptr %72, align 16, !tbaa !13
  %75 = getelementptr inbounds [8 x %"class.jet::Point"], ptr %8, i64 0, i64 7
  %76 = getelementptr inbounds %"class.jet::Point", ptr %75, i32 0, i32 0
  %77 = load i64, ptr %76, align 8, !tbaa !13
  %78 = sub nsw i64 %77, 1
  store i64 %78, ptr %76, align 8, !tbaa !13
  br label %79

79:                                               ; preds = %62, %45
  %80 = getelementptr inbounds %"class.jet::Point", ptr %7, i32 0, i32 1
  %81 = load i64, ptr %80, align 8, !tbaa !31
  %82 = sitofp i64 %81 to float
  %83 = fadd float %82, 5.000000e-01
  %84 = fpext float %83 to double
  %85 = getelementptr inbounds %"class.jet::PointHashGridSearcher3", ptr %11, i32 0, i32 1
  %86 = load double, ptr %85, align 8, !tbaa !16
  %87 = fmul double %84, %86
  %88 = load ptr, ptr %5, align 8, !tbaa !5
  %89 = getelementptr inbounds %"class.jet::Vector", ptr %88, i32 0, i32 1
  %90 = load double, ptr %89, align 8, !tbaa !32
  %91 = fcmp ole double %87, %90
  br i1 %91, label %92, label %109

92:                                               ; preds = %79
  %93 = getelementptr inbounds [8 x %"class.jet::Point"], ptr %8, i64 0, i64 2
  %94 = getelementptr inbounds %"class.jet::Point", ptr %93, i32 0, i32 1
  %95 = load i64, ptr %94, align 8, !tbaa !31
  %96 = add nsw i64 %95, 1
  store i64 %96, ptr %94, align 8, !tbaa !31
  %97 = getelementptr inbounds [8 x %"class.jet::Point"], ptr %8, i64 0, i64 3
  %98 = getelementptr inbounds %"class.jet::Point", ptr %97, i32 0, i32 1
  %99 = load i64, ptr %98, align 8, !tbaa !31
  %100 = add nsw i64 %99, 1
  store i64 %100, ptr %98, align 8, !tbaa !31
  %101 = getelementptr inbounds [8 x %"class.jet::Point"], ptr %8, i64 0, i64 6
  %102 = getelementptr inbounds %"class.jet::Point", ptr %101, i32 0, i32 1
  %103 = load i64, ptr %102, align 8, !tbaa !31
  %104 = add nsw i64 %103, 1
  store i64 %104, ptr %102, align 8, !tbaa !31
  %105 = getelementptr inbounds [8 x %"class.jet::Point"], ptr %8, i64 0, i64 7
  %106 = getelementptr inbounds %"class.jet::Point", ptr %105, i32 0, i32 1
  %107 = load i64, ptr %106, align 8, !tbaa !31
  %108 = add nsw i64 %107, 1
  store i64 %108, ptr %106, align 8, !tbaa !31
  br label %126

109:                                              ; preds = %79
  %110 = getelementptr inbounds [8 x %"class.jet::Point"], ptr %8, i64 0, i64 2
  %111 = getelementptr inbounds %"class.jet::Point", ptr %110, i32 0, i32 1
  %112 = load i64, ptr %111, align 8, !tbaa !31
  %113 = sub nsw i64 %112, 1
  store i64 %113, ptr %111, align 8, !tbaa !31
  %114 = getelementptr inbounds [8 x %"class.jet::Point"], ptr %8, i64 0, i64 3
  %115 = getelementptr inbounds %"class.jet::Point", ptr %114, i32 0, i32 1
  %116 = load i64, ptr %115, align 8, !tbaa !31
  %117 = sub nsw i64 %116, 1
  store i64 %117, ptr %115, align 8, !tbaa !31
  %118 = getelementptr inbounds [8 x %"class.jet::Point"], ptr %8, i64 0, i64 6
  %119 = getelementptr inbounds %"class.jet::Point", ptr %118, i32 0, i32 1
  %120 = load i64, ptr %119, align 8, !tbaa !31
  %121 = sub nsw i64 %120, 1
  store i64 %121, ptr %119, align 8, !tbaa !31
  %122 = getelementptr inbounds [8 x %"class.jet::Point"], ptr %8, i64 0, i64 7
  %123 = getelementptr inbounds %"class.jet::Point", ptr %122, i32 0, i32 1
  %124 = load i64, ptr %123, align 8, !tbaa !31
  %125 = sub nsw i64 %124, 1
  store i64 %125, ptr %123, align 8, !tbaa !31
  br label %126

126:                                              ; preds = %109, %92
  %127 = getelementptr inbounds %"class.jet::Point", ptr %7, i32 0, i32 2
  %128 = load i64, ptr %127, align 8, !tbaa !33
  %129 = sitofp i64 %128 to float
  %130 = fadd float %129, 5.000000e-01
  %131 = fpext float %130 to double
  %132 = getelementptr inbounds %"class.jet::PointHashGridSearcher3", ptr %11, i32 0, i32 1
  %133 = load double, ptr %132, align 8, !tbaa !16
  %134 = fmul double %131, %133
  %135 = load ptr, ptr %5, align 8, !tbaa !5
  %136 = getelementptr inbounds %"class.jet::Vector", ptr %135, i32 0, i32 2
  %137 = load double, ptr %136, align 8, !tbaa !34
  %138 = fcmp ole double %134, %137
  br i1 %138, label %139, label %156

139:                                              ; preds = %126
  %140 = getelementptr inbounds [8 x %"class.jet::Point"], ptr %8, i64 0, i64 1
  %141 = getelementptr inbounds %"class.jet::Point", ptr %140, i32 0, i32 2
  %142 = load i64, ptr %141, align 8, !tbaa !33
  %143 = add nsw i64 %142, 1
  store i64 %143, ptr %141, align 8, !tbaa !33
  %144 = getelementptr inbounds [8 x %"class.jet::Point"], ptr %8, i64 0, i64 3
  %145 = getelementptr inbounds %"class.jet::Point", ptr %144, i32 0, i32 2
  %146 = load i64, ptr %145, align 8, !tbaa !33
  %147 = add nsw i64 %146, 1
  store i64 %147, ptr %145, align 8, !tbaa !33
  %148 = getelementptr inbounds [8 x %"class.jet::Point"], ptr %8, i64 0, i64 5
  %149 = getelementptr inbounds %"class.jet::Point", ptr %148, i32 0, i32 2
  %150 = load i64, ptr %149, align 8, !tbaa !33
  %151 = add nsw i64 %150, 1
  store i64 %151, ptr %149, align 8, !tbaa !33
  %152 = getelementptr inbounds [8 x %"class.jet::Point"], ptr %8, i64 0, i64 7
  %153 = getelementptr inbounds %"class.jet::Point", ptr %152, i32 0, i32 2
  %154 = load i64, ptr %153, align 8, !tbaa !33
  %155 = add nsw i64 %154, 1
  store i64 %155, ptr %153, align 8, !tbaa !33
  br label %173

156:                                              ; preds = %126
  %157 = getelementptr inbounds [8 x %"class.jet::Point"], ptr %8, i64 0, i64 1
  %158 = getelementptr inbounds %"class.jet::Point", ptr %157, i32 0, i32 2
  %159 = load i64, ptr %158, align 8, !tbaa !33
  %160 = sub nsw i64 %159, 1
  store i64 %160, ptr %158, align 8, !tbaa !33
  %161 = getelementptr inbounds [8 x %"class.jet::Point"], ptr %8, i64 0, i64 3
  %162 = getelementptr inbounds %"class.jet::Point", ptr %161, i32 0, i32 2
  %163 = load i64, ptr %162, align 8, !tbaa !33
  %164 = sub nsw i64 %163, 1
  store i64 %164, ptr %162, align 8, !tbaa !33
  %165 = getelementptr inbounds [8 x %"class.jet::Point"], ptr %8, i64 0, i64 5
  %166 = getelementptr inbounds %"class.jet::Point", ptr %165, i32 0, i32 2
  %167 = load i64, ptr %166, align 8, !tbaa !33
  %168 = sub nsw i64 %167, 1
  store i64 %168, ptr %166, align 8, !tbaa !33
  %169 = getelementptr inbounds [8 x %"class.jet::Point"], ptr %8, i64 0, i64 7
  %170 = getelementptr inbounds %"class.jet::Point", ptr %169, i32 0, i32 2
  %171 = load i64, ptr %170, align 8, !tbaa !33
  %172 = sub nsw i64 %171, 1
  store i64 %172, ptr %170, align 8, !tbaa !33
  br label %173

173:                                              ; preds = %156, %139
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %174

174:                                              ; preds = %187, %173
  %175 = load i32, ptr %10, align 4, !tbaa !9
  %176 = icmp slt i32 %175, 8
  br i1 %176, label %178, label %177

177:                                              ; preds = %174
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  br label %190

178:                                              ; preds = %174
  %179 = load i32, ptr %10, align 4, !tbaa !9
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds [8 x %"class.jet::Point"], ptr %8, i64 0, i64 %180
  %182 = call noundef i64 @_ZNK3jet22PointHashGridSearcher325getHashKeyFromBucketIndexERKNS_5PointIlLm3EEE(ptr noundef nonnull align 8 dereferenceable(88) %11, ptr noundef nonnull align 8 dereferenceable(24) %181)
  %183 = load ptr, ptr %6, align 8, !tbaa !5
  %184 = load i32, ptr %10, align 4, !tbaa !9
  %185 = sext i32 %184 to i64
  %186 = getelementptr inbounds i64, ptr %183, i64 %185
  store i64 %182, ptr %186, align 8, !tbaa !35
  br label %187

187:                                              ; preds = %178
  %188 = load i32, ptr %10, align 4, !tbaa !9
  %189 = add nsw i32 %188, 1
  store i32 %189, ptr %10, align 4, !tbaa !9
  br label %174, !llvm.loop !36

190:                                              ; preds = %177
  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 @_ZNK3jet22PointHashGridSearcher314getBucketIndexERKNS_6VectorIdLm3EEE(ptr dead_on_unwind noalias writable sret(%"class.jet::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 @_ZN3jet5PointIlLm3EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNK3jet22PointHashGridSearcher325getHashKeyFromBucketIndexERKNS_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 @_ZN3jet5PointIlLm3EEaSERKS1_(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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !15, i64 0}
!14 = !{!"_ZTSN3jet5PointIlLm3EEE", !15, i64 0, !15, i64 8, !15, i64 16}
!15 = !{!"long", !7, i64 0}
!16 = !{!17, !20, i64 8}
!17 = !{!"_ZTSN3jet22PointHashGridSearcher3E", !18, i64 0, !20, i64 8, !14, i64 16, !21, i64 40, !25, i64 64}
!18 = !{!"_ZTSN3jet22PointNeighborSearcher3E", !19, i64 0}
!19 = !{!"_ZTSN3jet12SerializableE"}
!20 = !{!"double", !7, i64 0}
!21 = !{!"_ZTSSt6vectorIN3jet6VectorIdLm3EEESaIS2_EE", !22, i64 0}
!22 = !{!"_ZTSSt12_Vector_baseIN3jet6VectorIdLm3EEESaIS2_EE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIN3jet6VectorIdLm3EEESaIS2_EE12_Vector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIN3jet6VectorIdLm3EEESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!25 = !{!"_ZTSSt6vectorIS_ImSaImEESaIS1_EE", !26, i64 0}
!26 = !{!"_ZTSSt12_Vector_baseISt6vectorImSaImEESaIS2_EE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseISt6vectorImSaImEESaIS2_EE12_Vector_implE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseISt6vectorImSaImEESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!29 = !{!30, !20, i64 0}
!30 = !{!"_ZTSN3jet6VectorIdLm3EEE", !20, i64 0, !20, i64 8, !20, i64 16}
!31 = !{!14, !15, i64 8}
!32 = !{!30, !20, i64 8}
!33 = !{!14, !15, i64 16}
!34 = !{!30, !20, i64 16}
!35 = !{!15, !15, i64 0}
!36 = distinct !{!36, !12}


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

%"class.jet::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 @_ZNK3jet22PointHashGridSearcher313getNearbyKeysERKNS_6VectorIdLm3EEEPm(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 %"class.jet::Point", align 8
  %4 = alloca [8 x %"class.jet::Point"], align 16
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #3
  call void @_ZNK3jet22PointHashGridSearcher314getBucketIndexERKNS_6VectorIdLm3EEE(ptr dead_on_unwind nonnull writable sret(%"class.jet::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 @_ZN3jet5PointIlLm3EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %.ptr.1 = getelementptr inbounds i8, ptr %4, i64 24
  call void @_ZN3jet5PointIlLm3EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.1)
  %.ptr.2 = getelementptr inbounds i8, ptr %4, i64 48
  call void @_ZN3jet5PointIlLm3EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.2)
  %.ptr.3 = getelementptr inbounds i8, ptr %4, i64 72
  call void @_ZN3jet5PointIlLm3EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.3)
  %.ptr.4 = getelementptr inbounds i8, ptr %4, i64 96
  call void @_ZN3jet5PointIlLm3EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.4)
  %.ptr.5 = getelementptr inbounds i8, ptr %4, i64 120
  call void @_ZN3jet5PointIlLm3EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.5)
  %.ptr.6 = getelementptr inbounds i8, ptr %4, i64 144
  call void @_ZN3jet5PointIlLm3EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.6)
  %.ptr.7 = getelementptr inbounds i8, ptr %4, i64 168
  call void @_ZN3jet5PointIlLm3EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %.ptr.7)
  %5 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3jet5PointIlLm3EEaSERKS1_(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 @_ZN3jet5PointIlLm3EEaSERKS1_(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 @_ZN3jet5PointIlLm3EEaSERKS1_(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 @_ZN3jet5PointIlLm3EEaSERKS1_(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 @_ZN3jet5PointIlLm3EEaSERKS1_(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 @_ZN3jet5PointIlLm3EEaSERKS1_(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 @_ZN3jet5PointIlLm3EEaSERKS1_(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 @_ZN3jet5PointIlLm3EEaSERKS1_(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 !24
  %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 !26
  %34 = getelementptr inbounds i8, ptr %4, i64 80
  %35 = getelementptr inbounds i8, ptr %4, i64 152
  %36 = load i64, ptr %35, align 8, !tbaa !26
  %37 = getelementptr inbounds i8, ptr %4, i64 176
  %38 = getelementptr inbounds i8, ptr %4, i64 40
  %39 = load i64, ptr %38, align 8, !tbaa !27
  %40 = load <2 x i64>, ptr %30, align 8, !tbaa !28
  %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 !29
  %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 !26
  %52 = add nsw i64 %36, %50
  store i64 %52, ptr %35, align 8, !tbaa !26
  %53 = extractelement <2 x i64> %49, i64 1
  %54 = add nsw i64 %39, %53
  store i64 %54, ptr %38, align 8, !tbaa !27
  %55 = load <2 x i64>, ptr %34, align 16, !tbaa !28
  %56 = add nsw <2 x i64> %55, %49
  store <2 x i64> %56, ptr %34, align 16, !tbaa !28
  %57 = getelementptr inbounds i8, ptr %4, i64 136
  %58 = load i64, ptr %57, align 8, !tbaa !27
  %59 = add nsw i64 %58, %53
  store i64 %59, ptr %57, align 8, !tbaa !27
  %60 = load <2 x i64>, ptr %37, align 16, !tbaa !28
  %61 = add nsw <2 x i64> %60, %49
  store <2 x i64> %61, ptr %37, align 16, !tbaa !28
  %62 = call noundef i64 @_ZNK3jet22PointHashGridSearcher325getHashKeyFromBucketIndexERKNS_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 !28
  %63 = call noundef i64 @_ZNK3jet22PointHashGridSearcher325getHashKeyFromBucketIndexERKNS_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 !28
  %65 = call noundef i64 @_ZNK3jet22PointHashGridSearcher325getHashKeyFromBucketIndexERKNS_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 !28
  %67 = call noundef i64 @_ZNK3jet22PointHashGridSearcher325getHashKeyFromBucketIndexERKNS_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 !28
  %69 = call noundef i64 @_ZNK3jet22PointHashGridSearcher325getHashKeyFromBucketIndexERKNS_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 !28
  %71 = call noundef i64 @_ZNK3jet22PointHashGridSearcher325getHashKeyFromBucketIndexERKNS_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 !28
  %73 = call noundef i64 @_ZNK3jet22PointHashGridSearcher325getHashKeyFromBucketIndexERKNS_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 !28
  %75 = call noundef i64 @_ZNK3jet22PointHashGridSearcher325getHashKeyFromBucketIndexERKNS_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 !28
  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 @_ZNK3jet22PointHashGridSearcher314getBucketIndexERKNS_6VectorIdLm3EEE(ptr dead_on_unwind noalias writable sret(%"class.jet::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 @_ZN3jet5PointIlLm3EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNK3jet22PointHashGridSearcher325getHashKeyFromBucketIndexERKNS_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 @_ZN3jet5PointIlLm3EEaSERKS1_(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 = !{!"_ZTSN3jet5PointIlLm3EEE", !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, !14, i64 8}
!11 = !{!"_ZTSN3jet22PointHashGridSearcher3E", !12, i64 0, !14, i64 8, !6, i64 16, !15, i64 40, !20, i64 64}
!12 = !{!"_ZTSN3jet22PointNeighborSearcher3E", !13, i64 0}
!13 = !{!"_ZTSN3jet12SerializableE"}
!14 = !{!"double", !8, i64 0}
!15 = !{!"_ZTSSt6vectorIN3jet6VectorIdLm3EEESaIS2_EE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseIN3jet6VectorIdLm3EEESaIS2_EE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIN3jet6VectorIdLm3EEESaIS2_EE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIN3jet6VectorIdLm3EEESaIS2_EE17_Vector_impl_dataE", !19, i64 0, !19, i64 8, !19, i64 16}
!19 = !{!"any pointer", !8, i64 0}
!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", !19, i64 0, !19, i64 8, !19, i64 16}
!24 = !{!25, !14, i64 0}
!25 = !{!"_ZTSN3jet6VectorIdLm3EEE", !14, i64 0, !14, i64 8, !14, i64 16}
!26 = !{!6, !7, i64 8}
!27 = !{!6, !7, i64 16}
!28 = !{!7, !7, i64 0}
!29 = !{!14, !14, i64 0}


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