; LLVM IR from Lut1n/ImpGears :: src/ImpGears/Geometry/Triangulator.ll (ZN3imp10poly2EdgesERKNS_7PolygonE)

; 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.imp::Vec" = type <{ %"class.imp::Object", [3 x float], [4 x i8] }>
%"class.imp::Object" = type { ptr, %"class.std::shared_ptr" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::vector.17" = type { %"struct.std::_Vector_base.18" }
%"struct.std::_Vector_base.18" = type { %"struct.std::_Vector_base<imp::Edge, std::allocator<imp::Edge>>::_Vector_impl" }
%"struct.std::_Vector_base<imp::Edge, std::allocator<imp::Edge>>::_Vector_impl" = type { %"struct.std::_Vector_base<imp::Edge, std::allocator<imp::Edge>>::_Vector_impl_data" }
%"struct.std::_Vector_base<imp::Edge, std::allocator<imp::Edge>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.24" = type { %"struct.std::_Vector_base.25" }
%"struct.std::_Vector_base.25" = type { %"struct.std::_Vector_base<imp::Vec3, std::allocator<imp::Vec3>>::_Vector_impl" }
%"struct.std::_Vector_base<imp::Vec3, std::allocator<imp::Vec3>>::_Vector_impl" = type { %"struct.std::_Vector_base<imp::Vec3, std::allocator<imp::Vec3>>::_Vector_impl_data" }
%"struct.std::_Vector_base<imp::Vec3, std::allocator<imp::Vec3>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.30" = type { ptr }
%"class.imp::Path" = type { %"class.imp::Object", %"class.std::vector.24" }
%"class.imp::Edge" = type { %"class.imp::Object", %"class.imp::Vec3", %"class.imp::Vec3" }
%"class.imp::Vec3" = type { %"class.imp::Vec.base", [4 x i8] }
%"class.imp::Vec.base" = type <{ %"class.imp::Object", [3 x float] }>
%"class.__gnu_cxx::__normal_iterator.29" = type { ptr }
%"class.imp::Intersection" = type { %"class.imp::Object", [2 x %"class.imp::Edge"], %"class.imp::Vec3", %"class.imp::Vec3" }
%"class.imp::Polygon" = type { %"class.imp::Object", %"class.std::vector.12" }
%"class.std::vector.12" = type { %"struct.std::_Vector_base.13" }
%"struct.std::_Vector_base.13" = type { %"struct.std::_Vector_base<imp::Path, std::allocator<imp::Path>>::_Vector_impl" }
%"struct.std::_Vector_base<imp::Path, std::allocator<imp::Path>>::_Vector_impl" = type { %"struct.std::_Vector_base<imp::Path, std::allocator<imp::Path>>::_Vector_impl_data" }
%"struct.std::_Vector_base<imp::Path, std::allocator<imp::Path>>::_Vector_impl_data" = type { ptr, ptr, ptr }

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

declare i32 @__gxx_personality_v0(...)

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

declare void @_ZN3imp4EdgeC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef nonnull align 8 dereferenceable(104)) unnamed_addr #1

declare noundef zeroext i1 @_ZNK3imp4Edge11connectedToERKS0_(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef nonnull align 8 dereferenceable(104)) #1

declare void @_ZN3imp4EdgeC1ERKNS_4Vec3ES3_(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 8 dereferenceable(36)) unnamed_addr #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK3imp3VecILi3EfEplERKS1_(ptr dead_on_unwind noalias writable sret(%"class.imp::Vec") align 8, ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 8 dereferenceable(36)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK3imp3VecILi3EfEmlEf(ptr dead_on_unwind noalias writable sret(%"class.imp::Vec") align 8, ptr noundef nonnull align 8 dereferenceable(36), float noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp4Vec3C2ILi3EEERKNS_3VecIXT_EfEEf(ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 8 dereferenceable(36), float noundef) unnamed_addr #4 align 2

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

declare noundef zeroext i1 @_ZNK3imp7Polygon6insideERKNS_4Vec3E(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(36)) #1

; Function Attrs: nounwind
declare void @_ZN3imp4PathD1Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #5

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt4findIN9__gnu_cxx17__normal_iteratorIPN3imp4EdgeESt6vectorIS3_SaIS3_EEEES3_ET_S9_S9_RKT0_(ptr, ptr, ptr noundef nonnull align 8 dereferenceable(104)) #6

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

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

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

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

declare void @_ZN3imp12IntersectionC1ENS_4EdgeES1_(ptr noundef nonnull align 8 dereferenceable(312), ptr noundef, ptr noundef) unnamed_addr #1

declare noundef zeroext i1 @_ZN3imp12Intersection7computeEv(ptr noundef nonnull align 8 dereferenceable(312)) #1

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3imp10poly2EdgesERKNS_7PolygonE(ptr dead_on_unwind noalias writable sret(%"class.std::vector.17") align 8 %0, ptr noundef nonnull align 8 dereferenceable(48) %1) #4 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i1, align 1
  %6 = alloca %"class.std::vector.24", align 8
  %7 = alloca ptr, align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.30", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator.30", align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.imp::Path", align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %"class.imp::Edge", align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca %"class.imp::Edge", align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator.29", align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator.29", align 8
  %21 = alloca %"class.__gnu_cxx::__normal_iterator.29", align 8
  %22 = alloca %"class.__gnu_cxx::__normal_iterator.29", align 8
  %23 = alloca %"class.imp::Vec3", align 8
  %24 = alloca %"class.imp::Vec", align 8
  %25 = alloca %"class.imp::Vec", align 8
  %26 = alloca i8, align 1
  %27 = alloca ptr, align 8
  %28 = alloca %"class.__gnu_cxx::__normal_iterator.29", align 8
  %29 = alloca %"class.__gnu_cxx::__normal_iterator.29", align 8
  %30 = alloca %"class.imp::Edge", align 8
  %31 = alloca %"class.imp::Intersection", align 8
  %32 = alloca %"class.imp::Edge", align 8
  %33 = alloca %"class.imp::Edge", align 8
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  store i1 false, ptr %5, align 1
  call void @_ZNSt6vectorIN3imp4EdgeESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #7
  call void @_ZNSt6vectorIN3imp4Vec3ESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  %35 = getelementptr inbounds %"class.imp::Polygon", ptr %34, i32 0, i32 1
  store ptr %35, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  %36 = load ptr, ptr %7, align 8, !tbaa !5
  %37 = call ptr @_ZNKSt6vectorIN3imp4PathESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %36) #7
  %38 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.30", ptr %8, i32 0, i32 0
  store ptr %37, ptr %38, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %39 = load ptr, ptr %7, align 8, !tbaa !5
  %40 = call ptr @_ZNKSt6vectorIN3imp4PathESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %39) #7
  %41 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.30", ptr %9, i32 0, i32 0
  store ptr %40, ptr %41, align 8
  br label %42

