; LLVM IR from SourangshuGhosh/Fluid-Simulation-for-Computer-Graphics :: src (spatialpointgrid)

; 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.GridPointReference = type { i32 }
%"class.std::vector.20" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.std::allocator.34" = type { i8 }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<GridPointReference, std::allocator<GridPointReference>>::_Vector_impl" }
%"struct.std::_Vector_base<GridPointReference, std::allocator<GridPointReference>>::_Vector_impl" = type { %"struct.std::_Vector_base<GridPointReference, std::allocator<GridPointReference>>::_Vector_impl_data" }
%"struct.std::_Vector_base<GridPointReference, std::allocator<GridPointReference>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::_Bit_reference" = type { ptr, i64 }
%struct.GridPoint = type { %"class.vmath::vec3", %struct.GridPointReference }
%"class.vmath::vec3" = type { float, float, float }
%class.SpatialPointGrid = type { i32, i32, i32, double, %"class.std::vector", %"class.std::vector.0", %class.Array3d, %class.AABB }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<GridPoint, std::allocator<GridPoint>>::_Vector_impl" }
%"struct.std::_Vector_base<GridPoint, std::allocator<GridPoint>>::_Vector_impl" = type { %"struct.std::_Vector_base<GridPoint, std::allocator<GridPoint>>::_Vector_impl_data" }
%"struct.std::_Vector_base<GridPoint, std::allocator<GridPoint>>::_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<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.Array3d = type { i32, i32, i32, ptr, i8, %"struct.SpatialPointGrid::CellNode", i32 }
%"struct.SpatialPointGrid::CellNode" = type { i32, i32 }
%class.AABB = type { %"class.vmath::vec3", double, double, double }

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN9GridPointD2Ev(ptr noundef nonnull align 4 dereferenceable(16)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN16SpatialPointGrid32queryPointReferencesInsideSphereE18GridPointReferencedRSt6vectorIbSaIbEERS1_IS0_SaIS0_EE(ptr noundef nonnull align 8 dereferenceable(152), i32, double noundef, ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(24)) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9GridPointC2Ev(ptr noundef nonnull align 4 dereferenceable(16)) unnamed_addr #4 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN16SpatialPointGrid28_getConnectedPointReferencesE18GridPointReferencedRSt6vectorIS0_SaIS0_EE(ptr noundef nonnull align 8 dereferenceable(152) %0, i32 %1, double noundef %2, ptr noundef nonnull align 8 dereferenceable(24) %3) #4 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %struct.GridPointReference, align 4
  %6 = alloca ptr, align 8
  %7 = alloca double, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"class.std::vector.20", align 8
  %10 = alloca i8, align 1
  %11 = alloca %"class.std::allocator.34", align 1
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca %"class.std::vector.5", align 8
  %15 = alloca %"struct.std::_Bit_reference", align 8
  %16 = alloca %struct.GridPointReference, align 4
  %17 = alloca %struct.GridPoint, align 4
  %18 = alloca %"class.std::vector.5", align 8
  %19 = alloca %struct.GridPointReference, align 4
  %20 = alloca i32, align 4
  %21 = alloca %"struct.std::_Bit_reference", align 8
  %22 = alloca %"struct.std::_Bit_reference", align 8
  %23 = getelementptr inbounds %struct.GridPointReference, ptr %5, i32 0, i32 0
  store i32 %1, ptr %23, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store double %2, ptr %7, align 8, !tbaa !9
  store ptr %3, ptr %8, align 8, !tbaa !5
  %24 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 40, ptr %9) #5
  %25 = getelementptr inbounds %class.SpatialPointGrid, ptr %24, i32 0, i32 4
  %26 = call noundef i64 @_ZNKSt6vectorI9GridPointSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #5
  store i8 0, ptr %10, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #5
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKbRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %9, i64 noundef %26, ptr noundef nonnull align 1 dereferenceable(1) %10, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %27 unwind label %56

27:                                               ; preds = %4
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #5
  call void @_ZNSt6vectorI18GridPointReferenceSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #5
  invoke void @_ZNSt6vectorI18GridPointReferenceSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %28 unwind label %60

28:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #5
  %29 = getelementptr inbounds %struct.GridPointReference, ptr %5, i32 0, i32 0
  %30 = load i32, ptr %29, align 4, !tbaa !13
  %31 = sext i32 %30 to i64
  %32 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %9, i64 noundef %31)
          to label %33 unwind label %64

33:                                               ; preds = %28
  %34 = getelementptr inbounds { ptr, i64 }, ptr %15, i32 0, i32 0
  %35 = extractvalue { ptr, i64 } %32, 0
  store ptr %35, ptr %34, align 8
  %36 = getelementptr inbounds { ptr, i64 }, ptr %15, i32 0, i32 1
  %37 = extractvalue { ptr, i64 } %32, 1
  store i64 %37, ptr %36, align 8
  %38 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %15, i1 noundef zeroext true) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  invoke void @_ZN18GridPointReferenceC2Ev(ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %39 unwind label %68

39:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #5
  invoke void @_ZN9GridPointC2Ev(ptr noundef nonnull align 4 dereferenceable(16) %17)
          to label %40 unwind label %72

40:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #5
  call void @_ZNSt6vectorI18GridPointReferenceSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #5
  br label %41

41:                                               ; preds = %126, %40
  %42 = call noundef zeroext i1 @_ZNKSt6vectorI18GridPointReferenceSaIS0_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #5
  %43 = xor i1 %42, true
  br i1 %43, label %44, label %127

44:                                               ; preds = %41
  %45 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI18GridPointReferenceSaIS0_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %5, ptr align 4 %45, i64 4, i1 false), !tbaa.struct !16
  call void @_ZNSt6vectorI18GridPointReferenceSaIS0_EE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #5
  call void @_ZNSt6vectorI18GridPointReferenceSaIS0_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %18) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %19, ptr align 4 %5, i64 4, i1 false), !tbaa.struct !16
  %46 = load double, ptr %7, align 8, !tbaa !9
  %47 = getelementptr inbounds %struct.GridPointReference, ptr %19, i32 0, i32 0
  %48 = load i32, ptr %47, align 4
  invoke void @_ZN16SpatialPointGrid32queryPointReferencesInsideSphereE18GridPointReferencedRSt6vectorIbSaIbEERS1_IS0_SaIS0_EE(ptr noundef nonnull align 8 dereferenceable(152) %24, i32 %48, double noundef %46, ptr noundef nonnull align 8 dereferenceable(40) %9, ptr noundef nonnull align 8 dereferenceable(24) %18)
          to label %49 unwind label %76

49:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  store i32 0, ptr %20, align 4, !tbaa !17
  br label %50

50:                                               ; preds = %120, %49
  %51 = load i32, ptr %20, align 4, !tbaa !17
  %52 = zext i32 %51 to i64
  %53 = call noundef i64 @_ZNKSt6vectorI18GridPointReferenceSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %18) #5
  %54 = icmp ult i64 %52, %53
  br i1 %54, label %80, label %55

55:                                               ; preds = %50
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %124

56:                                               ; preds = %4
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %12, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %13, align 4
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #5
  br label %132

60:                                               ; preds = %27
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %12, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %13, align 4
  br label %131

64:                                               ; preds = %28
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %12, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #5
  br label %131

68:                                               ; preds = %33
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %12, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %13, align 4
  br label %130

72:                                               ; preds = %39
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %12, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %13, align 4
  br label %129

76:                                               ; preds = %124, %44
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %12, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %13, align 4
  br label %128

80:                                               ; preds = %50
  %81 = load i32, ptr %20, align 4, !tbaa !17
  %82 = zext i32 %81 to i64
  %83 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI18GridPointReferenceSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %82) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 4 %83, i64 4, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.start.p0(i64 16, ptr %21) #5
  %84 = getelementptr inbounds %struct.GridPointReference, ptr %16, i32 0, i32 0
  %85 = load i32, ptr %84, align 4, !tbaa !13
  %86 = sext i32 %85 to i64
  %87 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %9, i64 noundef %86)
          to label %88 unwind label %107

88:                                               ; preds = %80
  %89 = getelementptr inbounds { ptr, i64 }, ptr %21, i32 0, i32 0
  %90 = extractvalue { ptr, i64 } %87, 0
  store ptr %90, ptr %89, align 8
  %91 = getelementptr inbounds { ptr, i64 }, ptr %21, i32 0, i32 1
  %92 = extractvalue { ptr, i64 } %87, 1
  store i64 %92, ptr %91, align 8
  %93 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %21) #5
  %94 = xor i1 %93, true
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #5
  br i1 %94, label %95, label %119

95:                                               ; preds = %88
  invoke void @_ZNSt6vectorI18GridPointReferenceSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 4 dereferenceable(4) %16)
          to label %96 unwind label %111

96:                                               ; preds = %95
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #5
  %97 = getelementptr inbounds %struct.GridPointReference, ptr %16, i32 0, i32 0
  %98 = load i32, ptr %97, align 4, !tbaa !13
  %99 = sext i32 %98 to i64
  %100 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %9, i64 noundef %99)
          to label %101 unwind label %115

101:                                              ; preds = %96
  %102 = getelementptr inbounds { ptr, i64 }, ptr %22, i32 0, i32 0
  %103 = extractvalue { ptr, i64 } %100, 0
  store ptr %103, ptr %102, align 8
  %104 = getelementptr inbounds { ptr, i64 }, ptr %22, i32 0, i32 1
  %105 = extractvalue { ptr, i64 } %100, 1
  store i64 %105, ptr %104, align 8
  %106 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %22, i1 noundef zeroext true) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #5
  br label %119

107:                                              ; preds = %80
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %12, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %21) #5
  br label %123

111:                                              ; preds = %95
  %112 = landingpad { ptr, i32 }
          cleanup
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %12, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %13, align 4
  br label %123

115:                                              ; preds = %96
  %116 = landingpad { ptr, i32 }
          cleanup
  %117 = extractvalue { ptr, i32 } %116, 0
  store ptr %117, ptr %12, align 8
  %118 = extractvalue { ptr, i32 } %116, 1
  store i32 %118, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #5
  br label %123

119:                                              ; preds = %101, %88
  br label %120

120:                                              ; preds = %119
  %121 = load i32, ptr %20, align 4, !tbaa !17
  %122 = add i32 %121, 1
  store i32 %122, ptr %20, align 4, !tbaa !17
  br label %50, !llvm.loop !18

123:                                              ; preds = %115, %111, %107
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %128

124:                                              ; preds = %55
  %125 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_ZNSt6vectorI18GridPointReferenceSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %125, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %126 unwind label %76

126:                                              ; preds = %124
  br label %41, !llvm.loop !20

127:                                              ; preds = %41
  call void @_ZNSt6vectorI18GridPointReferenceSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #5
  call void @_ZN9GridPointD2Ev(ptr noundef nonnull align 4 dereferenceable(16) %17) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @_ZNSt6vectorI18GridPointReferenceSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #5
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %9) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %9) #5
  ret void

128:                                              ; preds = %123, %76
  call void @_ZNSt6vectorI18GridPointReferenceSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #5
  call void @_ZN9GridPointD2Ev(ptr noundef nonnull align 4 dereferenceable(16) %17) #5
  br label %129

129:                                              ; preds = %128, %72
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #5
  br label %130

130:                                              ; preds = %129, %68
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %131

131:                                              ; preds = %130, %64, %60
  call void @_ZNSt6vectorI18GridPointReferenceSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %14) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #5
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %9) #5
  br label %132

132:                                              ; preds = %131, %56
  call void @llvm.lifetime.end.p0(i64 40, ptr %9) #5
  br label %133

133:                                              ; preds = %132
  %134 = load ptr, ptr %12, align 8
  %135 = load i32, ptr %13, align 4
  %136 = insertvalue { ptr, i32 } poison, ptr %134, 0
  %137 = insertvalue { ptr, i32 } %136, i32 %135, 1
  resume { ptr, i32 } %137
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIbSaIbEEC2EmRKbRKS0_(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16), i1 noundef zeroext) #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN18GridPointReferenceC2Ev(ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI18GridPointReferenceSaIS0_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24)) #0 align 2

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint 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 #4 = { 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 #5 = { 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 = !{!"bool", !7, i64 0}
!13 = !{!14, !15, i64 0}
!14 = !{!"_ZTS18GridPointReference", !15, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{i64 0, i64 4, !17}
!17 = !{!15, !15, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}


; 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.GridPointReference = type { i32 }
%"class.std::vector.20" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.std::allocator.34" = type { i8 }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<GridPointReference, std::allocator<GridPointReference>>::_Vector_impl" }
%"struct.std::_Vector_base<GridPointReference, std::allocator<GridPointReference>>::_Vector_impl" = type { %"struct.std::_Vector_base<GridPointReference, std::allocator<GridPointReference>>::_Vector_impl_data" }
%"struct.std::_Vector_base<GridPointReference, std::allocator<GridPointReference>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::_Bit_reference" = type { ptr, i64 }
%struct.GridPoint = type { %"class.vmath::vec3", %struct.GridPointReference }
%"class.vmath::vec3" = type { float, float, float }

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN9GridPointD2Ev(ptr noundef nonnull align 4 dereferenceable(16)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN16SpatialPointGrid32queryPointReferencesInsideSphereE18GridPointReferencedRSt6vectorIbSaIbEERS1_IS0_SaIS0_EE(ptr noundef nonnull align 8 dereferenceable(152), i32, double noundef, ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN9GridPointC2Ev(ptr noundef nonnull align 4 dereferenceable(16)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI18GridPointReferenceSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN16SpatialPointGrid28_getConnectedPointReferencesE18GridPointReferencedRSt6vectorIS0_SaIS0_EE(ptr noundef nonnull align 8 dereferenceable(152) %0, i32 %1, double noundef %2, ptr noundef nonnull align 8 dereferenceable(24) %3) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %struct.GridPointReference, align 4
  %6 = alloca %"class.std::vector.20", align 8
  %7 = alloca i8, align 1
  %8 = alloca %"class.std::allocator.34", align 1
  %9 = alloca %"class.std::vector.5", align 8
  %10 = alloca %"struct.std::_Bit_reference", align 8
  %11 = alloca %struct.GridPointReference, align 4
  %12 = alloca %struct.GridPoint, align 4
  %13 = alloca %"class.std::vector.5", align 8
  %14 = alloca %"struct.std::_Bit_reference", align 8
  %15 = alloca %"struct.std::_Bit_reference", align 8
  store i32 %1, ptr %5, align 4
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %6) #4
  %16 = getelementptr inbounds i8, ptr %0, i64 24
  %17 = tail call noundef i64 @_ZNKSt6vectorI9GridPointSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %16) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #4
  store i8 0, ptr %7, align 1, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #4
  call void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #4
  invoke void @_ZNSt6vectorIbSaIbEEC2EmRKbRKS0_(ptr noundef nonnull align 8 dereferenceable(40) %6, i64 noundef %17, ptr noundef nonnull align 1 dereferenceable(1) %7, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %18 unwind label %37

18:                                               ; preds = %4
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #4
  call void @_ZNSt6vectorI18GridPointReferenceSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  invoke void @_ZNSt6vectorI18GridPointReferenceSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %19 unwind label %39

19:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #4
  %20 = load i32, ptr %5, align 4, !tbaa !9
  %21 = sext i32 %20 to i64
  %22 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %6, i64 noundef %21)
          to label %23 unwind label %41

23:                                               ; preds = %19
  %24 = extractvalue { ptr, i64 } %22, 0
  store ptr %24, ptr %10, align 8
  %25 = getelementptr inbounds i8, ptr %10, i64 8
  %26 = extractvalue { ptr, i64 } %22, 1
  store i64 %26, ptr %25, align 8
  %27 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %10, i1 noundef zeroext true) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #4
  call void @_ZN18GridPointReferenceC2Ev(ptr noundef nonnull align 4 dereferenceable(4) %11)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #4
  invoke void @_ZN9GridPointC2Ev(ptr noundef nonnull align 4 dereferenceable(16) %12)
          to label %28 unwind label %43

28:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #4
  call void @_ZNSt6vectorI18GridPointReferenceSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #4
  %29 = getelementptr inbounds i8, ptr %14, i64 8
  %30 = getelementptr inbounds i8, ptr %15, i64 8
  br label %31

31:                                               ; preds = %._crit_edge, %28
  %32 = call noundef zeroext i1 @_ZNKSt6vectorI18GridPointReferenceSaIS0_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  br i1 %32, label %76, label %33

33:                                               ; preds = %31
  %34 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI18GridPointReferenceSaIS0_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  %35 = load i32, ptr %34, align 4, !tbaa !12
  store i32 %35, ptr %5, align 4, !tbaa !12
  call void @_ZNSt6vectorI18GridPointReferenceSaIS0_EE8pop_backEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  call void @_ZNSt6vectorI18GridPointReferenceSaIS0_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #4
  %.sroa.0.0.copyload = load i32, ptr %5, align 4, !tbaa !12
  invoke void @_ZN16SpatialPointGrid32queryPointReferencesInsideSphereE18GridPointReferencedRSt6vectorIbSaIbEERS1_IS0_SaIS0_EE(ptr noundef nonnull align 8 dereferenceable(152) %0, i32 %.sroa.0.0.copyload, double noundef %2, ptr noundef nonnull align 8 dereferenceable(40) %6, ptr noundef nonnull align 8 dereferenceable(24) %13)
          to label %.preheader unwind label %45

.preheader:                                       ; preds = %33
  %36 = call noundef i64 @_ZNKSt6vectorI18GridPointReferenceSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #4
  %.not = icmp eq i64 %36, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %71, %.preheader
  invoke void @_ZNSt6vectorI18GridPointReferenceSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %31 unwind label %45, !llvm.loop !13

37:                                               ; preds = %4
  %38 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #4
  br label %80

39:                                               ; preds = %18
  %40 = landingpad { ptr, i32 }
          cleanup
  br label %79

41:                                               ; preds = %19
  %42 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #4
  br label %79

43:                                               ; preds = %23
  %44 = landingpad { ptr, i32 }
          cleanup
  br label %78

45:                                               ; preds = %._crit_edge, %33
  %46 = landingpad { ptr, i32 }
          cleanup
  br label %77

.lr.ph:                                           ; preds = %.preheader, %71
  %47 = phi i64 [ %73, %71 ], [ 0, %.preheader ]
  %.019 = phi i32 [ %72, %71 ], [ 0, %.preheader ]
  %48 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI18GridPointReferenceSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef %47) #4
  %49 = load i32, ptr %48, align 4, !tbaa !12
  store i32 %49, ptr %11, align 4, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #4
  %50 = sext i32 %49 to i64
  %51 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %6, i64 noundef %50)
          to label %52 unwind label %65

52:                                               ; preds = %.lr.ph
  %53 = extractvalue { ptr, i64 } %51, 0
  store ptr %53, ptr %14, align 8
  %54 = extractvalue { ptr, i64 } %51, 1
  store i64 %54, ptr %29, align 8
  %55 = call noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16) %14) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #4
  br i1 %55, label %71, label %56

56:                                               ; preds = %52
  invoke void @_ZNSt6vectorI18GridPointReferenceSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 4 dereferenceable(4) %11)
          to label %57 unwind label %67

57:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #4
  %58 = load i32, ptr %11, align 4, !tbaa !9
  %59 = sext i32 %58 to i64
  %60 = invoke { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40) %6, i64 noundef %59)
          to label %61 unwind label %69

61:                                               ; preds = %57
  %62 = extractvalue { ptr, i64 } %60, 0
  store ptr %62, ptr %15, align 8
  %63 = extractvalue { ptr, i64 } %60, 1
  store i64 %63, ptr %30, align 8
  %64 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16) %15, i1 noundef zeroext true) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #4
  br label %71

65:                                               ; preds = %.lr.ph
  %66 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #4
  br label %77

67:                                               ; preds = %56
  %68 = landingpad { ptr, i32 }
          cleanup
  br label %77

69:                                               ; preds = %57
  %70 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #4
  br label %77

71:                                               ; preds = %52, %61
  %72 = add i32 %.019, 1
  %73 = zext i32 %72 to i64
  %74 = call noundef i64 @_ZNKSt6vectorI18GridPointReferenceSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #4
  %75 = icmp ugt i64 %74, %73
  br i1 %75, label %.lr.ph, label %._crit_edge, !llvm.loop !15

76:                                               ; preds = %31
  call void @_ZNSt6vectorI18GridPointReferenceSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #4
  call void @_ZN9GridPointD2Ev(ptr noundef nonnull align 4 dereferenceable(16) %12) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #4
  call void @_ZNSt6vectorI18GridPointReferenceSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #4
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %6) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #4
  ret void

77:                                               ; preds = %65, %67, %69, %45
  %.pn.pn = phi { ptr, i32 } [ %46, %45 ], [ %70, %69 ], [ %68, %67 ], [ %66, %65 ]
  call void @_ZNSt6vectorI18GridPointReferenceSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #4
  call void @_ZN9GridPointD2Ev(ptr noundef nonnull align 4 dereferenceable(16) %12) #4
  br label %78

78:                                               ; preds = %77, %43
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %77 ], [ %44, %43 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #4
  br label %79

79:                                               ; preds = %78, %41, %39
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %78 ], [ %42, %41 ], [ %40, %39 ]
  call void @_ZNSt6vectorI18GridPointReferenceSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #4
  call void @_ZNSt13_Bvector_baseISaIbEED2Ev(ptr noundef nonnull align 8 dereferenceable(40) %6) #4
  br label %80

80:                                               ; preds = %79, %37
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %79 ], [ %38, %37 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #4
  resume { ptr, i32 } %.pn.pn.pn.pn.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSaIbEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIbSaIbEEC2EmRKbRKS0_(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef, ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIbED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNSt6vectorIbSaIbEEixEm(ptr noundef nonnull align 8 dereferenceable(40), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt14_Bit_referencecvbEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNSt14_Bit_referenceaSEb(ptr noundef nonnull align 8 dereferenceable(16), i1 noundef zeroext) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN18GridPointReferenceC2Ev(ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #0 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI18GridPointReferenceSaIS0_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint 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 = { 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 #4 = { 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 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTS18GridPointReference", !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass