; LLVM IR from PaddlePaddle/Serving :: core/predictor/tools/ocrtools (clipper)

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

%"struct.ClipperLib::IntPoint" = type { i64, i64 }
%"struct.ClipperLib::LocalMinimum" = type { i64, ptr, ptr }
%"struct.ClipperLib::TEdge" = type { %"struct.ClipperLib::IntPoint", %"struct.ClipperLib::IntPoint", %"struct.ClipperLib::IntPoint", double, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%"class.ClipperLib::ClipperBase" = type { ptr, %"class.__gnu_cxx::__normal_iterator", %"class.std::vector.5", i8, %"class.std::vector.10", i8, i8, %"class.std::vector.15", ptr, %"class.std::priority_queue" }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<ClipperLib::LocalMinimum, std::allocator<ClipperLib::LocalMinimum>>::_Vector_impl" }
%"struct.std::_Vector_base<ClipperLib::LocalMinimum, std::allocator<ClipperLib::LocalMinimum>>::_Vector_impl" = type { %"struct.std::_Vector_base<ClipperLib::LocalMinimum, std::allocator<ClipperLib::LocalMinimum>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ClipperLib::LocalMinimum, std::allocator<ClipperLib::LocalMinimum>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.10" = type { %"struct.std::_Vector_base.11" }
%"struct.std::_Vector_base.11" = type { %"struct.std::_Vector_base<ClipperLib::TEdge *, std::allocator<ClipperLib::TEdge *>>::_Vector_impl" }
%"struct.std::_Vector_base<ClipperLib::TEdge *, std::allocator<ClipperLib::TEdge *>>::_Vector_impl" = type { %"struct.std::_Vector_base<ClipperLib::TEdge *, std::allocator<ClipperLib::TEdge *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ClipperLib::TEdge *, std::allocator<ClipperLib::TEdge *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.15" = type { %"struct.std::_Vector_base.16" }
%"struct.std::_Vector_base.16" = type { %"struct.std::_Vector_base<ClipperLib::OutRec *, std::allocator<ClipperLib::OutRec *>>::_Vector_impl" }
%"struct.std::_Vector_base<ClipperLib::OutRec *, std::allocator<ClipperLib::OutRec *>>::_Vector_impl" = type { %"struct.std::_Vector_base<ClipperLib::OutRec *, std::allocator<ClipperLib::OutRec *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ClipperLib::OutRec *, std::allocator<ClipperLib::OutRec *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::priority_queue" = type <{ %"class.std::vector.20", [8 x i8] }>
%"class.std::vector.20" = type { %"struct.std::_Vector_base.21" }
%"struct.std::_Vector_base.21" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_ZTIN10ClipperLib16clipperExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.1 = external hidden unnamed_addr constant [37 x i8], align 1

; 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: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN10ClipperLib11SlopesEqualENS_8IntPointES0_S0_b(i64, i64, i64, i64, i64, i64, i1 noundef zeroext) #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10ClipperLib9InitEdge2ERNS_5TEdgeENS_8PolyTypeE(ptr noundef nonnull align 8 dereferenceable(136), i32 noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN10ClipperLib10RemoveEdgeEPNS_5TEdgeE(ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN10ClipperLib21Pt2IsBetweenPt1AndPt3ENS_8IntPointES0_S0_(i64, i64, i64, i64, i64, i64) #4

declare i32 @__gxx_personality_v0(...)

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) #5

declare ptr @__cxa_begin_catch(ptr)

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

declare ptr @__cxa_allocate_exception(i64)

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

declare void @__cxa_free_exception(ptr)

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

declare void @__cxa_throw(ptr, ptr, ptr)

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN10ClipperLib14FindNextLocMinEPNS_5TEdgeE(ptr noundef) #4

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN10ClipperLib17ReverseHorizontalERNS_5TEdgeE(ptr noundef nonnull align 8 dereferenceable(136)) #3

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN10ClipperLib11ClipperBase7AddPathERKSt6vectorINS_8IntPointESaIS2_EENS_8PolyTypeEb(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %2, i1 noundef zeroext %3) unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca i1, align 1
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i8, align 1
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i8, align 1
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca %"struct.ClipperLib::IntPoint", align 8
  %21 = alloca %"struct.ClipperLib::IntPoint", align 8
  %22 = alloca %"struct.ClipperLib::IntPoint", align 8
  %23 = alloca %"struct.ClipperLib::IntPoint", align 8
  %24 = alloca %"struct.ClipperLib::IntPoint", align 8
  %25 = alloca %"struct.ClipperLib::IntPoint", align 8
  %26 = alloca %"struct.ClipperLib::LocalMinimum", align 8
  %27 = alloca i8, align 1
  %28 = alloca ptr, align 8
  %29 = alloca %"struct.ClipperLib::LocalMinimum", align 8
  %30 = alloca ptr, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store i32 %2, ptr %8, align 4, !tbaa !9
  %31 = zext i1 %3 to i8
  store i8 %31, ptr %9, align 1, !tbaa !11
  %32 = load ptr, ptr %6, align 8
  %33 = load i8, ptr %9, align 1, !tbaa !11, !range !13, !noundef !14
  %34 = trunc i8 %33 to i1
  br i1 %34, label %45, label %35

35:                                               ; preds = %4
  %36 = load i32, ptr %8, align 4, !tbaa !9
  %37 = icmp eq i32 %36, 1
  br i1 %37, label %38, label %45

38:                                               ; preds = %35
  %39 = call ptr @__cxa_allocate_exception(i64 40) #10
  invoke void @_ZN10ClipperLib16clipperExceptionC2EPKc(ptr noundef nonnull align 8 dereferenceable(40) %39, ptr noundef @.str.1)
          to label %40 unwind label %41

40:                                               ; preds = %38
  call void @__cxa_throw(ptr %39, ptr @_ZTIN10ClipperLib16clipperExceptionE, ptr @_ZN10ClipperLib16clipperExceptionD2Ev) #11
  unreachable

41:                                               ; preds = %38
  %42 = landingpad { ptr, i32 }
          cleanup
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %10, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %11, align 4
  call void @__cxa_free_exception(ptr %39) #10
  br label %640

45:                                               ; preds = %35, %4
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #10
  %46 = load ptr, ptr %7, align 8, !tbaa !5
  %47 = call noundef i64 @_ZNKSt6vectorIN10ClipperLib8IntPointESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %46) #10
  %48 = trunc i64 %47 to i32
  %49 = sub nsw i32 %48, 1
  store i32 %49, ptr %12, align 4, !tbaa !15
  %50 = load i8, ptr %9, align 1, !tbaa !11, !range !13, !noundef !14
  %51 = trunc i8 %50 to i1
  br i1 %51, label %52, label %70

52:                                               ; preds = %45
  br label %53

53:                                               ; preds = %66, %52
  %54 = load i32, ptr %12, align 4, !tbaa !15
  %55 = icmp sgt i32 %54, 0
  br i1 %55, label %56, label %64

56:                                               ; preds = %53
  %57 = load ptr, ptr %7, align 8, !tbaa !5
  %58 = load i32, ptr %12, align 4, !tbaa !15
  %59 = sext i32 %58 to i64
  %60 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %57, i64 noundef %59) #10
  %61 = load ptr, ptr %7, align 8, !tbaa !5
  %62 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %61, i64 noundef 0) #10
  %63 = call noundef zeroext i1 @_ZN10ClipperLibeqERKNS_8IntPointES2_(ptr noundef nonnull align 8 dereferenceable(16) %60, ptr noundef nonnull align 8 dereferenceable(16) %62)
  br label %64

64:                                               ; preds = %56, %53
  %65 = phi i1 [ false, %53 ], [ %63, %56 ]
  br i1 %65, label %66, label %69

66:                                               ; preds = %64
  %67 = load i32, ptr %12, align 4, !tbaa !15
  %68 = add nsw i32 %67, -1
  store i32 %68, ptr %12, align 4, !tbaa !15
  br label %53, !llvm.loop !17

69:                                               ; preds = %64
  br label %70

70:                                               ; preds = %69, %45
  br label %71

71:                                               ; preds = %87, %70
  %72 = load i32, ptr %12, align 4, !tbaa !15
  %73 = icmp sgt i32 %72, 0
  br i1 %73, label %74, label %85

74:                                               ; preds = %71
  %75 = load ptr, ptr %7, align 8, !tbaa !5
  %76 = load i32, ptr %12, align 4, !tbaa !15
  %77 = sext i32 %76 to i64
  %78 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %75, i64 noundef %77) #10
  %79 = load ptr, ptr %7, align 8, !tbaa !5
  %80 = load i32, ptr %12, align 4, !tbaa !15
  %81 = sub nsw i32 %80, 1
  %82 = sext i32 %81 to i64
  %83 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %79, i64 noundef %82) #10
  %84 = call noundef zeroext i1 @_ZN10ClipperLibeqERKNS_8IntPointES2_(ptr noundef nonnull align 8 dereferenceable(16) %78, ptr noundef nonnull align 8 dereferenceable(16) %83)
  br label %85

85:                                               ; preds = %74, %71
  %86 = phi i1 [ false, %71 ], [ %84, %74 ]
  br i1 %86, label %87, label %90

87:                                               ; preds = %85
  %88 = load i32, ptr %12, align 4, !tbaa !15
  %89 = add nsw i32 %88, -1
  store i32 %89, ptr %12, align 4, !tbaa !15
  br label %71, !llvm.loop !19

90:                                               ; preds = %85
  %91 = load i8, ptr %9, align 1, !tbaa !11, !range !13, !noundef !14
  %92 = trunc i8 %91 to i1
  br i1 %92, label %93, label %96

93:                                               ; preds = %90
  %94 = load i32, ptr %12, align 4, !tbaa !15
  %95 = icmp slt i32 %94, 2
  br i1 %95, label %102, label %96

96:                                               ; preds = %93, %90
  %97 = load i8, ptr %9, align 1, !tbaa !11, !range !13, !noundef !14
  %98 = trunc i8 %97 to i1
  br i1 %98, label %103, label %99

99:                                               ; preds = %96
  %100 = load i32, ptr %12, align 4, !tbaa !15
  %101 = icmp slt i32 %100, 1
  br i1 %101, label %102, label %103

102:                                              ; preds = %99, %93
  store i1 false, ptr %5, align 1
  store i32 1, ptr %13, align 4
  br label %638

103:                                              ; preds = %99, %96
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #10
  %104 = load i32, ptr %12, align 4, !tbaa !15
  %105 = add nsw i32 %104, 1
  %106 = sext i32 %105 to i64
  %107 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %106, i64 136)
  %108 = extractvalue { i64, i1 } %107, 1
  %109 = extractvalue { i64, i1 } %107, 0
  %110 = select i1 %108, i64 -1, i64 %109
  %111 = call noalias noundef nonnull ptr @_Znam(i64 noundef %110) #12
  %112 = icmp eq i64 %106, 0
  br i1 %112, label %120, label %113

113:                                              ; preds = %103
  %114 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %111, i64 %106
  br label %115

115:                                              ; preds = %117, %113
  %116 = phi ptr [ %111, %113 ], [ %118, %117 ]
  invoke void @_ZN10ClipperLib5TEdgeC2Ev(ptr noundef nonnull align 8 dereferenceable(136) %116)
          to label %117 unwind label %169

117:                                              ; preds = %115
  %118 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %116, i64 1
  %119 = icmp eq ptr %118, %114
  br i1 %119, label %120, label %115

120:                                              ; preds = %117, %103
  store ptr %111, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #10
  store i8 1, ptr %15, align 1, !tbaa !11
  %121 = load ptr, ptr %7, align 8, !tbaa !5
  %122 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %121, i64 noundef 1) #10
  %123 = load ptr, ptr %14, align 8, !tbaa !5
  %124 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %123, i64 1
  %125 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %124, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %125, ptr align 8 %122, i64 16, i1 false), !tbaa.struct !20
  %126 = load ptr, ptr %7, align 8, !tbaa !5
  %127 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %126, i64 noundef 0) #10
  %128 = getelementptr inbounds %"class.ClipperLib::ClipperBase", ptr %32, i32 0, i32 3
  invoke void @_ZN10ClipperLib9RangeTestERKNS_8IntPointERb(ptr noundef nonnull align 8 dereferenceable(16) %127, ptr noundef nonnull align 1 dereferenceable(1) %128)
          to label %129 unwind label %173

129:                                              ; preds = %120
  %130 = load ptr, ptr %7, align 8, !tbaa !5
  %131 = load i32, ptr %12, align 4, !tbaa !15
  %132 = sext i32 %131 to i64
  %133 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %130, i64 noundef %132) #10
  %134 = getelementptr inbounds %"class.ClipperLib::ClipperBase", ptr %32, i32 0, i32 3
  invoke void @_ZN10ClipperLib9RangeTestERKNS_8IntPointERb(ptr noundef nonnull align 8 dereferenceable(16) %133, ptr noundef nonnull align 1 dereferenceable(1) %134)
          to label %135 unwind label %173

