; LLVM IR from Lut1n/ImpGears :: src/ImpGears/Geometry (Polygon)

; 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::Vec3" = type { %"class.imp::Vec.base", [4 x i8] }
%"class.imp::Vec.base" = type <{ %"class.imp::Object", [3 x float] }>
%"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.imp::Path" = type { %"class.imp::Object", %"class.std::vector.0" }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = 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.7" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.8" = type { ptr }
%"class.imp::Polygon" = type { %"class.imp::Object", %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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 }

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN3imp13findCompositeERKNS_4Vec3ERKNS_7PolygonE(ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 8 dereferenceable(48)) #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3imp8isEnter2ERKNS_4Vec3ERKNS_4PathES5_(ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) #4

declare void @_ZNK3imp4Path4nextERKNS_4Vec3E(ptr dead_on_unwind writable sret(%"class.imp::Vec3") align 8, ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(36)) #5

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3imp11pathFinder2ERKNS_7PolygonES2_RSt6vectorINS_4Vec3ESaIS4_EERKS4_bb(ptr dead_on_unwind noalias writable sret(%"class.imp::Path") align 8 %0, ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(36) %4, i1 noundef zeroext %5, i1 noundef zeroext %6) #4 personality ptr @__gxx_personality_v0 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i8, align 1
  %14 = alloca i8, align 1
  %15 = alloca %"class.imp::Path", align 8
  %16 = alloca i8, align 1
  %17 = alloca %"class.imp::Vec3", align 8
  %18 = alloca i32, align 4
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca %"class.imp::Vec3", align 8
  %23 = alloca %"class.__gnu_cxx::__normal_iterator.7", align 8
  %24 = alloca %"class.__gnu_cxx::__normal_iterator.7", align 8
  %25 = alloca %"class.__gnu_cxx::__normal_iterator.7", align 8
  %26 = alloca %"class.__gnu_cxx::__normal_iterator.7", align 8
  %27 = alloca %"class.__gnu_cxx::__normal_iterator.8", align 8
  %28 = alloca %"class.__gnu_cxx::__normal_iterator.7", align 8
  %29 = alloca i8, align 1
  %30 = alloca %"class.imp::Vec3", align 8
  %31 = alloca %"class.imp::Vec3", align 8
  %32 = alloca %"class.imp::Vec3", align 8
  store ptr %0, ptr %8, align 8
  store ptr %1, ptr %9, align 8, !tbaa !5
  store ptr %2, ptr %10, align 8, !tbaa !5
  store ptr %3, ptr %11, align 8, !tbaa !5
  store ptr %4, ptr %12, align 8, !tbaa !5
  %33 = zext i1 %5 to i8
  store i8 %33, ptr %13, align 1, !tbaa !9
  %34 = zext i1 %6 to i8
  store i8 %34, ptr %14, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 48, ptr %15) #7
  call void @_ZN3imp4PathC1Ev(ptr noundef nonnull align 8 dereferenceable(48) %15)
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #7
  store i8 0, ptr %16, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 40, ptr %17) #7
  %35 = load ptr, ptr %12, align 8, !tbaa !5
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %17, ptr noundef nonnull align 8 dereferenceable(36) %35) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #7
  %36 = load ptr, ptr %12, align 8, !tbaa !5
  %37 = load ptr, ptr %9, align 8, !tbaa !5
  %38 = invoke noundef i32 @_ZN3imp13findCompositeERKNS_4Vec3ERKNS_7PolygonE(ptr noundef nonnull align 8 dereferenceable(36) %36, ptr noundef nonnull align 8 dereferenceable(48) %37)
          to label %39 unwind label %97

39:                                               ; preds = %7
  store i32 %38, ptr %18, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #7
  %40 = load ptr, ptr %12, align 8, !tbaa !5
  %41 = load ptr, ptr %10, align 8, !tbaa !5
  %42 = invoke noundef i32 @_ZN3imp13findCompositeERKNS_4Vec3ERKNS_7PolygonE(ptr noundef nonnull align 8 dereferenceable(36) %40, ptr noundef nonnull align 8 dereferenceable(48) %41)
          to label %43 unwind label %101

