; LLVM IR from Lut1n/ImpGears :: src/ImpGears/Geometry/Path.ll (ZN3imp4Path15extractTriangleEv)

; 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.std::vector.4" = type { %"struct.std::_Vector_base.5" }
%"struct.std::_Vector_base.5" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.imp::Path" = 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::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.std::map.13" = type { %"class.std::_Rb_tree.14" }
%"class.std::_Rb_tree.14" = type { %"struct.std::_Rb_tree<float, std::pair<const float, int>, std::_Select1st<std::pair<const float, int>>, std::less<float>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<float, std::pair<const float, int>, std::_Select1st<std::pair<const float, int>>, std::less<float>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.imp::Edge" = type { %"class.imp::Object", %"class.imp::Vec3", %"class.imp::Vec3" }
%"struct.std::_Rb_tree_iterator.18" = type { ptr }
%"class.std::initializer_list" = type { ptr, i64 }
%"class.std::allocator.0" = type { i8 }
%"class.std::initializer_list.21" = type { ptr, i64 }
%"class.std::allocator.6" = type { i8 }
%"struct.std::pair.19" = type { float, i32 }

@_ZN3imp4Vec31ZE = external global %"class.imp::Vec3", align 8

; 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

; 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 #1 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Path6vertexEi(ptr noundef nonnull align 8 dereferenceable(48), i32 noundef) #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) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3imp4Path3tanEi(ptr dead_on_unwind noalias writable sret(%"class.imp::Vec3") align 8, ptr noundef nonnull align 8 dereferenceable(48), i32 noundef) #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3imp4Path7degreesEv(ptr dead_on_unwind noalias writable sret(%"class.std::vector.4") align 8, ptr noundef nonnull align 8 dereferenceable(48)) #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZN3imp4Vec39angleFromES0_S0_(ptr noundef nonnull align 8 dereferenceable(36), ptr noundef, ptr noundef) #3 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3imp4Path15extractTriangleEv(ptr dead_on_unwind noalias writable sret(%"class.imp::Path") align 8 %0, ptr noundef nonnull align 8 dereferenceable(48) %1) #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.imp::Vec3", align 8
  %6 = alloca %"class.std::vector.4", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::map.13", align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i8, align 1
  %16 = alloca %"class.imp::Edge", align 8
  %17 = alloca %"class.imp::Vec3", align 8
  %18 = alloca float, align 4
  %19 = alloca %"class.imp::Vec3", align 8
  %20 = alloca %"class.imp::Vec3", align 8
  %21 = alloca %"class.imp::Vec3", align 8
  %22 = alloca i32, align 4
  %23 = alloca %"struct.std::_Rb_tree_iterator.18", align 8
  %24 = alloca %"class.std::vector", align 8
  %25 = alloca %"class.std::initializer_list", align 8
  %26 = alloca [3 x %"class.imp::Vec3"], align 8
  %27 = alloca ptr, align 8
  %28 = alloca %"class.std::allocator.0", align 1
  %29 = alloca %"class.std::vector.4", align 8
  %30 = alloca %"class.std::initializer_list.21", align 8
  %31 = alloca [3 x i32], align 4
  %32 = alloca %"class.std::allocator.6", align 1
  %33 = alloca %"class.std::vector.4", align 8
  %34 = alloca %"class.std::initializer_list.21", align 8
  %35 = alloca [1 x i32], align 4
  %36 = alloca %"class.std::allocator.6", align 1
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  %37 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 40, ptr %5) #4
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %5, ptr noundef nonnull align 8 dereferenceable(36) @_ZN3imp4Vec31ZE) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #4
  invoke void @_ZNK3imp4Path7degreesEv(ptr dead_on_unwind writable sret(%"class.std::vector.4") align 8 %6, ptr noundef nonnull align 8 dereferenceable(48) %37)
          to label %38 unwind label %44

38:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 48, ptr %9) #4
  call void @_ZNSt3mapIfiSt4lessIfESaISt4pairIKfiEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %9) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %39

39:                                               ; preds = %114, %38
  %40 = load i32, ptr %10, align 4, !tbaa !9
  %41 = call noundef i32 @_ZNK3imp4Path5countEv(ptr noundef nonnull align 8 dereferenceable(48) %37)
  %42 = icmp slt i32 %40, %41
  br i1 %42, label %48, label %43

43:                                               ; preds = %39
  store i32 2, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %141

44:                                               ; preds = %2
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %7, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %8, align 4
  br label %256

48:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #4
  %49 = load i32, ptr %10, align 4, !tbaa !9
  %50 = sub nsw i32 %49, 2
  %51 = invoke noundef i32 @_ZNK3imp4Path10cycleIndexEi(ptr noundef nonnull align 8 dereferenceable(48) %37, i32 noundef %50)
          to label %52 unwind label %69

52:                                               ; preds = %48
  store i32 %51, ptr %12, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  %53 = load i32, ptr %10, align 4, !tbaa !9
  %54 = sub nsw i32 %53, 1
  %55 = invoke noundef i32 @_ZNK3imp4Path10cycleIndexEi(ptr noundef nonnull align 8 dereferenceable(48) %37, i32 noundef %54)
          to label %56 unwind label %73

56:                                               ; preds = %52
  store i32 %55, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  %57 = load i32, ptr %10, align 4, !tbaa !9
  %58 = invoke noundef i32 @_ZNK3imp4Path10cycleIndexEi(ptr noundef nonnull align 8 dereferenceable(48) %37, i32 noundef %57)
          to label %59 unwind label %77