135:                                              ; preds = %129
  %136 = load ptr, ptr %14, align 8, !tbaa !5
  %137 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %136, i64 0
  %138 = load ptr, ptr %14, align 8, !tbaa !5
  %139 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %138, i64 1
  %140 = load ptr, ptr %14, align 8, !tbaa !5
  %141 = load i32, ptr %12, align 4, !tbaa !15
  %142 = sext i32 %141 to i64
  %143 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %140, i64 %142
  %144 = load ptr, ptr %7, align 8, !tbaa !5
  %145 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %144, i64 noundef 0) #10
  invoke void @_ZN10ClipperLib8InitEdgeEPNS_5TEdgeES1_S1_RKNS_8IntPointE(ptr noundef %137, ptr noundef %139, ptr noundef %143, ptr noundef nonnull align 8 dereferenceable(16) %145)
          to label %146 unwind label %173

146:                                              ; preds = %135
  %147 = load ptr, ptr %14, align 8, !tbaa !5
  %148 = load i32, ptr %12, align 4, !tbaa !15
  %149 = sext i32 %148 to i64
  %150 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %147, i64 %149
  %151 = load ptr, ptr %14, align 8, !tbaa !5
  %152 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %151, i64 0
  %153 = load ptr, ptr %14, align 8, !tbaa !5
  %154 = load i32, ptr %12, align 4, !tbaa !15
  %155 = sub nsw i32 %154, 1
  %156 = sext i32 %155 to i64
  %157 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %153, i64 %156
  %158 = load ptr, ptr %7, align 8, !tbaa !5
  %159 = load i32, ptr %12, align 4, !tbaa !15
  %160 = sext i32 %159 to i64
  %161 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %158, i64 noundef %160) #10
  invoke void @_ZN10ClipperLib8InitEdgeEPNS_5TEdgeES1_S1_RKNS_8IntPointE(ptr noundef %150, ptr noundef %152, ptr noundef %157, ptr noundef nonnull align 8 dereferenceable(16) %161)
          to label %162 unwind label %173

162:                                              ; preds = %146
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #10
  %163 = load i32, ptr %12, align 4, !tbaa !15
  %164 = sub nsw i32 %163, 1
  store i32 %164, ptr %16, align 4, !tbaa !15
  br label %165

165:                                              ; preds = %203, %162
  %166 = load i32, ptr %16, align 4, !tbaa !15
  %167 = icmp sge i32 %166, 1
  br i1 %167, label %177, label %168

168:                                              ; preds = %165
  store i32 6, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #10
  br label %217

169:                                              ; preds = %115
  %170 = landingpad { ptr, i32 }
          cleanup
  %171 = extractvalue { ptr, i32 } %170, 0
  store ptr %171, ptr %10, align 8
  %172 = extractvalue { ptr, i32 } %170, 1
  store i32 %172, ptr %11, align 4
  call void @_ZdaPvm(ptr noundef %111, i64 noundef %110) #13
  br label %637

173:                                              ; preds = %146, %135, %129, %120
  %174 = landingpad { ptr, i32 }
          catch ptr null
  %175 = extractvalue { ptr, i32 } %174, 0
  store ptr %175, ptr %10, align 8
  %176 = extractvalue { ptr, i32 } %174, 1
  store i32 %176, ptr %11, align 4
  br label %210

177:                                              ; preds = %165
  %178 = load ptr, ptr %7, align 8, !tbaa !5
  %179 = load i32, ptr %16, align 4, !tbaa !15
  %180 = sext i32 %179 to i64
  %181 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %178, i64 noundef %180) #10
  %182 = getelementptr inbounds %"class.ClipperLib::ClipperBase", ptr %32, i32 0, i32 3
  invoke void @_ZN10ClipperLib9RangeTestERKNS_8IntPointERb(ptr noundef nonnull align 8 dereferenceable(16) %181, ptr noundef nonnull align 1 dereferenceable(1) %182)
          to label %183 unwind label %206

183:                                              ; preds = %177
  %184 = load ptr, ptr %14, align 8, !tbaa !5
  %185 = load i32, ptr %16, align 4, !tbaa !15
  %186 = sext i32 %185 to i64
  %187 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %184, i64 %186
  %188 = load ptr, ptr %14, align 8, !tbaa !5
  %189 = load i32, ptr %16, align 4, !tbaa !15
  %190 = add nsw i32 %189, 1
  %191 = sext i32 %190 to i64
  %192 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %188, i64 %191
  %193 = load ptr, ptr %14, align 8, !tbaa !5
  %194 = load i32, ptr %16, align 4, !tbaa !15
  %195 = sub nsw i32 %194, 1
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %193, i64 %196
  %198 = load ptr, ptr %7, align 8, !tbaa !5
  %199 = load i32, ptr %16, align 4, !tbaa !15
  %200 = sext i32 %199 to i64
  %201 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %198, i64 noundef %200) #10
  invoke void @_ZN10ClipperLib8InitEdgeEPNS_5TEdgeES1_S1_RKNS_8IntPointE(ptr noundef %187, ptr noundef %192, ptr noundef %197, ptr noundef nonnull align 8 dereferenceable(16) %201)
          to label %202 unwind label %206

202:                                              ; preds = %183
  br label %203

203:                                              ; preds = %202
  %204 = load i32, ptr %16, align 4, !tbaa !15
  %205 = add nsw i32 %204, -1
  store i32 %205, ptr %16, align 4, !tbaa !15
  br label %165, !llvm.loop !23

206:                                              ; preds = %183, %177
  %207 = landingpad { ptr, i32 }
          catch ptr null
  %208 = extractvalue { ptr, i32 } %207, 0
  store ptr %208, ptr %10, align 8
  %209 = extractvalue { ptr, i32 } %207, 1
  store i32 %209, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #10
  br label %210

210:                                              ; preds = %206, %173
  %211 = load ptr, ptr %10, align 8
  %212 = call ptr @__cxa_begin_catch(ptr %211) #10
  %213 = load ptr, ptr %14, align 8, !tbaa !5
  %214 = icmp eq ptr %213, null
  br i1 %214, label %216, label %215

215:                                              ; preds = %210
  call void @_ZdaPv(ptr noundef %213) #13
  br label %216

216:                                              ; preds = %215, %210
  invoke void @__cxa_rethrow() #11
          to label %648 unwind label %218

217:                                              ; preds = %168
  br label %223

218:                                              ; preds = %216
  %219 = landingpad { ptr, i32 }
          cleanup
  %220 = extractvalue { ptr, i32 } %219, 0
  store ptr %220, ptr %10, align 8
  %221 = extractvalue { ptr, i32 } %219, 1
  store i32 %221, ptr %11, align 4
  invoke void @__cxa_end_catch()
          to label %222 unwind label %645

222:                                              ; preds = %218
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #10
  br label %637

223:                                              ; preds = %217
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #10
  %224 = load ptr, ptr %14, align 8, !tbaa !5
  %225 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %224, i64 0
  store ptr %225, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #10
  %226 = load ptr, ptr %17, align 8, !tbaa !5
  store ptr %226, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #10
  %227 = load ptr, ptr %17, align 8, !tbaa !5
  store ptr %227, ptr %19, align 8, !tbaa !5
  br label %228

228:                                              ; preds = %364, %339, %260, %223
  %229 = load ptr, ptr %18, align 8, !tbaa !5
  %230 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %229, i32 0, i32 1
  %231 = load ptr, ptr %18, align 8, !tbaa !5
  %232 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %231, i32 0, i32 10
  %233 = load ptr, ptr %232, align 8, !tbaa !24
  %234 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %233, i32 0, i32 1
  %235 = call noundef zeroext i1 @_ZN10ClipperLibeqERKNS_8IntPointES2_(ptr noundef nonnull align 8 dereferenceable(16) %230, ptr noundef nonnull align 8 dereferenceable(16) %234)
  br i1 %235, label %236, label %264

236:                                              ; preds = %228
  %237 = load i8, ptr %9, align 1, !tbaa !11, !range !13, !noundef !14
  %238 = trunc i8 %237 to i1
  br i1 %238, label %245, label %239

239:                                              ; preds = %236
  %240 = load ptr, ptr %18, align 8, !tbaa !5
  %241 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %240, i32 0, i32 10
  %242 = load ptr, ptr %241, align 8, !tbaa !24
  %243 = load ptr, ptr %17, align 8, !tbaa !5
  %244 = icmp ne ptr %242, %243
  br i1 %244, label %245, label %264

245:                                              ; preds = %239, %236
  %246 = load ptr, ptr %18, align 8, !tbaa !5
  %247 = load ptr, ptr %18, align 8, !tbaa !5
  %248 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %247, i32 0, i32 10
  %249 = load ptr, ptr %248, align 8, !tbaa !24
  %250 = icmp eq ptr %246, %249
  br i1 %250, label %251, label %252

251:                                              ; preds = %245
  br label %365

252:                                              ; preds = %245
  %253 = load ptr, ptr %18, align 8, !tbaa !5
  %254 = load ptr, ptr %17, align 8, !tbaa !5
  %255 = icmp eq ptr %253, %254
  br i1 %255, label %256, label %260

256:                                              ; preds = %252
  %257 = load ptr, ptr %18, align 8, !tbaa !5
  %258 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %257, i32 0, i32 10
  %259 = load ptr, ptr %258, align 8, !tbaa !24
  store ptr %259, ptr %17, align 8, !tbaa !5
  br label %260

260:                                              ; preds = %256, %252
  %261 = load ptr, ptr %18, align 8, !tbaa !5
  %262 = call noundef ptr @_ZN10ClipperLib10RemoveEdgeEPNS_5TEdgeE(ptr noundef %261)
  store ptr %262, ptr %18, align 8, !tbaa !5
  %263 = load ptr, ptr %18, align 8, !tbaa !5
  store ptr %263, ptr %19, align 8, !tbaa !5
  br label %228, !llvm.loop !29

264:                                              ; preds = %239, %228
  %265 = load ptr, ptr %18, align 8, !tbaa !5
  %266 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %265, i32 0, i32 11
  %267 = load ptr, ptr %266, align 8, !tbaa !30
  %268 = load ptr, ptr %18, align 8, !tbaa !5
  %269 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %268, i32 0, i32 10
  %270 = load ptr, ptr %269, align 8, !tbaa !24
  %271 = icmp eq ptr %267, %270
  br i1 %271, label %272, label %273

272:                                              ; preds = %264
  br label %365

273:                                              ; preds = %264
  %274 = load i8, ptr %9, align 1, !tbaa !11, !range !13, !noundef !14
  %275 = trunc i8 %274 to i1
  br i1 %275, label %276, label %346

276:                                              ; preds = %273
  %277 = load ptr, ptr %18, align 8, !tbaa !5
  %278 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %277, i32 0, i32 11
  %279 = load ptr, ptr %278, align 8, !tbaa !30
  %280 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %279, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %20, ptr align 8 %280, i64 16, i1 false), !tbaa.struct !20
  %281 = load ptr, ptr %18, align 8, !tbaa !5
  %282 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %281, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %21, ptr align 8 %282, i64 16, i1 false), !tbaa.struct !20
  %283 = load ptr, ptr %18, align 8, !tbaa !5
  %284 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %283, i32 0, i32 10
  %285 = load ptr, ptr %284, align 8, !tbaa !24
  %286 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %285, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %22, ptr align 8 %286, i64 16, i1 false), !tbaa.struct !20
  %287 = getelementptr inbounds %"class.ClipperLib::ClipperBase", ptr %32, i32 0, i32 3
  %288 = load i8, ptr %287, align 8, !tbaa !31, !range !13, !noundef !14
  %289 = trunc i8 %288 to i1
  %290 = getelementptr inbounds { i64, i64 }, ptr %20, i32 0, i32 0
  %291 = load i64, ptr %290, align 8
  %292 = getelementptr inbounds { i64, i64 }, ptr %20, i32 0, i32 1
  %293 = load i64, ptr %292, align 8
  %294 = getelementptr inbounds { i64, i64 }, ptr %21, i32 0, i32 0
  %295 = load i64, ptr %294, align 8
  %296 = getelementptr inbounds { i64, i64 }, ptr %21, i32 0, i32 1
  %297 = load i64, ptr %296, align 8
  %298 = getelementptr inbounds { i64, i64 }, ptr %22, i32 0, i32 0
  %299 = load i64, ptr %298, align 8
  %300 = getelementptr inbounds { i64, i64 }, ptr %22, i32 0, i32 1
  %301 = load i64, ptr %300, align 8
  %302 = call noundef zeroext i1 @_ZN10ClipperLib11SlopesEqualENS_8IntPointES0_S0_b(i64 %291, i64 %293, i64 %295, i64 %297, i64 %299, i64 %301, i1 noundef zeroext %289)
  br i1 %302, label %303, label %346

