; LLVM IR from doyubkim/fluid-engine-dev :: src/jet (point_simple_list_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.3", i8, i8, %"class.std::vector.8", i64, i8, i8, ptr }
%"class.flatbuffers::vector_downward" = type { ptr, i8, i64, i64, ptr, ptr }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = 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.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = 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.13" = type { %"struct.std::_Vector_base.14" }
%"struct.std::_Vector_base.14" = 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.18" = type { ptr }
%"struct.jet::fbs::Vector2D" = type { double, double }
%"struct.flatbuffers::Offset" = type { i32 }
%"struct.flatbuffers::Offset.19" = type { i32 }
%"class.jet::PointSimpleListSearcher2" = type { %"class.jet::PointNeighborSearcher2", %"class.std::vector" }
%"class.jet::PointNeighborSearcher2" = type { %"class.jet::Serializable" }
%"class.jet::Serializable" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<jet::Vector<double, 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 }

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 @_ZNK3jet24PointSimpleListSearcher29serializeEPSt6vectorIhSaIhEE(ptr noundef nonnull align 8 dereferenceable(32) %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.13", align 8
  %7 = alloca ptr, align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.18", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator.18", align 8
  %10 = alloca ptr, align 8
  %11 = alloca %"struct.jet::fbs::Vector2D", align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca %"struct.flatbuffers::Offset", align 4
  %15 = alloca %"struct.flatbuffers::Offset.19", align 4
  %16 = alloca %"struct.flatbuffers::Offset", align 4
  %17 = alloca %"struct.flatbuffers::Offset.19", align 4
  %18 = alloca ptr, align 8
  %19 = alloca i64, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %20 = 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
  %21 = getelementptr inbounds %"class.jet::PointSimpleListSearcher2", ptr %20, i32 0, i32 1
  store ptr %21, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %22 = load ptr, ptr %7, align 8, !tbaa !5
  %23 = call ptr @_ZNKSt6vectorIN3jet6VectorIdLm2EEESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %22) #6
  %24 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.18", ptr %8, i32 0, i32 0
  store ptr %23, ptr %24, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %25 = load ptr, ptr %7, align 8, !tbaa !5
  %26 = call ptr @_ZNKSt6vectorIN3jet6VectorIdLm2EEESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #6
  %27 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.18", ptr %9, i32 0, i32 0
  store ptr %26, ptr %27, align 8
  br label %28

28:                                               ; preds = %36, %2
  %29 = 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) %9) #6
  br i1 %29, label %31, label %30

30:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #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 %42

31:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %32 = 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 %32, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #6
  %33 = load ptr, ptr %10, align 8, !tbaa !5
  invoke void @_ZN3jet8jetToFbsERKNS_6VectorIdLm2EEE(ptr dead_on_unwind writable sret(%"struct.jet::fbs::Vector2D") align 8 %11, ptr noundef nonnull align 8 dereferenceable(16) %33)
          to label %34 unwind label %38

34:                                               ; preds = %31
  invoke void @_ZNSt6vectorIN3jet3fbs8Vector2DESaIS2_EE9push_backEOS2_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(16) %11)
          to label %35 unwind label %38

35:                                               ; preds = %34
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %36

36:                                               ; preds = %35
  %37 = 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 %28

38:                                               ; preds = %34, %31
  %39 = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %12, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #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 %87

42:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  %43 = call noundef ptr @_ZNSt6vectorIN3jet3fbs8Vector2DESaIS2_EE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  %44 = call noundef i64 @_ZNKSt6vectorIN3jet3fbs8Vector2DESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  %45 = invoke i32 @_ZN11flatbuffers17FlatBufferBuilder21CreateVectorOfStructsIN3jet3fbs8Vector2DEEENS_6OffsetINS_6VectorIPKT_EEEES9_m(ptr noundef nonnull align 8 dereferenceable(128) %5, ptr noundef %43, i64 noundef %44)
          to label %46 unwind label %68

46:                                               ; preds = %42
  %47 = getelementptr inbounds %"struct.flatbuffers::Offset", ptr %14, i32 0, i32 0
  store i32 %45, ptr %47, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 4 %14, i64 4, i1 false), !tbaa.struct !9
  %48 = getelementptr inbounds %"struct.flatbuffers::Offset", ptr %16, i32 0, i32 0
  %49 = load i32, ptr %48, align 4
  %50 = invoke i32 @_ZN3jet3fbs30CreatePointSimpleListSearcher2ERN11flatbuffers17FlatBufferBuilderENS1_6OffsetINS1_6VectorIPKNS0_8Vector2DEEEEE(ptr noundef nonnull align 8 dereferenceable(128) %5, i32 %49)
          to label %51 unwind label %72