59:                                               ; preds = %56
  store i32 %58, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #4
  %60 = load i32, ptr %13, align 4, !tbaa !9
  %61 = sext i32 %60 to i64
  %62 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %61) #4
  %63 = load i32, ptr %62, align 4, !tbaa !9
  %64 = icmp sgt i32 %63, 2
  %65 = zext i1 %64 to i8
  store i8 %65, ptr %15, align 1, !tbaa !11
  %66 = load i8, ptr %15, align 1, !tbaa !11, !range !13, !noundef !14
  %67 = trunc i8 %66 to i1
  br i1 %67, label %68, label %81

68:                                               ; preds = %59
  store i32 4, ptr %11, align 4
  br label %111

69:                                               ; preds = %48
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %7, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %8, align 4
  br label %140

73:                                               ; preds = %52
  %74 = landingpad { ptr, i32 }
          cleanup
  %75 = extractvalue { ptr, i32 } %74, 0
  store ptr %75, ptr %7, align 8
  %76 = extractvalue { ptr, i32 } %74, 1
  store i32 %76, ptr %8, align 4
  br label %139

77:                                               ; preds = %56
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %7, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %8, align 4
  br label %138

81:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 104, ptr %16) #4
  %82 = load i32, ptr %12, align 4, !tbaa !9
  %83 = invoke noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Path6vertexEi(ptr noundef nonnull align 8 dereferenceable(48) %37, i32 noundef %82)
          to label %84 unwind label %92

84:                                               ; preds = %81
  %85 = load i32, ptr %14, align 4, !tbaa !9
  %86 = invoke noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Path6vertexEi(ptr noundef nonnull align 8 dereferenceable(48) %37, i32 noundef %85)
          to label %87 unwind label %92

87:                                               ; preds = %84
  invoke void @_ZN3imp4EdgeC1ERKNS_4Vec3ES3_(ptr noundef nonnull align 8 dereferenceable(104) %16, ptr noundef nonnull align 8 dereferenceable(36) %83, ptr noundef nonnull align 8 dereferenceable(36) %86)
          to label %88 unwind label %92

88:                                               ; preds = %87
  %89 = invoke noundef zeroext i1 @_ZN3imp12Intersection10isCrossingERKNS_4PathERKNS_4EdgeEb(ptr noundef nonnull align 8 dereferenceable(48) %37, ptr noundef nonnull align 8 dereferenceable(104) %16, i1 noundef zeroext true)
          to label %90 unwind label %96

90:                                               ; preds = %88
  br i1 %89, label %91, label %100

91:                                               ; preds = %90
  store i32 4, ptr %11, align 4
  br label %110

92:                                               ; preds = %87, %84, %81
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %7, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %8, align 4
  br label %137

96:                                               ; preds = %88
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %7, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %8, align 4
  br label %136

100:                                              ; preds = %90
  call void @llvm.lifetime.start.p0(i64 40, ptr %17) #4
  %101 = load i32, ptr %13, align 4, !tbaa !9
  invoke void @_ZNK3imp4Path3tanEi(ptr dead_on_unwind writable sret(%"class.imp::Vec3") align 8 %17, ptr noundef nonnull align 8 dereferenceable(48) %37, i32 noundef %101)
          to label %102 unwind label %117

102:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr %19) #4
  %103 = load i32, ptr %14, align 4, !tbaa !9
  invoke void @_ZNK3imp4Path3tanEi(ptr dead_on_unwind writable sret(%"class.imp::Vec3") align 8 %19, ptr noundef nonnull align 8 dereferenceable(48) %37, i32 noundef %103)
          to label %104 unwind label %121

104:                                              ; preds = %102
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %20, ptr noundef nonnull align 8 dereferenceable(36) %17) #4
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %21, ptr noundef nonnull align 8 dereferenceable(36) %5) #4
  %105 = invoke noundef float @_ZN3imp4Vec39angleFromES0_S0_(ptr noundef nonnull align 8 dereferenceable(36) %19, ptr noundef %20, ptr noundef %21)
          to label %106 unwind label %125

106:                                              ; preds = %104
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %21) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %20) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %19) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %19) #4
  store float %105, ptr %18, align 4, !tbaa !15
  %107 = load i32, ptr %14, align 4, !tbaa !9
  %108 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIfiSt4lessIfESaISt4pairIKfiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %9, ptr noundef nonnull align 4 dereferenceable(4) %18)
          to label %109 unwind label %130

109:                                              ; preds = %106
  store i32 %107, ptr %108, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %17) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %17) #4
  store i32 0, ptr %11, align 4
  br label %110

110:                                              ; preds = %109, %91
  call void @_ZN3imp4EdgeD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %16) #4
  call void @llvm.lifetime.end.p0(i64 104, ptr %16) #4
  br label %111

111:                                              ; preds = %110, %68
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  %112 = load i32, ptr %11, align 4
  switch i32 %112, label %262 [
    i32 0, label %113
    i32 4, label %114
  ]

113:                                              ; preds = %111
  br label %114

114:                                              ; preds = %113, %111
  %115 = load i32, ptr %10, align 4, !tbaa !9
  %116 = add nsw i32 %115, 1
  store i32 %116, ptr %10, align 4, !tbaa !9
  br label %39, !llvm.loop !17

117:                                              ; preds = %100
  %118 = landingpad { ptr, i32 }
          cleanup
  %119 = extractvalue { ptr, i32 } %118, 0
  store ptr %119, ptr %7, align 8
  %120 = extractvalue { ptr, i32 } %118, 1
  store i32 %120, ptr %8, align 4
  br label %135

121:                                              ; preds = %102
  %122 = landingpad { ptr, i32 }
          cleanup
  %123 = extractvalue { ptr, i32 } %122, 0
  store ptr %123, ptr %7, align 8
  %124 = extractvalue { ptr, i32 } %122, 1
  store i32 %124, ptr %8, align 4
  br label %129

125:                                              ; preds = %104
  %126 = landingpad { ptr, i32 }
          cleanup
  %127 = extractvalue { ptr, i32 } %126, 0
  store ptr %127, ptr %7, align 8
  %128 = extractvalue { ptr, i32 } %126, 1
  store i32 %128, ptr %8, align 4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %21) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %20) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %19) #4
  br label %129

129:                                              ; preds = %125, %121
  call void @llvm.lifetime.end.p0(i64 40, ptr %19) #4
  br label %134

130:                                              ; preds = %106
  %131 = landingpad { ptr, i32 }
          cleanup
  %132 = extractvalue { ptr, i32 } %131, 0
  store ptr %132, ptr %7, align 8
  %133 = extractvalue { ptr, i32 } %131, 1
  store i32 %133, ptr %8, align 4
  br label %134

134:                                              ; preds = %130, %129
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %17) #4
  br label %135

135:                                              ; preds = %134, %117
  call void @llvm.lifetime.end.p0(i64 40, ptr %17) #4
  br label %136

136:                                              ; preds = %135, %96
  call void @_ZN3imp4EdgeD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %16) #4
  br label %137

137:                                              ; preds = %136, %92
  call void @llvm.lifetime.end.p0(i64 104, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #4
  br label %138

138:                                              ; preds = %137, %77
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  br label %139

139:                                              ; preds = %138, %73
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %140

140:                                              ; preds = %139, %69
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  br label %255

141:                                              ; preds = %43
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  %142 = call ptr @_ZNSt3mapIfiSt4lessIfESaISt4pairIKfiEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %9) #4
  %143 = getelementptr inbounds %"struct.std::_Rb_tree_iterator.18", ptr %23, i32 0, i32 0
  store ptr %142, ptr %143, align 8
  %144 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKfiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #4
  %145 = getelementptr inbounds %"struct.std::pair.19", ptr %144, i32 0, i32 1
  %146 = load i32, ptr %145, align 4, !tbaa !19
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  store i32 %146, ptr %22, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %24) #4
  call void @llvm.lifetime.start.p0(i64 120, ptr %26) #4
  store ptr %26, ptr %27, align 8
  %147 = load i32, ptr %22, align 4, !tbaa !9
  %148 = invoke noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Path6vertexEi(ptr noundef nonnull align 8 dereferenceable(48) %37, i32 noundef %147)
          to label %149 unwind label %195

149:                                              ; preds = %141
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %26, ptr noundef nonnull align 8 dereferenceable(36) %148) #4
  %150 = getelementptr inbounds %"class.imp::Vec3", ptr %26, i64 1
  store ptr %150, ptr %27, align 8
  %151 = load i32, ptr %22, align 4, !tbaa !9
  %152 = sub nsw i32 %151, 1
  %153 = invoke noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Path6vertexEi(ptr noundef nonnull align 8 dereferenceable(48) %37, i32 noundef %152)
          to label %154 unwind label %195

154:                                              ; preds = %149
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %150, ptr noundef nonnull align 8 dereferenceable(36) %153) #4
  %155 = getelementptr inbounds %"class.imp::Vec3", ptr %26, i64 2
  store ptr %155, ptr %27, align 8
  %156 = load i32, ptr %22, align 4, !tbaa !9
  %157 = sub nsw i32 %156, 2
  %158 = invoke noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Path6vertexEi(ptr noundef nonnull align 8 dereferenceable(48) %37, i32 noundef %157)
          to label %159 unwind label %195

159:                                              ; preds = %154
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %155, ptr noundef nonnull align 8 dereferenceable(36) %158) #4
  %160 = getelementptr inbounds %"class.std::initializer_list", ptr %25, i32 0, i32 0
  store ptr %26, ptr %160, align 8, !tbaa !21
  %161 = getelementptr inbounds %"class.std::initializer_list", ptr %25, i32 0, i32 1
  store i64 3, ptr %161, align 8, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 1, ptr %28) #4
  call void @_ZNSaIN3imp4Vec3EEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #4
  %162 = getelementptr inbounds { ptr, i64 }, ptr %25, i32 0, i32 0
  %163 = load ptr, ptr %162, align 8
  %164 = getelementptr inbounds { ptr, i64 }, ptr %25, i32 0, i32 1
  %165 = load i64, ptr %164, align 8
  invoke void @_ZNSt6vectorIN3imp4Vec3ESaIS1_EEC2ESt16initializer_listIS1_ERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %24, ptr %163, i64 %165, ptr noundef nonnull align 1 dereferenceable(1) %28)
          to label %166 unwind label %206

166:                                              ; preds = %159
  call void @_ZNSt15__new_allocatorIN3imp4Vec3EED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #4
  %167 = getelementptr inbounds [3 x %"class.imp::Vec3"], ptr %26, i32 0, i32 0
  %168 = getelementptr inbounds %"class.imp::Vec3", ptr %167, i64 3
  br label %169

169:                                              ; preds = %169, %166
  %170 = phi ptr [ %168, %166 ], [ %171, %169 ]
  %171 = getelementptr inbounds %"class.imp::Vec3", ptr %170, i64 -1
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %171) #4
  %172 = icmp eq ptr %171, %167
  br i1 %172, label %173, label %169