42:                                               ; preds = %84, %2
  %43 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN3imp4PathESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  br i1 %43, label %45, label %44

44:                                               ; preds = %42
  store i32 2, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  br label %87

45:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 48, ptr %11) #7
  %46 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKN3imp4PathESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  invoke void @_ZN3imp4PathC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(48) %11, ptr noundef nonnull align 8 dereferenceable(48) %46)
          to label %47 unwind label %54

47:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #7
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %48

48:                                               ; preds = %70, %47
  %49 = load i32, ptr %14, align 4, !tbaa !9
  %50 = invoke noundef i32 @_ZNK3imp4Path5countEv(ptr noundef nonnull align 8 dereferenceable(48) %11)
          to label %51 unwind label %58

51:                                               ; preds = %48
  %52 = icmp slt i32 %49, %50
  br i1 %52, label %62, label %53

53:                                               ; preds = %51
  store i32 4, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  br label %83

54:                                               ; preds = %45
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %12, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %13, align 4
  br label %86

58:                                               ; preds = %68, %65, %48
  %59 = landingpad { ptr, i32 }
          cleanup
  %60 = extractvalue { ptr, i32 } %59, 0
  store ptr %60, ptr %12, align 8
  %61 = extractvalue { ptr, i32 } %59, 1
  store i32 %61, ptr %13, align 4
  br label %82

62:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 104, ptr %15) #7
  %63 = load i32, ptr %14, align 4, !tbaa !9
  invoke void @_ZNK3imp4Path4edgeEi(ptr dead_on_unwind writable sret(%"class.imp::Edge") align 8 %15, ptr noundef nonnull align 8 dereferenceable(48) %11, i32 noundef %63)
          to label %64 unwind label %73

64:                                               ; preds = %62
  invoke void @_ZNSt6vectorIN3imp4EdgeESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(104) %15)
          to label %65 unwind label %77

65:                                               ; preds = %64
  call void @_ZN3imp4EdgeD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %15) #7
  call void @llvm.lifetime.end.p0(i64 104, ptr %15) #7
  %66 = load i32, ptr %14, align 4, !tbaa !9
  %67 = invoke noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Path6vertexEi(ptr noundef nonnull align 8 dereferenceable(48) %11, i32 noundef %66)
          to label %68 unwind label %58

68:                                               ; preds = %65
  invoke void @_ZNSt6vectorIN3imp4Vec3ESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(36) %67)
          to label %69 unwind label %58

69:                                               ; preds = %68
  br label %70

70:                                               ; preds = %69
  %71 = load i32, ptr %14, align 4, !tbaa !9
  %72 = add nsw i32 %71, 1
  store i32 %72, ptr %14, align 4, !tbaa !9
  br label %48, !llvm.loop !11

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

77:                                               ; preds = %64
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %12, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %13, align 4
  call void @_ZN3imp4EdgeD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %15) #7
  br label %81

81:                                               ; preds = %77, %73
  call void @llvm.lifetime.end.p0(i64 104, ptr %15) #7
  br label %82

82:                                               ; preds = %81, %58
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #7
  call void @_ZN3imp4PathD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %11) #7
  br label %86

83:                                               ; preds = %53
  call void @_ZN3imp4PathD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %11) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %11) #7
  br label %84

84:                                               ; preds = %83
  %85 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKN3imp4PathESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  br label %42

86:                                               ; preds = %82, %54
  call void @llvm.lifetime.end.p0(i64 48, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  br label %257

87:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #7
  store i32 0, ptr %16, align 4, !tbaa !9
  br label %88

88:                                               ; preds = %252, %87
  %89 = load i32, ptr %16, align 4, !tbaa !9
  %90 = call noundef i64 @_ZNKSt6vectorIN3imp4Vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  %91 = trunc i64 %90 to i32
  %92 = icmp slt i32 %89, %91
  br i1 %92, label %94, label %93

93:                                               ; preds = %88
  store i32 7, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %255

94:                                               ; preds = %88
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #7
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %95

95:                                               ; preds = %239, %94
  %96 = load i32, ptr %17, align 4, !tbaa !9
  %97 = call noundef i64 @_ZNKSt6vectorIN3imp4Vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  %98 = trunc i64 %97 to i32
  %99 = icmp slt i32 %96, %98
  br i1 %99, label %101, label %100

100:                                              ; preds = %95
  store i32 10, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  br label %251

101:                                              ; preds = %95
  %102 = load i32, ptr %16, align 4, !tbaa !9
  %103 = load i32, ptr %17, align 4, !tbaa !9
  %104 = icmp eq i32 %102, %103
  br i1 %104, label %105, label %106

105:                                              ; preds = %101
  br label %239

106:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 104, ptr %18) #7
  %107 = load i32, ptr %16, align 4, !tbaa !9
  %108 = sext i32 %107 to i64
  %109 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZNSt6vectorIN3imp4Vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %108) #7
  %110 = load i32, ptr %17, align 4, !tbaa !9
  %111 = sext i32 %110 to i64
  %112 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZNSt6vectorIN3imp4Vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %111) #7
  invoke void @_ZN3imp4EdgeC1ERKNS_4Vec3ES3_(ptr noundef nonnull align 8 dereferenceable(104) %18, ptr noundef nonnull align 8 dereferenceable(36) %109, ptr noundef nonnull align 8 dereferenceable(36) %112)
          to label %113 unwind label %129

113:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %114 = call ptr @_ZNSt6vectorIN3imp4EdgeESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  %115 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.29", ptr %20, i32 0, i32 0
  store ptr %114, ptr %115, align 8
  %116 = call ptr @_ZNSt6vectorIN3imp4EdgeESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  %117 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.29", ptr %21, i32 0, i32 0
  store ptr %116, ptr %117, align 8
  %118 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.29", ptr %20, i32 0, i32 0
  %119 = load ptr, ptr %118, align 8
  %120 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.29", ptr %21, i32 0, i32 0
  %121 = load ptr, ptr %120, align 8
  %122 = invoke ptr @_ZSt4findIN9__gnu_cxx17__normal_iteratorIPN3imp4EdgeESt6vectorIS3_SaIS3_EEEES3_ET_S9_S9_RKT0_(ptr %119, ptr %121, ptr noundef nonnull align 8 dereferenceable(104) %18)
          to label %123 unwind label %133

123:                                              ; preds = %113
  %124 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.29", ptr %19, i32 0, i32 0
  store ptr %122, ptr %124, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %125 = call ptr @_ZNSt6vectorIN3imp4EdgeESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  %126 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.29", ptr %22, i32 0, i32 0
  store ptr %125, ptr %126, align 8
  %127 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN3imp4EdgeESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  br i1 %127, label %128, label %137

128:                                              ; preds = %123
  store i32 12, ptr %10, align 4
  br label %236

129:                                              ; preds = %106
  %130 = landingpad { ptr, i32 }
          cleanup
  %131 = extractvalue { ptr, i32 } %130, 0
  store ptr %131, ptr %12, align 8
  %132 = extractvalue { ptr, i32 } %130, 1
  store i32 %132, ptr %13, align 4
  br label %250

133:                                              ; preds = %113
  %134 = landingpad { ptr, i32 }
          cleanup
  %135 = extractvalue { ptr, i32 } %134, 0
  store ptr %135, ptr %12, align 8
  %136 = extractvalue { ptr, i32 } %134, 1
  store i32 %136, ptr %13, align 4
  br label %249

137:                                              ; preds = %123
  call void @llvm.lifetime.start.p0(i64 40, ptr %23) #7
  call void @llvm.lifetime.start.p0(i64 40, ptr %24) #7
  call void @llvm.lifetime.start.p0(i64 40, ptr %25) #7
  %138 = load i32, ptr %16, align 4, !tbaa !9
  %139 = sext i32 %138 to i64
  %140 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZNSt6vectorIN3imp4Vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %139) #7
  %141 = load i32, ptr %17, align 4, !tbaa !9
  %142 = sext i32 %141 to i64
  %143 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZNSt6vectorIN3imp4Vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %142) #7
  invoke void @_ZNK3imp3VecILi3EfEplERKS1_(ptr dead_on_unwind writable sret(%"class.imp::Vec") align 8 %25, ptr noundef nonnull align 8 dereferenceable(36) %140, ptr noundef nonnull align 8 dereferenceable(36) %143)
          to label %144 unwind label %151

144:                                              ; preds = %137
  invoke void @_ZNK3imp3VecILi3EfEmlEf(ptr dead_on_unwind writable sret(%"class.imp::Vec") align 8 %24, ptr noundef nonnull align 8 dereferenceable(36) %25, float noundef 5.000000e-01)
          to label %145 unwind label %155

145:                                              ; preds = %144
  invoke void @_ZN3imp4Vec3C2ILi3EEERKNS_3VecIXT_EfEEf(ptr noundef nonnull align 8 dereferenceable(36) %23, ptr noundef nonnull align 8 dereferenceable(36) %24, float noundef 1.000000e+00)
          to label %146 unwind label %159

146:                                              ; preds = %145
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %24) #7
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %25) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %24) #7
  %147 = load ptr, ptr %4, align 8, !tbaa !5
  %148 = invoke noundef zeroext i1 @_ZNK3imp7Polygon6insideERKNS_4Vec3E(ptr noundef nonnull align 8 dereferenceable(48) %147, ptr noundef nonnull align 8 dereferenceable(36) %23)
          to label %149 unwind label %165

149:                                              ; preds = %146
  br i1 %148, label %169, label %150

150:                                              ; preds = %149
  store i32 12, ptr %10, align 4
  br label %235

151:                                              ; preds = %137
  %152 = landingpad { ptr, i32 }
          cleanup
  %153 = extractvalue { ptr, i32 } %152, 0
  store ptr %153, ptr %12, align 8
  %154 = extractvalue { ptr, i32 } %152, 1
  store i32 %154, ptr %13, align 4
  br label %164

155:                                              ; preds = %144
  %156 = landingpad { ptr, i32 }
          cleanup
  %157 = extractvalue { ptr, i32 } %156, 0
  store ptr %157, ptr %12, align 8
  %158 = extractvalue { ptr, i32 } %156, 1
  store i32 %158, ptr %13, align 4
  br label %163

159:                                              ; preds = %145
  %160 = landingpad { ptr, i32 }
          cleanup
  %161 = extractvalue { ptr, i32 } %160, 0
  store ptr %161, ptr %12, align 8
  %162 = extractvalue { ptr, i32 } %160, 1
  store i32 %162, ptr %13, align 4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %24) #7
  br label %163

163:                                              ; preds = %159, %155
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %25) #7
  br label %164

164:                                              ; preds = %163, %151
  call void @llvm.lifetime.end.p0(i64 40, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %24) #7
  br label %248

165:                                              ; preds = %146
  %166 = landingpad { ptr, i32 }
          cleanup
  %167 = extractvalue { ptr, i32 } %166, 0
  store ptr %167, ptr %12, align 8
  %168 = extractvalue { ptr, i32 } %166, 1
  store i32 %168, ptr %13, align 4
  br label %247

169:                                              ; preds = %149
  call void @llvm.lifetime.start.p0(i64 1, ptr %26) #7
  store i8 0, ptr %26, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  store ptr %0, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  %170 = load ptr, ptr %27, align 8, !tbaa !5
  %171 = call ptr @_ZNSt6vectorIN3imp4EdgeESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %170) #7
  %172 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.29", ptr %28, i32 0, i32 0
  store ptr %171, ptr %172, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #7
  %173 = load ptr, ptr %27, align 8, !tbaa !5
  %174 = call ptr @_ZNSt6vectorIN3imp4EdgeESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %173) #7
  %175 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.29", ptr %29, i32 0, i32 0
  store ptr %174, ptr %175, align 8
  br label %176