303:                                              ; preds = %276
  %304 = getelementptr inbounds %"class.ClipperLib::ClipperBase", ptr %32, i32 0, i32 5
  %305 = load i8, ptr %304, align 8, !tbaa !52, !range !13, !noundef !14
  %306 = trunc i8 %305 to i1
  br i1 %306, label %307, label %331

307:                                              ; preds = %303
  %308 = load ptr, ptr %18, align 8, !tbaa !5
  %309 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %308, i32 0, i32 11
  %310 = load ptr, ptr %309, align 8, !tbaa !30
  %311 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %310, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %23, ptr align 8 %311, i64 16, i1 false), !tbaa.struct !20
  %312 = load ptr, ptr %18, align 8, !tbaa !5
  %313 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %312, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %24, ptr align 8 %313, i64 16, i1 false), !tbaa.struct !20
  %314 = load ptr, ptr %18, align 8, !tbaa !5
  %315 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %314, i32 0, i32 10
  %316 = load ptr, ptr %315, align 8, !tbaa !24
  %317 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %316, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %25, ptr align 8 %317, i64 16, i1 false), !tbaa.struct !20
  %318 = getelementptr inbounds { i64, i64 }, ptr %23, i32 0, i32 0
  %319 = load i64, ptr %318, align 8
  %320 = getelementptr inbounds { i64, i64 }, ptr %23, i32 0, i32 1
  %321 = load i64, ptr %320, align 8
  %322 = getelementptr inbounds { i64, i64 }, ptr %24, i32 0, i32 0
  %323 = load i64, ptr %322, align 8
  %324 = getelementptr inbounds { i64, i64 }, ptr %24, i32 0, i32 1
  %325 = load i64, ptr %324, align 8
  %326 = getelementptr inbounds { i64, i64 }, ptr %25, i32 0, i32 0
  %327 = load i64, ptr %326, align 8
  %328 = getelementptr inbounds { i64, i64 }, ptr %25, i32 0, i32 1
  %329 = load i64, ptr %328, align 8
  %330 = call noundef zeroext i1 @_ZN10ClipperLib21Pt2IsBetweenPt1AndPt3ENS_8IntPointES0_S0_(i64 %319, i64 %321, i64 %323, i64 %325, i64 %327, i64 %329)
  br i1 %330, label %346, label %331

331:                                              ; preds = %307, %303
  %332 = load ptr, ptr %18, align 8, !tbaa !5
  %333 = load ptr, ptr %17, align 8, !tbaa !5
  %334 = icmp eq ptr %332, %333
  br i1 %334, label %335, label %339

335:                                              ; preds = %331
  %336 = load ptr, ptr %18, align 8, !tbaa !5
  %337 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %336, i32 0, i32 10
  %338 = load ptr, ptr %337, align 8, !tbaa !24
  store ptr %338, ptr %17, align 8, !tbaa !5
  br label %339

339:                                              ; preds = %335, %331
  %340 = load ptr, ptr %18, align 8, !tbaa !5
  %341 = call noundef ptr @_ZN10ClipperLib10RemoveEdgeEPNS_5TEdgeE(ptr noundef %340)
  store ptr %341, ptr %18, align 8, !tbaa !5
  %342 = load ptr, ptr %18, align 8, !tbaa !5
  %343 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %342, i32 0, i32 11
  %344 = load ptr, ptr %343, align 8, !tbaa !30
  store ptr %344, ptr %18, align 8, !tbaa !5
  %345 = load ptr, ptr %18, align 8, !tbaa !5
  store ptr %345, ptr %19, align 8, !tbaa !5
  br label %228, !llvm.loop !29

346:                                              ; preds = %307, %276, %273
  br label %347

347:                                              ; preds = %346
  %348 = load ptr, ptr %18, align 8, !tbaa !5
  %349 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %348, i32 0, i32 10
  %350 = load ptr, ptr %349, align 8, !tbaa !24
  store ptr %350, ptr %18, align 8, !tbaa !5
  %351 = load ptr, ptr %18, align 8, !tbaa !5
  %352 = load ptr, ptr %19, align 8, !tbaa !5
  %353 = icmp eq ptr %351, %352
  br i1 %353, label %363, label %354

354:                                              ; preds = %347
  %355 = load i8, ptr %9, align 1, !tbaa !11, !range !13, !noundef !14
  %356 = trunc i8 %355 to i1
  br i1 %356, label %364, label %357

357:                                              ; preds = %354
  %358 = load ptr, ptr %18, align 8, !tbaa !5
  %359 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %358, i32 0, i32 10
  %360 = load ptr, ptr %359, align 8, !tbaa !24
  %361 = load ptr, ptr %17, align 8, !tbaa !5
  %362 = icmp eq ptr %360, %361
  br i1 %362, label %363, label %364

363:                                              ; preds = %357, %347
  br label %365

364:                                              ; preds = %357, %354
  br label %228, !llvm.loop !29

365:                                              ; preds = %363, %272, %251
  %366 = load i8, ptr %9, align 1, !tbaa !11, !range !13, !noundef !14
  %367 = trunc i8 %366 to i1
  br i1 %367, label %374, label %368

368:                                              ; preds = %365
  %369 = load ptr, ptr %18, align 8, !tbaa !5
  %370 = load ptr, ptr %18, align 8, !tbaa !5
  %371 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %370, i32 0, i32 10
  %372 = load ptr, ptr %371, align 8, !tbaa !24
  %373 = icmp eq ptr %369, %372
  br i1 %373, label %385, label %374

374:                                              ; preds = %368, %365
  %375 = load i8, ptr %9, align 1, !tbaa !11, !range !13, !noundef !14
  %376 = trunc i8 %375 to i1
  br i1 %376, label %377, label %390

377:                                              ; preds = %374
  %378 = load ptr, ptr %18, align 8, !tbaa !5
  %379 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %378, i32 0, i32 11
  %380 = load ptr, ptr %379, align 8, !tbaa !30
  %381 = load ptr, ptr %18, align 8, !tbaa !5
  %382 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %381, i32 0, i32 10
  %383 = load ptr, ptr %382, align 8, !tbaa !24
  %384 = icmp eq ptr %380, %383
  br i1 %384, label %385, label %390

385:                                              ; preds = %377, %368
  %386 = load ptr, ptr %14, align 8, !tbaa !5
  %387 = icmp eq ptr %386, null
  br i1 %387, label %389, label %388

388:                                              ; preds = %385
  call void @_ZdaPv(ptr noundef %386) #13
  br label %389

389:                                              ; preds = %388, %385
  store i1 false, ptr %5, align 1
  store i32 1, ptr %13, align 4
  br label %636

390:                                              ; preds = %377, %374
  %391 = load i8, ptr %9, align 1, !tbaa !11, !range !13, !noundef !14
  %392 = trunc i8 %391 to i1
  br i1 %392, label %399, label %393

393:                                              ; preds = %390
  %394 = getelementptr inbounds %"class.ClipperLib::ClipperBase", ptr %32, i32 0, i32 6
  store i8 1, ptr %394, align 1, !tbaa !53
  %395 = load ptr, ptr %17, align 8, !tbaa !5
  %396 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %395, i32 0, i32 11
  %397 = load ptr, ptr %396, align 8, !tbaa !30
  %398 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %397, i32 0, i32 9
  store i32 -2, ptr %398, align 4, !tbaa !54
  br label %399

399:                                              ; preds = %393, %390
  %400 = load ptr, ptr %17, align 8, !tbaa !5
  store ptr %400, ptr %18, align 8, !tbaa !5
  br label %401

401:                                              ; preds = %421, %399
  %402 = load ptr, ptr %18, align 8, !tbaa !5
  %403 = load i32, ptr %8, align 4, !tbaa !9
  call void @_ZN10ClipperLib9InitEdge2ERNS_5TEdgeENS_8PolyTypeE(ptr noundef nonnull align 8 dereferenceable(136) %402, i32 noundef %403)
  %404 = load ptr, ptr %18, align 8, !tbaa !5
  %405 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %404, i32 0, i32 10
  %406 = load ptr, ptr %405, align 8, !tbaa !24
  store ptr %406, ptr %18, align 8, !tbaa !5
  %407 = load i8, ptr %15, align 1, !tbaa !11, !range !13, !noundef !14
  %408 = trunc i8 %407 to i1
  br i1 %408, label %409, label %420

409:                                              ; preds = %401
  %410 = load ptr, ptr %18, align 8, !tbaa !5
  %411 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %410, i32 0, i32 1
  %412 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %411, i32 0, i32 1
  %413 = load i64, ptr %412, align 8, !tbaa !55
  %414 = load ptr, ptr %17, align 8, !tbaa !5
  %415 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %414, i32 0, i32 1
  %416 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %415, i32 0, i32 1
  %417 = load i64, ptr %416, align 8, !tbaa !55
  %418 = icmp ne i64 %413, %417
  br i1 %418, label %419, label %420

419:                                              ; preds = %409
  store i8 0, ptr %15, align 1, !tbaa !11
  br label %420

420:                                              ; preds = %419, %409, %401
  br label %421

421:                                              ; preds = %420
  %422 = load ptr, ptr %18, align 8, !tbaa !5
  %423 = load ptr, ptr %17, align 8, !tbaa !5
  %424 = icmp ne ptr %422, %423
  br i1 %424, label %401, label %425, !llvm.loop !56

425:                                              ; preds = %421
  %426 = load i8, ptr %15, align 1, !tbaa !11, !range !13, !noundef !14
  %427 = trunc i8 %426 to i1
  br i1 %427, label %428, label %489

428:                                              ; preds = %425
  %429 = load i8, ptr %9, align 1, !tbaa !11, !range !13, !noundef !14
  %430 = trunc i8 %429 to i1
  br i1 %430, label %431, label %436

431:                                              ; preds = %428
  %432 = load ptr, ptr %14, align 8, !tbaa !5
  %433 = icmp eq ptr %432, null
  br i1 %433, label %435, label %434

434:                                              ; preds = %431
  call void @_ZdaPv(ptr noundef %432) #13
  br label %435

435:                                              ; preds = %434, %431
  store i1 false, ptr %5, align 1
  store i32 1, ptr %13, align 4
  br label %636

436:                                              ; preds = %428
  %437 = load ptr, ptr %18, align 8, !tbaa !5
  %438 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %437, i32 0, i32 11
  %439 = load ptr, ptr %438, align 8, !tbaa !30
  %440 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %439, i32 0, i32 9
  store i32 -2, ptr %440, align 4, !tbaa !54
  call void @llvm.lifetime.start.p0(i64 24, ptr %26) #10
  %441 = load ptr, ptr %18, align 8, !tbaa !5
  %442 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %441, i32 0, i32 0
  %443 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %442, i32 0, i32 1
  %444 = load i64, ptr %443, align 8, !tbaa !57
  %445 = getelementptr inbounds %"struct.ClipperLib::LocalMinimum", ptr %26, i32 0, i32 0
  store i64 %444, ptr %445, align 8, !tbaa !58
  %446 = getelementptr inbounds %"struct.ClipperLib::LocalMinimum", ptr %26, i32 0, i32 1
  store ptr null, ptr %446, align 8, !tbaa !60
  %447 = load ptr, ptr %18, align 8, !tbaa !5
  %448 = getelementptr inbounds %"struct.ClipperLib::LocalMinimum", ptr %26, i32 0, i32 2
  store ptr %447, ptr %448, align 8, !tbaa !61
  %449 = getelementptr inbounds %"struct.ClipperLib::LocalMinimum", ptr %26, i32 0, i32 2
  %450 = load ptr, ptr %449, align 8, !tbaa !61
  %451 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %450, i32 0, i32 5
  store i32 2, ptr %451, align 4, !tbaa !62
  %452 = getelementptr inbounds %"struct.ClipperLib::LocalMinimum", ptr %26, i32 0, i32 2
  %453 = load ptr, ptr %452, align 8, !tbaa !61
  %454 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %453, i32 0, i32 6
  store i32 0, ptr %454, align 8, !tbaa !63
  br label %455

455:                                              ; preds = %477, %436
  %456 = load ptr, ptr %18, align 8, !tbaa !5
  %457 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %456, i32 0, i32 0
  %458 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %457, i32 0, i32 0
  %459 = load i64, ptr %458, align 8, !tbaa !64
  %460 = load ptr, ptr %18, align 8, !tbaa !5
  %461 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %460, i32 0, i32 11
  %462 = load ptr, ptr %461, align 8, !tbaa !30
  %463 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %462, i32 0, i32 2
  %464 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %463, i32 0, i32 0
  %465 = load i64, ptr %464, align 8, !tbaa !65
  %466 = icmp ne i64 %459, %465
  br i1 %466, label %467, label %469

467:                                              ; preds = %455
  %468 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN10ClipperLib17ReverseHorizontalERNS_5TEdgeE(ptr noundef nonnull align 8 dereferenceable(136) %468)
  br label %469