173:                                              ; preds = %169
  call void @llvm.lifetime.end.p0(i64 120, ptr %26) #4
  %174 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZNSt6vectorIN3imp4Vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %24, i64 noundef 0) #4
  %175 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZNSt6vectorIN3imp4Vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %24, i64 noundef 1) #4
  %176 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZNSt6vectorIN3imp4Vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %24, i64 noundef 2) #4
  %177 = invoke noundef zeroext i1 @_ZNK3imp4Path12areConnectedERKNS_4Vec3ES3_S3_(ptr noundef nonnull align 8 dereferenceable(48) %37, ptr noundef nonnull align 8 dereferenceable(36) %174, ptr noundef nonnull align 8 dereferenceable(36) %175, ptr noundef nonnull align 8 dereferenceable(36) %176)
          to label %178 unwind label %218

178:                                              ; preds = %173
  br i1 %177, label %179, label %231

179:                                              ; preds = %178
  call void @llvm.lifetime.start.p0(i64 12, ptr %31) #4
  %180 = load i32, ptr %22, align 4, !tbaa !9
  store i32 %180, ptr %31, align 4, !tbaa !9
  %181 = getelementptr inbounds i32, ptr %31, i64 1
  %182 = load i32, ptr %22, align 4, !tbaa !9
  %183 = sub nsw i32 %182, 1
  store i32 %183, ptr %181, align 4, !tbaa !9
  %184 = getelementptr inbounds i32, ptr %31, i64 2
  %185 = load i32, ptr %22, align 4, !tbaa !9
  %186 = sub nsw i32 %185, 2
  store i32 %186, ptr %184, align 4, !tbaa !9
  %187 = getelementptr inbounds %"class.std::initializer_list.21", ptr %30, i32 0, i32 0
  store ptr %31, ptr %187, align 8, !tbaa !25
  %188 = getelementptr inbounds %"class.std::initializer_list.21", ptr %30, i32 0, i32 1
  store i64 3, ptr %188, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 1, ptr %32) #4
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %32) #4
  %189 = getelementptr inbounds { ptr, i64 }, ptr %30, i32 0, i32 0
  %190 = load ptr, ptr %189, align 8
  %191 = getelementptr inbounds { ptr, i64 }, ptr %30, i32 0, i32 1
  %192 = load i64, ptr %191, align 8
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %29, ptr %190, i64 %192, ptr noundef nonnull align 1 dereferenceable(1) %32)
          to label %193 unwind label %222

193:                                              ; preds = %179
  invoke void @_ZN3imp4Path5eraseESt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(48) %37, ptr noundef %29)
          to label %194 unwind label %226

194:                                              ; preds = %193
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %29) #4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %32) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %32) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr %31) #4
  br label %251

195:                                              ; preds = %154, %149, %141
  %196 = landingpad { ptr, i32 }
          cleanup
  %197 = extractvalue { ptr, i32 } %196, 0
  store ptr %197, ptr %7, align 8
  %198 = extractvalue { ptr, i32 } %196, 1
  store i32 %198, ptr %8, align 4
  %199 = load ptr, ptr %27, align 8
  %200 = icmp eq ptr %26, %199
  br i1 %200, label %205, label %201

201:                                              ; preds = %201, %195
  %202 = phi ptr [ %199, %195 ], [ %203, %201 ]
  %203 = getelementptr inbounds %"class.imp::Vec3", ptr %202, i64 -1
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %203) #4
  %204 = icmp eq ptr %203, %26
  br i1 %204, label %205, label %201

205:                                              ; preds = %201, %195
  br label %217

206:                                              ; preds = %159
  %207 = landingpad { ptr, i32 }
          cleanup
  %208 = extractvalue { ptr, i32 } %207, 0
  store ptr %208, ptr %7, align 8
  %209 = extractvalue { ptr, i32 } %207, 1
  store i32 %209, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIN3imp4Vec3EED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %28) #4
  %210 = getelementptr inbounds [3 x %"class.imp::Vec3"], ptr %26, i32 0, i32 0
  %211 = getelementptr inbounds %"class.imp::Vec3", ptr %210, i64 3
  br label %212

212:                                              ; preds = %212, %206
  %213 = phi ptr [ %211, %206 ], [ %214, %212 ]
  %214 = getelementptr inbounds %"class.imp::Vec3", ptr %213, i64 -1
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %214) #4
  %215 = icmp eq ptr %214, %210
  br i1 %215, label %216, label %212

216:                                              ; preds = %212
  br label %217

217:                                              ; preds = %216, %205
  call void @llvm.lifetime.end.p0(i64 120, ptr %26) #4
  br label %254

218:                                              ; preds = %251, %173
  %219 = landingpad { ptr, i32 }
          cleanup
  %220 = extractvalue { ptr, i32 } %219, 0
  store ptr %220, ptr %7, align 8
  %221 = extractvalue { ptr, i32 } %219, 1
  store i32 %221, ptr %8, align 4
  br label %253

222:                                              ; preds = %179
  %223 = landingpad { ptr, i32 }
          cleanup
  %224 = extractvalue { ptr, i32 } %223, 0
  store ptr %224, ptr %7, align 8
  %225 = extractvalue { ptr, i32 } %223, 1
  store i32 %225, ptr %8, align 4
  br label %230

226:                                              ; preds = %193
  %227 = landingpad { ptr, i32 }
          cleanup
  %228 = extractvalue { ptr, i32 } %227, 0
  store ptr %228, ptr %7, align 8
  %229 = extractvalue { ptr, i32 } %227, 1
  store i32 %229, ptr %8, align 4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %29) #4
  br label %230

230:                                              ; preds = %226, %222
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %32) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %32) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr %31) #4
  br label %253