43:                                               ; preds = %39
  store i32 %42, ptr %21, align 4, !tbaa !11
  br label %44

44:                                               ; preds = %164, %43
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %22, ptr noundef nonnull align 8 dereferenceable(36) %17) #7
  invoke void @_ZN3imp4Path9addVertexENS_4Vec3E(ptr noundef nonnull align 8 dereferenceable(48) %15, ptr noundef %22)
          to label %45 unwind label %105

45:                                               ; preds = %44
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %22) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  %46 = load ptr, ptr %11, align 8, !tbaa !5
  %47 = call ptr @_ZNSt6vectorIN3imp4Vec3ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %46) #7
  %48 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.7", ptr %24, i32 0, i32 0
  store ptr %47, ptr %48, align 8
  %49 = load ptr, ptr %11, align 8, !tbaa !5
  %50 = call ptr @_ZNSt6vectorIN3imp4Vec3ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %49) #7
  %51 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.7", ptr %25, i32 0, i32 0
  store ptr %50, ptr %51, align 8
  %52 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.7", ptr %24, i32 0, i32 0
  %53 = load ptr, ptr %52, align 8
  %54 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.7", ptr %25, i32 0, i32 0
  %55 = load ptr, ptr %54, align 8
  %56 = invoke ptr @_ZSt4findIN9__gnu_cxx17__normal_iteratorIPN3imp4Vec3ESt6vectorIS3_SaIS3_EEEES3_ET_S9_S9_RKT0_(ptr %53, ptr %55, ptr noundef nonnull align 8 dereferenceable(36) %17)
          to label %57 unwind label %109

57:                                               ; preds = %45
  %58 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.7", ptr %23, i32 0, i32 0
  store ptr %56, ptr %58, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  %59 = load ptr, ptr %11, align 8, !tbaa !5
  %60 = call ptr @_ZNSt6vectorIN3imp4Vec3ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %59) #7
  %61 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.7", ptr %26, i32 0, i32 0
  store ptr %60, ptr %61, align 8
  %62 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN3imp4Vec3ESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %26) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  br i1 %62, label %63, label %117

63:                                               ; preds = %57
  %64 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKN3imp4Vec3ESt6vectorIS2_SaIS2_EEEC2IPS2_vEERKNS0_IT_S7_EE(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %23) #7
  %65 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.8", ptr %27, i32 0, i32 0
  %66 = load ptr, ptr %65, align 8
  %67 = invoke ptr @_ZNSt6vectorIN3imp4Vec3ESaIS1_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS1_S3_EE(ptr noundef nonnull align 8 dereferenceable(24) %64, ptr %66)
          to label %68 unwind label %109

68:                                               ; preds = %63
  %69 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.7", ptr %28, i32 0, i32 0
  store ptr %67, ptr %69, align 8
  %70 = load ptr, ptr %9, align 8, !tbaa !5
  %71 = invoke noundef i32 @_ZN3imp13findCompositeERKNS_4Vec3ERKNS_7PolygonE(ptr noundef nonnull align 8 dereferenceable(36) %17, ptr noundef nonnull align 8 dereferenceable(48) %70)
          to label %72 unwind label %109

72:                                               ; preds = %68
  store i32 %71, ptr %18, align 4, !tbaa !11
  %73 = load ptr, ptr %10, align 8, !tbaa !5
  %74 = invoke noundef i32 @_ZN3imp13findCompositeERKNS_4Vec3ERKNS_7PolygonE(ptr noundef nonnull align 8 dereferenceable(36) %17, ptr noundef nonnull align 8 dereferenceable(48) %73)
          to label %75 unwind label %109