51:                                               ; preds = %46
  %52 = getelementptr inbounds %"struct.flatbuffers::Offset.19", ptr %15, i32 0, i32 0
  store i32 %50, ptr %52, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %17, ptr align 4 %15, i64 4, i1 false), !tbaa.struct !9
  %53 = getelementptr inbounds %"struct.flatbuffers::Offset.19", ptr %17, i32 0, i32 0
  %54 = load i32, ptr %53, align 4
  invoke void @_ZN11flatbuffers17FlatBufferBuilder6FinishIN3jet3fbs24PointSimpleListSearcher2EEEvNS_6OffsetIT_EEPKc(ptr noundef nonnull align 8 dereferenceable(128) %5, i32 %54, ptr noundef null)
          to label %55 unwind label %72

55:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %56 = invoke noundef ptr @_ZNK11flatbuffers17FlatBufferBuilder16GetBufferPointerEv(ptr noundef nonnull align 8 dereferenceable(128) %5)
          to label %57 unwind label %76

57:                                               ; preds = %55
  store ptr %56, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #6
  %58 = invoke noundef i32 @_ZNK11flatbuffers17FlatBufferBuilder7GetSizeEv(ptr noundef nonnull align 8 dereferenceable(128) %5)
          to label %59 unwind label %80

59:                                               ; preds = %57
  %60 = zext i32 %58 to i64
  store i64 %60, ptr %19, align 8, !tbaa !12
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  %62 = load i64, ptr %19, align 8, !tbaa !12
  invoke void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %61, i64 noundef %62)
          to label %63 unwind label %80

63:                                               ; preds = %59
  %64 = load ptr, ptr %4, align 8, !tbaa !5
  %65 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %64) #6
  %66 = load ptr, ptr %18, align 8, !tbaa !5
  %67 = load i64, ptr %19, align 8, !tbaa !12
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %65, ptr align 1 %66, i64 %67, i1 false)
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, 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

68:                                               ; preds = %42
  %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 %86

72:                                               ; preds = %51, %46
  %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 %85

76:                                               ; preds = %55
  %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 %84

80:                                               ; preds = %59, %57
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %12, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  br label %84

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

85:                                               ; preds = %84, %72
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  br label %86

86:                                               ; preds = %85, %68
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %87

87:                                               ; preds = %86, %38
  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 %88

88:                                               ; preds = %87
  %89 = load ptr, ptr %12, align 8
  %90 = load i32, ptr %13, align 4
  %91 = insertvalue { ptr, i32 } poison, ptr %89, 0
  %92 = insertvalue { ptr, i32 } %91, i32 %90, 1
  resume { ptr, i32 } %92
}

; 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 @_ZNKSt6vectorIN3jet6VectorIdLm2EEESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt6vectorIN3jet6VectorIdLm2EEESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) #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: inlinehint mustprogress uwtable
declare dso_local i32 @_ZN3jet3fbs30CreatePointSimpleListSearcher2ERN11flatbuffers17FlatBufferBuilderENS1_6OffsetINS1_6VectorIPKNS0_8Vector2DEEEEE(ptr noundef nonnull align 8 dereferenceable(128), 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 @_ZN11flatbuffers17FlatBufferBuilder6FinishIN3jet3fbs24PointSimpleListSearcher2EEEvNS_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 @_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 = !{i64 0, i64 4, !10}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"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.3", i8, i8, %"class.std::vector.8", i64, i8, i8, ptr }
%"class.flatbuffers::vector_downward" = type { ptr, i8, i64, i64, ptr, ptr }
%"class.std::vector.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = 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.8" = type { %"struct.std::_Vector_base.9" }
%"struct.std::_Vector_base.9" = 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.13" = type { %"struct.std::_Vector_base.14" }
%"struct.std::_Vector_base.14" = 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.18" = type { ptr }
%"struct.jet::fbs::Vector2D" = type { double, double }

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 @_ZNK3jet24PointSimpleListSearcher29serializeEPSt6vectorIhSaIhEE(ptr noundef nonnull align 8 dereferenceable(32) %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.13", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator.18", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator.18", align 8
  %7 = alloca %"struct.jet::fbs::Vector2D", 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
  %8 = getelementptr inbounds i8, ptr %0, i64 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %9 = call ptr @_ZNKSt6vectorIN3jet6VectorIdLm2EEESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  store ptr %9, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %10 = call ptr @_ZNKSt6vectorIN3jet6VectorIdLm2EEESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  store ptr %10, ptr %6, align 8
  %11 = 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 %11, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %17, %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
  %12 = call noundef ptr @_ZNSt6vectorIN3jet3fbs8Vector2DESaIS2_EE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  %13 = call noundef i64 @_ZNKSt6vectorIN3jet3fbs8Vector2DESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  %14 = invoke i32 @_ZN11flatbuffers17FlatBufferBuilder21CreateVectorOfStructsIN3jet3fbs8Vector2DEEENS_6OffsetINS_6VectorIPKT_EEEES9_m(ptr noundef nonnull align 8 dereferenceable(128) %3, ptr noundef %12, i64 noundef %13)
          to label %22 unwind label %32

.lr.ph:                                           ; preds = %2, %17
  %15 = 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) %15)
          to label %16 unwind label %20

16:                                               ; 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 %17 unwind label %20

17:                                               ; preds = %16
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #6
  %18 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKN3jet6VectorIdLm2EEESt6vectorIS3_SaIS3_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  %19 = 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 %19, label %.lr.ph, label %._crit_edge

20:                                               ; preds = %16, %.lr.ph
  %21 = 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 %40

22:                                               ; preds = %._crit_edge
  %23 = invoke i32 @_ZN3jet3fbs30CreatePointSimpleListSearcher2ERN11flatbuffers17FlatBufferBuilderENS1_6OffsetINS1_6VectorIPKNS0_8Vector2DEEEEE(ptr noundef nonnull align 8 dereferenceable(128) %3, i32 %14)
          to label %24 unwind label %34

24:                                               ; preds = %22
  invoke void @_ZN11flatbuffers17FlatBufferBuilder6FinishIN3jet3fbs24PointSimpleListSearcher2EEEvNS_6OffsetIT_EEPKc(ptr noundef nonnull align 8 dereferenceable(128) %3, i32 %23, ptr noundef null)
          to label %25 unwind label %34

25:                                               ; preds = %24
  %26 = invoke noundef ptr @_ZNK11flatbuffers17FlatBufferBuilder16GetBufferPointerEv(ptr noundef nonnull align 8 dereferenceable(128) %3)
          to label %27 unwind label %36

27:                                               ; preds = %25
  %28 = call noundef i32 @_ZNK11flatbuffers17FlatBufferBuilder7GetSizeEv(ptr noundef nonnull align 8 dereferenceable(128) %3)
  %29 = zext i32 %28 to i64
  invoke void @_ZNSt6vectorIhSaIhEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %29)
          to label %30 unwind label %38

30:                                               ; preds = %27
  %31 = call noundef ptr @_ZNSt6vectorIhSaIhEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %31, ptr align 1 %26, i64 %29, i1 false)
  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

32:                                               ; preds = %._crit_edge
  %33 = landingpad { ptr, i32 }
          cleanup
  br label %40

34:                                               ; preds = %24, %22
  %35 = landingpad { ptr, i32 }
          cleanup
  br label %40

36:                                               ; preds = %25
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %40

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

40:                                               ; preds = %32, %36, %38, %34, %20
  %.pn20 = phi { ptr, i32 } [ %21, %20 ], [ %33, %32 ], [ %35, %34 ], [ %39, %38 ], [ %37, %36 ]
  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 } %.pn20
}

; 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 @_ZNKSt6vectorIN3jet6VectorIdLm2EEESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt6vectorIN3jet6VectorIdLm2EEESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) 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: inlinehint mustprogress uwtable
declare dso_local i32 @_ZN3jet3fbs30CreatePointSimpleListSearcher2ERN11flatbuffers17FlatBufferBuilderENS1_6OffsetINS1_6VectorIPKNS0_8Vector2DEEEEE(ptr noundef nonnull align 8 dereferenceable(128), 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 @_ZN11flatbuffers17FlatBufferBuilder6FinishIN3jet3fbs24PointSimpleListSearcher2EEEvNS_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 @_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)"}


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