176:                                              ; preds = %223, %169
  %177 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN3imp4EdgeESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull align 8 dereferenceable(8) %29) #7
  br i1 %177, label %179, label %178

178:                                              ; preds = %176
  store i32 13, ptr %10, align 4
  br label %227

179:                                              ; preds = %176
  call void @llvm.lifetime.start.p0(i64 104, ptr %30) #7
  %180 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN3imp4EdgeESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %28) #7
  invoke void @_ZN3imp4EdgeC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(104) %30, ptr noundef nonnull align 8 dereferenceable(104) %180)
          to label %181 unwind label %185

181:                                              ; preds = %179
  %182 = invoke noundef zeroext i1 @_ZNK3imp4Edge11connectedToERKS0_(ptr noundef nonnull align 8 dereferenceable(104) %18, ptr noundef nonnull align 8 dereferenceable(104) %30)
          to label %183 unwind label %189

183:                                              ; preds = %181
  br i1 %182, label %184, label %193

184:                                              ; preds = %183
  store i32 14, ptr %10, align 4
  br label %220

185:                                              ; preds = %179
  %186 = landingpad { ptr, i32 }
          cleanup
  %187 = extractvalue { ptr, i32 } %186, 0
  store ptr %187, ptr %12, align 8
  %188 = extractvalue { ptr, i32 } %186, 1
  store i32 %188, ptr %13, align 4
  br label %226

189:                                              ; preds = %181
  %190 = landingpad { ptr, i32 }
          cleanup
  %191 = extractvalue { ptr, i32 } %190, 0
  store ptr %191, ptr %12, align 8
  %192 = extractvalue { ptr, i32 } %190, 1
  store i32 %192, ptr %13, align 4
  br label %225

193:                                              ; preds = %183
  call void @llvm.lifetime.start.p0(i64 312, ptr %31) #7
  invoke void @_ZN3imp4EdgeC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(104) %32, ptr noundef nonnull align 8 dereferenceable(104) %18)
          to label %194 unwind label %200

194:                                              ; preds = %193
  invoke void @_ZN3imp4EdgeC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(104) %33, ptr noundef nonnull align 8 dereferenceable(104) %30)
          to label %195 unwind label %204

195:                                              ; preds = %194
  invoke void @_ZN3imp12IntersectionC1ENS_4EdgeES1_(ptr noundef nonnull align 8 dereferenceable(312) %31, ptr noundef %32, ptr noundef %33)
          to label %196 unwind label %208

196:                                              ; preds = %195
  %197 = invoke noundef zeroext i1 @_ZN3imp12Intersection7computeEv(ptr noundef nonnull align 8 dereferenceable(312) %31)
          to label %198 unwind label %212

198:                                              ; preds = %196
  call void @_ZN3imp12IntersectionD2Ev(ptr noundef nonnull align 8 dereferenceable(312) %31) #7
  call void @_ZN3imp4EdgeD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %33) #7
  call void @_ZN3imp4EdgeD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %32) #7
  call void @llvm.lifetime.end.p0(i64 312, ptr %31) #7
  br i1 %197, label %199, label %219

199:                                              ; preds = %198
  store i8 1, ptr %26, align 1, !tbaa !13
  store i32 13, ptr %10, align 4
  br label %220

200:                                              ; preds = %193
  %201 = landingpad { ptr, i32 }
          cleanup
  %202 = extractvalue { ptr, i32 } %201, 0
  store ptr %202, ptr %12, align 8
  %203 = extractvalue { ptr, i32 } %201, 1
  store i32 %203, ptr %13, align 4
  br label %218

204:                                              ; preds = %194
  %205 = landingpad { ptr, i32 }
          cleanup
  %206 = extractvalue { ptr, i32 } %205, 0
  store ptr %206, ptr %12, align 8
  %207 = extractvalue { ptr, i32 } %205, 1
  store i32 %207, ptr %13, align 4
  br label %217

208:                                              ; preds = %195
  %209 = landingpad { ptr, i32 }
          cleanup
  %210 = extractvalue { ptr, i32 } %209, 0
  store ptr %210, ptr %12, align 8
  %211 = extractvalue { ptr, i32 } %209, 1
  store i32 %211, ptr %13, align 4
  br label %216

212:                                              ; preds = %196
  %213 = landingpad { ptr, i32 }
          cleanup
  %214 = extractvalue { ptr, i32 } %213, 0
  store ptr %214, ptr %12, align 8
  %215 = extractvalue { ptr, i32 } %213, 1
  store i32 %215, ptr %13, align 4
  call void @_ZN3imp12IntersectionD2Ev(ptr noundef nonnull align 8 dereferenceable(312) %31) #7
  br label %216

216:                                              ; preds = %212, %208
  call void @_ZN3imp4EdgeD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %33) #7
  br label %217

217:                                              ; preds = %216, %204
  call void @_ZN3imp4EdgeD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %32) #7
  br label %218

218:                                              ; preds = %217, %200
  call void @llvm.lifetime.end.p0(i64 312, ptr %31) #7
  br label %225

219:                                              ; preds = %198
  store i32 0, ptr %10, align 4
  br label %220

220:                                              ; preds = %219, %199, %184
  call void @_ZN3imp4EdgeD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %30) #7
  call void @llvm.lifetime.end.p0(i64 104, ptr %30) #7
  %221 = load i32, ptr %10, align 4
  switch i32 %221, label %227 [
    i32 0, label %222
    i32 14, label %223
  ]

222:                                              ; preds = %220
  br label %223

223:                                              ; preds = %222, %220
  %224 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN3imp4EdgeESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %28) #7
  br label %176

225:                                              ; preds = %218, %189
  call void @_ZN3imp4EdgeD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %30) #7
  br label %226