75:                                               ; preds = %72
  store i32 %74, ptr %21, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr %29) #7
  %76 = load ptr, ptr %9, align 8, !tbaa !5
  %77 = getelementptr inbounds %"class.imp::Polygon", ptr %76, i32 0, i32 1
  %78 = load i32, ptr %18, align 4, !tbaa !11
  %79 = sext i32 %78 to i64
  %80 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN3imp4PathESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %77, i64 noundef %79) #7
  %81 = load ptr, ptr %10, align 8, !tbaa !5
  %82 = getelementptr inbounds %"class.imp::Polygon", ptr %81, i32 0, i32 1
  %83 = load i32, ptr %21, align 4, !tbaa !11
  %84 = sext i32 %83 to i64
  %85 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN3imp4PathESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %82, i64 noundef %84) #7
  %86 = invoke noundef zeroext i1 @_ZN3imp8isEnter2ERKNS_4Vec3ERKNS_4PathES5_(ptr noundef nonnull align 8 dereferenceable(36) %17, ptr noundef nonnull align 8 dereferenceable(48) %80, ptr noundef nonnull align 8 dereferenceable(48) %85)
          to label %87 unwind label %113

87:                                               ; preds = %75
  %88 = zext i1 %86 to i8
  store i8 %88, ptr %29, align 1, !tbaa !9
  %89 = load i8, ptr %29, align 1, !tbaa !9, !range !13, !noundef !14
  %90 = trunc i8 %89 to i1
  %91 = zext i1 %90 to i32
  %92 = load i8, ptr %13, align 1, !tbaa !9, !range !13, !noundef !14
  %93 = trunc i8 %92 to i1
  %94 = zext i1 %93 to i32
  %95 = icmp ne i32 %91, %94
  %96 = zext i1 %95 to i8
  store i8 %96, ptr %16, align 1, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 1, ptr %29) #7
  br label %117

97:                                               ; preds = %7
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %19, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %20, align 4
  br label %169

101:                                              ; preds = %165, %161, %39
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %19, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %20, align 4
  br label %168

105:                                              ; preds = %44
  %106 = landingpad { ptr, i32 }
          cleanup
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %19, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %20, align 4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %22) #7
  br label %168

109:                                              ; preds = %72, %68, %63, %45
  %110 = landingpad { ptr, i32 }
          cleanup
  %111 = extractvalue { ptr, i32 } %110, 0
  store ptr %111, ptr %19, align 8
  %112 = extractvalue { ptr, i32 } %110, 1
  store i32 %112, ptr %20, align 4
  br label %167

113:                                              ; preds = %75
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %19, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %29) #7
  br label %167

117:                                              ; preds = %87, %57
  %118 = load i8, ptr %16, align 1, !tbaa !9, !range !13, !noundef !14
  %119 = trunc i8 %118 to i1
  br i1 %119, label %120, label %132

120:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 40, ptr %30) #7
  %121 = load ptr, ptr %9, align 8, !tbaa !5
  %122 = getelementptr inbounds %"class.imp::Polygon", ptr %121, i32 0, i32 1
  %123 = load i32, ptr %18, align 4, !tbaa !11
  %124 = sext i32 %123 to i64
  %125 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN3imp4PathESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %122, i64 noundef %124) #7
  invoke void @_ZNK3imp4Path4nextERKNS_4Vec3E(ptr dead_on_unwind writable sret(%"class.imp::Vec3") align 8 %30, ptr noundef nonnull align 8 dereferenceable(48) %125, ptr noundef nonnull align 8 dereferenceable(36) %17)
          to label %126 unwind label %128

126:                                              ; preds = %120
  %127 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Vec3aSEOS0_(ptr noundef nonnull align 8 dereferenceable(36) %17, ptr noundef nonnull align 8 dereferenceable(36) %30) #7
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %30) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %30) #7
  br label %160

128:                                              ; preds = %120
  %129 = landingpad { ptr, i32 }
          cleanup
  %130 = extractvalue { ptr, i32 } %129, 0
  store ptr %130, ptr %19, align 8
  %131 = extractvalue { ptr, i32 } %129, 1
  store i32 %131, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 40, ptr %30) #7
  br label %167

132:                                              ; preds = %117
  %133 = load i8, ptr %14, align 1, !tbaa !9, !range !13, !noundef !14
  %134 = trunc i8 %133 to i1
  br i1 %134, label %135, label %147

135:                                              ; preds = %132
  call void @llvm.lifetime.start.p0(i64 40, ptr %31) #7
  %136 = load ptr, ptr %10, align 8, !tbaa !5
  %137 = getelementptr inbounds %"class.imp::Polygon", ptr %136, i32 0, i32 1
  %138 = load i32, ptr %21, align 4, !tbaa !11
  %139 = sext i32 %138 to i64
  %140 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN3imp4PathESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %137, i64 noundef %139) #7
  invoke void @_ZNK3imp4Path8previousERKNS_4Vec3E(ptr dead_on_unwind writable sret(%"class.imp::Vec3") align 8 %31, ptr noundef nonnull align 8 dereferenceable(48) %140, ptr noundef nonnull align 8 dereferenceable(36) %17)
          to label %141 unwind label %143

141:                                              ; preds = %135
  %142 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Vec3aSEOS0_(ptr noundef nonnull align 8 dereferenceable(36) %17, ptr noundef nonnull align 8 dereferenceable(36) %31) #7
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %31) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %31) #7
  br label %159

143:                                              ; preds = %135
  %144 = landingpad { ptr, i32 }
          cleanup
  %145 = extractvalue { ptr, i32 } %144, 0
  store ptr %145, ptr %19, align 8
  %146 = extractvalue { ptr, i32 } %144, 1
  store i32 %146, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 40, ptr %31) #7
  br label %167

147:                                              ; preds = %132
  call void @llvm.lifetime.start.p0(i64 40, ptr %32) #7
  %148 = load ptr, ptr %10, align 8, !tbaa !5
  %149 = getelementptr inbounds %"class.imp::Polygon", ptr %148, i32 0, i32 1
  %150 = load i32, ptr %21, align 4, !tbaa !11
  %151 = sext i32 %150 to i64
  %152 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN3imp4PathESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %149, i64 noundef %151) #7
  invoke void @_ZNK3imp4Path4nextERKNS_4Vec3E(ptr dead_on_unwind writable sret(%"class.imp::Vec3") align 8 %32, ptr noundef nonnull align 8 dereferenceable(48) %152, ptr noundef nonnull align 8 dereferenceable(36) %17)
          to label %153 unwind label %155

153:                                              ; preds = %147
  %154 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Vec3aSEOS0_(ptr noundef nonnull align 8 dereferenceable(36) %17, ptr noundef nonnull align 8 dereferenceable(36) %32) #7
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %32) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %32) #7
  br label %159

155:                                              ; preds = %147
  %156 = landingpad { ptr, i32 }
          cleanup
  %157 = extractvalue { ptr, i32 } %156, 0
  store ptr %157, ptr %19, align 8
  %158 = extractvalue { ptr, i32 } %156, 1
  store i32 %158, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 40, ptr %32) #7
  br label %167

159:                                              ; preds = %153, %141
  br label %160

160:                                              ; preds = %159, %126
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  br label %161

161:                                              ; preds = %160
  %162 = load ptr, ptr %12, align 8, !tbaa !5
  %163 = invoke noundef zeroext i1 @_ZNK3imp3VecILi3EfEneERKS1_(ptr noundef nonnull align 8 dereferenceable(36) %17, ptr noundef nonnull align 8 dereferenceable(36) %162)
          to label %164 unwind label %101

164:                                              ; preds = %161
  br i1 %163, label %44, label %165, !llvm.loop !15

165:                                              ; preds = %164
  invoke void @_ZN3imp4PathC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %15)
          to label %166 unwind label %101

166:                                              ; preds = %165
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %17) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #7
  call void @_ZN3imp4PathD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %15) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %15) #7
  ret void

167:                                              ; preds = %155, %143, %128, %113, %109
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  br label %168

168:                                              ; preds = %167, %105, %101
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #7
  br label %169

169:                                              ; preds = %168, %97
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #7
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %17) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #7
  call void @_ZN3imp4PathD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %15) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr %15) #7
  br label %170

170:                                              ; preds = %169
  %171 = load ptr, ptr %19, align 8
  %172 = load i32, ptr %20, align 4
  %173 = insertvalue { ptr, i32 } poison, ptr %171, 0
  %174 = insertvalue { ptr, i32 } %173, i32 %172, 1
  resume { ptr, i32 } %174
}

declare void @_ZN3imp4PathC1Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #5

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

declare void @_ZN3imp4Path9addVertexENS_4Vec3E(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt4findIN9__gnu_cxx17__normal_iteratorIPN3imp4Vec3ESt6vectorIS3_SaIS3_EEEES3_ET_S9_S9_RKT0_(ptr, ptr, ptr noundef nonnull align 8 dereferenceable(36)) #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIN3imp4Vec3ESaIS1_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_cxxneIPN3imp4Vec3ESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #6

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Vec3aSEOS0_(ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 8 dereferenceable(36)) #6 align 2

declare void @_ZNK3imp4Path8previousERKNS_4Vec3E(ptr dead_on_unwind writable sret(%"class.imp::Vec3") align 8, ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(36)) #5

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #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 = { "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 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 #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 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}


; 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::Vec3" = type { %"class.imp::Vec.base", [4 x i8] }
%"class.imp::Vec.base" = type <{ %"class.imp::Object", [3 x float] }>
%"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.imp::Path" = type { %"class.imp::Object", %"class.std::vector.0" }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = 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.7" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.8" = type { ptr }

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN3imp13findCompositeERKNS_4Vec3ERKNS_7PolygonE(ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3imp8isEnter2ERKNS_4Vec3ERKNS_4PathES5_(ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #4

declare void @_ZNK3imp4Path4nextERKNS_4Vec3E(ptr dead_on_unwind writable sret(%"class.imp::Vec3") align 8, ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(36)) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3imp11pathFinder2ERKNS_7PolygonES2_RSt6vectorINS_4Vec3ESaIS4_EERKS4_bb(ptr dead_on_unwind noalias writable sret(%"class.imp::Path") align 8 %0, ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(36) %4, i1 noundef zeroext %5, i1 noundef zeroext %6) local_unnamed_addr #4 personality ptr @__gxx_personality_v0 {
  %8 = alloca %"class.imp::Path", align 8
  %9 = alloca %"class.imp::Vec3", align 8
  %10 = alloca %"class.imp::Vec3", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator.7", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator.7", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator.8", align 8
  %14 = alloca %"class.imp::Vec3", align 8
  %15 = alloca %"class.imp::Vec3", align 8
  %16 = alloca %"class.imp::Vec3", align 8
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %8) #7
  call void @_ZN3imp4PathC1Ev(ptr noundef nonnull align 8 dereferenceable(48) %8)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %9) #7
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %9, ptr noundef nonnull align 8 dereferenceable(36) %4) #7
  %17 = invoke noundef i32 @_ZN3imp13findCompositeERKNS_4Vec3ERKNS_7PolygonE(ptr noundef nonnull align 8 dereferenceable(36) %4, ptr noundef nonnull align 8 dereferenceable(48) %1)
          to label %18 unwind label %45

18:                                               ; preds = %7
  %19 = invoke noundef i32 @_ZN3imp13findCompositeERKNS_4Vec3ERKNS_7PolygonE(ptr noundef nonnull align 8 dereferenceable(36) %4, ptr noundef nonnull align 8 dereferenceable(48) %2)
          to label %.preheader unwind label %47

.preheader:                                       ; preds = %18
  %20 = getelementptr inbounds i8, ptr %1, i64 24
  %21 = getelementptr inbounds i8, ptr %2, i64 24
  br label %22

22:                                               ; preds = %.preheader, %77
  %.036 = phi i32 [ %.13743, %77 ], [ %19, %.preheader ]
  %.029 = phi i32 [ %.13046, %77 ], [ %17, %.preheader ]
  %.0 = phi i1 [ %.148, %77 ], [ false, %.preheader ]
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %10, ptr noundef nonnull align 8 dereferenceable(36) %9) #7
  invoke void @_ZN3imp4Path9addVertexENS_4Vec3E(ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull %10)
          to label %23 unwind label %49

23:                                               ; preds = %22
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %10) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #7
  %24 = call ptr @_ZNSt6vectorIN3imp4Vec3ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  %25 = call ptr @_ZNSt6vectorIN3imp4Vec3ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  %26 = invoke ptr @_ZSt4findIN9__gnu_cxx17__normal_iteratorIPN3imp4Vec3ESt6vectorIS3_SaIS3_EEEES3_ET_S9_S9_RKT0_(ptr %24, ptr %25, ptr noundef nonnull align 8 dereferenceable(36) %9)
          to label %27 unwind label %51

27:                                               ; preds = %23
  store ptr %26, ptr %11, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #7
  %28 = call ptr @_ZNSt6vectorIN3imp4Vec3ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  store ptr %28, ptr %12, align 8
  %29 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN3imp4Vec3ESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #7
  br i1 %29, label %30, label %55

30:                                               ; preds = %27
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKN3imp4Vec3ESt6vectorIS2_SaIS2_EEEC2IPS2_vEERKNS0_IT_S7_EE(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  %31 = load ptr, ptr %13, align 8
  %32 = invoke ptr @_ZNSt6vectorIN3imp4Vec3ESaIS1_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS1_S3_EE(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr %31)
          to label %33 unwind label %51

33:                                               ; preds = %30
  %34 = invoke noundef i32 @_ZN3imp13findCompositeERKNS_4Vec3ERKNS_7PolygonE(ptr noundef nonnull align 8 dereferenceable(36) %9, ptr noundef nonnull align 8 dereferenceable(48) %1)
          to label %35 unwind label %51

35:                                               ; preds = %33
  %36 = invoke noundef i32 @_ZN3imp13findCompositeERKNS_4Vec3ERKNS_7PolygonE(ptr noundef nonnull align 8 dereferenceable(36) %9, ptr noundef nonnull align 8 dereferenceable(48) %2)
          to label %37 unwind label %51

37:                                               ; preds = %35
  %38 = sext i32 %34 to i64
  %39 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN3imp4PathESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %38) #7
  %40 = sext i32 %36 to i64
  %41 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN3imp4PathESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %40) #7
  %42 = invoke noundef zeroext i1 @_ZN3imp8isEnter2ERKNS_4Vec3ERKNS_4PathES5_(ptr noundef nonnull align 8 dereferenceable(36) %9, ptr noundef nonnull align 8 dereferenceable(48) %39, ptr noundef nonnull align 8 dereferenceable(48) %41)
          to label %43 unwind label %53

43:                                               ; preds = %37
  %44 = xor i1 %42, %5
  br i1 %44, label %56, label %63

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

47:                                               ; preds = %79, %18
  %48 = landingpad { ptr, i32 }
          cleanup
  br label %82

49:                                               ; preds = %22
  %50 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %10) #7
  br label %82

51:                                               ; preds = %35, %33, %30, %23
  %52 = landingpad { ptr, i32 }
          cleanup
  br label %81

53:                                               ; preds = %37
  %54 = landingpad { ptr, i32 }
          cleanup
  br label %81

55:                                               ; preds = %27
  br i1 %.0, label %56, label %63

56:                                               ; preds = %43, %55
  %.13045 = phi i32 [ %34, %43 ], [ %.029, %55 ]
  %.13744 = phi i32 [ %36, %43 ], [ %.036, %55 ]
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %14) #7
  %57 = sext i32 %.13045 to i64
  %58 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN3imp4PathESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef %57) #7
  invoke void @_ZNK3imp4Path4nextERKNS_4Vec3E(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec3") align 8 %14, ptr noundef nonnull align 8 dereferenceable(48) %58, ptr noundef nonnull align 8 dereferenceable(36) %9)
          to label %59 unwind label %61

59:                                               ; preds = %56
  %60 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Vec3aSEOS0_(ptr noundef nonnull align 8 dereferenceable(36) %9, ptr noundef nonnull align 8 dereferenceable(36) %14) #7
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %14) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %14) #7
  br label %77

61:                                               ; preds = %56
  %62 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %14) #7
  br label %81

63:                                               ; preds = %43, %55
  %.13047 = phi i32 [ %34, %43 ], [ %.029, %55 ]
  %.13742 = phi i32 [ %36, %43 ], [ %.036, %55 ]
  %64 = sext i32 %.13742 to i64
  br i1 %6, label %65, label %71

65:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %15) #7
  %66 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN3imp4PathESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %64) #7
  invoke void @_ZNK3imp4Path8previousERKNS_4Vec3E(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec3") align 8 %15, ptr noundef nonnull align 8 dereferenceable(48) %66, ptr noundef nonnull align 8 dereferenceable(36) %9)
          to label %67 unwind label %69

67:                                               ; preds = %65
  %68 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Vec3aSEOS0_(ptr noundef nonnull align 8 dereferenceable(36) %9, ptr noundef nonnull align 8 dereferenceable(36) %15) #7
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %15) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %15) #7
  br label %77

69:                                               ; preds = %65
  %70 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %15) #7
  br label %81

71:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %16) #7
  %72 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZNKSt6vectorIN3imp4PathESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %64) #7
  invoke void @_ZNK3imp4Path4nextERKNS_4Vec3E(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec3") align 8 %16, ptr noundef nonnull align 8 dereferenceable(48) %72, ptr noundef nonnull align 8 dereferenceable(36) %9)
          to label %73 unwind label %75

73:                                               ; preds = %71
  %74 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Vec3aSEOS0_(ptr noundef nonnull align 8 dereferenceable(36) %9, ptr noundef nonnull align 8 dereferenceable(36) %16) #7
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %16) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %16) #7
  br label %77

75:                                               ; preds = %71
  %76 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %16) #7
  br label %81

77:                                               ; preds = %67, %73, %59
  %.148 = phi i1 [ false, %67 ], [ false, %73 ], [ true, %59 ]
  %.13046 = phi i32 [ %.13047, %67 ], [ %.13047, %73 ], [ %.13045, %59 ]
  %.13743 = phi i32 [ %.13742, %67 ], [ %.13742, %73 ], [ %.13744, %59 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  %78 = call noundef zeroext i1 @_ZNK3imp3VecILi3EfEneERKS1_(ptr noundef nonnull align 8 dereferenceable(36) %9, ptr noundef nonnull align 8 dereferenceable(36) %4)
  br i1 %78, label %22, label %79, !llvm.loop !5

79:                                               ; preds = %77
  invoke void @_ZN3imp4PathC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %8)
          to label %80 unwind label %47

80:                                               ; preds = %79
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %9) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #7
  call void @_ZN3imp4PathD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %8) #7
  ret void

81:                                               ; preds = %75, %69, %61, %53, %51
  %.pn = phi { ptr, i32 } [ %62, %61 ], [ %70, %69 ], [ %76, %75 ], [ %54, %53 ], [ %52, %51 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  br label %82

82:                                               ; preds = %47, %49, %81, %45
  %.pn39.pn = phi { ptr, i32 } [ %46, %45 ], [ %48, %47 ], [ %.pn, %81 ], [ %50, %49 ]
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %9) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #7
  call void @_ZN3imp4PathD1Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %8) #7
  resume { ptr, i32 } %.pn39.pn
}

declare void @_ZN3imp4PathC1Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #5

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

declare void @_ZN3imp4Path9addVertexENS_4Vec3E(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt4findIN9__gnu_cxx17__normal_iteratorIPN3imp4Vec3ESt6vectorIS3_SaIS3_EEEES3_ET_S9_S9_RKT0_(ptr, ptr, ptr noundef nonnull align 8 dereferenceable(36)) local_unnamed_addr #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt6vectorIN3imp4Vec3ESaIS1_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_cxxneIPN3imp4Vec3ESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #6

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Vec3aSEOS0_(ptr noundef nonnull align 8 dereferenceable(36), ptr noundef nonnull align 8 dereferenceable(36)) local_unnamed_addr #6 align 2

declare void @_ZNK3imp4Path8previousERKNS_4Vec3E(ptr dead_on_unwind writable sret(%"class.imp::Vec3") align 8, ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(36)) local_unnamed_addr #5

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #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 = { "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 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 #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"}


; Effective O3 passes: AggressiveInstCombinePass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopSimplifyPass,ReassociatePass,SROAPass,SimplifyCFGPass