; LLVM IR from NavInfoNC/nc-geo :: src/polygon_merger.ll (ZN13PolygonMerger17_generateContoursEv)

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

%"struct.std::__detail::_Node_iterator.18" = type { %"struct.std::__detail::_Node_iterator_base.19" }
%"struct.std::__detail::_Node_iterator_base.19" = type { ptr }
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }
%"class.std::vector.20" = type { %"struct.std::_Vector_base.21" }
%"struct.std::_Vector_base.21" = type { %"struct.std::_Vector_base<Point, std::allocator<Point>>::_Vector_impl" }
%"struct.std::_Vector_base<Point, std::allocator<Point>>::_Vector_impl" = type { %"struct.std::_Vector_base<Point, std::allocator<Point>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Point, std::allocator<Point>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%class.PolygonMerger = type { %"class.std::unordered_map", %"class.std::vector" }
%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<StaticPolygon *, std::allocator<StaticPolygon *>>::_Vector_impl" }
%"struct.std::_Vector_base<StaticPolygon *, std::allocator<StaticPolygon *>>::_Vector_impl" = type { %"struct.std::_Vector_base<StaticPolygon *, std::allocator<StaticPolygon *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<StaticPolygon *, std::allocator<StaticPolygon *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair.25" = type { %struct.Point, %"class.std::unordered_set" }
%struct.Point = type { i32, i32 }
%"class.std::unordered_set" = type { %"class.std::_Hashtable.5" }
%"class.std::_Hashtable.5" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }

; 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 @_ZN13PolygonMerger17_generateContoursEv(ptr noundef nonnull align 8 dereferenceable(80) %0) #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %"struct.std::__detail::_Node_iterator.18", align 8
  %4 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %5 = alloca %"struct.std::__detail::_Node_iterator.18", align 8
  %6 = alloca %"struct.std::__detail::_Node_iterator.18", align 8
  %7 = alloca %"class.std::vector.20", align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %12 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %13 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %14 = alloca %"struct.std::__detail::_Node_iterator.18", align 8
  %15 = alloca %"struct.std::__detail::_Node_iterator.18", align 8
  %16 = alloca %"struct.std::__detail::_Node_iterator.18", align 8
  %17 = alloca %"struct.std::__detail::_Node_iterator.18", align 8
  %18 = alloca ptr, align 8
  %19 = alloca %"struct.std::__detail::_Node_iterator.18", align 8
  %20 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %21 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #8
  call void @_ZNSt8__detail14_Node_iteratorISt4pairIK5PointSt13unordered_setIS2_N13PolygonMerger11PointHasherESt8equal_toIS2_ESaIS2_EEELb0ELb1EEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #8
  call void @_ZNSt8__detail14_Node_iteratorI5PointLb1ELb1EEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #8
  %22 = getelementptr inbounds %class.PolygonMerger, ptr %21, i32 0, i32 0
  %23 = call ptr @_ZNSt13unordered_mapI5PointSt13unordered_setIS0_N13PolygonMerger11PointHasherESt8equal_toIS0_ESaIS0_EES3_S5_SaISt4pairIKS0_S7_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %22) #8
  %24 = getelementptr inbounds %"struct.std::__detail::_Node_iterator.18", ptr %5, i32 0, i32 0
  %25 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base.19", ptr %24, i32 0, i32 0
  store ptr %23, ptr %25, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %3, ptr align 8 %5, i64 8, i1 false)
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #8
  br label %26

26:                                               ; preds = %119, %1
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  %27 = getelementptr inbounds %class.PolygonMerger, ptr %21, i32 0, i32 0
  %28 = call ptr @_ZNSt13unordered_mapI5PointSt13unordered_setIS0_N13PolygonMerger11PointHasherESt8equal_toIS0_ESaIS0_EES3_S5_SaISt4pairIKS0_S7_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %27) #8
  %29 = getelementptr inbounds %"struct.std::__detail::_Node_iterator.18", ptr %6, i32 0, i32 0
  %30 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base.19", ptr %29, i32 0, i32 0
  store ptr %28, ptr %30, align 8
  %31 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIK5PointSt13unordered_setIS2_N13PolygonMerger11PointHasherESt8equal_toIS2_ESaIS2_EEELb1EEESE_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  br i1 %31, label %32, label %121

32:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #8
  call void @_ZNSt6vectorI5PointSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  %33 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIK5PointSt13unordered_setIS2_N13PolygonMerger11PointHasherESt8equal_toIS2_ESaIS2_EEELb0ELb1EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #8
  %34 = getelementptr inbounds %"struct.std::pair.25", ptr %33, i32 0, i32 0
  invoke void @_ZNSt6vectorI5PointSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 4 dereferenceable(8) %34)
          to label %35 unwind label %65