469:                                              ; preds = %467, %455
  %470 = load ptr, ptr %18, align 8, !tbaa !5
  %471 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %470, i32 0, i32 10
  %472 = load ptr, ptr %471, align 8, !tbaa !24
  %473 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %472, i32 0, i32 9
  %474 = load i32, ptr %473, align 4, !tbaa !54
  %475 = icmp eq i32 %474, -2
  br i1 %475, label %476, label %477

476:                                              ; preds = %469
  br label %486

477:                                              ; preds = %469
  %478 = load ptr, ptr %18, align 8, !tbaa !5
  %479 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %478, i32 0, i32 10
  %480 = load ptr, ptr %479, align 8, !tbaa !24
  %481 = load ptr, ptr %18, align 8, !tbaa !5
  %482 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %481, i32 0, i32 12
  store ptr %480, ptr %482, align 8, !tbaa !66
  %483 = load ptr, ptr %18, align 8, !tbaa !5
  %484 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %483, i32 0, i32 10
  %485 = load ptr, ptr %484, align 8, !tbaa !24
  store ptr %485, ptr %18, align 8, !tbaa !5
  br label %455, !llvm.loop !67

486:                                              ; preds = %476
  %487 = getelementptr inbounds %"class.ClipperLib::ClipperBase", ptr %32, i32 0, i32 2
  call void @_ZNSt6vectorIN10ClipperLib12LocalMinimumESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %487, ptr noundef nonnull align 8 dereferenceable(24) %26)
  %488 = getelementptr inbounds %"class.ClipperLib::ClipperBase", ptr %32, i32 0, i32 4
  call void @_ZNSt6vectorIPN10ClipperLib5TEdgeESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %488, ptr noundef nonnull align 8 dereferenceable(8) %14)
  store i1 true, ptr %5, align 1
  store i32 1, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %26) #10
  br label %636

489:                                              ; preds = %425
  %490 = getelementptr inbounds %"class.ClipperLib::ClipperBase", ptr %32, i32 0, i32 4
  call void @_ZNSt6vectorIPN10ClipperLib5TEdgeESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %490, ptr noundef nonnull align 8 dereferenceable(8) %14)
  call void @llvm.lifetime.start.p0(i64 1, ptr %27) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #10
  store ptr null, ptr %28, align 8, !tbaa !5
  %491 = load ptr, ptr %18, align 8, !tbaa !5
  %492 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %491, i32 0, i32 11
  %493 = load ptr, ptr %492, align 8, !tbaa !30
  %494 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %493, i32 0, i32 0
  %495 = load ptr, ptr %18, align 8, !tbaa !5
  %496 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %495, i32 0, i32 11
  %497 = load ptr, ptr %496, align 8, !tbaa !30
  %498 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %497, i32 0, i32 2
  %499 = call noundef zeroext i1 @_ZN10ClipperLibeqERKNS_8IntPointES2_(ptr noundef nonnull align 8 dereferenceable(16) %494, ptr noundef nonnull align 8 dereferenceable(16) %498)
  br i1 %499, label %500, label %504

500:                                              ; preds = %489
  %501 = load ptr, ptr %18, align 8, !tbaa !5
  %502 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %501, i32 0, i32 10
  %503 = load ptr, ptr %502, align 8, !tbaa !24
  store ptr %503, ptr %18, align 8, !tbaa !5
  br label %504

504:                                              ; preds = %500, %489
  br label %505

505:                                              ; preds = %634, %504
  %506 = load ptr, ptr %18, align 8, !tbaa !5
  %507 = call noundef ptr @_ZN10ClipperLib14FindNextLocMinEPNS_5TEdgeE(ptr noundef %506)
  store ptr %507, ptr %18, align 8, !tbaa !5
  %508 = load ptr, ptr %18, align 8, !tbaa !5
  %509 = load ptr, ptr %28, align 8, !tbaa !5
  %510 = icmp eq ptr %508, %509
  br i1 %510, label %511, label %512

511:                                              ; preds = %505
  br label %635

512:                                              ; preds = %505
  %513 = load ptr, ptr %28, align 8, !tbaa !5
  %514 = icmp ne ptr %513, null
  br i1 %514, label %517, label %515

515:                                              ; preds = %512
  %516 = load ptr, ptr %18, align 8, !tbaa !5
  store ptr %516, ptr %28, align 8, !tbaa !5
  br label %517

517:                                              ; preds = %515, %512
  br label %518

518:                                              ; preds = %517
  call void @llvm.lifetime.start.p0(i64 24, ptr %29) #10
  %519 = load ptr, ptr %18, align 8, !tbaa !5
  %520 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %519, i32 0, i32 0
  %521 = getelementptr inbounds %"struct.ClipperLib::IntPoint", ptr %520, i32 0, i32 1
  %522 = load i64, ptr %521, align 8, !tbaa !57
  %523 = getelementptr inbounds %"struct.ClipperLib::LocalMinimum", ptr %29, i32 0, i32 0
  store i64 %522, ptr %523, align 8, !tbaa !58
  %524 = load ptr, ptr %18, align 8, !tbaa !5
  %525 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %524, i32 0, i32 3
  %526 = load double, ptr %525, align 8, !tbaa !68
  %527 = load ptr, ptr %18, align 8, !tbaa !5
  %528 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %527, i32 0, i32 11
  %529 = load ptr, ptr %528, align 8, !tbaa !30
  %530 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %529, i32 0, i32 3
  %531 = load double, ptr %530, align 8, !tbaa !68
  %532 = fcmp olt double %526, %531
  br i1 %532, label %533, label %540

533:                                              ; preds = %518
  %534 = load ptr, ptr %18, align 8, !tbaa !5
  %535 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %534, i32 0, i32 11
  %536 = load ptr, ptr %535, align 8, !tbaa !30
  %537 = getelementptr inbounds %"struct.ClipperLib::LocalMinimum", ptr %29, i32 0, i32 1
  store ptr %536, ptr %537, align 8, !tbaa !60
  %538 = load ptr, ptr %18, align 8, !tbaa !5
  %539 = getelementptr inbounds %"struct.ClipperLib::LocalMinimum", ptr %29, i32 0, i32 2
  store ptr %538, ptr %539, align 8, !tbaa !61
  store i8 0, ptr %27, align 1, !tbaa !11
  br label %547

540:                                              ; preds = %518
  %541 = load ptr, ptr %18, align 8, !tbaa !5
  %542 = getelementptr inbounds %"struct.ClipperLib::LocalMinimum", ptr %29, i32 0, i32 1
  store ptr %541, ptr %542, align 8, !tbaa !60
  %543 = load ptr, ptr %18, align 8, !tbaa !5
  %544 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %543, i32 0, i32 11
  %545 = load ptr, ptr %544, align 8, !tbaa !30
  %546 = getelementptr inbounds %"struct.ClipperLib::LocalMinimum", ptr %29, i32 0, i32 2
  store ptr %545, ptr %546, align 8, !tbaa !61
  store i8 1, ptr %27, align 1, !tbaa !11
  br label %547

547:                                              ; preds = %540, %533
  %548 = load i8, ptr %9, align 1, !tbaa !11, !range !13, !noundef !14
  %549 = trunc i8 %548 to i1
  br i1 %549, label %554, label %550

550:                                              ; preds = %547
  %551 = getelementptr inbounds %"struct.ClipperLib::LocalMinimum", ptr %29, i32 0, i32 1
  %552 = load ptr, ptr %551, align 8, !tbaa !60
  %553 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %552, i32 0, i32 6
  store i32 0, ptr %553, align 8, !tbaa !63
  br label %571

554:                                              ; preds = %547
  %555 = getelementptr inbounds %"struct.ClipperLib::LocalMinimum", ptr %29, i32 0, i32 1
  %556 = load ptr, ptr %555, align 8, !tbaa !60
  %557 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %556, i32 0, i32 10
  %558 = load ptr, ptr %557, align 8, !tbaa !24
  %559 = getelementptr inbounds %"struct.ClipperLib::LocalMinimum", ptr %29, i32 0, i32 2
  %560 = load ptr, ptr %559, align 8, !tbaa !61
  %561 = icmp eq ptr %558, %560
  br i1 %561, label %562, label %566

562:                                              ; preds = %554
  %563 = getelementptr inbounds %"struct.ClipperLib::LocalMinimum", ptr %29, i32 0, i32 1
  %564 = load ptr, ptr %563, align 8, !tbaa !60
  %565 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %564, i32 0, i32 6
  store i32 -1, ptr %565, align 8, !tbaa !63
  br label %570

566:                                              ; preds = %554
  %567 = getelementptr inbounds %"struct.ClipperLib::LocalMinimum", ptr %29, i32 0, i32 1
  %568 = load ptr, ptr %567, align 8, !tbaa !60
  %569 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %568, i32 0, i32 6
  store i32 1, ptr %569, align 8, !tbaa !63
  br label %570

570:                                              ; preds = %566, %562
  br label %571

571:                                              ; preds = %570, %550
  %572 = getelementptr inbounds %"struct.ClipperLib::LocalMinimum", ptr %29, i32 0, i32 1
  %573 = load ptr, ptr %572, align 8, !tbaa !60
  %574 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %573, i32 0, i32 6
  %575 = load i32, ptr %574, align 8, !tbaa !63
  %576 = sub nsw i32 0, %575
  %577 = getelementptr inbounds %"struct.ClipperLib::LocalMinimum", ptr %29, i32 0, i32 2
  %578 = load ptr, ptr %577, align 8, !tbaa !61
  %579 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %578, i32 0, i32 6
  store i32 %576, ptr %579, align 8, !tbaa !63
  %580 = getelementptr inbounds %"struct.ClipperLib::LocalMinimum", ptr %29, i32 0, i32 1
  %581 = load ptr, ptr %580, align 8, !tbaa !60
  %582 = load i8, ptr %27, align 1, !tbaa !11, !range !13, !noundef !14
  %583 = trunc i8 %582 to i1
  %584 = call noundef ptr @_ZN10ClipperLib11ClipperBase12ProcessBoundEPNS_5TEdgeEb(ptr noundef nonnull align 8 dereferenceable(144) %32, ptr noundef %581, i1 noundef zeroext %583)
  store ptr %584, ptr %18, align 8, !tbaa !5
  %585 = load ptr, ptr %18, align 8, !tbaa !5
  %586 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %585, i32 0, i32 9
  %587 = load i32, ptr %586, align 4, !tbaa !54
  %588 = icmp eq i32 %587, -2
  br i1 %588, label %589, label %594

589:                                              ; preds = %571
  %590 = load ptr, ptr %18, align 8, !tbaa !5
  %591 = load i8, ptr %27, align 1, !tbaa !11, !range !13, !noundef !14
  %592 = trunc i8 %591 to i1
  %593 = call noundef ptr @_ZN10ClipperLib11ClipperBase12ProcessBoundEPNS_5TEdgeEb(ptr noundef nonnull align 8 dereferenceable(144) %32, ptr noundef %590, i1 noundef zeroext %592)
  store ptr %593, ptr %18, align 8, !tbaa !5
  br label %594

594:                                              ; preds = %589, %571
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #10
  %595 = getelementptr inbounds %"struct.ClipperLib::LocalMinimum", ptr %29, i32 0, i32 2
  %596 = load ptr, ptr %595, align 8, !tbaa !61
  %597 = load i8, ptr %27, align 1, !tbaa !11, !range !13, !noundef !14
  %598 = trunc i8 %597 to i1
  %599 = xor i1 %598, true
  %600 = call noundef ptr @_ZN10ClipperLib11ClipperBase12ProcessBoundEPNS_5TEdgeEb(ptr noundef nonnull align 8 dereferenceable(144) %32, ptr noundef %596, i1 noundef zeroext %599)
  store ptr %600, ptr %30, align 8, !tbaa !5
  %601 = load ptr, ptr %30, align 8, !tbaa !5
  %602 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %601, i32 0, i32 9
  %603 = load i32, ptr %602, align 4, !tbaa !54
  %604 = icmp eq i32 %603, -2
  br i1 %604, label %605, label %611

605:                                              ; preds = %594
  %606 = load ptr, ptr %30, align 8, !tbaa !5
  %607 = load i8, ptr %27, align 1, !tbaa !11, !range !13, !noundef !14
  %608 = trunc i8 %607 to i1
  %609 = xor i1 %608, true
  %610 = call noundef ptr @_ZN10ClipperLib11ClipperBase12ProcessBoundEPNS_5TEdgeEb(ptr noundef nonnull align 8 dereferenceable(144) %32, ptr noundef %606, i1 noundef zeroext %609)
  store ptr %610, ptr %30, align 8, !tbaa !5
  br label %611