231:                                              ; preds = %178
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #4
  %232 = load i32, ptr %22, align 4, !tbaa !9
  %233 = sub nsw i32 %232, 1
  store i32 %233, ptr %35, align 4, !tbaa !9
  %234 = getelementptr inbounds %"class.std::initializer_list.21", ptr %34, i32 0, i32 0
  store ptr %35, ptr %234, align 8, !tbaa !25
  %235 = getelementptr inbounds %"class.std::initializer_list.21", ptr %34, i32 0, i32 1
  store i64 1, ptr %235, align 8, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 1, ptr %36) #4
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %36) #4
  %236 = getelementptr inbounds { ptr, i64 }, ptr %34, i32 0, i32 0
  %237 = load ptr, ptr %236, align 8
  %238 = getelementptr inbounds { ptr, i64 }, ptr %34, i32 0, i32 1
  %239 = load i64, ptr %238, align 8
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %33, ptr %237, i64 %239, ptr noundef nonnull align 1 dereferenceable(1) %36)
          to label %240 unwind label %242

240:                                              ; preds = %231
  invoke void @_ZN3imp4Path5eraseESt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(48) %37, ptr noundef %33)
          to label %241 unwind label %246

241:                                              ; preds = %240
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %33) #4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %36) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %36) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #4
  br label %251

242:                                              ; preds = %231
  %243 = landingpad { ptr, i32 }
          cleanup
  %244 = extractvalue { ptr, i32 } %243, 0
  store ptr %244, ptr %7, align 8
  %245 = extractvalue { ptr, i32 } %243, 1
  store i32 %245, ptr %8, align 4
  br label %250

246:                                              ; preds = %240
  %247 = landingpad { ptr, i32 }
          cleanup
  %248 = extractvalue { ptr, i32 } %247, 0
  store ptr %248, ptr %7, align 8
  %249 = extractvalue { ptr, i32 } %247, 1
  store i32 %249, ptr %8, align 4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %33) #4
  br label %250

250:                                              ; preds = %246, %242
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %36) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %36) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #4
  br label %253

251:                                              ; preds = %241, %194
  invoke void @_ZN3imp4PathC1ERKSt6vectorINS_4Vec3ESaIS2_EE(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(24) %24)
          to label %252 unwind label %218

252:                                              ; preds = %251
  store i32 1, ptr %11, align 4
  call void @_ZNSt6vectorIN3imp4Vec3ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %24) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  call void @_ZNSt3mapIfiSt4lessIfESaISt4pairIKfiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %9) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr %9) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %5) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %5) #4
  ret void

253:                                              ; preds = %250, %230, %218
  call void @_ZNSt6vectorIN3imp4Vec3ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %24) #4
  br label %254

254:                                              ; preds = %253, %217
  call void @llvm.lifetime.end.p0(i64 24, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  br label %255

255:                                              ; preds = %254, %140
  call void @_ZNSt3mapIfiSt4lessIfESaISt4pairIKfiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %9) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr %9) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  br label %256

256:                                              ; preds = %255, %44
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %5) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr %5) #4
  br label %257

257:                                              ; preds = %256
  %258 = load ptr, ptr %7, align 8
  %259 = load i32, ptr %8, align 4
  %260 = insertvalue { ptr, i32 } poison, ptr %258, 0
  %261 = insertvalue { ptr, i32 } %260, i32 %259, 1
  resume { ptr, i32 } %261

262:                                              ; preds = %111
  unreachable
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3imp12Intersection10isCrossingERKNS_4PathERKNS_4EdgeEb(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(104), i1 noundef zeroext) #3 align 2

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

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

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

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

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

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

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

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

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

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

declare void @_ZN3imp4EdgeC1ERKNS_4Vec3ES3_(ptr, ptr, ptr)

declare void @_ZN3imp4PathC1ERKSt6vectorINS_4Vec3ESaIS2_EE(ptr, ptr)

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { 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 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!16, !16, i64 0}
!16 = !{!"float", !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = !{!20, !10, i64 4}
!20 = !{!"_ZTSSt4pairIKfiE", !16, i64 0, !10, i64 4}
!21 = !{!22, !6, i64 0}
!22 = !{!"_ZTSSt16initializer_listIN3imp4Vec3EE", !6, i64 0, !23, i64 8}
!23 = !{!"long", !7, i64 0}
!24 = !{!22, !23, i64 8}
!25 = !{!26, !6, i64 0}
!26 = !{!"_ZTSSt16initializer_listIiE", !6, i64 0, !23, i64 8}
!27 = !{!26, !23, i64 8}


; 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.std::vector.4" = type { %"struct.std::_Vector_base.5" }
%"struct.std::_Vector_base.5" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.imp::Path" = 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::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.std::map.13" = type { %"class.std::_Rb_tree.14" }
%"class.std::_Rb_tree.14" = type { %"struct.std::_Rb_tree<float, std::pair<const float, int>, std::_Select1st<std::pair<const float, int>>, std::less<float>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<float, std::pair<const float, int>, std::_Select1st<std::pair<const float, int>>, std::less<float>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.imp::Edge" = type { %"class.imp::Object", %"class.imp::Vec3", %"class.imp::Vec3" }
%"struct.std::_Rb_tree_iterator.18" = type { ptr }
%"class.std::allocator.0" = type { i8 }
%"class.std::allocator.6" = type { i8 }

@_ZN3imp4Vec31ZE = external global %"class.imp::Vec3", align 8

; 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

; 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 #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK3imp4Path10cycleIndexEi(ptr noundef nonnull align 8 dereferenceable(48), i32 noundef) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Path6vertexEi(ptr noundef nonnull align 8 dereferenceable(48), i32 noundef) 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 #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3imp4Path7degreesEv(ptr dead_on_unwind noalias writable sret(%"class.std::vector.4") align 8, ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3imp4Path5eraseESt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZN3imp4Vec39angleFromES0_S0_(ptr noundef nonnull align 8 dereferenceable(36), ptr noundef, ptr noundef) local_unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3imp4Path15extractTriangleEv(ptr dead_on_unwind noalias writable sret(%"class.imp::Path") align 8 %0, ptr noundef nonnull align 8 dereferenceable(48) %1) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.imp::Vec3", align 8
  %4 = alloca %"class.std::vector.4", align 8
  %5 = alloca %"class.std::map.13", align 8
  %6 = alloca %"class.imp::Edge", align 8
  %7 = alloca %"class.imp::Vec3", align 8
  %8 = alloca float, align 4
  %9 = alloca %"class.imp::Vec3", align 8
  %10 = alloca %"class.imp::Vec3", align 8
  %11 = alloca %"class.imp::Vec3", align 8
  %12 = alloca %"struct.std::_Rb_tree_iterator.18", align 8
  %13 = alloca %"class.std::vector", align 8
  %14 = alloca [3 x %"class.imp::Vec3"], align 8
  %15 = alloca %"class.std::allocator.0", align 1
  %16 = alloca %"class.std::vector.4", align 8
  %17 = alloca [3 x i32], align 4
  %18 = alloca %"class.std::allocator.6", align 1
  %19 = alloca %"class.std::vector.4", align 8
  %20 = alloca [1 x i32], align 4
  %21 = alloca %"class.std::allocator.6", align 1
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %3) #4
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %3, ptr noundef nonnull align 8 dereferenceable(36) @_ZN3imp4Vec31ZE) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #4
  invoke void @_ZNK3imp4Path7degreesEv(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.4") align 8 %4, ptr noundef nonnull align 8 dereferenceable(48) %1)
          to label %22 unwind label %31

22:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %5) #4
  call void @_ZNSt3mapIfiSt4lessIfESaISt4pairIKfiEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #4
  %23 = call noundef i32 @_ZNK3imp4Path5countEv(ptr noundef nonnull align 8 dereferenceable(48) %1)
  %24 = icmp sgt i32 %23, 0
  br i1 %24, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %71, %22
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #4
  %25 = call ptr @_ZNSt3mapIfiSt4lessIfESaISt4pairIKfiEEE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %5) #4
  store ptr %25, ptr %12, align 8
  %26 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKfiEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #4
  %27 = getelementptr inbounds i8, ptr %26, i64 4
  %28 = load i32, ptr %27, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #4
  call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %14) #4
  %29 = invoke noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Path6vertexEi(ptr noundef nonnull align 8 dereferenceable(48) %1, i32 noundef %28)
          to label %88 unwind label %.thread

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

31:                                               ; preds = %2
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %139

.lr.ph:                                           ; preds = %22, %71
  %.04166 = phi i32 [ %72, %71 ], [ 0, %22 ]
  %33 = add nsw i32 %.04166, -2
  %34 = invoke noundef i32 @_ZNK3imp4Path10cycleIndexEi(ptr noundef nonnull align 8 dereferenceable(48) %1, i32 noundef %33)
          to label %35 unwind label %45

35:                                               ; preds = %.lr.ph
  %36 = add nsw i32 %.04166, -1
  %37 = invoke noundef i32 @_ZNK3imp4Path10cycleIndexEi(ptr noundef nonnull align 8 dereferenceable(48) %1, i32 noundef %36)
          to label %38 unwind label %47

38:                                               ; preds = %35
  %39 = invoke noundef i32 @_ZNK3imp4Path10cycleIndexEi(ptr noundef nonnull align 8 dereferenceable(48) %1, i32 noundef %.04166)
          to label %40 unwind label %49

40:                                               ; preds = %38
  %41 = sext i32 %37 to i64
  %42 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %41) #4
  %43 = load i32, ptr %42, align 4, !tbaa !11
  %44 = icmp sgt i32 %43, 2
  br i1 %44, label %71, label %51

45:                                               ; preds = %.lr.ph
  %46 = landingpad { ptr, i32 }
          cleanup
  br label %138

47:                                               ; preds = %35
  %48 = landingpad { ptr, i32 }
          cleanup
  br label %138

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

51:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 104, ptr nonnull %6) #4
  %52 = invoke noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Path6vertexEi(ptr noundef nonnull align 8 dereferenceable(48) %1, i32 noundef %34)
          to label %53 unwind label %59

53:                                               ; preds = %51
  %54 = invoke noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Path6vertexEi(ptr noundef nonnull align 8 dereferenceable(48) %1, i32 noundef %39)
          to label %55 unwind label %59

55:                                               ; preds = %53
  invoke void @_ZN3imp4EdgeC1ERKNS_4Vec3ES3_(ptr noundef nonnull align 8 dereferenceable(104) %6, ptr noundef nonnull align 8 dereferenceable(36) %52, ptr noundef nonnull align 8 dereferenceable(36) %54)
          to label %56 unwind label %59

56:                                               ; preds = %55
  %57 = invoke noundef zeroext i1 @_ZN3imp12Intersection10isCrossingERKNS_4PathERKNS_4EdgeEb(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(104) %6, i1 noundef zeroext true)
          to label %58 unwind label %61

58:                                               ; preds = %56
  br i1 %57, label %70, label %63

59:                                               ; preds = %55, %53, %51
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %87

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

63:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %7) #4
  invoke void @_ZNK3imp4Path3tanEi(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec3") align 8 %7, ptr noundef nonnull align 8 dereferenceable(48) %1, i32 noundef %37)
          to label %64 unwind label %75

64:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %9) #4
  invoke void @_ZNK3imp4Path3tanEi(ptr dead_on_unwind nonnull writable sret(%"class.imp::Vec3") align 8 %9, ptr noundef nonnull align 8 dereferenceable(48) %1, i32 noundef %39)
          to label %65 unwind label %77

65:                                               ; preds = %64
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %10, ptr noundef nonnull align 8 dereferenceable(36) %7) #4
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %11, ptr noundef nonnull align 8 dereferenceable(36) %3) #4
  %66 = invoke noundef float @_ZN3imp4Vec39angleFromES0_S0_(ptr noundef nonnull align 8 dereferenceable(36) %9, ptr noundef nonnull %10, ptr noundef nonnull %11)
          to label %67 unwind label %79

67:                                               ; preds = %65
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %11) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %10) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %9) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #4
  store float %66, ptr %8, align 4, !tbaa !12
  %68 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt3mapIfiSt4lessIfESaISt4pairIKfiEEEixERS3_(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %69 unwind label %82

69:                                               ; preds = %67
  store i32 %39, ptr %68, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %7) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #4
  br label %70

70:                                               ; preds = %58, %69
  call void @_ZN3imp4EdgeD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %6) #4
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %6) #4
  br label %71

71:                                               ; preds = %40, %70
  %72 = add nuw nsw i32 %.04166, 1
  %73 = call noundef i32 @_ZNK3imp4Path5countEv(ptr noundef nonnull align 8 dereferenceable(48) %1)
  %74 = icmp slt i32 %72, %73
  br i1 %74, label %.lr.ph, label %._crit_edge, !llvm.loop !13

75:                                               ; preds = %63
  %76 = landingpad { ptr, i32 }
          cleanup
  br label %85

77:                                               ; preds = %64
  %78 = landingpad { ptr, i32 }
          cleanup
  br label %81

79:                                               ; preds = %65
  %80 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %11) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %10) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %9) #4
  br label %81

81:                                               ; preds = %79, %77
  %.pn52 = phi { ptr, i32 } [ %80, %79 ], [ %78, %77 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #4
  br label %84

82:                                               ; preds = %67
  %83 = landingpad { ptr, i32 }
          cleanup
  br label %84

84:                                               ; preds = %82, %81
  %.pn54 = phi { ptr, i32 } [ %83, %82 ], [ %.pn52, %81 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %7) #4
  br label %85

85:                                               ; preds = %84, %75
  %.pn54.pn = phi { ptr, i32 } [ %.pn54, %84 ], [ %76, %75 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %7) #4
  br label %86

86:                                               ; preds = %85, %61
  %.pn54.pn.pn = phi { ptr, i32 } [ %.pn54.pn, %85 ], [ %62, %61 ]
  call void @_ZN3imp4EdgeD2Ev(ptr noundef nonnull align 8 dereferenceable(104) %6) #4
  br label %87

87:                                               ; preds = %86, %59
  %.pn54.pn.pn.pn = phi { ptr, i32 } [ %.pn54.pn.pn, %86 ], [ %60, %59 ]
  call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %6) #4
  br label %138

88:                                               ; preds = %._crit_edge
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %14, ptr noundef nonnull align 8 dereferenceable(36) %29) #4
  %89 = getelementptr inbounds i8, ptr %14, i64 40
  %90 = add nsw i32 %28, -1
  %91 = invoke noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Path6vertexEi(ptr noundef nonnull align 8 dereferenceable(48) %1, i32 noundef %90)
          to label %92 unwind label %110

92:                                               ; preds = %88
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %89, ptr noundef nonnull align 8 dereferenceable(36) %91) #4
  %93 = getelementptr inbounds i8, ptr %14, i64 80
  %94 = add nsw i32 %28, -2
  %95 = invoke noundef nonnull align 8 dereferenceable(36) ptr @_ZN3imp4Path6vertexEi(ptr noundef nonnull align 8 dereferenceable(48) %1, i32 noundef %94)
          to label %96 unwind label %110

96:                                               ; preds = %92
  call void @_ZN3imp4Vec3C2ERKS0_(ptr noundef nonnull align 8 dereferenceable(36) %93, ptr noundef nonnull align 8 dereferenceable(36) %95) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %15) #4
  call void @_ZNSaIN3imp4Vec3EEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #4
  invoke void @_ZNSt6vectorIN3imp4Vec3ESaIS1_EEC2ESt16initializer_listIS1_ERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr nonnull %14, i64 3, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %97 unwind label %.loopexit.loopexit

97:                                               ; preds = %96
  call void @_ZNSt15__new_allocatorIN3imp4Vec3EED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #4
  %98 = getelementptr inbounds i8, ptr %14, i64 80
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %98) #4
  %99 = getelementptr inbounds i8, ptr %14, i64 40
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %99) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %14) #4
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %14) #4
  %100 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZNSt6vectorIN3imp4Vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef 0) #4
  %101 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZNSt6vectorIN3imp4Vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef 1) #4
  %102 = call noundef nonnull align 8 dereferenceable(36) ptr @_ZNSt6vectorIN3imp4Vec3ESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef 2) #4
  %103 = invoke noundef zeroext i1 @_ZNK3imp4Path12areConnectedERKNS_4Vec3ES3_S3_(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(36) %100, ptr noundef nonnull align 8 dereferenceable(36) %101, ptr noundef nonnull align 8 dereferenceable(36) %102)
          to label %104 unwind label %119

104:                                              ; preds = %97
  br i1 %103, label %105, label %126

105:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %17) #4
  store i32 %28, ptr %17, align 4, !tbaa !11
  %106 = getelementptr inbounds i8, ptr %17, i64 4
  store i32 %90, ptr %106, align 4, !tbaa !11
  %107 = getelementptr inbounds i8, ptr %17, i64 8
  store i32 %94, ptr %107, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %18) #4
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #4
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %16, ptr nonnull %17, i64 3, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %108 unwind label %121

108:                                              ; preds = %105
  invoke void @_ZN3imp4Path5eraseESt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull %16)
          to label %109 unwind label %123

109:                                              ; preds = %108
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %18) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %17) #4
  br label %134

110:                                              ; preds = %92, %88
  %.042 = phi ptr [ %93, %92 ], [ %89, %88 ]
  %111 = landingpad { ptr, i32 }
          cleanup
  br label %112

112:                                              ; preds = %110, %112
  %113 = phi ptr [ %.042, %110 ], [ %114, %112 ]
  %114 = getelementptr inbounds i8, ptr %113, i64 -40
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %114) #4
  %115 = icmp eq ptr %114, %14
  br i1 %115, label %.loopexit, label %112

.loopexit.loopexit:                               ; preds = %96
  %116 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIN3imp4Vec3EED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #4
  %117 = getelementptr inbounds i8, ptr %14, i64 80
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %117) #4
  %118 = getelementptr inbounds i8, ptr %14, i64 40
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %118) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %14) #4
  br label %.loopexit

.loopexit:                                        ; preds = %112, %.loopexit.loopexit, %.thread
  %.pn = phi { ptr, i32 } [ %30, %.thread ], [ %116, %.loopexit.loopexit ], [ %111, %112 ]
  call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %14) #4
  br label %137

119:                                              ; preds = %134, %97
  %120 = landingpad { ptr, i32 }
          cleanup
  br label %136

121:                                              ; preds = %105
  %122 = landingpad { ptr, i32 }
          cleanup
  br label %125

123:                                              ; preds = %108
  %124 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #4
  br label %125

125:                                              ; preds = %123, %121
  %.pn47 = phi { ptr, i32 } [ %124, %123 ], [ %122, %121 ]
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %18) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %17) #4
  br label %136

126:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %20) #4
  store i32 %90, ptr %20, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %21) #4
  call void @_ZNSaIiEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #4
  invoke void @_ZNSt6vectorIiSaIiEEC2ESt16initializer_listIiERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %19, ptr nonnull %20, i64 1, ptr noundef nonnull align 1 dereferenceable(1) %21)
          to label %127 unwind label %129

127:                                              ; preds = %126
  invoke void @_ZN3imp4Path5eraseESt6vectorIiSaIiEE(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull %19)
          to label %128 unwind label %131

128:                                              ; preds = %127
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #4
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %21) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #4
  br label %134

129:                                              ; preds = %126
  %130 = landingpad { ptr, i32 }
          cleanup
  br label %133

131:                                              ; preds = %127
  %132 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #4
  br label %133

133:                                              ; preds = %131, %129
  %.pn45 = phi { ptr, i32 } [ %132, %131 ], [ %130, %129 ]
  call void @_ZNSt15__new_allocatorIiED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %21) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %20) #4
  br label %136

134:                                              ; preds = %128, %109
  invoke void @_ZN3imp4PathC1ERKSt6vectorINS_4Vec3ESaIS2_EE(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(24) %13)
          to label %135 unwind label %119

135:                                              ; preds = %134
  call void @_ZNSt6vectorIN3imp4Vec3ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #4
  call void @_ZNSt3mapIfiSt4lessIfESaISt4pairIKfiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %3) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %3) #4
  ret void

136:                                              ; preds = %133, %125, %119
  %.pn49 = phi { ptr, i32 } [ %120, %119 ], [ %.pn47, %125 ], [ %.pn45, %133 ]
  call void @_ZNSt6vectorIN3imp4Vec3ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #4
  br label %137

137:                                              ; preds = %136, %.loopexit
  %.pn49.pn = phi { ptr, i32 } [ %.pn49, %136 ], [ %.pn, %.loopexit ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #4
  br label %138

138:                                              ; preds = %45, %49, %87, %47, %137
  %.pn54.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn49.pn, %137 ], [ %46, %45 ], [ %48, %47 ], [ %.pn54.pn.pn.pn, %87 ], [ %50, %49 ]
  call void @_ZNSt3mapIfiSt4lessIfESaISt4pairIKfiEEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #4
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #4
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #4
  br label %139

139:                                              ; preds = %138, %31
  %.pn54.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn54.pn.pn.pn.pn.pn.pn.pn, %138 ], [ %32, %31 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #4
  call void @_ZN3imp6ObjectD2Ev(ptr noundef nonnull align 8 dereferenceable(36) %3) #4
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %3) #4
  resume { ptr, i32 } %.pn54.pn.pn.pn.pn.pn.pn.pn.pn
}

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

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

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

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

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

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

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

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

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

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

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

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

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

declare void @_ZN3imp4EdgeC1ERKNS_4Vec3ES3_(ptr, ptr, ptr) local_unnamed_addr

declare void @_ZN3imp4PathC1ERKSt6vectorINS_4Vec3ESaIS2_EE(ptr, ptr) local_unnamed_addr

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { 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, !10, i64 4}
!6 = !{!"_ZTSSt4pairIKfiE", !7, i64 0, !10, i64 4}
!7 = !{!"float", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!10, !10, i64 0}
!12 = !{!7, !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


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