35:                                               ; preds = %32
  br label %36

36:                                               ; preds = %117, %35
  br label %37

37:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  %38 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIK5PointSt13unordered_setIS2_N13PolygonMerger11PointHasherESt8equal_toIS2_ESaIS2_EEELb0ELb1EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #8
  %39 = getelementptr inbounds %"struct.std::pair.25", ptr %38, i32 0, i32 1
  store ptr %39, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %40 = load ptr, ptr %10, align 8, !tbaa !5
  %41 = call ptr @_ZNSt13unordered_setI5PointN13PolygonMerger11PointHasherESt8equal_toIS0_ESaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %40) #8
  %42 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %11, i32 0, i32 0
  %43 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %42, i32 0, i32 0
  store ptr %41, ptr %43, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %4, ptr align 8 %11, i64 8, i1 false)
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  %44 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt8__detail14_Node_iteratorI5PointLb1ELb1EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  invoke void @_ZNSt6vectorI5PointSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 4 dereferenceable(8) %44)
          to label %45 unwind label %69

45:                                               ; preds = %37
  %46 = load ptr, ptr %10, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %12, ptr align 8 %4, i64 8, i1 false)
  %47 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %12, i32 0, i32 0
  %48 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %47, i32 0, i32 0
  %49 = load ptr, ptr %48, align 8
  %50 = invoke ptr @_ZNSt13unordered_setI5PointN13PolygonMerger11PointHasherESt8equal_toIS0_ESaIS0_EE5eraseENSt8__detail14_Node_iteratorIS0_Lb1ELb1EEE(ptr noundef nonnull align 8 dereferenceable(56) %46, ptr %49)
          to label %51 unwind label %69

51:                                               ; preds = %45
  %52 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %13, i32 0, i32 0
  %53 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %52, i32 0, i32 0
  store ptr %50, ptr %53, align 8
  %54 = load ptr, ptr %10, align 8, !tbaa !5
  %55 = call noundef zeroext i1 @_ZNKSt13unordered_setI5PointN13PolygonMerger11PointHasherESt8equal_toIS0_ESaIS0_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(56) %54) #8
  br i1 %55, label %56, label %73

56:                                               ; preds = %51
  %57 = getelementptr inbounds %class.PolygonMerger, ptr %21, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %14, ptr align 8 %3, i64 8, i1 false)
  %58 = getelementptr inbounds %"struct.std::__detail::_Node_iterator.18", ptr %14, i32 0, i32 0
  %59 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base.19", ptr %58, i32 0, i32 0
  %60 = load ptr, ptr %59, align 8
  %61 = invoke ptr @_ZNSt13unordered_mapI5PointSt13unordered_setIS0_N13PolygonMerger11PointHasherESt8equal_toIS0_ESaIS0_EES3_S5_SaISt4pairIKS0_S7_EEE5eraseENSt8__detail14_Node_iteratorISA_Lb0ELb1EEE(ptr noundef nonnull align 8 dereferenceable(56) %57, ptr %60)
          to label %62 unwind label %69

62:                                               ; preds = %56
  %63 = getelementptr inbounds %"struct.std::__detail::_Node_iterator.18", ptr %15, i32 0, i32 0
  %64 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base.19", ptr %63, i32 0, i32 0
  store ptr %61, ptr %64, align 8
  br label %73

65:                                               ; preds = %32
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %8, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %9, align 4
  br label %120

69:                                               ; preds = %56, %45, %37
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %8, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %9, align 4
  br label %118

73:                                               ; preds = %62, %51
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %74 = getelementptr inbounds %class.PolygonMerger, ptr %21, i32 0, i32 0
  %75 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorI5PointSaIS0_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  %76 = invoke ptr @_ZNSt13unordered_mapI5PointSt13unordered_setIS0_N13PolygonMerger11PointHasherESt8equal_toIS0_ESaIS0_EES3_S5_SaISt4pairIKS0_S7_EEE4findERS9_(ptr noundef nonnull align 8 dereferenceable(56) %74, ptr noundef nonnull align 4 dereferenceable(8) %75)
          to label %77 unwind label %101

77:                                               ; preds = %73
  %78 = getelementptr inbounds %"struct.std::__detail::_Node_iterator.18", ptr %16, i32 0, i32 0
  %79 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base.19", ptr %78, i32 0, i32 0
  store ptr %76, ptr %79, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %3, ptr align 8 %16, i64 8, i1 false)
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %80 = getelementptr inbounds %class.PolygonMerger, ptr %21, i32 0, i32 0
  %81 = call ptr @_ZNSt13unordered_mapI5PointSt13unordered_setIS0_N13PolygonMerger11PointHasherESt8equal_toIS0_ESaIS0_EES3_S5_SaISt4pairIKS0_S7_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %80) #8
  %82 = getelementptr inbounds %"struct.std::__detail::_Node_iterator.18", ptr %17, i32 0, i32 0
  %83 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base.19", ptr %82, i32 0, i32 0
  store ptr %81, ptr %83, align 8
  %84 = call noundef zeroext i1 @_ZNSt8__detaileqERKNS_19_Node_iterator_baseISt4pairIK5PointSt13unordered_setIS2_N13PolygonMerger11PointHasherESt8equal_toIS2_ESaIS2_EEELb1EEESE_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  br i1 %84, label %85, label %114

85:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  %86 = invoke noalias noundef nonnull ptr @_Znwm(i64 noundef 40) #9
          to label %87 unwind label %105

87:                                               ; preds = %85
  invoke void @_ZN13StaticPolygonC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %86)
          to label %88 unwind label %109

88:                                               ; preds = %87
  store ptr %86, ptr %18, align 8, !tbaa !5
  %89 = load ptr, ptr %18, align 8, !tbaa !5
  %90 = call noundef ptr @_ZNSt6vectorI5PointSaIS0_EE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  %91 = call noundef i64 @_ZNKSt6vectorI5PointSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  %92 = trunc i64 %91 to i32
  %93 = sub nsw i32 %92, 1
  invoke void @_ZN13StaticPolygon14initWithPointsEPK5Pointi(ptr noundef nonnull align 8 dereferenceable(40) %89, ptr noundef %90, i32 noundef %93)
          to label %94 unwind label %105

94:                                               ; preds = %88
  %95 = getelementptr inbounds %class.PolygonMerger, ptr %21, i32 0, i32 1
  invoke void @_ZNSt6vectorIP13StaticPolygonSaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %95, ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %96 unwind label %105

96:                                               ; preds = %94
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %97 = getelementptr inbounds %class.PolygonMerger, ptr %21, i32 0, i32 0
  %98 = call ptr @_ZNSt13unordered_mapI5PointSt13unordered_setIS0_N13PolygonMerger11PointHasherESt8equal_toIS0_ESaIS0_EES3_S5_SaISt4pairIKS0_S7_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %97) #8
  %99 = getelementptr inbounds %"struct.std::__detail::_Node_iterator.18", ptr %19, i32 0, i32 0
  %100 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base.19", ptr %99, i32 0, i32 0
  store ptr %98, ptr %100, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %3, ptr align 8 %19, i64 8, i1 false)
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  store i32 5, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  br label %115

101:                                              ; preds = %73
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %8, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  br label %118

105:                                              ; preds = %94, %88, %85
  %106 = landingpad { ptr, i32 }
          cleanup
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %8, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %9, align 4
  br label %113

109:                                              ; preds = %87
  %110 = landingpad { ptr, i32 }
          cleanup
  %111 = extractvalue { ptr, i32 } %110, 0
  store ptr %111, ptr %8, align 8
  %112 = extractvalue { ptr, i32 } %110, 1
  store i32 %112, ptr %9, align 4
  call void @_ZdlPvm(ptr noundef %86, i64 noundef 40) #10
  br label %113

113:                                              ; preds = %109, %105
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  br label %118

114:                                              ; preds = %77
  store i32 0, ptr %20, align 4
  br label %115

115:                                              ; preds = %114, %96
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  %116 = load i32, ptr %20, align 4
  switch i32 %116, label %127 [
    i32 0, label %117
    i32 5, label %119
  ]

117:                                              ; preds = %115
  br label %36, !llvm.loop !9

118:                                              ; preds = %113, %101, %69
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #8
  br label %120

119:                                              ; preds = %115
  call void @_ZNSt6vectorI5PointSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #8
  br label %26, !llvm.loop !11

120:                                              ; preds = %118, %65
  call void @_ZNSt6vectorI5PointSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #8
  br label %122

121:                                              ; preds = %26
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #8
  ret void

122:                                              ; preds = %120
  %123 = load ptr, ptr %8, align 8
  %124 = load i32, ptr %9, align 4
  %125 = insertvalue { ptr, i32 } poison, ptr %123, 0
  %126 = insertvalue { ptr, i32 } %125, i32 %124, 1
  resume { ptr, i32 } %126

127:                                              ; preds = %115
  unreachable
}

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #4

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

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #6

declare void @_ZN13StaticPolygon14initWithPointsEPK5Pointi(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef, i32 noundef) #7

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorI5PointSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nobuiltin allocsize(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 = { alwaysinline 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 #6 = { nobuiltin nounwind "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 #7 = { "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 #8 = { nounwind }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { builtin 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 = distinct !{!11, !10}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.std::__detail::_Node_iterator.18" = type { %"struct.std::__detail::_Node_iterator_base.19" }
%"struct.std::__detail::_Node_iterator_base.19" = type { ptr }
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }
%"class.std::vector.20" = type { %"struct.std::_Vector_base.21" }
%"struct.std::_Vector_base.21" = type { %"struct.std::_Vector_base<Point, std::allocator<Point>>::_Vector_impl" }
%"struct.std::_Vector_base<Point, std::allocator<Point>>::_Vector_impl" = type { %"struct.std::_Vector_base<Point, std::allocator<Point>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Point, std::allocator<Point>>::_Vector_impl_data" = type { ptr, ptr, ptr }

; 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 @_ZN13PolygonMerger17_generateContoursEv(ptr noundef nonnull align 8 dereferenceable(80) %0) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"struct.std::__detail::_Node_iterator.18", align 8
  %3 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %4 = alloca %"struct.std::__detail::_Node_iterator.18", align 8
  %5 = alloca %"class.std::vector.20", align 8
  %6 = alloca %"struct.std::__detail::_Node_iterator.18", align 8
  %7 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  call void @_ZNSt8__detail14_Node_iteratorISt4pairIK5PointSt13unordered_setIS2_N13PolygonMerger11PointHasherESt8equal_toIS2_ESaIS2_EEELb0ELb1EEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  call void @_ZNSt8__detail14_Node_iteratorI5PointLb1ELb1EEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3)
  %8 = call ptr @_ZNSt13unordered_mapI5PointSt13unordered_setIS0_N13PolygonMerger11PointHasherESt8equal_toIS0_ESaIS0_EES3_S5_SaISt4pairIKS0_S7_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %0) #6
  store ptr %8, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  %9 = call ptr @_ZNSt13unordered_mapI5PointSt13unordered_setIS0_N13PolygonMerger11PointHasherESt8equal_toIS0_ESaIS0_EES3_S5_SaISt4pairIKS0_S7_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %0) #6
  store ptr %9, ptr %4, align 8
  %10 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIK5PointSt13unordered_setIS2_N13PolygonMerger11PointHasherESt8equal_toIS2_ESaIS2_EEELb1EEESE_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  br i1 %10, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %1
  %11 = getelementptr inbounds i8, ptr %0, i64 56
  br label %12

12:                                               ; preds = %.lr.ph, %46
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #6
  call void @_ZNSt6vectorI5PointSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  %13 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIK5PointSt13unordered_setIS2_N13PolygonMerger11PointHasherESt8equal_toIS2_ESaIS2_EEELb0ELb1EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #6
  invoke void @_ZNSt6vectorI5PointSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(8) %13)
          to label %.preheader unwind label %24

.preheader:                                       ; preds = %12, %31
  %14 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIK5PointSt13unordered_setIS2_N13PolygonMerger11PointHasherESt8equal_toIS2_ESaIS2_EEELb0ELb1EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %2) #6
  %15 = getelementptr inbounds i8, ptr %14, i64 8
  %16 = call ptr @_ZNSt13unordered_setI5PointN13PolygonMerger11PointHasherESt8equal_toIS0_ESaIS0_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %15) #6
  store ptr %16, ptr %3, align 8
  %17 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNKSt8__detail14_Node_iteratorI5PointLb1ELb1EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  invoke void @_ZNSt6vectorI5PointSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(8) %17)
          to label %18 unwind label %26

18:                                               ; preds = %.preheader
  %.sroa.05.0.copyload = load ptr, ptr %3, align 8
  %19 = invoke ptr @_ZNSt13unordered_setI5PointN13PolygonMerger11PointHasherESt8equal_toIS0_ESaIS0_EE5eraseENSt8__detail14_Node_iteratorIS0_Lb1ELb1EEE(ptr noundef nonnull align 8 dereferenceable(56) %15, ptr %.sroa.05.0.copyload)
          to label %20 unwind label %26

20:                                               ; preds = %18
  %21 = call noundef zeroext i1 @_ZNKSt13unordered_setI5PointN13PolygonMerger11PointHasherESt8equal_toIS0_ESaIS0_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(56) %15) #6
  br i1 %21, label %22, label %28

22:                                               ; preds = %20
  %.sroa.03.0.copyload = load ptr, ptr %2, align 8
  %23 = invoke ptr @_ZNSt13unordered_mapI5PointSt13unordered_setIS0_N13PolygonMerger11PointHasherESt8equal_toIS0_ESaIS0_EES3_S5_SaISt4pairIKS0_S7_EEE5eraseENSt8__detail14_Node_iteratorISA_Lb0ELb1EEE(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr %.sroa.03.0.copyload)
          to label %28 unwind label %26

24:                                               ; preds = %12
  %25 = landingpad { ptr, i32 }
          cleanup
  br label %50

26:                                               ; preds = %22, %18, %.preheader
  %27 = landingpad { ptr, i32 }
          cleanup
  br label %50

28:                                               ; preds = %22, %20
  %29 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorI5PointSaIS0_EE4backEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  %30 = invoke ptr @_ZNSt13unordered_mapI5PointSt13unordered_setIS0_N13PolygonMerger11PointHasherESt8equal_toIS0_ESaIS0_EES3_S5_SaISt4pairIKS0_S7_EEE4findERS9_(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull align 4 dereferenceable(8) %29)
          to label %31 unwind label %42

31:                                               ; preds = %28
  store ptr %30, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %32 = call ptr @_ZNSt13unordered_mapI5PointSt13unordered_setIS0_N13PolygonMerger11PointHasherESt8equal_toIS0_ESaIS0_EES3_S5_SaISt4pairIKS0_S7_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %0) #6
  store ptr %32, ptr %6, align 8
  %33 = call noundef zeroext i1 @_ZNSt8__detaileqERKNS_19_Node_iterator_baseISt4pairIK5PointSt13unordered_setIS2_N13PolygonMerger11PointHasherESt8equal_toIS2_ESaIS2_EEELb1EEESE_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  br i1 %33, label %34, label %.preheader

34:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %35 = invoke noalias noundef nonnull dereferenceable(40) ptr @_Znwm(i64 noundef 40) #7
          to label %36 unwind label %44

36:                                               ; preds = %34
  call void @_ZN13StaticPolygonC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %35)
  store ptr %35, ptr %7, align 8, !tbaa !5
  %37 = call noundef ptr @_ZNSt6vectorI5PointSaIS0_EE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  %38 = call noundef i64 @_ZNKSt6vectorI5PointSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  %39 = trunc i64 %38 to i32
  %40 = add nsw i32 %39, -1
  invoke void @_ZN13StaticPolygon14initWithPointsEPK5Pointi(ptr noundef nonnull align 8 dereferenceable(40) %35, ptr noundef %37, i32 noundef %40)
          to label %41 unwind label %44

41:                                               ; preds = %36
  invoke void @_ZNSt6vectorIP13StaticPolygonSaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %46 unwind label %44

42:                                               ; preds = %28
  %43 = landingpad { ptr, i32 }
          cleanup
  br label %50

44:                                               ; preds = %41, %36, %34
  %45 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  br label %50

46:                                               ; preds = %41
  %47 = call ptr @_ZNSt13unordered_mapI5PointSt13unordered_setIS0_N13PolygonMerger11PointHasherESt8equal_toIS0_ESaIS0_EES3_S5_SaISt4pairIKS0_S7_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %0) #6
  store ptr %47, ptr %2, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @_ZNSt6vectorI5PointSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  %48 = call ptr @_ZNSt13unordered_mapI5PointSt13unordered_setIS0_N13PolygonMerger11PointHasherESt8equal_toIS0_ESaIS0_EES3_S5_SaISt4pairIKS0_S7_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %0) #6
  store ptr %48, ptr %4, align 8
  %49 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIK5PointSt13unordered_setIS2_N13PolygonMerger11PointHasherESt8equal_toIS2_ESaIS2_EEELb1EEESE_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  br i1 %49, label %12, label %._crit_edge, !llvm.loop !9

50:                                               ; preds = %26, %42, %44, %24
  %.pn.pn = phi { ptr, i32 } [ %25, %24 ], [ %45, %44 ], [ %43, %42 ], [ %27, %26 ]
  call void @_ZNSt6vectorI5PointSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  resume { ptr, i32 } %.pn.pn

._crit_edge:                                      ; preds = %46, %1
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  ret void
}

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #3

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

declare void @_ZN13StaticPolygon14initWithPointsEPK5Pointi(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef, i32 noundef) local_unnamed_addr #5

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorI5PointSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) 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 = { nobuiltin allocsize(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 = { alwaysinline 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 #5 = { "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 #6 = { nounwind }
attributes #7 = { builtin allocsize(0) }

!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"}


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