611:                                              ; preds = %605, %594
  %612 = getelementptr inbounds %"struct.ClipperLib::LocalMinimum", ptr %29, i32 0, i32 1
  %613 = load ptr, ptr %612, align 8, !tbaa !60
  %614 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %613, i32 0, i32 9
  %615 = load i32, ptr %614, align 4, !tbaa !54
  %616 = icmp eq i32 %615, -2
  br i1 %616, label %617, label %619

617:                                              ; preds = %611
  %618 = getelementptr inbounds %"struct.ClipperLib::LocalMinimum", ptr %29, i32 0, i32 1
  store ptr null, ptr %618, align 8, !tbaa !60
  br label %628

619:                                              ; preds = %611
  %620 = getelementptr inbounds %"struct.ClipperLib::LocalMinimum", ptr %29, i32 0, i32 2
  %621 = load ptr, ptr %620, align 8, !tbaa !61
  %622 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %621, i32 0, i32 9
  %623 = load i32, ptr %622, align 4, !tbaa !54
  %624 = icmp eq i32 %623, -2
  br i1 %624, label %625, label %627

625:                                              ; preds = %619
  %626 = getelementptr inbounds %"struct.ClipperLib::LocalMinimum", ptr %29, i32 0, i32 2
  store ptr null, ptr %626, align 8, !tbaa !61
  br label %627

627:                                              ; preds = %625, %619
  br label %628

628:                                              ; preds = %627, %617
  %629 = getelementptr inbounds %"class.ClipperLib::ClipperBase", ptr %32, i32 0, i32 2
  call void @_ZNSt6vectorIN10ClipperLib12LocalMinimumESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %629, ptr noundef nonnull align 8 dereferenceable(24) %29)
  %630 = load i8, ptr %27, align 1, !tbaa !11, !range !13, !noundef !14
  %631 = trunc i8 %630 to i1
  br i1 %631, label %634, label %632

632:                                              ; preds = %628
  %633 = load ptr, ptr %30, align 8, !tbaa !5
  store ptr %633, ptr %18, align 8, !tbaa !5
  br label %634

634:                                              ; preds = %632, %628
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr %29) #10
  br label %505, !llvm.loop !69

635:                                              ; preds = %511
  store i1 true, ptr %5, align 1
  store i32 1, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %27) #10
  br label %636

636:                                              ; preds = %635, %486, %435, %389
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #10
  br label %638

637:                                              ; preds = %222, %169
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #10
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #10
  br label %640

638:                                              ; preds = %636, %102
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #10
  %639 = load i1, ptr %5, align 1
  ret i1 %639

640:                                              ; preds = %637, %41
  %641 = load ptr, ptr %10, align 8
  %642 = load i32, ptr %11, align 4
  %643 = insertvalue { ptr, i32 } poison, ptr %641, 0
  %644 = insertvalue { ptr, i32 } %643, i32 %642, 1
  resume { ptr, i32 } %644

645:                                              ; preds = %218
  %646 = landingpad { ptr, i32 }
          catch ptr null
  %647 = extractvalue { ptr, i32 } %646, 0
  call void @__clang_call_terminate(ptr %647) #14
  unreachable

648:                                              ; preds = %216
  unreachable
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #6

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN10ClipperLib8InitEdgeEPNS_5TEdgeES1_S1_RKNS_8IntPointE(ptr noundef, ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(16)) #3

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) #9

declare void @__cxa_rethrow()

declare void @__cxa_end_catch()

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { noinline noreturn nounwind uwtable "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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { 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 #9 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #10 = { nounwind }
attributes #11 = { noreturn }
attributes #12 = { builtin allocsize(0) }
attributes #13 = { builtin nounwind }
attributes #14 = { noreturn 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 = !{!"_ZTSN10ClipperLib8PolyTypeE", !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 = !{!"int", !7, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}
!20 = !{i64 0, i64 8, !21, i64 8, i64 8, !21}
!21 = !{!22, !22, i64 0}
!22 = !{!"long long", !7, i64 0}
!23 = distinct !{!23, !18}
!24 = !{!25, !6, i64 80}
!25 = !{!"_ZTSN10ClipperLib5TEdgeE", !26, i64 0, !26, i64 16, !26, i64 32, !27, i64 48, !10, i64 56, !28, i64 60, !16, i64 64, !16, i64 68, !16, i64 72, !16, i64 76, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128}
!26 = !{!"_ZTSN10ClipperLib8IntPointE", !22, i64 0, !22, i64 8}
!27 = !{!"double", !7, i64 0}
!28 = !{!"_ZTSN10ClipperLib8EdgeSideE", !7, i64 0}
!29 = distinct !{!29, !18}
!30 = !{!25, !6, i64 88}
!31 = !{!32, !12, i64 40}
!32 = !{!"_ZTSN10ClipperLib11ClipperBaseE", !33, i64 8, !34, i64 16, !12, i64 40, !38, i64 48, !12, i64 72, !12, i64 73, !42, i64 80, !6, i64 104, !46, i64 112}
!33 = !{!"_ZTSN9__gnu_cxx17__normal_iteratorIPN10ClipperLib12LocalMinimumESt6vectorIS2_SaIS2_EEEE", !6, i64 0}
!34 = !{!"_ZTSSt6vectorIN10ClipperLib12LocalMinimumESaIS1_EE", !35, i64 0}
!35 = !{!"_ZTSSt12_Vector_baseIN10ClipperLib12LocalMinimumESaIS1_EE", !36, i64 0}
!36 = !{!"_ZTSNSt12_Vector_baseIN10ClipperLib12LocalMinimumESaIS1_EE12_Vector_implE", !37, i64 0}
!37 = !{!"_ZTSNSt12_Vector_baseIN10ClipperLib12LocalMinimumESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!38 = !{!"_ZTSSt6vectorIPN10ClipperLib5TEdgeESaIS2_EE", !39, i64 0}
!39 = !{!"_ZTSSt12_Vector_baseIPN10ClipperLib5TEdgeESaIS2_EE", !40, i64 0}
!40 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib5TEdgeESaIS2_EE12_Vector_implE", !41, i64 0}
!41 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib5TEdgeESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!42 = !{!"_ZTSSt6vectorIPN10ClipperLib6OutRecESaIS2_EE", !43, i64 0}
!43 = !{!"_ZTSSt12_Vector_baseIPN10ClipperLib6OutRecESaIS2_EE", !44, i64 0}
!44 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib6OutRecESaIS2_EE12_Vector_implE", !45, i64 0}
!45 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib6OutRecESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!46 = !{!"_ZTSSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEE", !47, i64 0, !51, i64 24}
!47 = !{!"_ZTSSt6vectorIxSaIxEE", !48, i64 0}
!48 = !{!"_ZTSSt12_Vector_baseIxSaIxEE", !49, i64 0}
!49 = !{!"_ZTSNSt12_Vector_baseIxSaIxEE12_Vector_implE", !50, i64 0}
!50 = !{!"_ZTSNSt12_Vector_baseIxSaIxEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!51 = !{!"_ZTSSt4lessIxE"}
!52 = !{!32, !12, i64 72}
!53 = !{!32, !12, i64 73}
!54 = !{!25, !16, i64 76}
!55 = !{!25, !22, i64 24}
!56 = distinct !{!56, !18}
!57 = !{!25, !22, i64 8}
!58 = !{!59, !22, i64 0}
!59 = !{!"_ZTSN10ClipperLib12LocalMinimumE", !22, i64 0, !6, i64 8, !6, i64 16}
!60 = !{!59, !6, i64 8}
!61 = !{!59, !6, i64 16}
!62 = !{!25, !28, i64 60}
!63 = !{!25, !16, i64 64}
!64 = !{!25, !22, i64 0}
!65 = !{!25, !22, i64 32}
!66 = !{!25, !6, i64 96}
!67 = distinct !{!67, !18}
!68 = !{!25, !27, i64 48}
!69 = distinct !{!69, !18}


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

%"struct.ClipperLib::LocalMinimum" = type { i64, ptr, ptr }
%"struct.ClipperLib::TEdge" = type { %"struct.ClipperLib::IntPoint", %"struct.ClipperLib::IntPoint", %"struct.ClipperLib::IntPoint", double, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%"struct.ClipperLib::IntPoint" = type { i64, i64 }

@_ZTIN10ClipperLib16clipperExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.1 = external hidden unnamed_addr constant [37 x i8], align 1

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN10ClipperLib11SlopesEqualENS_8IntPointES0_S0_b(i64, i64, i64, i64, i64, i64, i1 noundef zeroext) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10ClipperLib9InitEdge2ERNS_5TEdgeENS_8PolyTypeE(ptr noundef nonnull align 8 dereferenceable(136), i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN10ClipperLib10RemoveEdgeEPNS_5TEdgeE(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN10ClipperLib21Pt2IsBetweenPt1AndPt3ENS_8IntPointES0_S0_(i64, i64, i64, i64, i64, i64) local_unnamed_addr #4

declare i32 @__gxx_personality_v0(...)

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) local_unnamed_addr #5

declare ptr @__cxa_begin_catch(ptr) local_unnamed_addr

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

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

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

declare void @__cxa_free_exception(ptr) local_unnamed_addr

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN10ClipperLib14FindNextLocMinEPNS_5TEdgeE(ptr noundef) local_unnamed_addr #4

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN10ClipperLib17ReverseHorizontalERNS_5TEdgeE(ptr noundef nonnull align 8 dereferenceable(136)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN10ClipperLib11ClipperBase7AddPathERKSt6vectorINS_8IntPointESaIS2_EENS_8PolyTypeEb(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, i32 noundef %2, i1 noundef zeroext %3) unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca %"struct.ClipperLib::LocalMinimum", align 8
  %7 = alloca %"struct.ClipperLib::LocalMinimum", align 8
  %8 = icmp ne i32 %2, 1
  %or.cond.not = or i1 %8, %3
  br i1 %or.cond.not, label %14, label %9

9:                                                ; preds = %4
  %10 = tail call ptr @__cxa_allocate_exception(i64 40) #10
  invoke void @_ZN10ClipperLib16clipperExceptionC2EPKc(ptr noundef nonnull align 8 dereferenceable(40) %10, ptr noundef nonnull @.str.1)
          to label %11 unwind label %12

11:                                               ; preds = %9
  tail call void @__cxa_throw(ptr nonnull %10, ptr nonnull @_ZTIN10ClipperLib16clipperExceptionE, ptr nonnull @_ZN10ClipperLib16clipperExceptionD2Ev) #11
  unreachable

12:                                               ; preds = %9
  %13 = landingpad { ptr, i32 }
          cleanup
  tail call void @__cxa_free_exception(ptr %10) #10
  br label %278

14:                                               ; preds = %4
  %15 = tail call noundef i64 @_ZNKSt6vectorIN10ClipperLib8IntPointESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #10
  %16 = trunc i64 %15 to i32
  %17 = add i32 %16, -1
  %18 = icmp sgt i32 %16, 1
  %or.cond10 = and i1 %18, %3
  br i1 %or.cond10, label %.preheader.preheader, label %.critedge

.preheader.preheader:                             ; preds = %14
  %19 = zext nneg i32 %17 to i64
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %23
  %indvars.iv = phi i64 [ %19, %.preheader.preheader ], [ %indvars.iv.next, %23 ]
  %20 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv) #10
  %21 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #10
  %22 = tail call noundef zeroext i1 @_ZN10ClipperLibeqERKNS_8IntPointES2_(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 8 dereferenceable(16) %21)
  br i1 %22, label %23, label %.critedge.loopexit.split.loop.exit291

23:                                               ; preds = %.preheader
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %.old9 = icmp sgt i64 %indvars.iv, 1
  br i1 %.old9, label %.preheader, label %.critedge

.critedge.loopexit.split.loop.exit291:            ; preds = %.preheader
  %24 = trunc nuw nsw i64 %indvars.iv to i32
  br label %.critedge

.critedge:                                        ; preds = %23, %.critedge.loopexit.split.loop.exit291, %14
  %.1164 = phi i32 [ %17, %14 ], [ %24, %.critedge.loopexit.split.loop.exit291 ], [ 0, %23 ]
  %25 = zext i32 %.1164 to i64
  %smin = tail call i32 @llvm.smin.i32(i32 %.1164, i32 0)
  br label %26

26:                                               ; preds = %29, %.critedge
  %indvars.iv266 = phi i64 [ %31, %29 ], [ %25, %.critedge ]
  %27 = trunc nuw i64 %indvars.iv266 to i32
  %28 = icmp sgt i32 %27, 0
  br i1 %28, label %29, label %.critedge3

29:                                               ; preds = %26
  %30 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv266) #10
  %31 = add nsw i64 %indvars.iv266, -1
  %32 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %31) #10
  %33 = tail call noundef zeroext i1 @_ZN10ClipperLibeqERKNS_8IntPointES2_(ptr noundef nonnull align 8 dereferenceable(16) %30, ptr noundef nonnull align 8 dereferenceable(16) %32)
  br i1 %33, label %26, label %.critedge3, !llvm.loop !5

.critedge3:                                       ; preds = %26, %29
  %.2165.lcssa = phi i32 [ %smin, %26 ], [ %27, %29 ]
  %or.cond.v = zext i1 %3 to i32
  %or.cond = icmp sgt i32 %.2165.lcssa, %or.cond.v
  br i1 %or.cond, label %34, label %277

34:                                               ; preds = %.critedge3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #10
  %35 = add nuw nsw i32 %.2165.lcssa, 1
  %36 = zext nneg i32 %35 to i64
  %37 = mul nuw nsw i64 %36, 136
  %38 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %37) #12
  %39 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %38, i64 %36
  br label %40

40:                                               ; preds = %42, %34
  %41 = phi ptr [ %38, %34 ], [ %43, %42 ]
  invoke void @_ZN10ClipperLib5TEdgeC2Ev(ptr noundef nonnull align 8 dereferenceable(136) %41)
          to label %42 unwind label %105

42:                                               ; preds = %40
  %43 = getelementptr inbounds i8, ptr %41, i64 136
  %44 = icmp eq ptr %43, %39
  br i1 %44, label %.loopexit215, label %40

.loopexit215:                                     ; preds = %42
  store ptr %38, ptr %5, align 8, !tbaa !7
  %45 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 1) #10
  %46 = getelementptr inbounds i8, ptr %38, i64 152
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %46, ptr noundef nonnull align 8 dereferenceable(16) %45, i64 16, i1 false), !tbaa.struct !11
  %47 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #10
  %48 = getelementptr inbounds i8, ptr %0, i64 40
  invoke void @_ZN10ClipperLib9RangeTestERKNS_8IntPointERb(ptr noundef nonnull align 8 dereferenceable(16) %47, ptr noundef nonnull align 1 dereferenceable(1) %48)
          to label %49 unwind label %107