226:                                              ; preds = %225, %185
  call void @llvm.lifetime.end.p0(i64 104, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  br label %246

227:                                              ; preds = %220, %178
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  br label %228

228:                                              ; preds = %227
  %229 = load i8, ptr %26, align 1, !tbaa !13, !range !15, !noundef !16
  %230 = trunc i8 %229 to i1
  br i1 %230, label %231, label %232

231:                                              ; preds = %228
  store i32 12, ptr %10, align 4
  br label %234

232:                                              ; preds = %228
  invoke void @_ZNSt6vectorIN3imp4EdgeESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(104) %18)
          to label %233 unwind label %242

233:                                              ; preds = %232
  store i32 0, ptr %10, align 4
  br label %234

234:                                              ; preds = %233, %231
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #7
  br label %235

235:                                              ; preds = %234, %150
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %23) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %23) #7
  br label %236

236:                                              ; preds = %235, %128
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @_ZN3imp4EdgeD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %18) #7
  call void @llvm.lifetime.end.p0(i64 104, ptr %18) #7
  %237 = load i32, ptr %10, align 4
  switch i32 %237, label %265 [
    i32 0, label %238
    i32 12, label %239
  ]

238:                                              ; preds = %236
  br label %239

239:                                              ; preds = %238, %236, %105
  %240 = load i32, ptr %17, align 4, !tbaa !9
  %241 = add nsw i32 %240, 1
  store i32 %241, ptr %17, align 4, !tbaa !9
  br label %95, !llvm.loop !17

242:                                              ; preds = %232
  %243 = landingpad { ptr, i32 }
          cleanup
  %244 = extractvalue { ptr, i32 } %243, 0
  store ptr %244, ptr %12, align 8
  %245 = extractvalue { ptr, i32 } %243, 1
  store i32 %245, ptr %13, align 4
  br label %246

246:                                              ; preds = %242, %226
  call void @llvm.lifetime.end.p0(i64 1, ptr %26) #7
  br label %247

247:                                              ; preds = %246, %165
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %23) #7
  br label %248

248:                                              ; preds = %247, %164
  call void @llvm.lifetime.end.p0(i64 40, ptr %23) #7
  br label %249

249:                                              ; preds = %248, %133
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @_ZN3imp4EdgeD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %18) #7
  br label %250

250:                                              ; preds = %249, %129
  call void @llvm.lifetime.end.p0(i64 104, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #7
  br label %257

251:                                              ; preds = %100
  br label %252

252:                                              ; preds = %251
  %253 = load i32, ptr %16, align 4, !tbaa !9
  %254 = add nsw i32 %253, 1
  store i32 %254, ptr %16, align 4, !tbaa !9
  br label %88, !llvm.loop !18

255:                                              ; preds = %93
  store i1 true, ptr %5, align 1
  store i32 1, ptr %10, align 4
  call void @_ZNSt6vectorIN3imp4Vec3ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #7
  %256 = load i1, ptr %5, align 1
  br i1 %256, label %259, label %258

257:                                              ; preds = %250, %86
  call void @_ZNSt6vectorIN3imp4Vec3ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #7
  call void @_ZNSt6vectorIN3imp4EdgeESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  br label %260

258:                                              ; preds = %255
  call void @_ZNSt6vectorIN3imp4EdgeESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  br label %259

259:                                              ; preds = %258, %255
  ret void

260:                                              ; preds = %257
  %261 = load ptr, ptr %12, align 8
  %262 = load i32, ptr %13, align 4
  %263 = insertvalue { ptr, i32 } poison, ptr %261, 0
  %264 = insertvalue { ptr, i32 } %263, i32 %262, 1
  resume { ptr, i32 } %264

265:                                              ; preds = %236
  unreachable
}

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3imp4PathC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #6 align 2

declare noundef i32 @_ZNK3imp4Path5countEv(ptr noundef nonnull align 8 dereferenceable(48)) #1

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

declare void @_ZNK3imp4Path4edgeEi(ptr dead_on_unwind writable sret(%"class.imp::Edge") align 8, ptr noundef nonnull align 8 dereferenceable(48), i32 noundef) #1

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

declare noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Path6vertexEi(ptr noundef nonnull align 8 dereferenceable(48), i32 noundef) #1

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind "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 = { 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 #7 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !14, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}


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

%"class.imp::Vec" = type <{ %"class.imp::Object", [3 x float], [4 x i8] }>
%"class.imp::Object" = type { ptr, %"class.std::shared_ptr" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::vector.17" = type { %"struct.std::_Vector_base.18" }
%"struct.std::_Vector_base.18" = type { %"struct.std::_Vector_base<imp::Edge, std::allocator<imp::Edge>>::_Vector_impl" }
%"struct.std::_Vector_base<imp::Edge, std::allocator<imp::Edge>>::_Vector_impl" = type { %"struct.std::_Vector_base<imp::Edge, std::allocator<imp::Edge>>::_Vector_impl_data" }
%"struct.std::_Vector_base<imp::Edge, std::allocator<imp::Edge>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.24" = type { %"struct.std::_Vector_base.25" }
%"struct.std::_Vector_base.25" = type { %"struct.std::_Vector_base<imp::Vec3, std::allocator<imp::Vec3>>::_Vector_impl" }
%"struct.std::_Vector_base<imp::Vec3, std::allocator<imp::Vec3>>::_Vector_impl" = type { %"struct.std::_Vector_base<imp::Vec3, std::allocator<imp::Vec3>>::_Vector_impl_data" }
%"struct.std::_Vector_base<imp::Vec3, std::allocator<imp::Vec3>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.30" = type { ptr }
%"class.imp::Path" = type { %"class.imp::Object", %"class.std::vector.24" }
%"class.imp::Edge" = type { %"class.imp::Object", %"class.imp::Vec3", %"class.imp::Vec3" }
%"class.imp::Vec3" = type { %"class.imp::Vec.base", [4 x i8] }
%"class.imp::Vec.base" = type <{ %"class.imp::Object", [3 x float] }>
%"class.__gnu_cxx::__normal_iterator.29" = type { ptr }
%"class.imp::Intersection" = type { %"class.imp::Object", [2 x %"class.imp::Edge"], %"class.imp::Vec3", %"class.imp::Vec3" }

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

declare i32 @__gxx_personality_v0(...)

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

declare void @_ZN3imp4EdgeC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef nonnull align 8 dereferenceable(104)) unnamed_addr #1

declare noundef zeroext i1 @_ZNK3imp4Edge11connectedToERKS0_(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef nonnull align 8 dereferenceable(104)) local_unnamed_addr #1

declare void @_ZN3imp4EdgeC1ERKNS_4Vec3ES3_(ptr noundef nonnull align 8 dereferenceable(104), ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 8 dereferenceable(36)) unnamed_addr #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK3imp3VecILi3EfEplERKS1_(ptr dead_on_unwind noalias writable sret(%"class.imp::Vec") align 8, ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 8 dereferenceable(36)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK3imp3VecILi3EfEmlEf(ptr dead_on_unwind noalias writable sret(%"class.imp::Vec") align 8, ptr noundef nonnull align 8 dereferenceable(36), float noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp4Vec3C2ILi3EEERKNS_3VecIXT_EfEEf(ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 8 dereferenceable(36), float noundef) unnamed_addr #4 align 2

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

declare noundef zeroext i1 @_ZNK3imp7Polygon6insideERKNS_4Vec3E(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(36)) local_unnamed_addr #1

; Function Attrs: nounwind
declare void @_ZN3imp4PathD1Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #5

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt4findIN9__gnu_cxx17__normal_iteratorIPN3imp4EdgeESt6vectorIS3_SaIS3_EEEES3_ET_S9_S9_RKT0_(ptr, ptr, ptr noundef nonnull align 8 dereferenceable(104)) local_unnamed_addr #6

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPN3imp4EdgeESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(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 noundef nonnull align 8 dereferenceable(104) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN3imp4EdgeESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

declare void @_ZN3imp12IntersectionC1ENS_4EdgeES1_(ptr noundef nonnull align 8 dereferenceable(312), ptr noundef, ptr noundef) unnamed_addr #1

declare noundef zeroext i1 @_ZN3imp12Intersection7computeEv(ptr noundef nonnull align 8 dereferenceable(312)) local_unnamed_addr #1

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3imp10poly2EdgesERKNS_7PolygonE(ptr dead_on_unwind noalias nonnull writable sret(%"class.std::vector.17") align 8 %0, ptr noundef nonnull align 8 dereferenceable(48) %1) local_unnamed_addr #4 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::vector.24", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator.30", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator.30", align 8
  %6 = alloca %"class.imp::Path", align 8
  %7 = alloca %"class.imp::Edge", align 8
  %8 = alloca %"class.imp::Edge", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator.29", align 8
  %10 = alloca %"class.__gnu_cxx::__normal_iterator.29", align 8
  %11 = alloca %"class.imp::Vec3", align 8
  %12 = alloca %"class.imp::Vec", align 8
  %13 = alloca %"class.imp::Vec", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator.29", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator.29", align 8
  %16 = alloca %"class.imp::Edge", align 8
  %17 = alloca %"class.imp::Intersection", align 8
  %18 = alloca %"class.imp::Edge", align 8
  %19 = alloca %"class.imp::Edge", align 8
  tail call void @_ZNSt6vectorIN3imp4EdgeESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #7
  call void @_ZNSt6vectorIN3imp4Vec3ESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  %20 = getelementptr inbounds i8, ptr %1, i64 24
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %21 = call ptr @_ZNKSt6vectorIN3imp4PathESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #7
  store ptr %21, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %22 = call ptr @_ZNKSt6vectorIN3imp4PathESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #7
  store ptr %22, ptr %5, align 8
  %23 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN3imp4PathESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  br i1 %23, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %31, %2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  %24 = call noundef i64 @_ZNKSt6vectorIN3imp4Vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  %25 = trunc i64 %24 to i32
  %26 = icmp sgt i32 %25, 0
  br i1 %26, label %.preheader, label %._crit_edge80

.lr.ph:                                           ; preds = %2, %31
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %6) #7
  %27 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKN3imp4PathESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  invoke void @_ZN3imp4PathC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(48) %6, ptr noundef nonnull align 8 dereferenceable(48) %27)
          to label %.preheader66 unwind label %34

.preheader66:                                     ; preds = %.lr.ph, %43
  %.031 = phi i32 [ %44, %43 ], [ 0, %.lr.ph ]
  %28 = invoke noundef i32 @_ZNK3imp4Path5countEv(ptr noundef nonnull align 8 dereferenceable(48) %6)
          to label %29 unwind label %36

29:                                               ; preds = %.preheader66
  %30 = icmp slt i32 %.031, %28
  br i1 %30, label %38, label %31

31:                                               ; preds = %29
  call void @_ZN3imp4PathD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #7
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKN3imp4PathESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #7
  %33 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN3imp4PathESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  br i1 %33, label %.lr.ph, label %._crit_edge

34:                                               ; preds = %.lr.ph
  %35 = landingpad { ptr, i32 }
          cleanup
  br label %51

36:                                               ; preds = %42, %40, %.preheader66
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %50

38:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 104, ptr nonnull %7) #7
  invoke void @_ZNK3imp4Path4edgeEi(ptr dead_on_unwind nonnull writable sret(%"class.imp::Edge") align 8 %7, ptr noundef nonnull align 8 dereferenceable(48) %6, i32 noundef %.031)
          to label %39 unwind label %45

39:                                               ; preds = %38
  invoke void @_ZNSt6vectorIN3imp4EdgeESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(104) %7)
          to label %40 unwind label %47

40:                                               ; preds = %39
  call void @_ZN3imp4EdgeD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %7) #7
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %7) #7
  %41 = invoke noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Path6vertexEi(ptr noundef nonnull align 8 dereferenceable(48) %6, i32 noundef %.031)
          to label %42 unwind label %36

42:                                               ; preds = %40
  invoke void @_ZNSt6vectorIN3imp4Vec3ESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(36) %41)
          to label %43 unwind label %36

43:                                               ; preds = %42
  %44 = add nuw nsw i32 %.031, 1
  br label %.preheader66, !llvm.loop !5

45:                                               ; preds = %38
  %46 = landingpad { ptr, i32 }
          cleanup
  br label %49

47:                                               ; preds = %39
  %48 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3imp4EdgeD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %7) #7
  br label %49

49:                                               ; preds = %47, %45
  %.pn57 = phi { ptr, i32 } [ %48, %47 ], [ %46, %45 ]
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %7) #7
  br label %50

50:                                               ; preds = %49, %36
  %.pn59 = phi { ptr, i32 } [ %37, %36 ], [ %.pn57, %49 ]
  call void @_ZN3imp4PathD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %6) #7
  br label %51

51:                                               ; preds = %50, %34
  %.pn59.pn = phi { ptr, i32 } [ %.pn59, %50 ], [ %35, %34 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  br label %130

.preheader:                                       ; preds = %._crit_edge, %._crit_edge78
  %indvars.iv89 = phi i64 [ %indvars.iv.next90, %._crit_edge78 ], [ 0, %._crit_edge ]
  %52 = call noundef i64 @_ZNKSt6vectorIN3imp4Vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  %53 = trunc i64 %52 to i32
  %54 = icmp sgt i32 %53, 0
  br i1 %54, label %.lr.ph77, label %._crit_edge78

._crit_edge80:                                    ; preds = %._crit_edge78, %._crit_edge
  call void @_ZNSt6vectorIN3imp4Vec3ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #7
  ret void

._crit_edge78:                                    ; preds = %120, %.preheader
  %indvars.iv.next90 = add nuw nsw i64 %indvars.iv89, 1
  %55 = call noundef i64 @_ZNKSt6vectorIN3imp4Vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  %sext93 = shl i64 %55, 32
  %56 = ashr exact i64 %sext93, 32
  %57 = icmp slt i64 %indvars.iv.next90, %56
  br i1 %57, label %.preheader, label %._crit_edge80, !llvm.loop !7

.lr.ph77:                                         ; preds = %.preheader, %120
  %indvars.iv = phi i64 [ %indvars.iv.next, %120 ], [ 0, %.preheader ]
  %58 = icmp eq i64 %indvars.iv89, %indvars.iv
  br i1 %58, label %120, label %59

59:                                               ; preds = %.lr.ph77
  call void @llvm.lifetime.start.p0(i64 104, ptr nonnull %8) #7
  %60 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZNSt6vectorIN3imp4Vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv89) #7
  %61 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZNSt6vectorIN3imp4Vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv) #7
  invoke void @_ZN3imp4EdgeC1ERKNS_4Vec3ES3_(ptr noundef nonnull align 8 dereferenceable(104) %8, ptr noundef nonnull align 8 dereferenceable(36) %60, ptr noundef nonnull align 8 dereferenceable(36) %61)
          to label %62 unwind label %69

62:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  %63 = call ptr @_ZNSt6vectorIN3imp4EdgeESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  %64 = call ptr @_ZNSt6vectorIN3imp4EdgeESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  %65 = invoke ptr @_ZSt4findIN9__gnu_cxx17__normal_iteratorIPN3imp4EdgeESt6vectorIS3_SaIS3_EEEES3_ET_S9_S9_RKT0_(ptr %63, ptr %64, ptr noundef nonnull align 8 dereferenceable(104) %8)
          to label %66 unwind label %71

66:                                               ; preds = %62
  store ptr %65, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  %67 = call ptr @_ZNSt6vectorIN3imp4EdgeESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  store ptr %67, ptr %10, align 8
  %68 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN3imp4EdgeESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  br i1 %68, label %119, label %73

69:                                               ; preds = %59
  %70 = landingpad { ptr, i32 }
          cleanup
  br label %129

71:                                               ; preds = %62
  %72 = landingpad { ptr, i32 }
          cleanup
  br label %128

73:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %11) #7
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %12) #7
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %13) #7
  %74 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZNSt6vectorIN3imp4Vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv89) #7
  %75 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZNSt6vectorIN3imp4Vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv) #7
  call void @_ZNK3imp3VecILi3EfEplERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec") align 8 %13, ptr noundef nonnull align 8 dereferenceable(36) %74, ptr noundef nonnull align 8 dereferenceable(36) %75)
  call void @_ZNK3imp3VecILi3EfEmlEf(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec") align 8 %12, ptr noundef nonnull align 8 dereferenceable(36) %13, float noundef 5.000000e-01)
  invoke void @_ZN3imp4Vec3C2ILi3EEERKNS_3VecIXT_EfEEf(ptr noundef nonnull align 8 dereferenceable(36) %11, ptr noundef nonnull align 8 dereferenceable(36) %12, float noundef 1.000000e+00)
          to label %76 unwind label %79

76:                                               ; preds = %73
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %12) #7
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %13) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %12) #7
  %77 = invoke noundef zeroext i1 @_ZNK3imp7Polygon6insideERKNS_4Vec3E(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(36) %11)
          to label %78 unwind label %81

78:                                               ; preds = %76
  br i1 %77, label %83, label %118

79:                                               ; preds = %73
  %80 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %12) #7
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %13) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %12) #7
  br label %127

81:                                               ; preds = %76
  %82 = landingpad { ptr, i32 }
          cleanup
  br label %126

83:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #7
  %84 = call ptr @_ZNSt6vectorIN3imp4EdgeESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  store ptr %84, ptr %14, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #7
  %85 = call ptr @_ZNSt6vectorIN3imp4EdgeESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  store ptr %85, ptr %15, align 8
  %86 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN3imp4EdgeESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  br i1 %86, label %.lr.ph75, label %.loopexit

.lr.ph75:                                         ; preds = %83, %113
  call void @llvm.lifetime.start.p0(i64 104, ptr nonnull %16) #7
  %87 = call noundef nonnull align 8 dereferenceable(104) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN3imp4EdgeESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  invoke void @_ZN3imp4EdgeC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(104) %16, ptr noundef nonnull align 8 dereferenceable(104) %87)
          to label %88 unwind label %91

88:                                               ; preds = %.lr.ph75
  %89 = invoke noundef zeroext i1 @_ZNK3imp4Edge11connectedToERKS0_(ptr noundef nonnull align 8 dereferenceable(104) %8, ptr noundef nonnull align 8 dereferenceable(104) %16)
          to label %90 unwind label %93

90:                                               ; preds = %88
  br i1 %89, label %113, label %95

91:                                               ; preds = %.lr.ph75
  %92 = landingpad { ptr, i32 }
          cleanup
  br label %117

93:                                               ; preds = %88
  %94 = landingpad { ptr, i32 }
          cleanup
  br label %116

95:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 312, ptr nonnull %17) #7
  invoke void @_ZN3imp4EdgeC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(104) %18, ptr noundef nonnull align 8 dereferenceable(104) %8)
          to label %96 unwind label %101

96:                                               ; preds = %95
  invoke void @_ZN3imp4EdgeC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(104) %19, ptr noundef nonnull align 8 dereferenceable(104) %16)
          to label %97 unwind label %103

97:                                               ; preds = %96
  invoke void @_ZN3imp12IntersectionC1ENS_4EdgeES1_(ptr noundef nonnull align 8 dereferenceable(312) %17, ptr noundef nonnull %18, ptr noundef nonnull %19)
          to label %98 unwind label %105

98:                                               ; preds = %97
  %99 = invoke noundef zeroext i1 @_ZN3imp12Intersection7computeEv(ptr noundef nonnull align 8 dereferenceable(312) %17)
          to label %100 unwind label %107

100:                                              ; preds = %98
  call void @_ZN3imp12IntersectionD2Ev(ptr noundef nonnull align 8 dereferenceable(312) %17) #7
  call void @_ZN3imp4EdgeD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %19) #7
  call void @_ZN3imp4EdgeD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %18) #7
  call void @llvm.lifetime.end.p0(i64 312, ptr nonnull %17) #7
  br i1 %99, label %112, label %113

101:                                              ; preds = %95
  %102 = landingpad { ptr, i32 }
          cleanup
  br label %111

103:                                              ; preds = %96
  %104 = landingpad { ptr, i32 }
          cleanup
  br label %110

105:                                              ; preds = %97
  %106 = landingpad { ptr, i32 }
          cleanup
  br label %109

107:                                              ; preds = %98
  %108 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3imp12IntersectionD2Ev(ptr noundef nonnull align 8 dereferenceable(312) %17) #7
  br label %109

109:                                              ; preds = %107, %105
  %.pn = phi { ptr, i32 } [ %108, %107 ], [ %106, %105 ]
  call void @_ZN3imp4EdgeD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %19) #7
  br label %110

110:                                              ; preds = %109, %103
  %.pn.pn = phi { ptr, i32 } [ %.pn, %109 ], [ %104, %103 ]
  call void @_ZN3imp4EdgeD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %18) #7
  br label %111

111:                                              ; preds = %110, %101
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %110 ], [ %102, %101 ]
  call void @llvm.lifetime.end.p0(i64 312, ptr nonnull %17) #7
  br label %116

112:                                              ; preds = %100
  call void @_ZN3imp4EdgeD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %16) #7
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  br label %118

113:                                              ; preds = %90, %100
  call void @_ZN3imp4EdgeD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %16) #7
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %16) #7
  %114 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN3imp4EdgeESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  %115 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN3imp4EdgeESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  br i1 %115, label %.lr.ph75, label %.loopexit

116:                                              ; preds = %111, %93
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %111 ], [ %94, %93 ]
  call void @_ZN3imp4EdgeD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %16) #7
  br label %117

117:                                              ; preds = %116, %91
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %116 ], [ %92, %91 ]
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  br label %126

.loopexit:                                        ; preds = %113, %83
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #7
  invoke void @_ZNSt6vectorIN3imp4EdgeESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(104) %8)
          to label %118 unwind label %124

118:                                              ; preds = %112, %.loopexit, %78
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %11) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %11) #7
  br label %119

119:                                              ; preds = %66, %118
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  call void @_ZN3imp4EdgeD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %8) #7
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %8) #7
  br label %120

120:                                              ; preds = %119, %.lr.ph77
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %121 = call noundef i64 @_ZNKSt6vectorIN3imp4Vec3ESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  %sext = shl i64 %121, 32
  %122 = ashr exact i64 %sext, 32
  %123 = icmp slt i64 %indvars.iv.next, %122
  br i1 %123, label %.lr.ph77, label %._crit_edge78, !llvm.loop !8

124:                                              ; preds = %.loopexit
  %125 = landingpad { ptr, i32 }
          cleanup
  br label %126

126:                                              ; preds = %117, %124, %81
  %.pn51.pn = phi { ptr, i32 } [ %82, %81 ], [ %125, %124 ], [ %.pn.pn.pn.pn.pn, %117 ]
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %11) #7
  br label %127

127:                                              ; preds = %126, %79
  %.pn51.pn.pn = phi { ptr, i32 } [ %.pn51.pn, %126 ], [ %80, %79 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %11) #7
  br label %128

128:                                              ; preds = %127, %71
  %.pn51.pn.pn.pn = phi { ptr, i32 } [ %.pn51.pn.pn, %127 ], [ %72, %71 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  call void @_ZN3imp4EdgeD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %8) #7
  br label %129

129:                                              ; preds = %128, %69
  %.pn51.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn51.pn.pn.pn, %128 ], [ %70, %69 ]
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %8) #7
  br label %130

130:                                              ; preds = %129, %51
  %.pn59.pn.pn = phi { ptr, i32 } [ %.pn59.pn, %51 ], [ %.pn51.pn.pn.pn.pn, %129 ]
  call void @_ZNSt6vectorIN3imp4Vec3ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #7
  call void @_ZNSt6vectorIN3imp4EdgeESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #7
  resume { ptr, i32 } %.pn59.pn.pn
}

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxneIPKN3imp4PathESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(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 noundef nonnull align 8 dereferenceable(48) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKN3imp4PathESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3imp4PathC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #6 align 2

declare noundef i32 @_ZNK3imp4Path5countEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #1

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

declare void @_ZNK3imp4Path4edgeEi(ptr dead_on_unwind writable sret(%"class.imp::Edge") align 8, ptr noundef nonnull align 8 dereferenceable(48), i32 noundef) local_unnamed_addr #1

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

declare noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Path6vertexEi(ptr noundef nonnull align 8 dereferenceable(48), i32 noundef) local_unnamed_addr #1

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind "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 = { 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 #7 = { 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"}
!7 = distinct !{!7, !6}
!8 = distinct !{!8, !6}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass