; LLVM IR from doyubkim/fluid-engine-dev :: src/jet (point_kdtree_searcher2)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.flatbuffers::FlatBufferBuilder" = type { %"class.flatbuffers::vector_downward", %"class.std::vector.8", i8, i8, %"class.std::vector.13", i64, i8, i8, ptr }
%"class.flatbuffers::vector_downward" = type { ptr, i8, i64, i64, ptr, ptr }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<flatbuffers::FlatBufferBuilder::FieldLoc, std::allocator<flatbuffers::FlatBufferBuilder::FieldLoc>>::_Vector_impl" }
%"struct.std::_Vector_base<flatbuffers::FlatBufferBuilder::FieldLoc, std::allocator<flatbuffers::FlatBufferBuilder::FieldLoc>>::_Vector_impl" = type { %"struct.std::_Vector_base<flatbuffers::FlatBufferBuilder::FieldLoc, std::allocator<flatbuffers::FlatBufferBuilder::FieldLoc>>::_Vector_impl_data" }
%"struct.std::_Vector_base<flatbuffers::FlatBufferBuilder::FieldLoc, std::allocator<flatbuffers::FlatBufferBuilder::FieldLoc>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.13" = type { %"struct.std::_Vector_base.14" }
%"struct.std::_Vector_base.14" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.18" = type { %"struct.std::_Vector_base.19" }
%"struct.std::_Vector_base.19" = type { %"struct.std::_Vector_base<jet::fbs::Vector2D, std::allocator<jet::fbs::Vector2D>>::_Vector_impl" }
%"struct.std::_Vector_base<jet::fbs::Vector2D, std::allocator<jet::fbs::Vector2D>>::_Vector_impl" = type { %"struct.std::_Vector_base<jet::fbs::Vector2D, std::allocator<jet::fbs::Vector2D>>::_Vector_impl_data" }
%"struct.std::_Vector_base<jet::fbs::Vector2D, std::allocator<jet::fbs::Vector2D>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.jet::fbs::Vector2D" = type { double, double }
%"struct.flatbuffers::Offset" = type { i32 }
%"class.std::vector.23" = type { %"struct.std::_Vector_base.24" }
%"struct.std::_Vector_base.24" = type { %"struct.std::_Vector_base<jet::fbs::PointKdTreeSearcherNode2, std::allocator<jet::fbs::PointKdTreeSearcherNode2>>::_Vector_impl" }
%"struct.std::_Vector_base<jet::fbs::PointKdTreeSearcherNode2, std::allocator<jet::fbs::PointKdTreeSearcherNode2>>::_Vector_impl" = type { %"struct.std::_Vector_base<jet::fbs::PointKdTreeSearcherNode2, std::allocator<jet::fbs::PointKdTreeSearcherNode2>>::_Vector_impl_data" }
%"struct.std::_Vector_base<jet::fbs::PointKdTreeSearcherNode2, std::allocator<jet::fbs::PointKdTreeSearcherNode2>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.28" = type { ptr }
%"struct.flatbuffers::Offset.29" = type { i32 }
%"struct.flatbuffers::Offset.30" = type { i32 }
%"class.jet::PointKdTreeSearcher2" = type { %"class.jet::PointNeighborSearcher2", %"class.jet::KdTree" }
%"class.jet::PointNeighborSearcher2" = type { %"class.jet::Serializable" }
%"class.jet::Serializable" = type { ptr }
%"class.jet::KdTree" = type { %"class.std::vector", %"class.std::vector.0" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<jet::Vector<double, 2>, std::allocator<jet::Vector<double, 2>>>::_Vector_impl" }
%"struct.std::_Vector_base<jet::Vector<double, 2>, std::allocator<jet::Vector<double, 2>>>::_Vector_impl" = type { %"struct.std::_Vector_base<jet::Vector<double, 2>, std::allocator<jet::Vector<double, 2>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<jet::Vector<double, 2>, std::allocator<jet::Vector<double, 2>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<jet::KdTree<double, 2>::Node, std::allocator<jet::KdTree<double, 2>::Node>>::_Vector_impl" }
%"struct.std::_Vector_base<jet::KdTree<double, 2>::Node, std::allocator<jet::KdTree<double, 2>::Node>>::_Vector_impl" = type { %"struct.std::_Vector_base<jet::KdTree<double, 2>::Node, std::allocator<jet::KdTree<double, 2>::Node>>::_Vector_impl_data" }
%"struct.std::_Vector_base<jet::KdTree<double, 2>::Node, std::allocator<jet::KdTree<double, 2>::Node>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.jet::KdTree<double, 2>::Node" = type { i64, i64, i64, %"class.jet::Vector" }
%"class.jet::Vector" = type { double, double }

declare i32 @__gxx_personality_v0(...)

; 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 @_ZNK3jet20PointKdTreeSearcher29serializeEPSt6vectorIhSaIhEE(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef %1) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.flatbuffers::FlatBufferBuilder", align 8
  %6 = alloca %"class.std::vector.18", align 8
  %7 = alloca ptr, align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %12 = alloca ptr, align 8
  %13 = alloca %"struct.jet::fbs::Vector2D", align 8
  %14 = alloca %"struct.flatbuffers::Offset", align 4
  %15 = alloca %"class.std::vector.23", align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator.28", align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator.28", align 8
  %18 = alloca %"struct.flatbuffers::Offset.29", align 4
  %19 = alloca %"struct.flatbuffers::Offset.30", align 4
  %20 = alloca %"struct.flatbuffers::Offset", align 4
  %21 = alloca %"struct.flatbuffers::Offset.29", align 4
  %22 = alloca %"struct.flatbuffers::Offset.30", align 4
  %23 = alloca ptr, align 8
  %24 = alloca i64, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %25 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 128, ptr %5) #6
  call void @_ZN11flatbuffers17FlatBufferBuilderC2EmPNS_9AllocatorEb(ptr noundef nonnull align 8 dereferenceable(128) %5, i64 noundef 1024, ptr noundef null, i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #6
  call void @_ZNSt6vectorIN3jet3fbs8Vector2DESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %26 = getelementptr inbounds %"class.jet::PointKdTreeSearcher2", ptr %25, i32 0, i32 1
  store ptr %26, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %27 = load ptr, ptr %7, align 8, !tbaa !5
  %28 = invoke ptr @_ZNK3jet6KdTreeIdLm2EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %27)
          to label %29 unwind label %38

29:                                               ; preds = %2
  %30 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %8, i32 0, i32 0
  store ptr %28, ptr %30, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %31 = load ptr, ptr %7, align 8, !tbaa !5
  %32 = invoke ptr @_ZNK3jet6KdTreeIdLm2EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %31)
          to label %33 unwind label %42

33:                                               ; preds = %29
  %34 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %11, i32 0, i32 0
  store ptr %32, ptr %34, align 8
  br label %35

35:                                               ; preds = %51, %33
  %36 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN3jet6VectorIdLm2EEESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %11) #6
  br i1 %36, label %46, label %37

37:                                               ; preds = %35
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %59

38:                                               ; preds = %2
  %39 = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %9, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %10, align 4
  br label %58

42:                                               ; preds = %29
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %9, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %10, align 4
  br label %57

46:                                               ; preds = %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %47 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKN3jet6VectorIdLm2EEESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  store ptr %47, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #6
  %48 = load ptr, ptr %12, align 8, !tbaa !5
  invoke void @_ZN3jet8jetToFbsERKNS_6VectorIdLm2EEE(ptr dead_on_unwind writable sret(%"struct.jet::fbs::Vector2D") align 8 %13, ptr noundef nonnull align 8 dereferenceable(16) %48)
          to label %49 unwind label %53

49:                                               ; preds = %46
  invoke void @_ZNSt6vectorIN3jet3fbs8Vector2DESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(16) %13)
          to label %50 unwind label %53

50:                                               ; preds = %49
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %51

51:                                               ; preds = %50
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKN3jet6VectorIdLm2EEESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  br label %35

53:                                               ; preds = %49, %46
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %9, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %57

57:                                               ; preds = %53, %42
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %58

58:                                               ; preds = %57, %38
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %147

59:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %60 = call noundef ptr @_ZNSt6vectorIN3jet3fbs8Vector2DESaIS2_EE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  %61 = call noundef i64 @_ZNKSt6vectorIN3jet3fbs8Vector2DESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  %62 = invoke i32 @_ZN11flatbuffers17FlatBufferBuilder21CreateVectorOfStructsIN3jet3fbs8Vector2DEEENS_6OffsetINS_6VectorIPKT_EEEES9_m(ptr noundef nonnull align 8 dereferenceable(128) %5, ptr noundef %60, i64 noundef %61)
          to label %63 unwind label %76

63:                                               ; preds = %59
  %64 = getelementptr inbounds %"struct.flatbuffers::Offset", ptr %14, i32 0, i32 0
  store i32 %62, ptr %64, align 4
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #6
  call void @_ZNSt6vectorIN3jet3fbs24PointKdTreeSearcherNode2ESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %65 = getelementptr inbounds %"class.jet::PointKdTreeSearcher2", ptr %25, i32 0, i32 1
  %66 = invoke ptr @_ZNK3jet6KdTreeIdLm2EE9beginNodeEv(ptr noundef nonnull align 8 dereferenceable(48) %65)
          to label %67 unwind label %80

67:                                               ; preds = %63
  %68 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.28", ptr %16, i32 0, i32 0
  store ptr %66, ptr %68, align 8
  br label %69

69:                                               ; preds = %97, %67
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %70 = getelementptr inbounds %"class.jet::PointKdTreeSearcher2", ptr %25, i32 0, i32 1
  %71 = invoke ptr @_ZNK3jet6KdTreeIdLm2EE7endNodeEv(ptr noundef nonnull align 8 dereferenceable(48) %70)
          to label %72 unwind label %84

72:                                               ; preds = %69
  %73 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.28", ptr %17, i32 0, i32 0
  store ptr %71, ptr %73, align 8
  %74 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN3jet6KdTreeIdLm2EE4NodeESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESF_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br i1 %74, label %88, label %75

75:                                               ; preds = %72
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %100

76:                                               ; preds = %59
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %9, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %10, align 4
  br label %146

80:                                               ; preds = %88, %63
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %9, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %10, align 4
  br label %99

84:                                               ; preds = %69
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %9, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %99

88:                                               ; preds = %72
  %89 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKN3jet6KdTreeIdLm2EE4NodeESt6vectorIS4_SaIS4_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #6
  %90 = getelementptr inbounds %"struct.jet::KdTree<double, 2>::Node", ptr %89, i32 0, i32 0
  %91 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKN3jet6KdTreeIdLm2EE4NodeESt6vectorIS4_SaIS4_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #6
  %92 = getelementptr inbounds %"struct.jet::KdTree<double, 2>::Node", ptr %91, i32 0, i32 1
  %93 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKN3jet6KdTreeIdLm2EE4NodeESt6vectorIS4_SaIS4_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #6
  %94 = getelementptr inbounds %"struct.jet::KdTree<double, 2>::Node", ptr %93, i32 0, i32 2
  %95 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIN3jet3fbs24PointKdTreeSearcherNode2ESaIS2_EE12emplace_backIJRKmS7_S7_EEERS2_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(8) %90, ptr noundef nonnull align 8 dereferenceable(8) %92, ptr noundef nonnull align 8 dereferenceable(8) %94)
          to label %96 unwind label %80

96:                                               ; preds = %88
  br label %97

97:                                               ; preds = %96
  %98 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKN3jet6KdTreeIdLm2EE4NodeESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #6
  br label %69, !llvm.loop !9

99:                                               ; preds = %84, %80
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %145

100:                                              ; preds = %75
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  %101 = invoke i32 @_ZN11flatbuffers17FlatBufferBuilder21CreateVectorOfStructsIN3jet3fbs24PointKdTreeSearcherNode2EEENS_6OffsetINS_6VectorIPKT_EEEERKSt6vectorIS7_SaIS7_EE(ptr noundef nonnull align 8 dereferenceable(128) %5, ptr noundef nonnull align 8 dereferenceable(24) %15)
          to label %102 unwind label %126

102:                                              ; preds = %100
  %103 = getelementptr inbounds %"struct.flatbuffers::Offset.29", ptr %18, i32 0, i32 0
  store i32 %101, ptr %103, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %20, ptr align 4 %14, i64 4, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %21, ptr align 4 %18, i64 4, i1 false), !tbaa.struct !11
  %104 = getelementptr inbounds %"struct.flatbuffers::Offset", ptr %20, i32 0, i32 0
  %105 = load i32, ptr %104, align 4
  %106 = getelementptr inbounds %"struct.flatbuffers::Offset.29", ptr %21, i32 0, i32 0
  %107 = load i32, ptr %106, align 4
  %108 = invoke i32 @_ZN3jet3fbs26CreatePointKdTreeSearcher2ERN11flatbuffers17FlatBufferBuilderENS1_6OffsetINS1_6VectorIPKNS0_8Vector2DEEEEENS4_INS5_IPKNS0_24PointKdTreeSearcherNode2EEEEE(ptr noundef nonnull align 8 dereferenceable(128) %5, i32 %105, i32 %107)
          to label %109 unwind label %130

109:                                              ; preds = %102
  %110 = getelementptr inbounds %"struct.flatbuffers::Offset.30", ptr %19, i32 0, i32 0
  store i32 %108, ptr %110, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %22, ptr align 4 %19, i64 4, i1 false), !tbaa.struct !11
  %111 = getelementptr inbounds %"struct.flatbuffers::Offset.30", ptr %22, i32 0, i32 0
  %112 = load i32, ptr %111, align 4
  invoke void @_ZN11flatbuffers17FlatBufferBuilder6FinishIN3jet3fbs20PointKdTreeSearcher2EEEvNS_6OffsetIT_EEPKc(ptr noundef nonnull align 8 dereferenceable(128) %5, i32 %112, ptr noundef null)
          to label %113 unwind label %130

113:                                              ; preds = %109
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %114 = invoke noundef ptr @_ZNK11flatbuffers17FlatBufferBuilder16GetBufferPointerEv(ptr noundef nonnull align 8 dereferenceable(128) %5)
          to label %115 unwind label %134

115:                                              ; preds = %113
  store ptr %114, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  %116 = invoke noundef i32 @_ZNK11flatbuffers17FlatBufferBuilder7GetSizeEv(ptr noundef nonnull align 8 dereferenceable(128) %5)
          to label %117 unwind label %138

117:                                              ; preds = %115
  %118 = zext i32 %116 to i64
  store i64 %118, ptr %24, align 8, !tbaa !14
  %119 = load ptr, ptr %4, align 8, !tbaa !5
  %120 = load i64, ptr %24, align 8, !tbaa !14
  invoke void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %119, i64 noundef %120)
          to label %121 unwind label %138

121:                                              ; preds = %117
  %122 = load ptr, ptr %4, align 8, !tbaa !5
  %123 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %122) #6
  %124 = load ptr, ptr %23, align 8, !tbaa !5
  %125 = load i64, ptr %24, align 8, !tbaa !14
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %123, ptr align 1 %124, i64 %125, i1 false)
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @_ZNSt6vectorIN3jet3fbs24PointKdTreeSearcherNode2ESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @_ZNSt6vectorIN3jet3fbs8Vector2DESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #6
  call void @_ZN11flatbuffers17FlatBufferBuilderD2Ev(ptr noundef nonnull align 8 dereferenceable(128) %5) #6
  call void @llvm.lifetime.end.p0(i64 128, ptr %5) #6
  ret void

126:                                              ; preds = %100
  %127 = landingpad { ptr, i32 }
          cleanup
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %9, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %10, align 4
  br label %144

130:                                              ; preds = %109, %102
  %131 = landingpad { ptr, i32 }
          cleanup
  %132 = extractvalue { ptr, i32 } %131, 0
  store ptr %132, ptr %9, align 8
  %133 = extractvalue { ptr, i32 } %131, 1
  store i32 %133, ptr %10, align 4
  br label %143

134:                                              ; preds = %113
  %135 = landingpad { ptr, i32 }
          cleanup
  %136 = extractvalue { ptr, i32 } %135, 0
  store ptr %136, ptr %9, align 8
  %137 = extractvalue { ptr, i32 } %135, 1
  store i32 %137, ptr %10, align 4
  br label %142

138:                                              ; preds = %117, %115
  %139 = landingpad { ptr, i32 }
          cleanup
  %140 = extractvalue { ptr, i32 } %139, 0
  store ptr %140, ptr %9, align 8
  %141 = extractvalue { ptr, i32 } %139, 1
  store i32 %141, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  br label %142

142:                                              ; preds = %138, %134
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  br label %143

143:                                              ; preds = %142, %130
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %144

144:                                              ; preds = %143, %126
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %145

145:                                              ; preds = %144, %99
  call void @_ZNSt6vectorIN3jet3fbs24PointKdTreeSearcherNode2ESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #6
  br label %146

146:                                              ; preds = %145, %76
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %147

147:                                              ; preds = %146, %58
  call void @_ZNSt6vectorIN3jet3fbs8Vector2DESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #6
  call void @_ZN11flatbuffers17FlatBufferBuilderD2Ev(ptr noundef nonnull align 8 dereferenceable(128) %5) #6
  call void @llvm.lifetime.end.p0(i64 128, ptr %5) #6
  br label %148

148:                                              ; preds = %147
  %149 = load ptr, ptr %9, align 8
  %150 = load i32, ptr %10, align 4
  %151 = insertvalue { ptr, i32 } poison, ptr %149, 0
  %152 = insertvalue { ptr, i32 } %151, i32 %150, 1
  resume { ptr, i32 } %152
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11flatbuffers17FlatBufferBuilderC2EmPNS_9AllocatorEb(ptr noundef nonnull align 8 dereferenceable(128), i64 noundef, ptr noundef, i1 noundef zeroext) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNK3jet6KdTreeIdLm2EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNK3jet6KdTreeIdLm2EE3endEv(ptr noundef nonnull align 8 dereferenceable(48)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPKN3jet6VectorIdLm2EEESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3jet8jetToFbsERKNS_6VectorIdLm2EEE(ptr dead_on_unwind noalias writable sret(%"struct.jet::fbs::Vector2D") align 8, ptr noundef nonnull align 8 dereferenceable(16)) #4

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

; Function Attrs: mustprogress uwtable
declare dso_local i32 @_ZN11flatbuffers17FlatBufferBuilder21CreateVectorOfStructsIN3jet3fbs8Vector2DEEENS_6OffsetINS_6VectorIPKT_EEEES9_m(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef, i64 noundef) #1 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNK3jet6KdTreeIdLm2EE9beginNodeEv(ptr noundef nonnull align 8 dereferenceable(48)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPKN3jet6KdTreeIdLm2EE4NodeESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESF_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNK3jet6KdTreeIdLm2EE7endNodeEv(ptr noundef nonnull align 8 dereferenceable(48)) #2 align 2

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i32 @_ZN3jet3fbs26CreatePointKdTreeSearcher2ERN11flatbuffers17FlatBufferBuilderENS1_6OffsetINS1_6VectorIPKNS0_8Vector2DEEEEENS4_INS5_IPKNS0_24PointKdTreeSearcherNode2EEEEE(ptr noundef nonnull align 8 dereferenceable(128), i32, i32) #4

; 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) #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11flatbuffers17FlatBufferBuilder6FinishIN3jet3fbs20PointKdTreeSearcher2EEEvNS_6OffsetIT_EEPKc(ptr noundef nonnull align 8 dereferenceable(128), i32, ptr noundef) #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK11flatbuffers17FlatBufferBuilder7GetSizeEv(ptr noundef nonnull align 8 dereferenceable(128)) #2 align 2

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11flatbuffers17FlatBufferBuilderD2Ev(ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #2 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 = { 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 = { inlinehint 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{i64 0, i64 4, !12}
!12 = !{!13, !13, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"long", !7, i64 0}


; 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.flatbuffers::FlatBufferBuilder" = type { %"class.flatbuffers::vector_downward", %"class.std::vector.8", i8, i8, %"class.std::vector.13", i64, i8, i8, ptr }
%"class.flatbuffers::vector_downward" = type { ptr, i8, i64, i64, ptr, ptr }
%"class.std::vector.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = type { %"struct.std::_Vector_base<flatbuffers::FlatBufferBuilder::FieldLoc, std::allocator<flatbuffers::FlatBufferBuilder::FieldLoc>>::_Vector_impl" }
%"struct.std::_Vector_base<flatbuffers::FlatBufferBuilder::FieldLoc, std::allocator<flatbuffers::FlatBufferBuilder::FieldLoc>>::_Vector_impl" = type { %"struct.std::_Vector_base<flatbuffers::FlatBufferBuilder::FieldLoc, std::allocator<flatbuffers::FlatBufferBuilder::FieldLoc>>::_Vector_impl_data" }
%"struct.std::_Vector_base<flatbuffers::FlatBufferBuilder::FieldLoc, std::allocator<flatbuffers::FlatBufferBuilder::FieldLoc>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.13" = type { %"struct.std::_Vector_base.14" }
%"struct.std::_Vector_base.14" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.18" = type { %"struct.std::_Vector_base.19" }
%"struct.std::_Vector_base.19" = type { %"struct.std::_Vector_base<jet::fbs::Vector2D, std::allocator<jet::fbs::Vector2D>>::_Vector_impl" }
%"struct.std::_Vector_base<jet::fbs::Vector2D, std::allocator<jet::fbs::Vector2D>>::_Vector_impl" = type { %"struct.std::_Vector_base<jet::fbs::Vector2D, std::allocator<jet::fbs::Vector2D>>::_Vector_impl_data" }
%"struct.std::_Vector_base<jet::fbs::Vector2D, std::allocator<jet::fbs::Vector2D>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"struct.jet::fbs::Vector2D" = type { double, double }
%"class.std::vector.23" = type { %"struct.std::_Vector_base.24" }
%"struct.std::_Vector_base.24" = type { %"struct.std::_Vector_base<jet::fbs::PointKdTreeSearcherNode2, std::allocator<jet::fbs::PointKdTreeSearcherNode2>>::_Vector_impl" }
%"struct.std::_Vector_base<jet::fbs::PointKdTreeSearcherNode2, std::allocator<jet::fbs::PointKdTreeSearcherNode2>>::_Vector_impl" = type { %"struct.std::_Vector_base<jet::fbs::PointKdTreeSearcherNode2, std::allocator<jet::fbs::PointKdTreeSearcherNode2>>::_Vector_impl_data" }
%"struct.std::_Vector_base<jet::fbs::PointKdTreeSearcherNode2, std::allocator<jet::fbs::PointKdTreeSearcherNode2>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.28" = type { ptr }

declare i32 @__gxx_personality_v0(...)

; 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 @_ZNK3jet20PointKdTreeSearcher29serializeEPSt6vectorIhSaIhEE(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef %1) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.flatbuffers::FlatBufferBuilder", align 8
  %4 = alloca %"class.std::vector.18", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"struct.jet::fbs::Vector2D", align 8
  %8 = alloca %"class.std::vector.23", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator.28", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator.28", align 8
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %3) #6
  call void @_ZN11flatbuffers17FlatBufferBuilderC2EmPNS_9AllocatorEb(ptr noundef nonnull align 8 dereferenceable(128) %3, i64 noundef 1024, ptr noundef null, i1 noundef zeroext false)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #6
  call void @_ZNSt6vectorIN3jet3fbs8Vector2DESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  %11 = getelementptr inbounds i8, ptr %0, i64 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %12 = call ptr @_ZNK3jet6KdTreeIdLm2EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %11)
  store ptr %12, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %13 = call ptr @_ZNK3jet6KdTreeIdLm2EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %11)
  store ptr %13, ptr %6, align 8
  %14 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN3jet6VectorIdLm2EEESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  br i1 %14, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %20, %2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  %15 = call noundef ptr @_ZNSt6vectorIN3jet3fbs8Vector2DESaIS2_EE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  %16 = call noundef i64 @_ZNKSt6vectorIN3jet3fbs8Vector2DESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  %17 = invoke i32 @_ZN11flatbuffers17FlatBufferBuilder21CreateVectorOfStructsIN3jet3fbs8Vector2DEEENS_6OffsetINS_6VectorIPKT_EEEES9_m(ptr noundef nonnull align 8 dereferenceable(128) %3, ptr noundef %15, i64 noundef %16)
          to label %25 unwind label %30

.lr.ph:                                           ; preds = %2, %20
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKN3jet6VectorIdLm2EEESt6vectorIS3_SaIS3_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #6
  invoke void @_ZN3jet8jetToFbsERKNS_6VectorIdLm2EEE(ptr dead_on_unwind nonnull writable sret(%"struct.jet::fbs::Vector2D") align 8 %7, ptr noundef nonnull align 8 dereferenceable(16) %18)
          to label %19 unwind label %23

19:                                               ; preds = %.lr.ph
  invoke void @_ZNSt6vectorIN3jet3fbs8Vector2DESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(16) %7)
          to label %20 unwind label %23

20:                                               ; preds = %19
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #6
  %21 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKN3jet6VectorIdLm2EEESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  %22 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN3jet6VectorIdLm2EEESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  br i1 %22, label %.lr.ph, label %._crit_edge

23:                                               ; preds = %19, %.lr.ph
  %24 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  br label %63

25:                                               ; preds = %._crit_edge
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #6
  call void @_ZNSt6vectorIN3jet3fbs24PointKdTreeSearcherNode2ESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  %26 = call ptr @_ZNK3jet6KdTreeIdLm2EE9beginNodeEv(ptr noundef nonnull align 8 dereferenceable(48) %11)
  store ptr %26, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  %27 = call ptr @_ZNK3jet6KdTreeIdLm2EE7endNodeEv(ptr noundef nonnull align 8 dereferenceable(48) %11)
  store ptr %27, ptr %10, align 8
  %28 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN3jet6KdTreeIdLm2EE4NodeESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESF_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  br i1 %28, label %.lr.ph30, label %._crit_edge31

._crit_edge31:                                    ; preds = %40, %25
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  %29 = invoke i32 @_ZN11flatbuffers17FlatBufferBuilder21CreateVectorOfStructsIN3jet3fbs24PointKdTreeSearcherNode2EEENS_6OffsetINS_6VectorIPKT_EEEERKSt6vectorIS7_SaIS7_EE(ptr noundef nonnull align 8 dereferenceable(128) %3, ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %44 unwind label %54

30:                                               ; preds = %._crit_edge
  %31 = landingpad { ptr, i32 }
          cleanup
  br label %63

32:                                               ; preds = %.lr.ph30
  %33 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  br label %62

.lr.ph30:                                         ; preds = %25, %40
  %34 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKN3jet6KdTreeIdLm2EE4NodeESt6vectorIS4_SaIS4_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  %35 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKN3jet6KdTreeIdLm2EE4NodeESt6vectorIS4_SaIS4_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  %36 = getelementptr inbounds i8, ptr %35, i64 8
  %37 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKN3jet6KdTreeIdLm2EE4NodeESt6vectorIS4_SaIS4_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  %38 = getelementptr inbounds i8, ptr %37, i64 16
  %39 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIN3jet3fbs24PointKdTreeSearcherNode2ESaIS2_EE12emplace_backIJRKmS7_S7_EEERS2_DpOT_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull align 8 dereferenceable(8) %38)
          to label %40 unwind label %32

40:                                               ; preds = %.lr.ph30
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKN3jet6KdTreeIdLm2EE4NodeESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  %42 = call ptr @_ZNK3jet6KdTreeIdLm2EE7endNodeEv(ptr noundef nonnull align 8 dereferenceable(48) %11)
  store ptr %42, ptr %10, align 8
  %43 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN3jet6KdTreeIdLm2EE4NodeESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESF_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  br i1 %43, label %.lr.ph30, label %._crit_edge31, !llvm.loop !5

44:                                               ; preds = %._crit_edge31
  %45 = invoke i32 @_ZN3jet3fbs26CreatePointKdTreeSearcher2ERN11flatbuffers17FlatBufferBuilderENS1_6OffsetINS1_6VectorIPKNS0_8Vector2DEEEEENS4_INS5_IPKNS0_24PointKdTreeSearcherNode2EEEEE(ptr noundef nonnull align 8 dereferenceable(128) %3, i32 %17, i32 %29)
          to label %46 unwind label %56

46:                                               ; preds = %44
  invoke void @_ZN11flatbuffers17FlatBufferBuilder6FinishIN3jet3fbs20PointKdTreeSearcher2EEEvNS_6OffsetIT_EEPKc(ptr noundef nonnull align 8 dereferenceable(128) %3, i32 %45, ptr noundef null)
          to label %47 unwind label %56

47:                                               ; preds = %46
  %48 = invoke noundef ptr @_ZNK11flatbuffers17FlatBufferBuilder16GetBufferPointerEv(ptr noundef nonnull align 8 dereferenceable(128) %3)
          to label %49 unwind label %58

49:                                               ; preds = %47
  %50 = call noundef i32 @_ZNK11flatbuffers17FlatBufferBuilder7GetSizeEv(ptr noundef nonnull align 8 dereferenceable(128) %3)
  %51 = zext i32 %50 to i64
  invoke void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %51)
          to label %52 unwind label %60

52:                                               ; preds = %49
  %53 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %53, ptr align 1 %48, i64 %51, i1 false)
  call void @_ZNSt6vectorIN3jet3fbs24PointKdTreeSearcherNode2ESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #6
  call void @_ZNSt6vectorIN3jet3fbs8Vector2DESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  call void @_ZN11flatbuffers17FlatBufferBuilderD2Ev(ptr noundef nonnull align 8 dereferenceable(128) %3) #6
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %3) #6
  ret void

54:                                               ; preds = %._crit_edge31
  %55 = landingpad { ptr, i32 }
          cleanup
  br label %62

56:                                               ; preds = %46, %44
  %57 = landingpad { ptr, i32 }
          cleanup
  br label %62

58:                                               ; preds = %47
  %59 = landingpad { ptr, i32 }
          cleanup
  br label %62

60:                                               ; preds = %49
  %61 = landingpad { ptr, i32 }
          cleanup
  br label %62

62:                                               ; preds = %54, %58, %60, %56, %32
  %.pn24 = phi { ptr, i32 } [ %33, %32 ], [ %55, %54 ], [ %57, %56 ], [ %61, %60 ], [ %59, %58 ]
  call void @_ZNSt6vectorIN3jet3fbs24PointKdTreeSearcherNode2ESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #6
  br label %63

63:                                               ; preds = %30, %62, %23
  %.pn27 = phi { ptr, i32 } [ %24, %23 ], [ %.pn24, %62 ], [ %31, %30 ]
  call void @_ZNSt6vectorIN3jet3fbs8Vector2DESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  call void @_ZN11flatbuffers17FlatBufferBuilderD2Ev(ptr noundef nonnull align 8 dereferenceable(128) %3) #6
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %3) #6
  resume { ptr, i32 } %.pn27
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11flatbuffers17FlatBufferBuilderC2EmPNS_9AllocatorEb(ptr noundef nonnull align 8 dereferenceable(128), i64 noundef, ptr noundef, i1 noundef zeroext) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNK3jet6KdTreeIdLm2EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNK3jet6KdTreeIdLm2EE3endEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPKN3jet6VectorIdLm2EEESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3jet8jetToFbsERKNS_6VectorIdLm2EEE(ptr dead_on_unwind noalias writable sret(%"struct.jet::fbs::Vector2D") align 8, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
declare dso_local i32 @_ZN11flatbuffers17FlatBufferBuilder21CreateVectorOfStructsIN3jet3fbs8Vector2DEEENS_6OffsetINS_6VectorIPKT_EEEES9_m(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef, i64 noundef) local_unnamed_addr #1 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNK3jet6KdTreeIdLm2EE9beginNodeEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPKN3jet6KdTreeIdLm2EE4NodeESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESF_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNK3jet6KdTreeIdLm2EE7endNodeEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #2 align 2

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local i32 @_ZN3jet3fbs26CreatePointKdTreeSearcher2ERN11flatbuffers17FlatBufferBuilderENS1_6OffsetINS1_6VectorIPKNS0_8Vector2DEEEEENS4_INS5_IPKNS0_24PointKdTreeSearcherNode2EEEEE(ptr noundef nonnull align 8 dereferenceable(128), i32, i32) local_unnamed_addr #4

; Function Attrs: mustprogress 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) #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11flatbuffers17FlatBufferBuilder6FinishIN3jet3fbs20PointKdTreeSearcher2EEEvNS_6OffsetIT_EEPKc(ptr noundef nonnull align 8 dereferenceable(128), i32, ptr noundef) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK11flatbuffers17FlatBufferBuilder7GetSizeEv(ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #2 align 2

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11flatbuffers17FlatBufferBuilderD2Ev(ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #2 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 = { 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 = { inlinehint 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}


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