49:                                               ; preds = %.loopexit215
  %50 = sext i32 %.2165.lcssa to i64
  %51 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %50) #10
  invoke void @_ZN10ClipperLib9RangeTestERKNS_8IntPointERb(ptr noundef nonnull align 8 dereferenceable(16) %51, ptr noundef nonnull align 1 dereferenceable(1) %48)
          to label %52 unwind label %107

52:                                               ; preds = %49
  %53 = load ptr, ptr %5, align 8, !tbaa !7
  %54 = getelementptr inbounds i8, ptr %53, i64 136
  %55 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %53, i64 %50
  %56 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #10
  tail call void @_ZN10ClipperLib8InitEdgeEPNS_5TEdgeES1_S1_RKNS_8IntPointE(ptr noundef %53, ptr noundef nonnull %54, ptr noundef %55, ptr noundef nonnull align 8 dereferenceable(16) %56)
  %57 = add i32 %.2165.lcssa, -1
  %58 = sext i32 %57 to i64
  %59 = getelementptr inbounds %"struct.ClipperLib::TEdge", ptr %53, i64 %58
  %60 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %50) #10
  tail call void @_ZN10ClipperLib8InitEdgeEPNS_5TEdgeES1_S1_RKNS_8IntPointE(ptr noundef %55, ptr noundef %53, ptr noundef %59, ptr noundef nonnull align 8 dereferenceable(16) %60)
  %61 = icmp sgt i32 %.2165.lcssa, 1
  br i1 %61, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %52
  %62 = zext nneg i32 %57 to i64
  br label %.lr.ph

._crit_edge:                                      ; preds = %110, %52
  %63 = phi ptr [ %53, %52 ], [ %111, %110 ]
  %64 = getelementptr inbounds i8, ptr %0, i64 72
  br i1 %3, label %.outer.us, label %.outer

.outer.us:                                        ; preds = %._crit_edge, %.outer.us.backedge
  %.0175.ph.us = phi ptr [ %.0175.ph.us.be, %.outer.us.backedge ], [ %63, %._crit_edge ]
  %.0169.ph.us = phi ptr [ %.0169.ph.us.be, %.outer.us.backedge ], [ %63, %._crit_edge ]
  br label %74

65:                                               ; preds = %.split.us.us
  %66 = load ptr, ptr %76, align 8, !tbaa !14
  br label %67

67:                                               ; preds = %.split.us.us, %65
  %.2171.us = phi ptr [ %66, %65 ], [ %.0169.ph.us, %.split.us.us ]
  %68 = tail call noundef ptr @_ZN10ClipperLib10RemoveEdgeEPNS_5TEdgeE(ptr noundef nonnull %.0172.us.us)
  %69 = getelementptr inbounds i8, ptr %68, i64 88
  %70 = load ptr, ptr %69, align 8, !tbaa !21
  br label %.outer.us.backedge

71:                                               ; preds = %.split233.us.us
  %72 = icmp eq ptr %.0172.us.us, %.0169.ph.us
  %spec.select.us = select i1 %72, ptr %103, ptr %.0169.ph.us
  %73 = tail call noundef ptr @_ZN10ClipperLib10RemoveEdgeEPNS_5TEdgeE(ptr noundef nonnull %.0172.us.us)
  br label %.outer.us.backedge

.outer.us.backedge:                               ; preds = %71, %67
  %.0175.ph.us.be = phi ptr [ %70, %67 ], [ %73, %71 ]
  %.0169.ph.us.be = phi ptr [ %.2171.us, %67 ], [ %spec.select.us, %71 ]
  br label %.outer.us, !llvm.loop !22

74:                                               ; preds = %.thread208.us.us, %.outer.us
  %.0172.us.us = phi ptr [ %.0175.ph.us, %.outer.us ], [ %100, %.thread208.us.us ]
  %75 = getelementptr inbounds i8, ptr %.0172.us.us, i64 16
  %76 = getelementptr inbounds i8, ptr %.0172.us.us, i64 80
  %77 = load ptr, ptr %76, align 8, !tbaa !14
  %78 = getelementptr inbounds i8, ptr %77, i64 16
  %79 = tail call noundef zeroext i1 @_ZN10ClipperLibeqERKNS_8IntPointES2_(ptr noundef nonnull align 8 dereferenceable(16) %75, ptr noundef nonnull align 8 dereferenceable(16) %78)
  br i1 %79, label %.split233.us.us, label %80

80:                                               ; preds = %74
  %81 = getelementptr inbounds i8, ptr %.0172.us.us, i64 88
  %82 = load ptr, ptr %81, align 8, !tbaa !21
  %83 = load ptr, ptr %76, align 8, !tbaa !14
  %84 = icmp eq ptr %82, %83
  br i1 %84, label %.loopexit213, label %85

85:                                               ; preds = %80
  %86 = getelementptr inbounds i8, ptr %82, i64 16
  %.sroa.027.0.copyload.us.us = load i64, ptr %86, align 8, !tbaa !12
  %.sroa.228.0..sroa_idx.us.us = getelementptr inbounds i8, ptr %82, i64 24
  %.sroa.228.0.copyload.us.us = load i64, ptr %.sroa.228.0..sroa_idx.us.us, align 8, !tbaa !12
  %.sroa.025.0.copyload.us.us = load i64, ptr %75, align 8, !tbaa !12
  %.sroa.226.0..sroa_idx.us.us = getelementptr inbounds i8, ptr %.0172.us.us, i64 24
  %.sroa.226.0.copyload.us.us = load i64, ptr %.sroa.226.0..sroa_idx.us.us, align 8, !tbaa !12
  %87 = getelementptr inbounds i8, ptr %83, i64 16
  %.sroa.023.0.copyload.us.us = load i64, ptr %87, align 8, !tbaa !12
  %.sroa.224.0..sroa_idx.us.us = getelementptr inbounds i8, ptr %83, i64 24
  %.sroa.224.0.copyload.us.us = load i64, ptr %.sroa.224.0..sroa_idx.us.us, align 8, !tbaa !12
  %88 = load i8, ptr %48, align 8, !tbaa !23, !range !45, !noundef !46
  %89 = trunc nuw i8 %88 to i1
  %90 = tail call noundef zeroext i1 @_ZN10ClipperLib11SlopesEqualENS_8IntPointES0_S0_b(i64 %.sroa.027.0.copyload.us.us, i64 %.sroa.228.0.copyload.us.us, i64 %.sroa.025.0.copyload.us.us, i64 %.sroa.226.0.copyload.us.us, i64 %.sroa.023.0.copyload.us.us, i64 %.sroa.224.0.copyload.us.us, i1 noundef zeroext %89)
  br i1 %90, label %91, label %.thread208.us.us

91:                                               ; preds = %85
  %92 = load i8, ptr %64, align 8, !tbaa !47, !range !45, !noundef !46
  %93 = trunc nuw i8 %92 to i1
  br i1 %93, label %94, label %.split.us.us

94:                                               ; preds = %91
  %95 = load ptr, ptr %81, align 8, !tbaa !21
  %96 = getelementptr inbounds i8, ptr %95, i64 16
  %.sroa.021.0.copyload.us.us = load i64, ptr %96, align 8, !tbaa !12
  %.sroa.222.0..sroa_idx.us.us = getelementptr inbounds i8, ptr %95, i64 24
  %.sroa.222.0.copyload.us.us = load i64, ptr %.sroa.222.0..sroa_idx.us.us, align 8, !tbaa !12
  %.sroa.019.0.copyload.us.us = load i64, ptr %75, align 8, !tbaa !12
  %.sroa.220.0.copyload.us.us = load i64, ptr %.sroa.226.0..sroa_idx.us.us, align 8, !tbaa !12
  %97 = load ptr, ptr %76, align 8, !tbaa !14
  %98 = getelementptr inbounds i8, ptr %97, i64 16
  %.sroa.0.0.copyload.us.us = load i64, ptr %98, align 8, !tbaa !12
  %.sroa.2.0..sroa_idx.us.us = getelementptr inbounds i8, ptr %97, i64 24
  %.sroa.2.0.copyload.us.us = load i64, ptr %.sroa.2.0..sroa_idx.us.us, align 8, !tbaa !12
  %99 = tail call noundef zeroext i1 @_ZN10ClipperLib21Pt2IsBetweenPt1AndPt3ENS_8IntPointES0_S0_(i64 %.sroa.021.0.copyload.us.us, i64 %.sroa.222.0.copyload.us.us, i64 %.sroa.019.0.copyload.us.us, i64 %.sroa.220.0.copyload.us.us, i64 %.sroa.0.0.copyload.us.us, i64 %.sroa.2.0.copyload.us.us)
  br i1 %99, label %.thread208.us.us, label %.split.us.us

.thread208.us.us:                                 ; preds = %94, %85
  %100 = load ptr, ptr %76, align 8, !tbaa !14
  %101 = icmp eq ptr %100, %.0175.ph.us
  br i1 %101, label %.loopexit213, label %74, !llvm.loop !22

.split.us.us:                                     ; preds = %94, %91
  %102 = icmp eq ptr %.0172.us.us, %.0169.ph.us
  br i1 %102, label %65, label %67

.split233.us.us:                                  ; preds = %74
  %103 = load ptr, ptr %76, align 8, !tbaa !14
  %104 = icmp eq ptr %.0172.us.us, %103
  br i1 %104, label %.loopexit213, label %71

105:                                              ; preds = %40
  %106 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdaPvm(ptr noundef nonnull %38, i64 noundef %37) #13
  br label %276

107:                                              ; preds = %49, %.loopexit215
  %108 = landingpad { ptr, i32 }
          catch ptr null
  br label %119

.lr.ph:                                           ; preds = %.lr.ph.preheader, %110
  %indvars.iv269 = phi i64 [ %62, %.lr.ph.preheader ], [ %indvars.iv.next270, %110 ]
  %109 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv269) #10
  invoke void @_ZN10ClipperLib9RangeTestERKNS_8IntPointERb(ptr noundef nonnull align 8 dereferenceable(16) %109, ptr noundef nonnull align 1 dereferenceable(1) %48)
          to label %110 unwind label %117

110:                                              ; preds = %.lr.ph
  %111 = load ptr, ptr %5, align 8, !tbaa !7
  %112 = getelementptr %"struct.ClipperLib::TEdge", ptr %111, i64 %indvars.iv269
  %113 = getelementptr inbounds i8, ptr %112, i64 136
  %114 = getelementptr i8, ptr %112, i64 -136
  %115 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN10ClipperLib8IntPointESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv269) #10
  tail call void @_ZN10ClipperLib8InitEdgeEPNS_5TEdgeES1_S1_RKNS_8IntPointE(ptr noundef nonnull %112, ptr noundef nonnull %113, ptr noundef %114, ptr noundef nonnull align 8 dereferenceable(16) %115)
  %indvars.iv.next270 = add nsw i64 %indvars.iv269, -1
  %116 = icmp sgt i64 %indvars.iv269, 1
  br i1 %116, label %.lr.ph, label %._crit_edge, !llvm.loop !48

117:                                              ; preds = %.lr.ph
  %118 = landingpad { ptr, i32 }
          catch ptr null
  br label %119

119:                                              ; preds = %117, %107
  %.pn = phi { ptr, i32 } [ %118, %117 ], [ %108, %107 ]
  %.0159 = extractvalue { ptr, i32 } %.pn, 0
  %120 = tail call ptr @__cxa_begin_catch(ptr %.0159) #10
  %121 = load ptr, ptr %5, align 8, !tbaa !7
  %122 = icmp eq ptr %121, null
  br i1 %122, label %124, label %123

123:                                              ; preds = %119
  tail call void @_ZdaPv(ptr noundef nonnull %121) #13
  br label %124

124:                                              ; preds = %123, %119
  invoke void @__cxa_rethrow() #11
          to label %282 unwind label %125

125:                                              ; preds = %124
  %126 = landingpad { ptr, i32 }
          cleanup
  invoke void @__cxa_end_catch()
          to label %276 unwind label %279

127:                                              ; preds = %148, %.outer
  %128 = phi ptr [ %150, %148 ], [ %.pre, %.outer ]
  %.0172 = phi ptr [ %146, %148 ], [ %.0175.ph, %.outer ]
  %129 = getelementptr inbounds i8, ptr %.0172, i64 16
  %130 = getelementptr inbounds i8, ptr %.0172, i64 80
  %131 = getelementptr inbounds i8, ptr %128, i64 16
  %132 = tail call noundef zeroext i1 @_ZN10ClipperLibeqERKNS_8IntPointES2_(ptr noundef nonnull align 8 dereferenceable(16) %129, ptr noundef nonnull align 8 dereferenceable(16) %131)
  br i1 %132, label %133, label %138

133:                                              ; preds = %127
  %134 = load ptr, ptr %130, align 8, !tbaa !14
  %.not = icmp eq ptr %134, %.0169.ph
  br i1 %.not, label %.thread, label %.split233

.split233:                                        ; preds = %133
  %135 = icmp eq ptr %.0172, %134
  br i1 %135, label %.loopexit213, label %.outer.backedge

.outer.backedge:                                  ; preds = %.split233
  %136 = icmp eq ptr %.0172, %.0169.ph
  %spec.select = select i1 %136, ptr %134, ptr %.0169.ph
  %137 = tail call noundef ptr @_ZN10ClipperLib10RemoveEdgeEPNS_5TEdgeE(ptr noundef nonnull %.0172)
  br label %.outer, !llvm.loop !22

.outer:                                           ; preds = %._crit_edge, %.outer.backedge
  %.0175.ph = phi ptr [ %137, %.outer.backedge ], [ %63, %._crit_edge ]
  %.0169.ph = phi ptr [ %spec.select, %.outer.backedge ], [ %63, %._crit_edge ]
  %.phi.trans.insert = getelementptr inbounds i8, ptr %.0175.ph, i64 80
  %.pre = load ptr, ptr %.phi.trans.insert, align 8, !tbaa !14
  br label %127

138:                                              ; preds = %127
  %139 = getelementptr inbounds i8, ptr %.0172, i64 88
  %140 = load ptr, ptr %139, align 8, !tbaa !21
  %141 = load ptr, ptr %130, align 8, !tbaa !14
  %142 = icmp eq ptr %140, %141
  br i1 %142, label %.loopexit213, label %.thread208

.thread:                                          ; preds = %133
  %143 = getelementptr inbounds i8, ptr %.0172, i64 88
  %144 = load ptr, ptr %143, align 8, !tbaa !21
  %145 = icmp eq ptr %144, %.0169.ph
  br i1 %145, label %.thread209, label %.thread208

.thread208:                                       ; preds = %138, %.thread
  %146 = phi ptr [ %141, %138 ], [ %134, %.thread ]
  %147 = icmp eq ptr %146, %.0175.ph
  br i1 %147, label %.loopexit213, label %148

148:                                              ; preds = %.thread208
  %149 = getelementptr inbounds i8, ptr %146, i64 80
  %150 = load ptr, ptr %149, align 8, !tbaa !14
  %151 = icmp eq ptr %150, %.0169.ph
  br i1 %151, label %.thread209, label %127, !llvm.loop !22

.loopexit213:                                     ; preds = %.split233, %138, %.thread208, %.split233.us.us, %80, %.thread208.us.us
  %.0169.ph227 = phi ptr [ %.0169.ph.us, %.thread208.us.us ], [ %.0169.ph.us, %80 ], [ %.0169.ph.us, %.split233.us.us ], [ %.0169.ph, %.thread208 ], [ %.0169.ph, %138 ], [ %.0169.ph, %.split233 ]
  %.1173 = phi ptr [ %.0172.us.us, %80 ], [ %100, %.thread208.us.us ], [ %.0172.us.us, %.split233.us.us ], [ %.0172, %138 ], [ %146, %.thread208 ], [ %.0172, %.split233 ]
  br i1 %3, label %.critedge203, label %.thread209

.thread209:                                       ; preds = %.thread, %148, %.loopexit213
  %.0169.ph226 = phi ptr [ %.0169.ph227, %.loopexit213 ], [ %.0169.ph, %148 ], [ %.0169.ph, %.thread ]
  %.1173211 = phi ptr [ %.1173, %.loopexit213 ], [ %.0172, %.thread ], [ %146, %148 ]
  %152 = getelementptr inbounds i8, ptr %.1173211, i64 80
  %153 = load ptr, ptr %152, align 8, !tbaa !14
  %154 = icmp eq ptr %.1173211, %153
  br i1 %154, label %160, label %.critedge205

.critedge203:                                     ; preds = %.loopexit213
  %155 = getelementptr inbounds i8, ptr %.1173, i64 88
  %156 = load ptr, ptr %155, align 8, !tbaa !21
  %157 = getelementptr inbounds i8, ptr %.1173, i64 80
  %158 = load ptr, ptr %157, align 8, !tbaa !14
  %159 = icmp eq ptr %156, %158
  br i1 %159, label %160, label %167

160:                                              ; preds = %.critedge203, %.thread209
  %161 = icmp eq ptr %63, null
  br i1 %161, label %.loopexit, label %162

162:                                              ; preds = %160
  tail call void @_ZdaPv(ptr noundef nonnull %63) #13
  br label %.loopexit

.critedge205:                                     ; preds = %.thread209
  %163 = getelementptr inbounds i8, ptr %0, i64 73
  store i8 1, ptr %163, align 1, !tbaa !49
  %164 = getelementptr inbounds i8, ptr %.0169.ph226, i64 88
  %165 = load ptr, ptr %164, align 8, !tbaa !21
  %166 = getelementptr inbounds i8, ptr %165, i64 76
  store i32 -2, ptr %166, align 4, !tbaa !50
  br label %167

167:                                              ; preds = %.critedge203, %.critedge205
  %.0169.ph225 = phi ptr [ %.0169.ph227, %.critedge203 ], [ %.0169.ph226, %.critedge205 ]
  %168 = getelementptr inbounds i8, ptr %.0169.ph225, i64 24
  br label %169

169:                                              ; preds = %177, %167
  %.2174 = phi ptr [ %.0169.ph225, %167 ], [ %171, %177 ]
  %.0166 = phi i8 [ 1, %167 ], [ %.1167, %177 ]
  tail call void @_ZN10ClipperLib9InitEdge2ERNS_5TEdgeENS_8PolyTypeE(ptr noundef nonnull align 8 dereferenceable(136) %.2174, i32 noundef %2)
  %170 = getelementptr inbounds i8, ptr %.2174, i64 80
  %171 = load ptr, ptr %170, align 8, !tbaa !14
  %172 = trunc nuw i8 %.0166 to i1
  br i1 %172, label %173, label %177

173:                                              ; preds = %169
  %174 = getelementptr inbounds i8, ptr %171, i64 24
  %175 = load i64, ptr %174, align 8, !tbaa !51
  %176 = load i64, ptr %168, align 8, !tbaa !51
  %.not194 = icmp eq i64 %175, %176
  %spec.select206 = select i1 %.not194, i8 %.0166, i8 0
  br label %177

177:                                              ; preds = %173, %169
  %.1167 = phi i8 [ %.0166, %169 ], [ %spec.select206, %173 ]
  %.not195 = icmp eq ptr %171, %.0169.ph225
  br i1 %.not195, label %178, label %169, !llvm.loop !52

178:                                              ; preds = %177
  %179 = trunc nuw i8 %.1167 to i1
  br i1 %179, label %180, label %211

180:                                              ; preds = %178
  br i1 %3, label %181, label %184

181:                                              ; preds = %180
  %182 = icmp eq ptr %63, null
  br i1 %182, label %.loopexit, label %183

183:                                              ; preds = %181
  tail call void @_ZdaPv(ptr noundef nonnull %63) #13
  br label %.loopexit

184:                                              ; preds = %180
  %185 = getelementptr inbounds i8, ptr %171, i64 88
  %186 = load ptr, ptr %185, align 8, !tbaa !21
  %187 = getelementptr inbounds i8, ptr %186, i64 76
  store i32 -2, ptr %187, align 4, !tbaa !50
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #10
  %188 = getelementptr inbounds i8, ptr %171, i64 8
  %189 = load i64, ptr %188, align 8, !tbaa !53
  store i64 %189, ptr %6, align 8, !tbaa !54
  %190 = getelementptr inbounds i8, ptr %6, i64 8
  store ptr null, ptr %190, align 8, !tbaa !56
  %191 = getelementptr inbounds i8, ptr %6, i64 16
  store ptr %171, ptr %191, align 8, !tbaa !57
  %192 = getelementptr inbounds i8, ptr %171, i64 60
  store i32 2, ptr %192, align 4, !tbaa !58
  %193 = getelementptr inbounds i8, ptr %171, i64 64
  store i32 0, ptr %193, align 8, !tbaa !59
  br label %194

194:                                              ; preds = %206, %184
  %195 = phi ptr [ %186, %184 ], [ %.pre273, %206 ]
  %.3 = phi ptr [ %171, %184 ], [ %202, %206 ]
  %196 = load i64, ptr %.3, align 8, !tbaa !60
  %197 = getelementptr inbounds i8, ptr %195, i64 32
  %198 = load i64, ptr %197, align 8, !tbaa !61
  %.not197 = icmp eq i64 %196, %198
  br i1 %.not197, label %200, label %199

199:                                              ; preds = %194
  tail call void @_ZN10ClipperLib17ReverseHorizontalERNS_5TEdgeE(ptr noundef nonnull align 8 dereferenceable(136) %.3)
  br label %200

200:                                              ; preds = %199, %194
  %201 = getelementptr inbounds i8, ptr %.3, i64 80
  %202 = load ptr, ptr %201, align 8, !tbaa !14
  %203 = getelementptr inbounds i8, ptr %202, i64 76
  %204 = load i32, ptr %203, align 4, !tbaa !50
  %205 = icmp eq i32 %204, -2
  br i1 %205, label %208, label %206

206:                                              ; preds = %200
  %207 = getelementptr inbounds i8, ptr %.3, i64 96
  store ptr %202, ptr %207, align 8, !tbaa !62
  %.phi.trans.insert272 = getelementptr inbounds i8, ptr %202, i64 88
  %.pre273 = load ptr, ptr %.phi.trans.insert272, align 8, !tbaa !21
  br label %194, !llvm.loop !63

208:                                              ; preds = %200
  %209 = getelementptr inbounds i8, ptr %0, i64 16
  call void @_ZNSt6vectorIN10ClipperLib12LocalMinimumESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %209, ptr noundef nonnull align 8 dereferenceable(24) %6)
  %210 = getelementptr inbounds i8, ptr %0, i64 48
  call void @_ZNSt6vectorIPN10ClipperLib5TEdgeESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %210, ptr noundef nonnull align 8 dereferenceable(8) %5)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #10
  br label %.loopexit

211:                                              ; preds = %178
  %212 = getelementptr inbounds i8, ptr %0, i64 48
  call void @_ZNSt6vectorIPN10ClipperLib5TEdgeESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %212, ptr noundef nonnull align 8 dereferenceable(8) %5)
  %213 = getelementptr inbounds i8, ptr %171, i64 88
  %214 = load ptr, ptr %213, align 8, !tbaa !21
  %215 = getelementptr inbounds i8, ptr %214, i64 32
  %216 = call noundef zeroext i1 @_ZN10ClipperLibeqERKNS_8IntPointES2_(ptr noundef nonnull align 8 dereferenceable(16) %214, ptr noundef nonnull align 8 dereferenceable(16) %215)
  br i1 %216, label %217, label %220

217:                                              ; preds = %211
  %218 = getelementptr inbounds i8, ptr %171, i64 80
  %219 = load ptr, ptr %218, align 8, !tbaa !14
  br label %220

220:                                              ; preds = %217, %211
  %.4 = phi ptr [ %219, %217 ], [ %171, %211 ]
  %221 = call noundef ptr @_ZN10ClipperLib14FindNextLocMinEPNS_5TEdgeE(ptr noundef %.4)
  %222 = icmp eq ptr %221, null
  br i1 %222, label %.loopexit, label %.lr.ph247

.lr.ph247:                                        ; preds = %220
  %223 = getelementptr inbounds i8, ptr %7, i64 8
  %224 = getelementptr inbounds i8, ptr %7, i64 16
  %225 = getelementptr inbounds i8, ptr %0, i64 16
  br label %226

226:                                              ; preds = %.lr.ph247, %273
  %227 = phi ptr [ %221, %.lr.ph247 ], [ %274, %273 ]
  %.0155245 = phi ptr [ null, %.lr.ph247 ], [ %spec.select207, %273 ]
  %.not196 = icmp eq ptr %.0155245, null
  %spec.select207 = select i1 %.not196, ptr %227, ptr %.0155245
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #10
  %228 = getelementptr inbounds i8, ptr %227, i64 8
  %229 = load i64, ptr %228, align 8, !tbaa !53
  store i64 %229, ptr %7, align 8, !tbaa !54
  %230 = getelementptr inbounds i8, ptr %227, i64 48
  %231 = load double, ptr %230, align 8, !tbaa !64
  %232 = getelementptr inbounds i8, ptr %227, i64 88
  %233 = load ptr, ptr %232, align 8, !tbaa !21
  %234 = getelementptr inbounds i8, ptr %233, i64 48
  %235 = load double, ptr %234, align 8, !tbaa !64
  %236 = fcmp uge double %231, %235
  %storemerge274 = select i1 %236, ptr %227, ptr %233
  %storemerge = select i1 %236, ptr %233, ptr %227
  store ptr %storemerge274, ptr %223, align 8, !tbaa !56
  store ptr %storemerge, ptr %224, align 8, !tbaa !57
  br i1 %3, label %239, label %237

237:                                              ; preds = %226
  %238 = getelementptr inbounds i8, ptr %storemerge274, i64 64
  store i32 0, ptr %238, align 8, !tbaa !59
  br label %246

239:                                              ; preds = %226
  %240 = getelementptr inbounds i8, ptr %storemerge274, i64 80
  %241 = load ptr, ptr %240, align 8, !tbaa !14
  %242 = icmp eq ptr %241, %storemerge
  %243 = getelementptr inbounds i8, ptr %storemerge274, i64 64
  br i1 %242, label %244, label %245

244:                                              ; preds = %239
  store i32 -1, ptr %243, align 8, !tbaa !59
  br label %246

245:                                              ; preds = %239
  store i32 1, ptr %243, align 8, !tbaa !59
  br label %246

246:                                              ; preds = %244, %245, %237
  %.neg = phi i32 [ 1, %244 ], [ -1, %245 ], [ 0, %237 ]
  %247 = getelementptr inbounds i8, ptr %storemerge, i64 64
  store i32 %.neg, ptr %247, align 8, !tbaa !59
  %248 = call noundef ptr @_ZN10ClipperLib11ClipperBase12ProcessBoundEPNS_5TEdgeEb(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef nonnull %storemerge274, i1 noundef zeroext %236)
  %249 = getelementptr inbounds i8, ptr %248, i64 76
  %250 = load i32, ptr %249, align 4, !tbaa !50
  %251 = icmp eq i32 %250, -2
  br i1 %251, label %252, label %254

252:                                              ; preds = %246
  %253 = call noundef ptr @_ZN10ClipperLib11ClipperBase12ProcessBoundEPNS_5TEdgeEb(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef nonnull %248, i1 noundef zeroext %236)
  br label %254

254:                                              ; preds = %252, %246
  %.6 = phi ptr [ %253, %252 ], [ %248, %246 ]
  %255 = load ptr, ptr %224, align 8, !tbaa !57
  %256 = xor i1 %236, true
  %257 = call noundef ptr @_ZN10ClipperLib11ClipperBase12ProcessBoundEPNS_5TEdgeEb(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef %255, i1 noundef zeroext %256)
  %258 = getelementptr inbounds i8, ptr %257, i64 76
  %259 = load i32, ptr %258, align 4, !tbaa !50
  %260 = icmp eq i32 %259, -2
  br i1 %260, label %261, label %263

261:                                              ; preds = %254
  %262 = call noundef ptr @_ZN10ClipperLib11ClipperBase12ProcessBoundEPNS_5TEdgeEb(ptr noundef nonnull align 8 dereferenceable(144) %0, ptr noundef nonnull %257, i1 noundef zeroext %256)
  br label %263

263:                                              ; preds = %261, %254
  %.0 = phi ptr [ %262, %261 ], [ %257, %254 ]
  %264 = load ptr, ptr %223, align 8, !tbaa !56
  %265 = getelementptr inbounds i8, ptr %264, i64 76
  %266 = load i32, ptr %265, align 4, !tbaa !50
  %267 = icmp eq i32 %266, -2
  br i1 %267, label %.sink.split, label %268

268:                                              ; preds = %263
  %269 = load ptr, ptr %224, align 8, !tbaa !57
  %270 = getelementptr inbounds i8, ptr %269, i64 76
  %271 = load i32, ptr %270, align 4, !tbaa !50
  %272 = icmp eq i32 %271, -2
  br i1 %272, label %.sink.split, label %273

.sink.split:                                      ; preds = %268, %263
  %.sink = phi ptr [ %223, %263 ], [ %224, %268 ]
  store ptr null, ptr %.sink, align 8, !tbaa !7
  br label %273

273:                                              ; preds = %.sink.split, %268
  call void @_ZNSt6vectorIN10ClipperLib12LocalMinimumESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %225, ptr noundef nonnull align 8 dereferenceable(24) %7)
  %.7 = select i1 %236, ptr %.6, ptr %.0
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #10
  %274 = call noundef ptr @_ZN10ClipperLib14FindNextLocMinEPNS_5TEdgeE(ptr noundef %.7)
  %275 = icmp eq ptr %274, %spec.select207
  br i1 %275, label %.loopexit, label %226, !llvm.loop !65

.loopexit:                                        ; preds = %273, %220, %181, %183, %160, %162, %208
  %.0157 = phi i1 [ true, %208 ], [ false, %162 ], [ false, %160 ], [ false, %183 ], [ false, %181 ], [ true, %220 ], [ true, %273 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #10
  br label %277

276:                                              ; preds = %125, %105
  %.pn198 = phi { ptr, i32 } [ %106, %105 ], [ %126, %125 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #10
  br label %278

277:                                              ; preds = %.critedge3, %.loopexit
  %.1158 = phi i1 [ %.0157, %.loopexit ], [ false, %.critedge3 ]
  ret i1 %.1158

278:                                              ; preds = %276, %12
  %.pn200 = phi { ptr, i32 } [ %13, %12 ], [ %.pn198, %276 ]
  resume { ptr, i32 } %.pn200

279:                                              ; preds = %125
  %280 = landingpad { ptr, i32 }
          catch ptr null
  %281 = extractvalue { ptr, i32 } %280, 0
  tail call void @__clang_call_terminate(ptr %281) #14
  unreachable

282:                                              ; preds = %124
  unreachable
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN10ClipperLib5TEdgeC2Ev(ptr noundef nonnull align 8 dereferenceable(136)) unnamed_addr #7 align 2

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPvm(ptr noundef, i64 noundef) local_unnamed_addr #8

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN10ClipperLib8InitEdgeEPNS_5TEdgeES1_S1_RKNS_8IntPointE(ptr noundef, ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3

; Function Attrs: nobuiltin nounwind
declare void @_ZdaPv(ptr noundef) local_unnamed_addr #8

declare void @__cxa_rethrow() local_unnamed_addr

declare void @__cxa_end_catch() local_unnamed_addr

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smin.i32(i32, i32) #9

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { noinline noreturn nounwind uwtable "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nobuiltin allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 #8 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #10 = { nounwind }
attributes #11 = { noreturn }
attributes #12 = { builtin allocsize(0) }
attributes #13 = { builtin nounwind }
attributes #14 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = !{!8, !8, i64 0}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{i64 0, i64 8, !12, i64 8, i64 8, !12}
!12 = !{!13, !13, i64 0}
!13 = !{!"long long", !9, i64 0}
!14 = !{!15, !8, i64 80}
!15 = !{!"_ZTSN10ClipperLib5TEdgeE", !16, i64 0, !16, i64 16, !16, i64 32, !17, i64 48, !18, i64 56, !19, i64 60, !20, i64 64, !20, i64 68, !20, i64 72, !20, i64 76, !8, i64 80, !8, i64 88, !8, i64 96, !8, i64 104, !8, i64 112, !8, i64 120, !8, i64 128}
!16 = !{!"_ZTSN10ClipperLib8IntPointE", !13, i64 0, !13, i64 8}
!17 = !{!"double", !9, i64 0}
!18 = !{!"_ZTSN10ClipperLib8PolyTypeE", !9, i64 0}
!19 = !{!"_ZTSN10ClipperLib8EdgeSideE", !9, i64 0}
!20 = !{!"int", !9, i64 0}
!21 = !{!15, !8, i64 88}
!22 = distinct !{!22, !6}
!23 = !{!24, !30, i64 40}
!24 = !{!"_ZTSN10ClipperLib11ClipperBaseE", !25, i64 8, !26, i64 16, !30, i64 40, !31, i64 48, !30, i64 72, !30, i64 73, !35, i64 80, !8, i64 104, !39, i64 112}
!25 = !{!"_ZTSN9__gnu_cxx17__normal_iteratorIPN10ClipperLib12LocalMinimumESt6vectorIS2_SaIS2_EEEE", !8, i64 0}
!26 = !{!"_ZTSSt6vectorIN10ClipperLib12LocalMinimumESaIS1_EE", !27, i64 0}
!27 = !{!"_ZTSSt12_Vector_baseIN10ClipperLib12LocalMinimumESaIS1_EE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIN10ClipperLib12LocalMinimumESaIS1_EE12_Vector_implE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseIN10ClipperLib12LocalMinimumESaIS1_EE17_Vector_impl_dataE", !8, i64 0, !8, i64 8, !8, i64 16}
!30 = !{!"bool", !9, i64 0}
!31 = !{!"_ZTSSt6vectorIPN10ClipperLib5TEdgeESaIS2_EE", !32, i64 0}
!32 = !{!"_ZTSSt12_Vector_baseIPN10ClipperLib5TEdgeESaIS2_EE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib5TEdgeESaIS2_EE12_Vector_implE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib5TEdgeESaIS2_EE17_Vector_impl_dataE", !8, i64 0, !8, i64 8, !8, i64 16}
!35 = !{!"_ZTSSt6vectorIPN10ClipperLib6OutRecESaIS2_EE", !36, i64 0}
!36 = !{!"_ZTSSt12_Vector_baseIPN10ClipperLib6OutRecESaIS2_EE", !37, i64 0}
!37 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib6OutRecESaIS2_EE12_Vector_implE", !38, i64 0}
!38 = !{!"_ZTSNSt12_Vector_baseIPN10ClipperLib6OutRecESaIS2_EE17_Vector_impl_dataE", !8, i64 0, !8, i64 8, !8, i64 16}
!39 = !{!"_ZTSSt14priority_queueIxSt6vectorIxSaIxEESt4lessIxEE", !40, i64 0, !44, i64 24}
!40 = !{!"_ZTSSt6vectorIxSaIxEE", !41, i64 0}
!41 = !{!"_ZTSSt12_Vector_baseIxSaIxEE", !42, i64 0}
!42 = !{!"_ZTSNSt12_Vector_baseIxSaIxEE12_Vector_implE", !43, i64 0}
!43 = !{!"_ZTSNSt12_Vector_baseIxSaIxEE17_Vector_impl_dataE", !8, i64 0, !8, i64 8, !8, i64 16}
!44 = !{!"_ZTSSt4lessIxE"}
!45 = !{i8 0, i8 2}
!46 = !{}
!47 = !{!24, !30, i64 72}
!48 = distinct !{!48, !6}
!49 = !{!24, !30, i64 73}
!50 = !{!15, !20, i64 76}
!51 = !{!15, !13, i64 24}
!52 = distinct !{!52, !6}
!53 = !{!15, !13, i64 8}
!54 = !{!55, !13, i64 0}
!55 = !{!"_ZTSN10ClipperLib12LocalMinimumE", !13, i64 0, !8, i64 8, !8, i64 16}
!56 = !{!55, !8, i64 8}
!57 = !{!55, !8, i64 16}
!58 = !{!15, !19, i64 60}
!59 = !{!15, !20, i64 64}
!60 = !{!15, !13, i64 0}
!61 = !{!15, !13, i64 32}
!62 = !{!15, !8, i64 96}
!63 = distinct !{!63, !6}
!64 = !{!15, !17, i64 48}
!65 = distinct !{!65, !6}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass