; LLVM IR from erayzesen/QuarkPhysics :: QuarkPhysics/polypartition (polypartition)

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

%"struct.std::_List_iterator" = type { ptr }
%"struct.TPPLPartition::ScanLineEdge" = type { i64, %struct.TPPLPoint, %struct.TPPLPoint }
%struct.TPPLPoint = type { double, double, i32 }
%"class.TPPLPartition::VertexSorter" = type { ptr }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<TPPLPartition::ScanLineEdge, TPPLPartition::ScanLineEdge, std::_Identity<TPPLPartition::ScanLineEdge>, std::less<TPPLPartition::ScanLineEdge>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<TPPLPartition::ScanLineEdge, TPPLPartition::ScanLineEdge, std::_Identity<TPPLPartition::ScanLineEdge>, std::less<TPPLPartition::ScanLineEdge>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"struct.std::pair" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%class.TPPLPoly = type <{ ptr, i64, i8, [7 x i8] }>
%"struct.TPPLPartition::MonotoneVertex" = type { %struct.TPPLPoint, i64, i64 }

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPolyixEi(ptr noundef nonnull align 8 dereferenceable(17), i32 noundef) #6 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN13TPPLPartition17MonotonePartitionEPNSt7__cxx114listI8TPPLPolySaIS2_EEES5_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef %1, ptr noundef %2) #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %"struct.std::_List_iterator", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i64, align 8
  %17 = alloca i64, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca %"struct.TPPLPartition::ScanLineEdge", align 8
  %24 = alloca i8, align 1
  %25 = alloca %"struct.std::_List_iterator", align 8
  %26 = alloca %"struct.std::_List_iterator", align 8
  %27 = alloca i32, align 4
  %28 = alloca %"struct.std::_List_iterator", align 8
  %29 = alloca %"struct.std::_List_iterator", align 8
  %30 = alloca %"struct.std::_List_iterator", align 8
  %31 = alloca %"struct.std::_List_iterator", align 8
  %32 = alloca ptr, align 8
  %33 = alloca %"class.TPPLPartition::VertexSorter", align 8
  %34 = alloca ptr, align 8
  %35 = alloca ptr, align 8
  %36 = alloca %"class.std::set", align 8
  %37 = alloca ptr, align 8
  %38 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %39 = alloca ptr, align 8
  %40 = alloca i32, align 4
  %41 = alloca %"struct.std::pair", align 8
  %42 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %43 = alloca %"struct.std::pair", align 8
  %44 = alloca { ptr, i8 }, align 8
  %45 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %46 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %47 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %48 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %49 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %50 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %51 = alloca %"struct.std::pair", align 8
  %52 = alloca { ptr, i8 }, align 8
  %53 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %54 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %55 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %56 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %57 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %58 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %59 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %60 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %61 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %62 = alloca %"struct.std::pair", align 8
  %63 = alloca { ptr, i8 }, align 8
  %64 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %65 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %66 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %67 = alloca ptr, align 8
  %68 = alloca i64, align 8
  %69 = alloca %class.TPPLPoly, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  %70 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #10
  call void @_ZNSt14_List_iteratorI8TPPLPolyEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #10
  store ptr null, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #10
  store ptr null, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #10
  store ptr null, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #10
  store ptr null, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #10
  store ptr null, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #10
  store ptr null, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 56, ptr %23) #10
  call void @llvm.lifetime.start.p0(i64 1, ptr %24) #10
  store i8 0, ptr %24, align 1, !tbaa !9
  store i64 0, ptr %11, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #10
  %71 = load ptr, ptr %6, align 8, !tbaa !5
  %72 = call ptr @_ZNSt7__cxx114listI8TPPLPolySaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %71) #10
  %73 = getelementptr inbounds %"struct.std::_List_iterator", ptr %25, i32 0, i32 0
  store ptr %72, ptr %73, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %8, ptr align 8 %25, i64 8, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #10
  br label %74

74:                                               ; preds = %88, %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #10
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = call ptr @_ZNSt7__cxx114listI8TPPLPolySaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %75) #10
  %77 = getelementptr inbounds %"struct.std::_List_iterator", ptr %26, i32 0, i32 0
  store ptr %76, ptr %77, align 8
  %78 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorI8TPPLPolyES3_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %26) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #10
  br i1 %78, label %79, label %91

79:                                               ; preds = %74
  %80 = call noundef ptr @_ZNKSt14_List_iteratorI8TPPLPolyEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #10
  %81 = call noundef zeroext i1 @_ZNK8TPPLPoly5ValidEv(ptr noundef nonnull align 8 dereferenceable(17) %80)
  br i1 %81, label %83, label %82

82:                                               ; preds = %79
  store i32 0, ptr %4, align 4
  store i32 1, ptr %27, align 4
  br label %898

83:                                               ; preds = %79
  %84 = call noundef ptr @_ZNKSt14_List_iteratorI8TPPLPolyEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #10
  %85 = call noundef i64 @_ZNK8TPPLPoly12GetNumPointsEv(ptr noundef nonnull align 8 dereferenceable(17) %84)
  %86 = load i64, ptr %11, align 8, !tbaa !11
  %87 = add nsw i64 %86, %85
  store i64 %87, ptr %11, align 8, !tbaa !11
  br label %88

88:                                               ; preds = %83
  %89 = call ptr @_ZNSt14_List_iteratorI8TPPLPolyEppEi(ptr noundef nonnull align 8 dereferenceable(8) %8, i32 noundef 0) #10
  %90 = getelementptr inbounds %"struct.std::_List_iterator", ptr %28, i32 0, i32 0
  store ptr %89, ptr %90, align 8
  br label %74, !llvm.loop !14

91:                                               ; preds = %74
  %92 = load i64, ptr %11, align 8, !tbaa !11
  %93 = mul nsw i64 %92, 3
  store i64 %93, ptr %15, align 8, !tbaa !11
  %94 = load i64, ptr %15, align 8, !tbaa !11
  %95 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %94, i64 40)
  %96 = extractvalue { i64, i1 } %95, 1
  %97 = extractvalue { i64, i1 } %95, 0
  %98 = select i1 %96, i64 -1, i64 %97
  %99 = call noalias noundef nonnull ptr @_Znam(i64 noundef %98) #11
  store ptr %99, ptr %9, align 8, !tbaa !5
  %100 = load i64, ptr %11, align 8, !tbaa !11
  store i64 %100, ptr %14, align 8, !tbaa !11
  store i64 0, ptr %16, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #10
  %101 = load ptr, ptr %6, align 8, !tbaa !5
  %102 = call ptr @_ZNSt7__cxx114listI8TPPLPolySaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %101) #10
  %103 = getelementptr inbounds %"struct.std::_List_iterator", ptr %29, i32 0, i32 0
  store ptr %102, ptr %103, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %8, ptr align 8 %29, i64 8, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #10
  br label %104

104:                                              ; preds = %184, %91
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #10
  %105 = load ptr, ptr %6, align 8, !tbaa !5
  %106 = call ptr @_ZNSt7__cxx114listI8TPPLPolySaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %105) #10
  %107 = getelementptr inbounds %"struct.std::_List_iterator", ptr %30, i32 0, i32 0
  store ptr %106, ptr %107, align 8
  %108 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorI8TPPLPolyES3_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %30) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #10
  br i1 %108, label %109, label %187

109:                                              ; preds = %104
  %110 = call noundef nonnull align 8 dereferenceable(17) ptr @_ZNKSt14_List_iteratorI8TPPLPolyEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #10
  store ptr %110, ptr %18, align 8, !tbaa !5
  %111 = load i64, ptr %16, align 8, !tbaa !11
  %112 = load ptr, ptr %18, align 8, !tbaa !5
  %113 = call noundef i64 @_ZNK8TPPLPoly12GetNumPointsEv(ptr noundef nonnull align 8 dereferenceable(17) %112)
  %114 = add nsw i64 %111, %113
  %115 = sub nsw i64 %114, 1
  store i64 %115, ptr %17, align 8, !tbaa !11
  store i64 0, ptr %10, align 8, !tbaa !11
  br label %116

116:                                              ; preds = %178, %109
  %117 = load i64, ptr %10, align 8, !tbaa !11
  %118 = load ptr, ptr %18, align 8, !tbaa !5
  %119 = call noundef i64 @_ZNK8TPPLPoly12GetNumPointsEv(ptr noundef nonnull align 8 dereferenceable(17) %118)
  %120 = icmp slt i64 %117, %119
  br i1 %120, label %121, label %181

121:                                              ; preds = %116
  %122 = load ptr, ptr %18, align 8, !tbaa !5
  %123 = load i64, ptr %10, align 8, !tbaa !11
  %124 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %122, i64 noundef %123)
  %125 = load ptr, ptr %9, align 8, !tbaa !5
  %126 = load i64, ptr %10, align 8, !tbaa !11
  %127 = load i64, ptr %16, align 8, !tbaa !11
  %128 = add nsw i64 %126, %127
  %129 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %125, i64 %128
  %130 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %129, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %130, ptr align 8 %124, i64 24, i1 false), !tbaa.struct !16
  %131 = load i64, ptr %10, align 8, !tbaa !11
  %132 = icmp eq i64 %131, 0
  br i1 %132, label %133, label %141

133:                                              ; preds = %121
  %134 = load i64, ptr %17, align 8, !tbaa !11
  %135 = load ptr, ptr %9, align 8, !tbaa !5
  %136 = load i64, ptr %10, align 8, !tbaa !11
  %137 = load i64, ptr %16, align 8, !tbaa !11
  %138 = add nsw i64 %136, %137
  %139 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %135, i64 %138
  %140 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %139, i32 0, i32 1
  store i64 %134, ptr %140, align 8, !tbaa !21
  br label %152

141:                                              ; preds = %121
  %142 = load i64, ptr %10, align 8, !tbaa !11
  %143 = load i64, ptr %16, align 8, !tbaa !11
  %144 = add nsw i64 %142, %143
  %145 = sub nsw i64 %144, 1
  %146 = load ptr, ptr %9, align 8, !tbaa !5
  %147 = load i64, ptr %10, align 8, !tbaa !11
  %148 = load i64, ptr %16, align 8, !tbaa !11
  %149 = add nsw i64 %147, %148
  %150 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %146, i64 %149
  %151 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %150, i32 0, i32 1
  store i64 %145, ptr %151, align 8, !tbaa !21
  br label %152

152:                                              ; preds = %141, %133
  %153 = load i64, ptr %10, align 8, !tbaa !11
  %154 = load ptr, ptr %18, align 8, !tbaa !5
  %155 = call noundef i64 @_ZNK8TPPLPoly12GetNumPointsEv(ptr noundef nonnull align 8 dereferenceable(17) %154)
  %156 = sub nsw i64 %155, 1
  %157 = icmp eq i64 %153, %156
  br i1 %157, label %158, label %166

158:                                              ; preds = %152
  %159 = load i64, ptr %16, align 8, !tbaa !11
  %160 = load ptr, ptr %9, align 8, !tbaa !5
  %161 = load i64, ptr %10, align 8, !tbaa !11
  %162 = load i64, ptr %16, align 8, !tbaa !11
  %163 = add nsw i64 %161, %162
  %164 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %160, i64 %163
  %165 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %164, i32 0, i32 2
  store i64 %159, ptr %165, align 8, !tbaa !24
  br label %177

166:                                              ; preds = %152
  %167 = load i64, ptr %10, align 8, !tbaa !11
  %168 = load i64, ptr %16, align 8, !tbaa !11
  %169 = add nsw i64 %167, %168
  %170 = add nsw i64 %169, 1
  %171 = load ptr, ptr %9, align 8, !tbaa !5
  %172 = load i64, ptr %10, align 8, !tbaa !11
  %173 = load i64, ptr %16, align 8, !tbaa !11
  %174 = add nsw i64 %172, %173
  %175 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %171, i64 %174
  %176 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %175, i32 0, i32 2
  store i64 %170, ptr %176, align 8, !tbaa !24
  br label %177

177:                                              ; preds = %166, %158
  br label %178

178:                                              ; preds = %177
  %179 = load i64, ptr %10, align 8, !tbaa !11
  %180 = add nsw i64 %179, 1
  store i64 %180, ptr %10, align 8, !tbaa !11
  br label %116, !llvm.loop !25

181:                                              ; preds = %116
  %182 = load i64, ptr %17, align 8, !tbaa !11
  %183 = add nsw i64 %182, 1
  store i64 %183, ptr %16, align 8, !tbaa !11
  br label %184

184:                                              ; preds = %181
  %185 = call ptr @_ZNSt14_List_iteratorI8TPPLPolyEppEi(ptr noundef nonnull align 8 dereferenceable(8) %8, i32 noundef 0) #10
  %186 = getelementptr inbounds %"struct.std::_List_iterator", ptr %31, i32 0, i32 0
  store ptr %185, ptr %186, align 8
  br label %104, !llvm.loop !26

187:                                              ; preds = %104
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #10
  %188 = load i64, ptr %11, align 8, !tbaa !11
  %189 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %188, i64 8)
  %190 = extractvalue { i64, i1 } %189, 1
  %191 = extractvalue { i64, i1 } %189, 0
  %192 = select i1 %190, i64 -1, i64 %191
  %193 = call noalias noundef nonnull ptr @_Znam(i64 noundef %192) #11
  store ptr %193, ptr %32, align 8, !tbaa !5
  store i64 0, ptr %10, align 8, !tbaa !11
  br label %194

194:                                              ; preds = %203, %187
  %195 = load i64, ptr %10, align 8, !tbaa !11
  %196 = load i64, ptr %11, align 8, !tbaa !11
  %197 = icmp slt i64 %195, %196
  br i1 %197, label %198, label %206

198:                                              ; preds = %194
  %199 = load i64, ptr %10, align 8, !tbaa !11
  %200 = load ptr, ptr %32, align 8, !tbaa !5
  %201 = load i64, ptr %10, align 8, !tbaa !11
  %202 = getelementptr inbounds i64, ptr %200, i64 %201
  store i64 %199, ptr %202, align 8, !tbaa !11
  br label %203

203:                                              ; preds = %198
  %204 = load i64, ptr %10, align 8, !tbaa !11
  %205 = add nsw i64 %204, 1
  store i64 %205, ptr %10, align 8, !tbaa !11
  br label %194, !llvm.loop !27

206:                                              ; preds = %194
  %207 = load ptr, ptr %32, align 8, !tbaa !5
  %208 = load ptr, ptr %32, align 8, !tbaa !5
  %209 = load i64, ptr %11, align 8, !tbaa !11
  %210 = getelementptr inbounds i64, ptr %208, i64 %209
  %211 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN13TPPLPartition12VertexSorterC2EPNS_14MonotoneVertexE(ptr noundef nonnull align 8 dereferenceable(8) %33, ptr noundef %211)
  %212 = getelementptr inbounds %"class.TPPLPartition::VertexSorter", ptr %33, i32 0, i32 0
  %213 = load ptr, ptr %212, align 8
  call void @_ZSt4sortIPlN13TPPLPartition12VertexSorterEEvT_S3_T0_(ptr noundef %207, ptr noundef %210, ptr %213)
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #10
  %214 = load i64, ptr %15, align 8, !tbaa !11
  %215 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %214, i64 4)
  %216 = extractvalue { i64, i1 } %215, 1
  %217 = extractvalue { i64, i1 } %215, 0
  %218 = select i1 %216, i64 -1, i64 %217
  %219 = call noalias noundef nonnull ptr @_Znam(i64 noundef %218) #11
  store ptr %219, ptr %34, align 8, !tbaa !5
  store i64 0, ptr %10, align 8, !tbaa !11
  br label %220

220:                                              ; preds = %301, %206
  %221 = load i64, ptr %10, align 8, !tbaa !11
  %222 = load i64, ptr %11, align 8, !tbaa !11
  %223 = icmp slt i64 %221, %222
  br i1 %223, label %224, label %304

224:                                              ; preds = %220
  %225 = load ptr, ptr %9, align 8, !tbaa !5
  %226 = load i64, ptr %10, align 8, !tbaa !11
  %227 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %225, i64 %226
  store ptr %227, ptr %19, align 8, !tbaa !5
  %228 = load ptr, ptr %9, align 8, !tbaa !5
  %229 = load ptr, ptr %19, align 8, !tbaa !5
  %230 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %229, i32 0, i32 1
  %231 = load i64, ptr %230, align 8, !tbaa !21
  %232 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %228, i64 %231
  store ptr %232, ptr %21, align 8, !tbaa !5
  %233 = load ptr, ptr %9, align 8, !tbaa !5
  %234 = load ptr, ptr %19, align 8, !tbaa !5
  %235 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %234, i32 0, i32 2
  %236 = load i64, ptr %235, align 8, !tbaa !24
  %237 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %233, i64 %236
  store ptr %237, ptr %22, align 8, !tbaa !5
  %238 = load ptr, ptr %21, align 8, !tbaa !5
  %239 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %238, i32 0, i32 0
  %240 = load ptr, ptr %19, align 8, !tbaa !5
  %241 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %240, i32 0, i32 0
  %242 = call noundef zeroext i1 @_ZN13TPPLPartition5BelowER9TPPLPointS1_(ptr noundef nonnull align 1 dereferenceable(1) %70, ptr noundef nonnull align 8 dereferenceable(24) %239, ptr noundef nonnull align 8 dereferenceable(24) %241)
  br i1 %242, label %243, label %266

243:                                              ; preds = %224
  %244 = load ptr, ptr %22, align 8, !tbaa !5
  %245 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %244, i32 0, i32 0
  %246 = load ptr, ptr %19, align 8, !tbaa !5
  %247 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %246, i32 0, i32 0
  %248 = call noundef zeroext i1 @_ZN13TPPLPartition5BelowER9TPPLPointS1_(ptr noundef nonnull align 1 dereferenceable(1) %70, ptr noundef nonnull align 8 dereferenceable(24) %245, ptr noundef nonnull align 8 dereferenceable(24) %247)
  br i1 %248, label %249, label %266

249:                                              ; preds = %243
  %250 = load ptr, ptr %22, align 8, !tbaa !5
  %251 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %250, i32 0, i32 0
  %252 = load ptr, ptr %21, align 8, !tbaa !5
  %253 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %252, i32 0, i32 0
  %254 = load ptr, ptr %19, align 8, !tbaa !5
  %255 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %254, i32 0, i32 0
  %256 = call noundef zeroext i1 @_ZN13TPPLPartition8IsConvexER9TPPLPointS1_S1_(ptr noundef nonnull align 1 dereferenceable(1) %70, ptr noundef nonnull align 8 dereferenceable(24) %251, ptr noundef nonnull align 8 dereferenceable(24) %253, ptr noundef nonnull align 8 dereferenceable(24) %255)
  br i1 %256, label %257, label %261

257:                                              ; preds = %249
  %258 = load ptr, ptr %34, align 8, !tbaa !5
  %259 = load i64, ptr %10, align 8, !tbaa !11
  %260 = getelementptr inbounds i32, ptr %258, i64 %259
  store i32 1, ptr %260, align 4, !tbaa !28
  br label %265

261:                                              ; preds = %249
  %262 = load ptr, ptr %34, align 8, !tbaa !5
  %263 = load i64, ptr %10, align 8, !tbaa !11
  %264 = getelementptr inbounds i32, ptr %262, i64 %263
  store i32 3, ptr %264, align 4, !tbaa !28
  br label %265

265:                                              ; preds = %261, %257
  br label %300

266:                                              ; preds = %243, %224
  %267 = load ptr, ptr %19, align 8, !tbaa !5
  %268 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %267, i32 0, i32 0
  %269 = load ptr, ptr %21, align 8, !tbaa !5
  %270 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %269, i32 0, i32 0
  %271 = call noundef zeroext i1 @_ZN13TPPLPartition5BelowER9TPPLPointS1_(ptr noundef nonnull align 1 dereferenceable(1) %70, ptr noundef nonnull align 8 dereferenceable(24) %268, ptr noundef nonnull align 8 dereferenceable(24) %270)
  br i1 %271, label %272, label %295

272:                                              ; preds = %266
  %273 = load ptr, ptr %19, align 8, !tbaa !5
  %274 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %273, i32 0, i32 0
  %275 = load ptr, ptr %22, align 8, !tbaa !5
  %276 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %275, i32 0, i32 0
  %277 = call noundef zeroext i1 @_ZN13TPPLPartition5BelowER9TPPLPointS1_(ptr noundef nonnull align 1 dereferenceable(1) %70, ptr noundef nonnull align 8 dereferenceable(24) %274, ptr noundef nonnull align 8 dereferenceable(24) %276)
  br i1 %277, label %278, label %295

278:                                              ; preds = %272
  %279 = load ptr, ptr %22, align 8, !tbaa !5
  %280 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %279, i32 0, i32 0
  %281 = load ptr, ptr %21, align 8, !tbaa !5
  %282 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %281, i32 0, i32 0
  %283 = load ptr, ptr %19, align 8, !tbaa !5
  %284 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %283, i32 0, i32 0
  %285 = call noundef zeroext i1 @_ZN13TPPLPartition8IsConvexER9TPPLPointS1_S1_(ptr noundef nonnull align 1 dereferenceable(1) %70, ptr noundef nonnull align 8 dereferenceable(24) %280, ptr noundef nonnull align 8 dereferenceable(24) %282, ptr noundef nonnull align 8 dereferenceable(24) %284)
  br i1 %285, label %286, label %290

286:                                              ; preds = %278
  %287 = load ptr, ptr %34, align 8, !tbaa !5
  %288 = load i64, ptr %10, align 8, !tbaa !11
  %289 = getelementptr inbounds i32, ptr %287, i64 %288
  store i32 2, ptr %289, align 4, !tbaa !28
  br label %294

290:                                              ; preds = %278
  %291 = load ptr, ptr %34, align 8, !tbaa !5
  %292 = load i64, ptr %10, align 8, !tbaa !11
  %293 = getelementptr inbounds i32, ptr %291, i64 %292
  store i32 4, ptr %293, align 4, !tbaa !28
  br label %294

294:                                              ; preds = %290, %286
  br label %299

295:                                              ; preds = %272, %266
  %296 = load ptr, ptr %34, align 8, !tbaa !5
  %297 = load i64, ptr %10, align 8, !tbaa !11
  %298 = getelementptr inbounds i32, ptr %296, i64 %297
  store i32 0, ptr %298, align 4, !tbaa !28
  br label %299

299:                                              ; preds = %295, %294
  br label %300

300:                                              ; preds = %299, %265
  br label %301

301:                                              ; preds = %300
  %302 = load i64, ptr %10, align 8, !tbaa !11
  %303 = add nsw i64 %302, 1
  store i64 %303, ptr %10, align 8, !tbaa !11
  br label %220, !llvm.loop !30

304:                                              ; preds = %220
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #10
  %305 = load i64, ptr %15, align 8, !tbaa !11
  %306 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %305, i64 8)
  %307 = extractvalue { i64, i1 } %306, 1
  %308 = extractvalue { i64, i1 } %306, 0
  %309 = select i1 %307, i64 -1, i64 %308
  %310 = call noalias noundef nonnull ptr @_Znam(i64 noundef %309) #11
  store ptr %310, ptr %35, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 48, ptr %36) #10
  call void @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %36) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #10
  call void @_ZNSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %38) #10
  %311 = load i64, ptr %15, align 8, !tbaa !11
  %312 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %311, i64 8)
  %313 = extractvalue { i64, i1 } %312, 1
  %314 = extractvalue { i64, i1 } %312, 0
  %315 = select i1 %313, i64 -1, i64 %314
  %316 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %315) #11
          to label %317 unwind label %340

317:                                              ; preds = %304
  %318 = icmp eq i64 %311, 0
  br i1 %318, label %325, label %319

319:                                              ; preds = %317
  %320 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %316, i64 %311
  br label %321

321:                                              ; preds = %321, %319
  %322 = phi ptr [ %316, %319 ], [ %323, %321 ]
  call void @_ZNSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %322) #10
  %323 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %322, i64 1
  %324 = icmp eq ptr %323, %320
  br i1 %324, label %325, label %321

325:                                              ; preds = %321, %317
  store ptr %316, ptr %37, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %41) #10
  invoke void @_ZNSt4pairISt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEbEC2IS3_bTnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES7_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 8 dereferenceable(9) %41)
          to label %326 unwind label %344

326:                                              ; preds = %325
  store i64 0, ptr %10, align 8, !tbaa !11
  br label %327

327:                                              ; preds = %337, %326
  %328 = load i64, ptr %10, align 8, !tbaa !11
  %329 = load i64, ptr %11, align 8, !tbaa !11
  %330 = icmp slt i64 %328, %329
  br i1 %330, label %331, label %348

331:                                              ; preds = %327
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #10
  %332 = call ptr @_ZNKSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %36) #10
  %333 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %42, i32 0, i32 0
  store ptr %332, ptr %333, align 8
  %334 = load ptr, ptr %37, align 8, !tbaa !5
  %335 = load i64, ptr %10, align 8, !tbaa !11
  %336 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %334, i64 %335
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %336, ptr align 8 %42, i64 8, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #10
  br label %337

337:                                              ; preds = %331
  %338 = load i64, ptr %10, align 8, !tbaa !11
  %339 = add nsw i64 %338, 1
  store i64 %339, ptr %10, align 8, !tbaa !11
  br label %327, !llvm.loop !31

340:                                              ; preds = %304
  %341 = landingpad { ptr, i32 }
          cleanup
  %342 = extractvalue { ptr, i32 } %341, 0
  store ptr %342, ptr %39, align 8
  %343 = extractvalue { ptr, i32 } %341, 1
  store i32 %343, ptr %40, align 4
  br label %897

344:                                              ; preds = %727, %658, %640, %608, %588, %547, %532, %458, %429, %416, %325
  %345 = landingpad { ptr, i32 }
          cleanup
  %346 = extractvalue { ptr, i32 } %345, 0
  store ptr %346, ptr %39, align 8
  %347 = extractvalue { ptr, i32 } %345, 1
  store i32 %347, ptr %40, align 4
  br label %896

348:                                              ; preds = %327
  store i64 0, ptr %10, align 8, !tbaa !11
  br label %349

349:                                              ; preds = %753, %348
  %350 = load i64, ptr %10, align 8, !tbaa !11
  %351 = load i64, ptr %11, align 8, !tbaa !11
  %352 = icmp slt i64 %350, %351
  br i1 %352, label %353, label %756

353:                                              ; preds = %349
  %354 = load ptr, ptr %32, align 8, !tbaa !5
  %355 = load i64, ptr %10, align 8, !tbaa !11
  %356 = getelementptr inbounds i64, ptr %354, i64 %355
  %357 = load i64, ptr %356, align 8, !tbaa !11
  store i64 %357, ptr %12, align 8, !tbaa !11
  %358 = load ptr, ptr %9, align 8, !tbaa !5
  %359 = load i64, ptr %12, align 8, !tbaa !11
  %360 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %358, i64 %359
  store ptr %360, ptr %19, align 8, !tbaa !5
  %361 = load i64, ptr %12, align 8, !tbaa !11
  store i64 %361, ptr %13, align 8, !tbaa !11
  %362 = load ptr, ptr %19, align 8, !tbaa !5
  store ptr %362, ptr %20, align 8, !tbaa !5
  %363 = load ptr, ptr %34, align 8, !tbaa !5
  %364 = load i64, ptr %12, align 8, !tbaa !11
  %365 = getelementptr inbounds i32, ptr %363, i64 %364
  %366 = load i32, ptr %365, align 4, !tbaa !28
  switch i32 %366, label %748 [
    i32 1, label %367
    i32 2, label %395
    i32 3, label %440
    i32 4, label %511
    i32 0, label %608
  ]

367:                                              ; preds = %353
  %368 = load ptr, ptr %19, align 8, !tbaa !5
  %369 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %368, i32 0, i32 0
  %370 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %23, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %370, ptr align 8 %369, i64 24, i1 false), !tbaa.struct !16
  %371 = load ptr, ptr %9, align 8, !tbaa !5
  %372 = load ptr, ptr %19, align 8, !tbaa !5
  %373 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %372, i32 0, i32 2
  %374 = load i64, ptr %373, align 8, !tbaa !24
  %375 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %371, i64 %374
  %376 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %375, i32 0, i32 0
  %377 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %23, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %377, ptr align 8 %376, i64 24, i1 false), !tbaa.struct !16
  %378 = load i64, ptr %12, align 8, !tbaa !11
  %379 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %23, i32 0, i32 0
  store i64 %378, ptr %379, align 8, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 16, ptr %43) #10
  %380 = invoke { ptr, i8 } @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE6insertERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %36, ptr noundef nonnull align 8 dereferenceable(56) %23)
          to label %381 unwind label %391

381:                                              ; preds = %367
  store { ptr, i8 } %380, ptr %44, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %43, ptr align 8 %44, i64 9, i1 false)
  %382 = call noundef nonnull align 8 dereferenceable(9) ptr @_ZNSt4pairISt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEbEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(9) %41, ptr noundef nonnull align 8 dereferenceable(9) %43) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %43) #10
  %383 = getelementptr inbounds %"struct.std::pair", ptr %41, i32 0, i32 0
  %384 = load ptr, ptr %37, align 8, !tbaa !5
  %385 = load i64, ptr %12, align 8, !tbaa !11
  %386 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %384, i64 %385
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %386, ptr align 8 %383, i64 8, i1 false), !tbaa.struct !13
  %387 = load i64, ptr %12, align 8, !tbaa !11
  %388 = load ptr, ptr %35, align 8, !tbaa !5
  %389 = load i64, ptr %12, align 8, !tbaa !11
  %390 = getelementptr inbounds i64, ptr %388, i64 %389
  store i64 %387, ptr %390, align 8, !tbaa !11
  br label %748

391:                                              ; preds = %367
  %392 = landingpad { ptr, i32 }
          cleanup
  %393 = extractvalue { ptr, i32 } %392, 0
  store ptr %393, ptr %39, align 8
  %394 = extractvalue { ptr, i32 } %392, 1
  store i32 %394, ptr %40, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %43) #10
  br label %896

395:                                              ; preds = %353
  %396 = load ptr, ptr %37, align 8, !tbaa !5
  %397 = load ptr, ptr %19, align 8, !tbaa !5
  %398 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %397, i32 0, i32 1
  %399 = load i64, ptr %398, align 8, !tbaa !21
  %400 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %396, i64 %399
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #10
  %401 = call ptr @_ZNKSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %36) #10
  %402 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %45, i32 0, i32 0
  store ptr %401, ptr %402, align 8
  %403 = call noundef zeroext i1 @_ZSteqRKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEES4_(ptr noundef nonnull align 8 dereferenceable(8) %400, ptr noundef nonnull align 8 dereferenceable(8) %45) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #10
  br i1 %403, label %404, label %405

404:                                              ; preds = %395
  store i8 1, ptr %24, align 1, !tbaa !9
  br label %748

405:                                              ; preds = %395
  %406 = load ptr, ptr %34, align 8, !tbaa !5
  %407 = load ptr, ptr %35, align 8, !tbaa !5
  %408 = load ptr, ptr %19, align 8, !tbaa !5
  %409 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %408, i32 0, i32 1
  %410 = load i64, ptr %409, align 8, !tbaa !21
  %411 = getelementptr inbounds i64, ptr %407, i64 %410
  %412 = load i64, ptr %411, align 8, !tbaa !11
  %413 = getelementptr inbounds i32, ptr %406, i64 %412
  %414 = load i32, ptr %413, align 4, !tbaa !28
  %415 = icmp eq i32 %414, 4
  br i1 %415, label %416, label %429

416:                                              ; preds = %405
  %417 = load ptr, ptr %9, align 8, !tbaa !5
  %418 = load i64, ptr %12, align 8, !tbaa !11
  %419 = load ptr, ptr %35, align 8, !tbaa !5
  %420 = load ptr, ptr %19, align 8, !tbaa !5
  %421 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %420, i32 0, i32 1
  %422 = load i64, ptr %421, align 8, !tbaa !21
  %423 = getelementptr inbounds i64, ptr %419, i64 %422
  %424 = load i64, ptr %423, align 8, !tbaa !11
  %425 = load ptr, ptr %34, align 8, !tbaa !5
  %426 = load ptr, ptr %37, align 8, !tbaa !5
  %427 = load ptr, ptr %35, align 8, !tbaa !5
  invoke void @_ZN13TPPLPartition11AddDiagonalEPNS_14MonotoneVertexEPlllP14TPPLVertexTypePSt23_Rb_tree_const_iteratorINS_12ScanLineEdgeEEPSt3setIS6_St4lessIS6_ESaIS6_EES2_(ptr noundef nonnull align 1 dereferenceable(1) %70, ptr noundef %417, ptr noundef %14, i64 noundef %418, i64 noundef %424, ptr noundef %425, ptr noundef %426, ptr noundef %36, ptr noundef %427)
          to label %428 unwind label %344

428:                                              ; preds = %416
  br label %429

429:                                              ; preds = %428, %405
  %430 = load ptr, ptr %37, align 8, !tbaa !5
  %431 = load ptr, ptr %19, align 8, !tbaa !5
  %432 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %431, i32 0, i32 1
  %433 = load i64, ptr %432, align 8, !tbaa !21
  %434 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %430, i64 %433
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %46, ptr align 8 %434, i64 8, i1 false), !tbaa.struct !13
  %435 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %46, i32 0, i32 0
  %436 = load ptr, ptr %435, align 8
  %437 = invoke ptr @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIS1_E(ptr noundef nonnull align 8 dereferenceable(48) %36, ptr %436)
          to label %438 unwind label %344

438:                                              ; preds = %429
  %439 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %47, i32 0, i32 0
  store ptr %437, ptr %439, align 8
  br label %748

440:                                              ; preds = %353
  %441 = load ptr, ptr %19, align 8, !tbaa !5
  %442 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %441, i32 0, i32 0
  %443 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %23, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %443, ptr align 8 %442, i64 24, i1 false), !tbaa.struct !16
  %444 = load ptr, ptr %19, align 8, !tbaa !5
  %445 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %444, i32 0, i32 0
  %446 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %23, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %446, ptr align 8 %445, i64 24, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %48) #10
  %447 = invoke ptr @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE11lower_boundERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %36, ptr noundef nonnull align 8 dereferenceable(56) %23)
          to label %448 unwind label %454

448:                                              ; preds = %440
  %449 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %48, i32 0, i32 0
  store ptr %447, ptr %449, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %38, ptr align 8 %48, i64 8, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %49) #10
  %450 = call ptr @_ZNKSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %36) #10
  %451 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %49, i32 0, i32 0
  store ptr %450, ptr %451, align 8
  %452 = call noundef zeroext i1 @_ZSteqRKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEES4_(ptr noundef nonnull align 8 dereferenceable(8) %38, ptr noundef nonnull align 8 dereferenceable(8) %49) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %49) #10
  br i1 %452, label %453, label %458

453:                                              ; preds = %448
  store i8 1, ptr %24, align 1, !tbaa !9
  br label %748

454:                                              ; preds = %440
  %455 = landingpad { ptr, i32 }
          cleanup
  %456 = extractvalue { ptr, i32 } %455, 0
  store ptr %456, ptr %39, align 8
  %457 = extractvalue { ptr, i32 } %455, 1
  store i32 %457, ptr %40, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #10
  br label %896

458:                                              ; preds = %448
  %459 = call ptr @_ZNSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEmmEi(ptr noundef nonnull align 8 dereferenceable(8) %38, i32 noundef 0) #10
  %460 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %50, i32 0, i32 0
  store ptr %459, ptr %460, align 8
  %461 = load ptr, ptr %9, align 8, !tbaa !5
  %462 = load i64, ptr %12, align 8, !tbaa !11
  %463 = load ptr, ptr %35, align 8, !tbaa !5
  %464 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %38) #10
  %465 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %464, i32 0, i32 0
  %466 = load i64, ptr %465, align 8, !tbaa !32
  %467 = getelementptr inbounds i64, ptr %463, i64 %466
  %468 = load i64, ptr %467, align 8, !tbaa !11
  %469 = load ptr, ptr %34, align 8, !tbaa !5
  %470 = load ptr, ptr %37, align 8, !tbaa !5
  %471 = load ptr, ptr %35, align 8, !tbaa !5
  invoke void @_ZN13TPPLPartition11AddDiagonalEPNS_14MonotoneVertexEPlllP14TPPLVertexTypePSt23_Rb_tree_const_iteratorINS_12ScanLineEdgeEEPSt3setIS6_St4lessIS6_ESaIS6_EES2_(ptr noundef nonnull align 1 dereferenceable(1) %70, ptr noundef %461, ptr noundef %14, i64 noundef %462, i64 noundef %468, ptr noundef %469, ptr noundef %470, ptr noundef %36, ptr noundef %471)
          to label %472 unwind label %344

472:                                              ; preds = %458
  %473 = load i64, ptr %14, align 8, !tbaa !11
  %474 = sub nsw i64 %473, 2
  store i64 %474, ptr %13, align 8, !tbaa !11
  %475 = load ptr, ptr %9, align 8, !tbaa !5
  %476 = load i64, ptr %13, align 8, !tbaa !11
  %477 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %475, i64 %476
  store ptr %477, ptr %20, align 8, !tbaa !5
  %478 = load i64, ptr %12, align 8, !tbaa !11
  %479 = load ptr, ptr %35, align 8, !tbaa !5
  %480 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %38) #10
  %481 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %480, i32 0, i32 0
  %482 = load i64, ptr %481, align 8, !tbaa !32
  %483 = getelementptr inbounds i64, ptr %479, i64 %482
  store i64 %478, ptr %483, align 8, !tbaa !11
  %484 = load ptr, ptr %20, align 8, !tbaa !5
  %485 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %484, i32 0, i32 0
  %486 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %23, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %486, ptr align 8 %485, i64 24, i1 false), !tbaa.struct !16
  %487 = load ptr, ptr %9, align 8, !tbaa !5
  %488 = load ptr, ptr %20, align 8, !tbaa !5
  %489 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %488, i32 0, i32 2
  %490 = load i64, ptr %489, align 8, !tbaa !24
  %491 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %487, i64 %490
  %492 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %491, i32 0, i32 0
  %493 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %23, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %493, ptr align 8 %492, i64 24, i1 false), !tbaa.struct !16
  %494 = load i64, ptr %13, align 8, !tbaa !11
  %495 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %23, i32 0, i32 0
  store i64 %494, ptr %495, align 8, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 16, ptr %51) #10
  %496 = invoke { ptr, i8 } @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE6insertERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %36, ptr noundef nonnull align 8 dereferenceable(56) %23)
          to label %497 unwind label %507

497:                                              ; preds = %472
  store { ptr, i8 } %496, ptr %52, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %51, ptr align 8 %52, i64 9, i1 false)
  %498 = call noundef nonnull align 8 dereferenceable(9) ptr @_ZNSt4pairISt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEbEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(9) %41, ptr noundef nonnull align 8 dereferenceable(9) %51) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %51) #10
  %499 = getelementptr inbounds %"struct.std::pair", ptr %41, i32 0, i32 0
  %500 = load ptr, ptr %37, align 8, !tbaa !5
  %501 = load i64, ptr %13, align 8, !tbaa !11
  %502 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %500, i64 %501
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %502, ptr align 8 %499, i64 8, i1 false), !tbaa.struct !13
  %503 = load i64, ptr %13, align 8, !tbaa !11
  %504 = load ptr, ptr %35, align 8, !tbaa !5
  %505 = load i64, ptr %13, align 8, !tbaa !11
  %506 = getelementptr inbounds i64, ptr %504, i64 %505
  store i64 %503, ptr %506, align 8, !tbaa !11
  br label %748

507:                                              ; preds = %472
  %508 = landingpad { ptr, i32 }
          cleanup
  %509 = extractvalue { ptr, i32 } %508, 0
  store ptr %509, ptr %39, align 8
  %510 = extractvalue { ptr, i32 } %508, 1
  store i32 %510, ptr %40, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %51) #10
  br label %896

511:                                              ; preds = %353
  %512 = load ptr, ptr %37, align 8, !tbaa !5
  %513 = load ptr, ptr %19, align 8, !tbaa !5
  %514 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %513, i32 0, i32 1
  %515 = load i64, ptr %514, align 8, !tbaa !21
  %516 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %512, i64 %515
  call void @llvm.lifetime.start.p0(i64 8, ptr %53) #10
  %517 = call ptr @_ZNKSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %36) #10
  %518 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %53, i32 0, i32 0
  store ptr %517, ptr %518, align 8
  %519 = call noundef zeroext i1 @_ZSteqRKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEES4_(ptr noundef nonnull align 8 dereferenceable(8) %516, ptr noundef nonnull align 8 dereferenceable(8) %53) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #10
  br i1 %519, label %520, label %521

520:                                              ; preds = %511
  store i8 1, ptr %24, align 1, !tbaa !9
  br label %748

521:                                              ; preds = %511
  %522 = load ptr, ptr %34, align 8, !tbaa !5
  %523 = load ptr, ptr %35, align 8, !tbaa !5
  %524 = load ptr, ptr %19, align 8, !tbaa !5
  %525 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %524, i32 0, i32 1
  %526 = load i64, ptr %525, align 8, !tbaa !21
  %527 = getelementptr inbounds i64, ptr %523, i64 %526
  %528 = load i64, ptr %527, align 8, !tbaa !11
  %529 = getelementptr inbounds i32, ptr %522, i64 %528
  %530 = load i32, ptr %529, align 4, !tbaa !28
  %531 = icmp eq i32 %530, 4
  br i1 %531, label %532, label %547

532:                                              ; preds = %521
  %533 = load ptr, ptr %9, align 8, !tbaa !5
  %534 = load i64, ptr %12, align 8, !tbaa !11
  %535 = load ptr, ptr %35, align 8, !tbaa !5
  %536 = load ptr, ptr %19, align 8, !tbaa !5
  %537 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %536, i32 0, i32 1
  %538 = load i64, ptr %537, align 8, !tbaa !21
  %539 = getelementptr inbounds i64, ptr %535, i64 %538
  %540 = load i64, ptr %539, align 8, !tbaa !11
  %541 = load ptr, ptr %34, align 8, !tbaa !5
  %542 = load ptr, ptr %37, align 8, !tbaa !5
  %543 = load ptr, ptr %35, align 8, !tbaa !5
  invoke void @_ZN13TPPLPartition11AddDiagonalEPNS_14MonotoneVertexEPlllP14TPPLVertexTypePSt23_Rb_tree_const_iteratorINS_12ScanLineEdgeEEPSt3setIS6_St4lessIS6_ESaIS6_EES2_(ptr noundef nonnull align 1 dereferenceable(1) %70, ptr noundef %533, ptr noundef %14, i64 noundef %534, i64 noundef %540, ptr noundef %541, ptr noundef %542, ptr noundef %36, ptr noundef %543)
          to label %544 unwind label %344

544:                                              ; preds = %532
  %545 = load i64, ptr %14, align 8, !tbaa !11
  %546 = sub nsw i64 %545, 2
  store i64 %546, ptr %13, align 8, !tbaa !11
  br label %547

547:                                              ; preds = %544, %521
  %548 = load ptr, ptr %37, align 8, !tbaa !5
  %549 = load ptr, ptr %19, align 8, !tbaa !5
  %550 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %549, i32 0, i32 1
  %551 = load i64, ptr %550, align 8, !tbaa !21
  %552 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %548, i64 %551
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %54, ptr align 8 %552, i64 8, i1 false), !tbaa.struct !13
  %553 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %54, i32 0, i32 0
  %554 = load ptr, ptr %553, align 8
  %555 = invoke ptr @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIS1_E(ptr noundef nonnull align 8 dereferenceable(48) %36, ptr %554)
          to label %556 unwind label %344

556:                                              ; preds = %547
  %557 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %55, i32 0, i32 0
  store ptr %555, ptr %557, align 8
  %558 = load ptr, ptr %19, align 8, !tbaa !5
  %559 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %558, i32 0, i32 0
  %560 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %23, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %560, ptr align 8 %559, i64 24, i1 false), !tbaa.struct !16
  %561 = load ptr, ptr %19, align 8, !tbaa !5
  %562 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %561, i32 0, i32 0
  %563 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %23, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %563, ptr align 8 %562, i64 24, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %56) #10
  %564 = invoke ptr @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE11lower_boundERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %36, ptr noundef nonnull align 8 dereferenceable(56) %23)
          to label %565 unwind label %571

565:                                              ; preds = %556
  %566 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %56, i32 0, i32 0
  store ptr %564, ptr %566, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %38, ptr align 8 %56, i64 8, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %56) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %57) #10
  %567 = call ptr @_ZNKSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %36) #10
  %568 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %57, i32 0, i32 0
  store ptr %567, ptr %568, align 8
  %569 = call noundef zeroext i1 @_ZSteqRKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEES4_(ptr noundef nonnull align 8 dereferenceable(8) %38, ptr noundef nonnull align 8 dereferenceable(8) %57) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %57) #10
  br i1 %569, label %570, label %575

570:                                              ; preds = %565
  store i8 1, ptr %24, align 1, !tbaa !9
  br label %748

571:                                              ; preds = %556
  %572 = landingpad { ptr, i32 }
          cleanup
  %573 = extractvalue { ptr, i32 } %572, 0
  store ptr %573, ptr %39, align 8
  %574 = extractvalue { ptr, i32 } %572, 1
  store i32 %574, ptr %40, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %56) #10
  br label %896

575:                                              ; preds = %565
  %576 = call ptr @_ZNSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEmmEi(ptr noundef nonnull align 8 dereferenceable(8) %38, i32 noundef 0) #10
  %577 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %58, i32 0, i32 0
  store ptr %576, ptr %577, align 8
  %578 = load ptr, ptr %34, align 8, !tbaa !5
  %579 = load ptr, ptr %35, align 8, !tbaa !5
  %580 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %38) #10
  %581 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %580, i32 0, i32 0
  %582 = load i64, ptr %581, align 8, !tbaa !32
  %583 = getelementptr inbounds i64, ptr %579, i64 %582
  %584 = load i64, ptr %583, align 8, !tbaa !11
  %585 = getelementptr inbounds i32, ptr %578, i64 %584
  %586 = load i32, ptr %585, align 4, !tbaa !28
  %587 = icmp eq i32 %586, 4
  br i1 %587, label %588, label %601

588:                                              ; preds = %575
  %589 = load ptr, ptr %9, align 8, !tbaa !5
  %590 = load i64, ptr %13, align 8, !tbaa !11
  %591 = load ptr, ptr %35, align 8, !tbaa !5
  %592 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %38) #10
  %593 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %592, i32 0, i32 0
  %594 = load i64, ptr %593, align 8, !tbaa !32
  %595 = getelementptr inbounds i64, ptr %591, i64 %594
  %596 = load i64, ptr %595, align 8, !tbaa !11
  %597 = load ptr, ptr %34, align 8, !tbaa !5
  %598 = load ptr, ptr %37, align 8, !tbaa !5
  %599 = load ptr, ptr %35, align 8, !tbaa !5
  invoke void @_ZN13TPPLPartition11AddDiagonalEPNS_14MonotoneVertexEPlllP14TPPLVertexTypePSt23_Rb_tree_const_iteratorINS_12ScanLineEdgeEEPSt3setIS6_St4lessIS6_ESaIS6_EES2_(ptr noundef nonnull align 1 dereferenceable(1) %70, ptr noundef %589, ptr noundef %14, i64 noundef %590, i64 noundef %596, ptr noundef %597, ptr noundef %598, ptr noundef %36, ptr noundef %599)
          to label %600 unwind label %344

600:                                              ; preds = %588
  br label %601

601:                                              ; preds = %600, %575
  %602 = load i64, ptr %13, align 8, !tbaa !11
  %603 = load ptr, ptr %35, align 8, !tbaa !5
  %604 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %38) #10
  %605 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %604, i32 0, i32 0
  %606 = load i64, ptr %605, align 8, !tbaa !32
  %607 = getelementptr inbounds i64, ptr %603, i64 %606
  store i64 %602, ptr %607, align 8, !tbaa !11
  br label %748

608:                                              ; preds = %353
  %609 = load ptr, ptr %19, align 8, !tbaa !5
  %610 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %609, i32 0, i32 0
  %611 = load ptr, ptr %9, align 8, !tbaa !5
  %612 = load ptr, ptr %19, align 8, !tbaa !5
  %613 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %612, i32 0, i32 1
  %614 = load i64, ptr %613, align 8, !tbaa !21
  %615 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %611, i64 %614
  %616 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %615, i32 0, i32 0
  %617 = invoke noundef zeroext i1 @_ZN13TPPLPartition5BelowER9TPPLPointS1_(ptr noundef nonnull align 1 dereferenceable(1) %70, ptr noundef nonnull align 8 dereferenceable(24) %610, ptr noundef nonnull align 8 dereferenceable(24) %616)
          to label %618 unwind label %344

618:                                              ; preds = %608
  br i1 %617, label %619, label %696

619:                                              ; preds = %618
  %620 = load ptr, ptr %37, align 8, !tbaa !5
  %621 = load ptr, ptr %19, align 8, !tbaa !5
  %622 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %621, i32 0, i32 1
  %623 = load i64, ptr %622, align 8, !tbaa !21
  %624 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %620, i64 %623
  call void @llvm.lifetime.start.p0(i64 8, ptr %59) #10
  %625 = call ptr @_ZNKSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %36) #10
  %626 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %59, i32 0, i32 0
  store ptr %625, ptr %626, align 8
  %627 = call noundef zeroext i1 @_ZSteqRKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEES4_(ptr noundef nonnull align 8 dereferenceable(8) %624, ptr noundef nonnull align 8 dereferenceable(8) %59) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %59) #10
  br i1 %627, label %628, label %629

628:                                              ; preds = %619
  store i8 1, ptr %24, align 1, !tbaa !9
  br label %748

629:                                              ; preds = %619
  %630 = load ptr, ptr %34, align 8, !tbaa !5
  %631 = load ptr, ptr %35, align 8, !tbaa !5
  %632 = load ptr, ptr %19, align 8, !tbaa !5
  %633 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %632, i32 0, i32 1
  %634 = load i64, ptr %633, align 8, !tbaa !21
  %635 = getelementptr inbounds i64, ptr %631, i64 %634
  %636 = load i64, ptr %635, align 8, !tbaa !11
  %637 = getelementptr inbounds i32, ptr %630, i64 %636
  %638 = load i32, ptr %637, align 4, !tbaa !28
  %639 = icmp eq i32 %638, 4
  br i1 %639, label %640, label %658

640:                                              ; preds = %629
  %641 = load ptr, ptr %9, align 8, !tbaa !5
  %642 = load i64, ptr %12, align 8, !tbaa !11
  %643 = load ptr, ptr %35, align 8, !tbaa !5
  %644 = load ptr, ptr %19, align 8, !tbaa !5
  %645 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %644, i32 0, i32 1
  %646 = load i64, ptr %645, align 8, !tbaa !21
  %647 = getelementptr inbounds i64, ptr %643, i64 %646
  %648 = load i64, ptr %647, align 8, !tbaa !11
  %649 = load ptr, ptr %34, align 8, !tbaa !5
  %650 = load ptr, ptr %37, align 8, !tbaa !5
  %651 = load ptr, ptr %35, align 8, !tbaa !5
  invoke void @_ZN13TPPLPartition11AddDiagonalEPNS_14MonotoneVertexEPlllP14TPPLVertexTypePSt23_Rb_tree_const_iteratorINS_12ScanLineEdgeEEPSt3setIS6_St4lessIS6_ESaIS6_EES2_(ptr noundef nonnull align 1 dereferenceable(1) %70, ptr noundef %641, ptr noundef %14, i64 noundef %642, i64 noundef %648, ptr noundef %649, ptr noundef %650, ptr noundef %36, ptr noundef %651)
          to label %652 unwind label %344

652:                                              ; preds = %640
  %653 = load i64, ptr %14, align 8, !tbaa !11
  %654 = sub nsw i64 %653, 2
  store i64 %654, ptr %13, align 8, !tbaa !11
  %655 = load ptr, ptr %9, align 8, !tbaa !5
  %656 = load i64, ptr %13, align 8, !tbaa !11
  %657 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %655, i64 %656
  store ptr %657, ptr %20, align 8, !tbaa !5
  br label %658

658:                                              ; preds = %652, %629
  %659 = load ptr, ptr %37, align 8, !tbaa !5
  %660 = load ptr, ptr %19, align 8, !tbaa !5
  %661 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %660, i32 0, i32 1
  %662 = load i64, ptr %661, align 8, !tbaa !21
  %663 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %659, i64 %662
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %60, ptr align 8 %663, i64 8, i1 false), !tbaa.struct !13
  %664 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %60, i32 0, i32 0
  %665 = load ptr, ptr %664, align 8
  %666 = invoke ptr @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIS1_E(ptr noundef nonnull align 8 dereferenceable(48) %36, ptr %665)
          to label %667 unwind label %344

667:                                              ; preds = %658
  %668 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %61, i32 0, i32 0
  store ptr %666, ptr %668, align 8
  %669 = load ptr, ptr %20, align 8, !tbaa !5
  %670 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %669, i32 0, i32 0
  %671 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %23, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %671, ptr align 8 %670, i64 24, i1 false), !tbaa.struct !16
  %672 = load ptr, ptr %9, align 8, !tbaa !5
  %673 = load ptr, ptr %20, align 8, !tbaa !5
  %674 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %673, i32 0, i32 2
  %675 = load i64, ptr %674, align 8, !tbaa !24
  %676 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %672, i64 %675
  %677 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %676, i32 0, i32 0
  %678 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %23, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %678, ptr align 8 %677, i64 24, i1 false), !tbaa.struct !16
  %679 = load i64, ptr %13, align 8, !tbaa !11
  %680 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %23, i32 0, i32 0
  store i64 %679, ptr %680, align 8, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 16, ptr %62) #10
  %681 = invoke { ptr, i8 } @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE6insertERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %36, ptr noundef nonnull align 8 dereferenceable(56) %23)
          to label %682 unwind label %692

682:                                              ; preds = %667
  store { ptr, i8 } %681, ptr %63, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %62, ptr align 8 %63, i64 9, i1 false)
  %683 = call noundef nonnull align 8 dereferenceable(9) ptr @_ZNSt4pairISt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEbEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(9) %41, ptr noundef nonnull align 8 dereferenceable(9) %62) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %62) #10
  %684 = getelementptr inbounds %"struct.std::pair", ptr %41, i32 0, i32 0
  %685 = load ptr, ptr %37, align 8, !tbaa !5
  %686 = load i64, ptr %13, align 8, !tbaa !11
  %687 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %685, i64 %686
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %687, ptr align 8 %684, i64 8, i1 false), !tbaa.struct !13
  %688 = load i64, ptr %12, align 8, !tbaa !11
  %689 = load ptr, ptr %35, align 8, !tbaa !5
  %690 = load i64, ptr %13, align 8, !tbaa !11
  %691 = getelementptr inbounds i64, ptr %689, i64 %690
  store i64 %688, ptr %691, align 8, !tbaa !11
  br label %747

692:                                              ; preds = %667
  %693 = landingpad { ptr, i32 }
          cleanup
  %694 = extractvalue { ptr, i32 } %693, 0
  store ptr %694, ptr %39, align 8
  %695 = extractvalue { ptr, i32 } %693, 1
  store i32 %695, ptr %40, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %62) #10
  br label %896

696:                                              ; preds = %618
  %697 = load ptr, ptr %19, align 8, !tbaa !5
  %698 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %697, i32 0, i32 0
  %699 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %23, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %699, ptr align 8 %698, i64 24, i1 false), !tbaa.struct !16
  %700 = load ptr, ptr %19, align 8, !tbaa !5
  %701 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %700, i32 0, i32 0
  %702 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %23, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %702, ptr align 8 %701, i64 24, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %64) #10
  %703 = invoke ptr @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE11lower_boundERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %36, ptr noundef nonnull align 8 dereferenceable(56) %23)
          to label %704 unwind label %710

704:                                              ; preds = %696
  %705 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %64, i32 0, i32 0
  store ptr %703, ptr %705, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %38, ptr align 8 %64, i64 8, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %64) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr %65) #10
  %706 = call ptr @_ZNKSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %36) #10
  %707 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %65, i32 0, i32 0
  store ptr %706, ptr %707, align 8
  %708 = call noundef zeroext i1 @_ZSteqRKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEES4_(ptr noundef nonnull align 8 dereferenceable(8) %38, ptr noundef nonnull align 8 dereferenceable(8) %65) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %65) #10
  br i1 %708, label %709, label %714

709:                                              ; preds = %704
  store i8 1, ptr %24, align 1, !tbaa !9
  br label %748

710:                                              ; preds = %696
  %711 = landingpad { ptr, i32 }
          cleanup
  %712 = extractvalue { ptr, i32 } %711, 0
  store ptr %712, ptr %39, align 8
  %713 = extractvalue { ptr, i32 } %711, 1
  store i32 %713, ptr %40, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %64) #10
  br label %896

714:                                              ; preds = %704
  %715 = call ptr @_ZNSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEmmEi(ptr noundef nonnull align 8 dereferenceable(8) %38, i32 noundef 0) #10
  %716 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %66, i32 0, i32 0
  store ptr %715, ptr %716, align 8
  %717 = load ptr, ptr %34, align 8, !tbaa !5
  %718 = load ptr, ptr %35, align 8, !tbaa !5
  %719 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %38) #10
  %720 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %719, i32 0, i32 0
  %721 = load i64, ptr %720, align 8, !tbaa !32
  %722 = getelementptr inbounds i64, ptr %718, i64 %721
  %723 = load i64, ptr %722, align 8, !tbaa !11
  %724 = getelementptr inbounds i32, ptr %717, i64 %723
  %725 = load i32, ptr %724, align 4, !tbaa !28
  %726 = icmp eq i32 %725, 4
  br i1 %726, label %727, label %740

727:                                              ; preds = %714
  %728 = load ptr, ptr %9, align 8, !tbaa !5
  %729 = load i64, ptr %12, align 8, !tbaa !11
  %730 = load ptr, ptr %35, align 8, !tbaa !5
  %731 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %38) #10
  %732 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %731, i32 0, i32 0
  %733 = load i64, ptr %732, align 8, !tbaa !32
  %734 = getelementptr inbounds i64, ptr %730, i64 %733
  %735 = load i64, ptr %734, align 8, !tbaa !11
  %736 = load ptr, ptr %34, align 8, !tbaa !5
  %737 = load ptr, ptr %37, align 8, !tbaa !5
  %738 = load ptr, ptr %35, align 8, !tbaa !5
  invoke void @_ZN13TPPLPartition11AddDiagonalEPNS_14MonotoneVertexEPlllP14TPPLVertexTypePSt23_Rb_tree_const_iteratorINS_12ScanLineEdgeEEPSt3setIS6_St4lessIS6_ESaIS6_EES2_(ptr noundef nonnull align 1 dereferenceable(1) %70, ptr noundef %728, ptr noundef %14, i64 noundef %729, i64 noundef %735, ptr noundef %736, ptr noundef %737, ptr noundef %36, ptr noundef %738)
          to label %739 unwind label %344

739:                                              ; preds = %727
  br label %740

740:                                              ; preds = %739, %714
  %741 = load i64, ptr %12, align 8, !tbaa !11
  %742 = load ptr, ptr %35, align 8, !tbaa !5
  %743 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %38) #10
  %744 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %743, i32 0, i32 0
  %745 = load i64, ptr %744, align 8, !tbaa !32
  %746 = getelementptr inbounds i64, ptr %742, i64 %745
  store i64 %741, ptr %746, align 8, !tbaa !11
  br label %747

747:                                              ; preds = %740, %682
  br label %748

748:                                              ; preds = %747, %709, %628, %601, %570, %520, %497, %453, %438, %404, %381, %353
  %749 = load i8, ptr %24, align 1, !tbaa !9, !range !34, !noundef !35
  %750 = trunc i8 %749 to i1
  br i1 %750, label %751, label %752

751:                                              ; preds = %748
  br label %756

752:                                              ; preds = %748
  br label %753

753:                                              ; preds = %752
  %754 = load i64, ptr %10, align 8, !tbaa !11
  %755 = add nsw i64 %754, 1
  store i64 %755, ptr %10, align 8, !tbaa !11
  br label %349, !llvm.loop !36

756:                                              ; preds = %751, %349
  call void @llvm.lifetime.start.p0(i64 8, ptr %67) #10
  %757 = load i64, ptr %14, align 8, !tbaa !11
  %758 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %757) #11
          to label %759 unwind label %778

759:                                              ; preds = %756
  store ptr %758, ptr %67, align 8, !tbaa !5
  %760 = load ptr, ptr %67, align 8, !tbaa !5
  %761 = load i64, ptr %14, align 8, !tbaa !11
  %762 = mul i64 %761, 1
  call void @llvm.memset.p0.i64(ptr align 1 %760, i8 0, i64 %762, i1 false)
  %763 = load i8, ptr %24, align 1, !tbaa !9, !range !34, !noundef !35
  %764 = trunc i8 %763 to i1
  br i1 %764, label %865, label %765

765:                                              ; preds = %759
  call void @llvm.lifetime.start.p0(i64 8, ptr %68) #10
  call void @llvm.lifetime.start.p0(i64 24, ptr %69) #10
  invoke void @_ZN8TPPLPolyC1Ev(ptr noundef nonnull align 8 dereferenceable(17) %69)
          to label %766 unwind label %782

766:                                              ; preds = %765
  store i64 0, ptr %10, align 8, !tbaa !11
  br label %767

767:                                              ; preds = %860, %766
  %768 = load i64, ptr %10, align 8, !tbaa !11
  %769 = load i64, ptr %14, align 8, !tbaa !11
  %770 = icmp slt i64 %768, %769
  br i1 %770, label %771, label %863

771:                                              ; preds = %767
  %772 = load ptr, ptr %67, align 8, !tbaa !5
  %773 = load i64, ptr %10, align 8, !tbaa !11
  %774 = getelementptr inbounds i8, ptr %772, i64 %773
  %775 = load i8, ptr %774, align 1, !tbaa !37
  %776 = icmp ne i8 %775, 0
  br i1 %776, label %777, label %786

777:                                              ; preds = %771
  br label %860

778:                                              ; preds = %756
  %779 = landingpad { ptr, i32 }
          cleanup
  %780 = extractvalue { ptr, i32 } %779, 0
  store ptr %780, ptr %39, align 8
  %781 = extractvalue { ptr, i32 } %779, 1
  store i32 %781, ptr %40, align 4
  br label %895

782:                                              ; preds = %765
  %783 = landingpad { ptr, i32 }
          cleanup
  %784 = extractvalue { ptr, i32 } %783, 0
  store ptr %784, ptr %39, align 8
  %785 = extractvalue { ptr, i32 } %783, 1
  store i32 %785, ptr %40, align 4
  br label %864

786:                                              ; preds = %771
  %787 = load ptr, ptr %9, align 8, !tbaa !5
  %788 = load i64, ptr %10, align 8, !tbaa !11
  %789 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %787, i64 %788
  store ptr %789, ptr %19, align 8, !tbaa !5
  %790 = load ptr, ptr %9, align 8, !tbaa !5
  %791 = load ptr, ptr %19, align 8, !tbaa !5
  %792 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %791, i32 0, i32 2
  %793 = load i64, ptr %792, align 8, !tbaa !24
  %794 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %790, i64 %793
  store ptr %794, ptr %22, align 8, !tbaa !5
  store i64 1, ptr %68, align 8, !tbaa !11
  br label %795

795:                                              ; preds = %799, %786
  %796 = load ptr, ptr %22, align 8, !tbaa !5
  %797 = load ptr, ptr %19, align 8, !tbaa !5
  %798 = icmp ne ptr %796, %797
  br i1 %798, label %799, label %807

799:                                              ; preds = %795
  %800 = load ptr, ptr %9, align 8, !tbaa !5
  %801 = load ptr, ptr %22, align 8, !tbaa !5
  %802 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %801, i32 0, i32 2
  %803 = load i64, ptr %802, align 8, !tbaa !24
  %804 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %800, i64 %803
  store ptr %804, ptr %22, align 8, !tbaa !5
  %805 = load i64, ptr %68, align 8, !tbaa !11
  %806 = add nsw i64 %805, 1
  store i64 %806, ptr %68, align 8, !tbaa !11
  br label %795, !llvm.loop !38

807:                                              ; preds = %795
  %808 = load i64, ptr %68, align 8, !tbaa !11
  invoke void @_ZN8TPPLPoly4InitEl(ptr noundef nonnull align 8 dereferenceable(17) %69, i64 noundef %808)
          to label %809 unwind label %853

809:                                              ; preds = %807
  %810 = load ptr, ptr %9, align 8, !tbaa !5
  %811 = load i64, ptr %10, align 8, !tbaa !11
  %812 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %810, i64 %811
  store ptr %812, ptr %19, align 8, !tbaa !5
  %813 = load ptr, ptr %19, align 8, !tbaa !5
  %814 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %813, i32 0, i32 0
  %815 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPolyixEi(ptr noundef nonnull align 8 dereferenceable(17) %69, i32 noundef 0)
          to label %816 unwind label %853

816:                                              ; preds = %809
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %815, ptr align 8 %814, i64 24, i1 false), !tbaa.struct !16
  %817 = load ptr, ptr %9, align 8, !tbaa !5
  %818 = load ptr, ptr %19, align 8, !tbaa !5
  %819 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %818, i32 0, i32 2
  %820 = load i64, ptr %819, align 8, !tbaa !24
  %821 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %817, i64 %820
  store ptr %821, ptr %22, align 8, !tbaa !5
  store i64 1, ptr %68, align 8, !tbaa !11
  %822 = load ptr, ptr %67, align 8, !tbaa !5
  %823 = load i64, ptr %10, align 8, !tbaa !11
  %824 = getelementptr inbounds i8, ptr %822, i64 %823
  store i8 1, ptr %824, align 1, !tbaa !37
  %825 = load ptr, ptr %67, align 8, !tbaa !5
  %826 = load ptr, ptr %19, align 8, !tbaa !5
  %827 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %826, i32 0, i32 2
  %828 = load i64, ptr %827, align 8, !tbaa !24
  %829 = getelementptr inbounds i8, ptr %825, i64 %828
  store i8 1, ptr %829, align 1, !tbaa !37
  br label %830

830:                                              ; preds = %840, %816
  %831 = load ptr, ptr %22, align 8, !tbaa !5
  %832 = load ptr, ptr %19, align 8, !tbaa !5
  %833 = icmp ne ptr %831, %832
  br i1 %833, label %834, label %857

834:                                              ; preds = %830
  %835 = load ptr, ptr %22, align 8, !tbaa !5
  %836 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %835, i32 0, i32 0
  %837 = load i64, ptr %68, align 8, !tbaa !11
  %838 = trunc i64 %837 to i32
  %839 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPolyixEi(ptr noundef nonnull align 8 dereferenceable(17) %69, i32 noundef %838)
          to label %840 unwind label %853

840:                                              ; preds = %834
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %839, ptr align 8 %836, i64 24, i1 false), !tbaa.struct !16
  %841 = load ptr, ptr %67, align 8, !tbaa !5
  %842 = load ptr, ptr %22, align 8, !tbaa !5
  %843 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %842, i32 0, i32 2
  %844 = load i64, ptr %843, align 8, !tbaa !24
  %845 = getelementptr inbounds i8, ptr %841, i64 %844
  store i8 1, ptr %845, align 1, !tbaa !37
  %846 = load ptr, ptr %9, align 8, !tbaa !5
  %847 = load ptr, ptr %22, align 8, !tbaa !5
  %848 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %847, i32 0, i32 2
  %849 = load i64, ptr %848, align 8, !tbaa !24
  %850 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %846, i64 %849
  store ptr %850, ptr %22, align 8, !tbaa !5
  %851 = load i64, ptr %68, align 8, !tbaa !11
  %852 = add nsw i64 %851, 1
  store i64 %852, ptr %68, align 8, !tbaa !11
  br label %830, !llvm.loop !39

853:                                              ; preds = %857, %834, %809, %807
  %854 = landingpad { ptr, i32 }
          cleanup
  %855 = extractvalue { ptr, i32 } %854, 0
  store ptr %855, ptr %39, align 8
  %856 = extractvalue { ptr, i32 } %854, 1
  store i32 %856, ptr %40, align 4
  call void @_ZN8TPPLPolyD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %69) #10
  br label %864

857:                                              ; preds = %830
  %858 = load ptr, ptr %7, align 8, !tbaa !5
  invoke void @_ZNSt7__cxx114listI8TPPLPolySaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %858, ptr noundef nonnull align 8 dereferenceable(17) %69)
          to label %859 unwind label %853

859:                                              ; preds = %857
  br label %860

860:                                              ; preds = %859, %777
  %861 = load i64, ptr %10, align 8, !tbaa !11
  %862 = add nsw i64 %861, 1
  store i64 %862, ptr %10, align 8, !tbaa !11
  br label %767, !llvm.loop !40

863:                                              ; preds = %767
  call void @_ZN8TPPLPolyD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %69) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr %69) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %68) #10
  br label %865

864:                                              ; preds = %853, %782
  call void @llvm.lifetime.end.p0(i64 24, ptr %69) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %68) #10
  br label %895

865:                                              ; preds = %863, %759
  %866 = load ptr, ptr %9, align 8, !tbaa !5
  %867 = icmp eq ptr %866, null
  br i1 %867, label %869, label %868

868:                                              ; preds = %865
  call void @_ZdaPv(ptr noundef %866) #12
  br label %869

869:                                              ; preds = %868, %865
  %870 = load ptr, ptr %32, align 8, !tbaa !5
  %871 = icmp eq ptr %870, null
  br i1 %871, label %873, label %872

872:                                              ; preds = %869
  call void @_ZdaPv(ptr noundef %870) #12
  br label %873

873:                                              ; preds = %872, %869
  %874 = load ptr, ptr %34, align 8, !tbaa !5
  %875 = icmp eq ptr %874, null
  br i1 %875, label %877, label %876

876:                                              ; preds = %873
  call void @_ZdaPv(ptr noundef %874) #12
  br label %877

877:                                              ; preds = %876, %873
  %878 = load ptr, ptr %37, align 8, !tbaa !5
  %879 = icmp eq ptr %878, null
  br i1 %879, label %881, label %880

880:                                              ; preds = %877
  call void @_ZdaPv(ptr noundef %878) #12
  br label %881

881:                                              ; preds = %880, %877
  %882 = load ptr, ptr %35, align 8, !tbaa !5
  %883 = icmp eq ptr %882, null
  br i1 %883, label %885, label %884

884:                                              ; preds = %881
  call void @_ZdaPv(ptr noundef %882) #12
  br label %885

885:                                              ; preds = %884, %881
  %886 = load ptr, ptr %67, align 8, !tbaa !5
  %887 = icmp eq ptr %886, null
  br i1 %887, label %889, label %888

888:                                              ; preds = %885
  call void @_ZdaPv(ptr noundef %886) #12
  br label %889

889:                                              ; preds = %888, %885
  %890 = load i8, ptr %24, align 1, !tbaa !9, !range !34, !noundef !35
  %891 = trunc i8 %890 to i1
  br i1 %891, label %892, label %893

892:                                              ; preds = %889
  store i32 0, ptr %4, align 4
  store i32 1, ptr %27, align 4
  br label %894

893:                                              ; preds = %889
  store i32 1, ptr %4, align 4
  store i32 1, ptr %27, align 4
  br label %894

894:                                              ; preds = %893, %892
  call void @llvm.lifetime.end.p0(i64 8, ptr %67) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %41) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #10
  call void @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %36) #10
  call void @llvm.lifetime.end.p0(i64 48, ptr %36) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #10
  br label %898

895:                                              ; preds = %864, %778
  call void @llvm.lifetime.end.p0(i64 8, ptr %67) #10
  br label %896

896:                                              ; preds = %895, %710, %692, %571, %507, %454, %391, %344
  call void @llvm.lifetime.end.p0(i64 16, ptr %41) #10
  br label %897

897:                                              ; preds = %896, %340
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #10
  call void @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %36) #10
  call void @llvm.lifetime.end.p0(i64 48, ptr %36) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #10
  call void @llvm.lifetime.end.p0(i64 56, ptr %23) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #10
  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 8, ptr %16) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #10
  br label %900

898:                                              ; preds = %894, %82
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #10
  call void @llvm.lifetime.end.p0(i64 56, ptr %23) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #10
  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 8, ptr %16) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #10
  %899 = load i32, ptr %4, align 4
  ret i32 %899

900:                                              ; preds = %897
  %901 = load ptr, ptr %39, align 8
  %902 = load i32, ptr %40, align 4
  %903 = insertvalue { ptr, i32 } poison, ptr %901, 0
  %904 = insertvalue { ptr, i32 } %903, i32 %902, 1
  resume { ptr, i32 } %904
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPlN13TPPLPartition12VertexSorterEEvT_S3_T0_(ptr noundef, ptr noundef, ptr) #8

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE6insertERKS1_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(56)) #1 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN13TPPLPartition11AddDiagonalEPNS_14MonotoneVertexEPlllP14TPPLVertexTypePSt23_Rb_tree_const_iteratorINS_12ScanLineEdgeEEPSt3setIS6_St4lessIS6_ESaIS6_EES2_(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef, ptr noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #6 align 2

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

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

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #9

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

declare void @_ZN8TPPLPolyC1Ev(ptr)

declare void @_ZN8TPPLPolyD1Ev(ptr)

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{i64 0, i64 8, !5}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = !{i64 0, i64 8, !17, i64 8, i64 8, !17, i64 16, i64 4, !19}
!17 = !{!18, !18, i64 0}
!18 = !{!"double", !7, i64 0}
!19 = !{!20, !20, i64 0}
!20 = !{!"int", !7, i64 0}
!21 = !{!22, !12, i64 24}
!22 = !{!"_ZTSN13TPPLPartition14MonotoneVertexE", !23, i64 0, !12, i64 24, !12, i64 32}
!23 = !{!"_ZTS9TPPLPoint", !18, i64 0, !18, i64 8, !20, i64 16}
!24 = !{!22, !12, i64 32}
!25 = distinct !{!25, !15}
!26 = distinct !{!26, !15}
!27 = distinct !{!27, !15}
!28 = !{!29, !29, i64 0}
!29 = !{!"_ZTS14TPPLVertexType", !7, i64 0}
!30 = distinct !{!30, !15}
!31 = distinct !{!31, !15}
!32 = !{!33, !12, i64 0}
!33 = !{!"_ZTSN13TPPLPartition12ScanLineEdgeE", !12, i64 0, !23, i64 8, !23, i64 32}
!34 = !{i8 0, i8 2}
!35 = !{}
!36 = distinct !{!36, !15}
!37 = !{!7, !7, i64 0}
!38 = distinct !{!38, !15}
!39 = distinct !{!39, !15}
!40 = distinct !{!40, !15}


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

%"struct.std::_List_iterator" = type { ptr }
%"struct.TPPLPartition::ScanLineEdge" = type { i64, %struct.TPPLPoint, %struct.TPPLPoint }
%struct.TPPLPoint = type { double, double, i32 }
%"class.TPPLPartition::VertexSorter" = type { ptr }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<TPPLPartition::ScanLineEdge, TPPLPartition::ScanLineEdge, std::_Identity<TPPLPartition::ScanLineEdge>, std::less<TPPLPartition::ScanLineEdge>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<TPPLPartition::ScanLineEdge, TPPLPartition::ScanLineEdge, std::_Identity<TPPLPartition::ScanLineEdge>, std::less<TPPLPartition::ScanLineEdge>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"struct.std::pair" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%class.TPPLPoly = type <{ ptr, i64, i8, [7 x i8] }>
%"struct.TPPLPartition::MonotoneVertex" = type { %struct.TPPLPoint, i64, i64 }

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPolyixEi(ptr noundef nonnull align 8 dereferenceable(17), i32 noundef) local_unnamed_addr #6 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK8TPPLPoly5ValidEv(ptr noundef nonnull align 8 dereferenceable(17)) local_unnamed_addr #7 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 2) i32 @_ZN13TPPLPartition17MonotonePartitionEPNSt7__cxx114listI8TPPLPolySaIS2_EEES5_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"struct.std::_List_iterator", align 8
  %5 = alloca i64, align 8
  %6 = alloca %"struct.TPPLPartition::ScanLineEdge", align 8
  %7 = alloca %"struct.std::_List_iterator", align 8
  %8 = alloca %"struct.std::_List_iterator", align 8
  %9 = alloca %"class.TPPLPartition::VertexSorter", align 8
  %10 = alloca %"class.std::set", align 8
  %11 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %12 = alloca %"struct.std::pair", align 8
  %13 = alloca %"struct.std::pair", align 8
  %14 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %15 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %16 = alloca %"struct.std::pair", align 8
  %17 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %18 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %19 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %20 = alloca %"struct.std::pair", align 8
  %21 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %22 = alloca %class.TPPLPoly, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #10
  call void @_ZNSt14_List_iteratorI8TPPLPolyEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #10
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %6) #10
  %23 = call ptr @_ZNSt7__cxx114listI8TPPLPolySaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #10
  store ptr %23, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #10
  %24 = call ptr @_ZNSt7__cxx114listI8TPPLPolySaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #10
  store ptr %24, ptr %7, align 8
  %25 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorI8TPPLPolyES3_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %7) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #10
  br i1 %25, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %3, %28
  %.0288320 = phi i64 [ %31, %28 ], [ 0, %3 ]
  %26 = call noundef ptr @_ZNKSt14_List_iteratorI8TPPLPolyEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #10
  %27 = call noundef zeroext i1 @_ZNK8TPPLPoly5ValidEv(ptr noundef nonnull align 8 dereferenceable(17) %26)
  br i1 %27, label %28, label %.loopexit318

28:                                               ; preds = %.lr.ph
  %29 = call noundef ptr @_ZNKSt14_List_iteratorI8TPPLPolyEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #10
  %30 = call noundef i64 @_ZNK8TPPLPoly12GetNumPointsEv(ptr noundef nonnull align 8 dereferenceable(17) %29)
  %31 = add nsw i64 %30, %.0288320
  %32 = call ptr @_ZNSt14_List_iteratorI8TPPLPolyEppEi(ptr noundef nonnull align 8 dereferenceable(8) %4, i32 noundef 0) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #10
  %33 = call ptr @_ZNSt7__cxx114listI8TPPLPolySaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #10
  store ptr %33, ptr %7, align 8
  %34 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorI8TPPLPolyES3_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %7) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #10
  br i1 %34, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge:                                      ; preds = %28, %3
  %.0288.lcssa = phi i64 [ 0, %3 ], [ %31, %28 ]
  %35 = mul nsw i64 %.0288.lcssa, 3
  %36 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %35, i64 40)
  %37 = extractvalue { i64, i1 } %36, 1
  %38 = extractvalue { i64, i1 } %36, 0
  %39 = select i1 %37, i64 -1, i64 %38
  %40 = call noalias noundef nonnull ptr @_Znam(i64 noundef %39) #11
  store i64 %.0288.lcssa, ptr %5, align 8, !tbaa !11
  %41 = call ptr @_ZNSt7__cxx114listI8TPPLPolySaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #10
  store ptr %41, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #10
  %42 = call ptr @_ZNSt7__cxx114listI8TPPLPolySaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #10
  store ptr %42, ptr %8, align 8
  %43 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorI8TPPLPolyES3_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %8) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #10
  br i1 %43, label %.lr.ph327, label %._crit_edge328

.lr.ph327:                                        ; preds = %._crit_edge, %._crit_edge324
  %.0291325 = phi i64 [ %46, %._crit_edge324 ], [ 0, %._crit_edge ]
  %44 = call noundef nonnull align 8 dereferenceable(17) ptr @_ZNKSt14_List_iteratorI8TPPLPolyEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #10
  %45 = call noundef i64 @_ZNK8TPPLPoly12GetNumPointsEv(ptr noundef nonnull align 8 dereferenceable(17) %44)
  %46 = add nsw i64 %45, %.0291325
  %47 = call noundef i64 @_ZNK8TPPLPoly12GetNumPointsEv(ptr noundef nonnull align 8 dereferenceable(17) %44)
  %48 = icmp sgt i64 %47, 0
  br i1 %48, label %49, label %._crit_edge324

49:                                               ; preds = %.lr.ph327
  %50 = add nsw i64 %46, -1
  %51 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %44, i64 noundef 0)
  %52 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %40, i64 %.0291325
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %52, ptr noundef nonnull align 8 dereferenceable(24) %51, i64 24, i1 false), !tbaa.struct !13
  %53 = getelementptr inbounds i8, ptr %52, i64 24
  store i64 %50, ptr %53, align 8
  %54 = call noundef i64 @_ZNK8TPPLPoly12GetNumPointsEv(ptr noundef nonnull align 8 dereferenceable(17) %44)
  %55 = icmp ne i64 %54, 1
  %56 = zext i1 %55 to i64
  %spec.select = add nsw i64 %.0291325, %56
  %57 = getelementptr inbounds i8, ptr %52, i64 32
  store i64 %spec.select, ptr %57, align 8
  %58 = call noundef i64 @_ZNK8TPPLPoly12GetNumPointsEv(ptr noundef nonnull align 8 dereferenceable(17) %44)
  %59 = icmp sgt i64 %58, 1
  br i1 %59, label %.lr.ph323.peel.next, label %._crit_edge324

.lr.ph323.peel.next:                              ; preds = %49, %.lr.ph323.peel.next
  %.0286321 = phi i64 [ %70, %.lr.ph323.peel.next ], [ 1, %49 ]
  %60 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %44, i64 noundef %.0286321)
  %61 = add nsw i64 %.0286321, %.0291325
  %62 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %40, i64 %61
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %62, ptr noundef nonnull align 8 dereferenceable(24) %60, i64 24, i1 false), !tbaa.struct !13
  %63 = add nsw i64 %61, -1
  %64 = getelementptr inbounds i8, ptr %62, i64 24
  store i64 %63, ptr %64, align 8
  %65 = call noundef i64 @_ZNK8TPPLPoly12GetNumPointsEv(ptr noundef nonnull align 8 dereferenceable(17) %44)
  %66 = add nsw i64 %65, -1
  %67 = icmp eq i64 %.0286321, %66
  %68 = add nsw i64 %61, 1
  %spec.select386 = select i1 %67, i64 %.0291325, i64 %68
  %69 = getelementptr inbounds i8, ptr %62, i64 32
  store i64 %spec.select386, ptr %69, align 8
  %70 = add nuw nsw i64 %.0286321, 1
  %71 = call noundef i64 @_ZNK8TPPLPoly12GetNumPointsEv(ptr noundef nonnull align 8 dereferenceable(17) %44)
  %72 = icmp slt i64 %70, %71
  br i1 %72, label %.lr.ph323.peel.next, label %._crit_edge324, !llvm.loop !18

._crit_edge324:                                   ; preds = %.lr.ph323.peel.next, %49, %.lr.ph327
  %73 = call ptr @_ZNSt14_List_iteratorI8TPPLPolyEppEi(ptr noundef nonnull align 8 dereferenceable(8) %4, i32 noundef 0) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #10
  %74 = call ptr @_ZNSt7__cxx114listI8TPPLPolySaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #10
  store ptr %74, ptr %8, align 8
  %75 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorI8TPPLPolyES3_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %8) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #10
  br i1 %75, label %.lr.ph327, label %._crit_edge328, !llvm.loop !20

._crit_edge328:                                   ; preds = %._crit_edge324, %._crit_edge
  %76 = icmp ugt i64 %.0288.lcssa, 2305843009213693951
  %77 = shl i64 %.0288.lcssa, 3
  %78 = select i1 %76, i64 -1, i64 %77
  %79 = call noalias noundef nonnull ptr @_Znam(i64 noundef %78) #11
  %80 = icmp sgt i64 %.0288.lcssa, 0
  br i1 %80, label %.lr.ph331.preheader, label %._crit_edge332

.lr.ph331.preheader:                              ; preds = %._crit_edge328
  %min.iters.check = icmp ult i64 %.0288.lcssa, 4
  br i1 %min.iters.check, label %.lr.ph331.preheader391, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph331.preheader
  %n.vec = and i64 %.0288.lcssa, 9223372036854775804
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.ind = phi <2 x i64> [ <i64 0, i64 1>, %vector.ph ], [ %vec.ind.next, %vector.body ]
  %step.add = add <2 x i64> %vec.ind, <i64 2, i64 2>
  %81 = getelementptr inbounds i64, ptr %79, i64 %index
  %82 = getelementptr inbounds i8, ptr %81, i64 16
  store <2 x i64> %vec.ind, ptr %81, align 8, !tbaa !11
  store <2 x i64> %step.add, ptr %82, align 8, !tbaa !11
  %index.next = add nuw i64 %index, 4
  %vec.ind.next = add <2 x i64> %vec.ind, <i64 4, i64 4>
  %83 = icmp eq i64 %index.next, %n.vec
  br i1 %83, label %middle.block, label %vector.body, !llvm.loop !21

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %.0288.lcssa, %n.vec
  br i1 %cmp.n, label %._crit_edge332, label %.lr.ph331.preheader391

.lr.ph331.preheader391:                           ; preds = %middle.block, %.lr.ph331.preheader
  %.1287329.ph = phi i64 [ 0, %.lr.ph331.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph331

.lr.ph331:                                        ; preds = %.lr.ph331.preheader391, %.lr.ph331
  %.1287329 = phi i64 [ %85, %.lr.ph331 ], [ %.1287329.ph, %.lr.ph331.preheader391 ]
  %84 = getelementptr inbounds i64, ptr %79, i64 %.1287329
  store i64 %.1287329, ptr %84, align 8, !tbaa !11
  %85 = add nuw nsw i64 %.1287329, 1
  %exitcond.not = icmp eq i64 %85, %.0288.lcssa
  br i1 %exitcond.not, label %._crit_edge332, label %.lr.ph331, !llvm.loop !24

._crit_edge332:                                   ; preds = %.lr.ph331, %middle.block, %._crit_edge328
  %86 = getelementptr inbounds i64, ptr %79, i64 %.0288.lcssa
  call void @_ZN13TPPLPartition12VertexSorterC2EPNS_14MonotoneVertexE(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull %40)
  %87 = load ptr, ptr %9, align 8
  call void @_ZSt4sortIPlN13TPPLPartition12VertexSorterEEvT_S3_T0_(ptr noundef nonnull %79, ptr noundef nonnull %86, ptr %87)
  %88 = icmp ugt i64 %35, 4611686018427387903
  %89 = mul i64 %.0288.lcssa, 12
  %90 = select i1 %88, i64 -1, i64 %89
  %91 = call noalias noundef nonnull ptr @_Znam(i64 noundef %90) #11
  br i1 %80, label %.lr.ph336, label %._crit_edge337

.lr.ph336:                                        ; preds = %._crit_edge332, %118
  %.2333 = phi i64 [ %119, %118 ], [ 0, %._crit_edge332 ]
  %92 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %40, i64 %.2333
  %93 = getelementptr inbounds i8, ptr %92, i64 24
  %94 = load i64, ptr %93, align 8, !tbaa !25
  %95 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %40, i64 %94
  %96 = getelementptr inbounds i8, ptr %92, i64 32
  %97 = load i64, ptr %96, align 8, !tbaa !28
  %98 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %40, i64 %97
  %99 = call noundef zeroext i1 @_ZN13TPPLPartition5BelowER9TPPLPointS1_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull align 8 dereferenceable(24) %95, ptr noundef nonnull align 8 dereferenceable(24) %92)
  br i1 %99, label %100, label %107

100:                                              ; preds = %.lr.ph336
  %101 = call noundef zeroext i1 @_ZN13TPPLPartition5BelowER9TPPLPointS1_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull align 8 dereferenceable(24) %98, ptr noundef nonnull align 8 dereferenceable(24) %92)
  br i1 %101, label %102, label %107

102:                                              ; preds = %100
  %103 = call noundef zeroext i1 @_ZN13TPPLPartition8IsConvexER9TPPLPointS1_S1_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull align 8 dereferenceable(24) %98, ptr noundef nonnull align 8 dereferenceable(24) %95, ptr noundef nonnull align 8 dereferenceable(24) %92)
  %104 = getelementptr inbounds i32, ptr %91, i64 %.2333
  br i1 %103, label %105, label %106

105:                                              ; preds = %102
  store i32 1, ptr %104, align 4, !tbaa !29
  br label %118

106:                                              ; preds = %102
  store i32 3, ptr %104, align 4, !tbaa !29
  br label %118

107:                                              ; preds = %100, %.lr.ph336
  %108 = call noundef zeroext i1 @_ZN13TPPLPartition5BelowER9TPPLPointS1_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull align 8 dereferenceable(24) %92, ptr noundef nonnull align 8 dereferenceable(24) %95)
  br i1 %108, label %109, label %116

109:                                              ; preds = %107
  %110 = call noundef zeroext i1 @_ZN13TPPLPartition5BelowER9TPPLPointS1_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull align 8 dereferenceable(24) %92, ptr noundef nonnull align 8 dereferenceable(24) %98)
  br i1 %110, label %111, label %116

111:                                              ; preds = %109
  %112 = call noundef zeroext i1 @_ZN13TPPLPartition8IsConvexER9TPPLPointS1_S1_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull align 8 dereferenceable(24) %98, ptr noundef nonnull align 8 dereferenceable(24) %95, ptr noundef nonnull align 8 dereferenceable(24) %92)
  %113 = getelementptr inbounds i32, ptr %91, i64 %.2333
  br i1 %112, label %114, label %115

114:                                              ; preds = %111
  store i32 2, ptr %113, align 4, !tbaa !29
  br label %118

115:                                              ; preds = %111
  store i32 4, ptr %113, align 4, !tbaa !29
  br label %118

116:                                              ; preds = %109, %107
  %117 = getelementptr inbounds i32, ptr %91, i64 %.2333
  store i32 0, ptr %117, align 4, !tbaa !29
  br label %118

118:                                              ; preds = %106, %105, %114, %115, %116
  %119 = add nuw nsw i64 %.2333, 1
  %exitcond376.not = icmp eq i64 %119, %.0288.lcssa
  br i1 %exitcond376.not, label %._crit_edge337, label %.lr.ph336, !llvm.loop !31

._crit_edge337:                                   ; preds = %118, %._crit_edge332
  %120 = icmp ugt i64 %35, 2305843009213693951
  %121 = mul i64 %.0288.lcssa, 24
  %122 = select i1 %120, i64 -1, i64 %121
  %123 = call noalias noundef nonnull ptr @_Znam(i64 noundef %122) #11
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %10) #10
  call void @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %10) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #10
  call void @_ZNSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #10
  %124 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %122) #11
          to label %125 unwind label %138

125:                                              ; preds = %._crit_edge337
  %126 = icmp eq i64 %.0288.lcssa, 0
  br i1 %126, label %.loopexit.thread, label %127

.loopexit.thread:                                 ; preds = %125
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #10
  call void @_ZNSt4pairISt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEbEC2IS3_bTnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES7_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 8 dereferenceable(9) %12)
  br label %.thread

127:                                              ; preds = %125
  %128 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %124, i64 %35
  br label %129

129:                                              ; preds = %129, %127
  %130 = phi ptr [ %124, %127 ], [ %131, %129 ]
  call void @_ZNSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %130) #10
  %131 = getelementptr inbounds i8, ptr %130, i64 8
  %132 = icmp eq ptr %131, %128
  br i1 %132, label %.loopexit, label %129

.loopexit:                                        ; preds = %129
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #10
  call void @_ZNSt4pairISt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEbEC2IS3_bTnNSt9enable_ifIXsr6__and_ISt37__is_implicitly_default_constructibleIT_ES7_IT0_EEE5valueEbE4typeELb1EEEv(ptr noundef nonnull align 8 dereferenceable(9) %12)
  br i1 %80, label %.lr.ph340, label %.thread

.preheader317:                                    ; preds = %.lr.ph340
  br i1 %80, label %.lr.ph342, label %.thread

.lr.ph342:                                        ; preds = %.preheader317
  %133 = getelementptr inbounds i8, ptr %6, i64 8
  %134 = getelementptr inbounds i8, ptr %6, i64 32
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %20, i64 8
  %.sroa.220.0..sroa_idx = getelementptr inbounds i8, ptr %16, i64 8
  %.sroa.228.0..sroa_idx = getelementptr inbounds i8, ptr %13, i64 8
  br label %142

.lr.ph340:                                        ; preds = %.loopexit, %.lr.ph340
  %.3338 = phi i64 [ %137, %.lr.ph340 ], [ 0, %.loopexit ]
  %135 = call ptr @_ZNKSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %10) #10
  %136 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %124, i64 %.3338
  store ptr %135, ptr %136, align 8, !tbaa !5
  %137 = add nuw nsw i64 %.3338, 1
  %exitcond377.not = icmp eq i64 %137, %.0288.lcssa
  br i1 %exitcond377.not, label %.preheader317, label %.lr.ph340, !llvm.loop !32

138:                                              ; preds = %._crit_edge337
  %139 = landingpad { ptr, i32 }
          cleanup
  br label %349

140:                                              ; preds = %271, %222, %173
  %141 = landingpad { ptr, i32 }
          cleanup
  br label %348

142:                                              ; preds = %.lr.ph342, %311
  %.4341 = phi i64 [ 0, %.lr.ph342 ], [ %312, %311 ]
  %143 = getelementptr inbounds i64, ptr %79, i64 %.4341
  %144 = load i64, ptr %143, align 8, !tbaa !11
  %145 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %40, i64 %144
  %146 = getelementptr inbounds i32, ptr %91, i64 %144
  %147 = load i32, ptr %146, align 4, !tbaa !29
  switch i32 %147, label %311 [
    i32 1, label %148
    i32 2, label %159
    i32 3, label %177
    i32 4, label %206
    i32 0, label %250
  ]

148:                                              ; preds = %142
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %133, ptr noundef nonnull align 8 dereferenceable(24) %145, i64 24, i1 false), !tbaa.struct !13
  %149 = getelementptr inbounds i8, ptr %145, i64 32
  %150 = load i64, ptr %149, align 8, !tbaa !28
  %151 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %40, i64 %150
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %134, ptr noundef nonnull align 8 dereferenceable(24) %151, i64 24, i1 false), !tbaa.struct !13
  store i64 %144, ptr %6, align 8, !tbaa !33
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #10
  %152 = invoke { ptr, i8 } @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE6insertERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %10, ptr noundef nonnull align 8 dereferenceable(56) %6)
          to label %153 unwind label %157

153:                                              ; preds = %148
  %.fca.0.extract25 = extractvalue { ptr, i8 } %152, 0
  %.fca.1.extract26 = extractvalue { ptr, i8 } %152, 1
  store ptr %.fca.0.extract25, ptr %13, align 8
  store i8 %.fca.1.extract26, ptr %.sroa.228.0..sroa_idx, align 8
  %154 = call noundef nonnull align 8 dereferenceable(9) ptr @_ZNSt4pairISt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEbEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(9) %12, ptr noundef nonnull align 8 dereferenceable(9) %13) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #10
  %155 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %124, i64 %144
  %156 = load i64, ptr %12, align 8, !tbaa !5
  store i64 %156, ptr %155, align 8, !tbaa !5
  br label %.sink.split

157:                                              ; preds = %148
  %158 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #10
  br label %348

159:                                              ; preds = %142
  %160 = getelementptr inbounds i8, ptr %145, i64 24
  %161 = load i64, ptr %160, align 8, !tbaa !25
  %162 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %124, i64 %161
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #10
  %163 = call ptr @_ZNKSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %10) #10
  store ptr %163, ptr %14, align 8
  %164 = call noundef zeroext i1 @_ZSteqRKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEES4_(ptr noundef nonnull align 8 dereferenceable(8) %162, ptr noundef nonnull align 8 dereferenceable(8) %14) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #10
  br i1 %164, label %.thread, label %165

165:                                              ; preds = %159
  %166 = load i64, ptr %160, align 8, !tbaa !25
  %167 = getelementptr inbounds i64, ptr %123, i64 %166
  %168 = load i64, ptr %167, align 8, !tbaa !11
  %169 = getelementptr inbounds i32, ptr %91, i64 %168
  %170 = load i32, ptr %169, align 4, !tbaa !29
  %171 = icmp eq i32 %170, 4
  br i1 %171, label %172, label %173

172:                                              ; preds = %165
  call void @_ZN13TPPLPartition11AddDiagonalEPNS_14MonotoneVertexEPlllP14TPPLVertexTypePSt23_Rb_tree_const_iteratorINS_12ScanLineEdgeEEPSt3setIS6_St4lessIS6_ESaIS6_EES2_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull %40, ptr noundef nonnull %5, i64 noundef %144, i64 noundef %168, ptr noundef nonnull %91, ptr noundef nonnull %124, ptr noundef nonnull %10, ptr noundef nonnull %123)
  %.pre383 = load i64, ptr %160, align 8, !tbaa !25
  br label %173

173:                                              ; preds = %172, %165
  %174 = phi i64 [ %.pre383, %172 ], [ %166, %165 ]
  %175 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %124, i64 %174
  %.sroa.024.0.copyload = load ptr, ptr %175, align 8, !tbaa !5
  %176 = invoke ptr @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIS1_E(ptr noundef nonnull align 8 dereferenceable(48) %10, ptr %.sroa.024.0.copyload)
          to label %311 unwind label %140

177:                                              ; preds = %142
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %133, ptr noundef nonnull align 8 dereferenceable(24) %145, i64 24, i1 false), !tbaa.struct !13
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %134, ptr noundef nonnull align 8 dereferenceable(24) %145, i64 24, i1 false), !tbaa.struct !13
  %178 = invoke ptr @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE11lower_boundERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %10, ptr noundef nonnull align 8 dereferenceable(56) %6)
          to label %179 unwind label %182

179:                                              ; preds = %177
  store ptr %178, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #10
  %180 = call ptr @_ZNKSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %10) #10
  store ptr %180, ptr %15, align 8
  %181 = call noundef zeroext i1 @_ZSteqRKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEES4_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %15) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #10
  br i1 %181, label %.thread, label %184

182:                                              ; preds = %177
  %183 = landingpad { ptr, i32 }
          cleanup
  br label %348

184:                                              ; preds = %179
  %185 = call ptr @_ZNSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEmmEi(ptr noundef nonnull align 8 dereferenceable(8) %11, i32 noundef 0) #10
  %186 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #10
  %187 = load i64, ptr %186, align 8, !tbaa !33
  %188 = getelementptr inbounds i64, ptr %123, i64 %187
  %189 = load i64, ptr %188, align 8, !tbaa !11
  call void @_ZN13TPPLPartition11AddDiagonalEPNS_14MonotoneVertexEPlllP14TPPLVertexTypePSt23_Rb_tree_const_iteratorINS_12ScanLineEdgeEEPSt3setIS6_St4lessIS6_ESaIS6_EES2_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull %40, ptr noundef nonnull %5, i64 noundef %144, i64 noundef %189, ptr noundef nonnull %91, ptr noundef nonnull %124, ptr noundef nonnull %10, ptr noundef nonnull %123)
  %190 = load i64, ptr %5, align 8, !tbaa !11
  %191 = add nsw i64 %190, -2
  %192 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %40, i64 %191
  %193 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #10
  %194 = load i64, ptr %193, align 8, !tbaa !33
  %195 = getelementptr inbounds i64, ptr %123, i64 %194
  store i64 %144, ptr %195, align 8, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %133, ptr noundef nonnull align 8 dereferenceable(24) %192, i64 24, i1 false), !tbaa.struct !13
  %196 = getelementptr inbounds i8, ptr %192, i64 32
  %197 = load i64, ptr %196, align 8, !tbaa !28
  %198 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %40, i64 %197
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %134, ptr noundef nonnull align 8 dereferenceable(24) %198, i64 24, i1 false), !tbaa.struct !13
  store i64 %191, ptr %6, align 8, !tbaa !33
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #10
  %199 = invoke { ptr, i8 } @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE6insertERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %10, ptr noundef nonnull align 8 dereferenceable(56) %6)
          to label %200 unwind label %204

200:                                              ; preds = %184
  %.fca.0.extract17 = extractvalue { ptr, i8 } %199, 0
  %.fca.1.extract18 = extractvalue { ptr, i8 } %199, 1
  store ptr %.fca.0.extract17, ptr %16, align 8
  store i8 %.fca.1.extract18, ptr %.sroa.220.0..sroa_idx, align 8
  %201 = call noundef nonnull align 8 dereferenceable(9) ptr @_ZNSt4pairISt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEbEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(9) %12, ptr noundef nonnull align 8 dereferenceable(9) %16) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #10
  %202 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %124, i64 %191
  %203 = load i64, ptr %12, align 8, !tbaa !5
  store i64 %203, ptr %202, align 8, !tbaa !5
  br label %.sink.split

204:                                              ; preds = %184
  %205 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #10
  br label %348

206:                                              ; preds = %142
  %207 = getelementptr inbounds i8, ptr %145, i64 24
  %208 = load i64, ptr %207, align 8, !tbaa !25
  %209 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %124, i64 %208
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #10
  %210 = call ptr @_ZNKSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %10) #10
  store ptr %210, ptr %17, align 8
  %211 = call noundef zeroext i1 @_ZSteqRKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEES4_(ptr noundef nonnull align 8 dereferenceable(8) %209, ptr noundef nonnull align 8 dereferenceable(8) %17) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #10
  br i1 %211, label %.thread, label %212

212:                                              ; preds = %206
  %213 = load i64, ptr %207, align 8, !tbaa !25
  %214 = getelementptr inbounds i64, ptr %123, i64 %213
  %215 = load i64, ptr %214, align 8, !tbaa !11
  %216 = getelementptr inbounds i32, ptr %91, i64 %215
  %217 = load i32, ptr %216, align 4, !tbaa !29
  %218 = icmp eq i32 %217, 4
  br i1 %218, label %219, label %222

219:                                              ; preds = %212
  call void @_ZN13TPPLPartition11AddDiagonalEPNS_14MonotoneVertexEPlllP14TPPLVertexTypePSt23_Rb_tree_const_iteratorINS_12ScanLineEdgeEEPSt3setIS6_St4lessIS6_ESaIS6_EES2_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull %40, ptr noundef nonnull %5, i64 noundef %144, i64 noundef %215, ptr noundef nonnull %91, ptr noundef nonnull %124, ptr noundef nonnull %10, ptr noundef nonnull %123)
  %220 = load i64, ptr %5, align 8, !tbaa !11
  %221 = add nsw i64 %220, -2
  %.pre382 = load i64, ptr %207, align 8, !tbaa !25
  br label %222

222:                                              ; preds = %219, %212
  %223 = phi i64 [ %.pre382, %219 ], [ %213, %212 ]
  %.0289 = phi i64 [ %221, %219 ], [ %144, %212 ]
  %224 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %124, i64 %223
  %.sroa.016.0.copyload = load ptr, ptr %224, align 8, !tbaa !5
  %225 = invoke ptr @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIS1_E(ptr noundef nonnull align 8 dereferenceable(48) %10, ptr %.sroa.016.0.copyload)
          to label %226 unwind label %140

226:                                              ; preds = %222
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %133, ptr noundef nonnull align 8 dereferenceable(24) %145, i64 24, i1 false), !tbaa.struct !13
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %134, ptr noundef nonnull align 8 dereferenceable(24) %145, i64 24, i1 false), !tbaa.struct !13
  %227 = invoke ptr @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE11lower_boundERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %10, ptr noundef nonnull align 8 dereferenceable(56) %6)
          to label %228 unwind label %231

228:                                              ; preds = %226
  store ptr %227, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #10
  %229 = call ptr @_ZNKSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %10) #10
  store ptr %229, ptr %18, align 8
  %230 = call noundef zeroext i1 @_ZSteqRKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEES4_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %18) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #10
  br i1 %230, label %.thread, label %233

231:                                              ; preds = %226
  %232 = landingpad { ptr, i32 }
          cleanup
  br label %348

233:                                              ; preds = %228
  %234 = call ptr @_ZNSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEmmEi(ptr noundef nonnull align 8 dereferenceable(8) %11, i32 noundef 0) #10
  %235 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #10
  %236 = load i64, ptr %235, align 8, !tbaa !33
  %237 = getelementptr inbounds i64, ptr %123, i64 %236
  %238 = load i64, ptr %237, align 8, !tbaa !11
  %239 = getelementptr inbounds i32, ptr %91, i64 %238
  %240 = load i32, ptr %239, align 4, !tbaa !29
  %241 = icmp eq i32 %240, 4
  br i1 %241, label %242, label %247

242:                                              ; preds = %233
  %243 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #10
  %244 = load i64, ptr %243, align 8, !tbaa !33
  %245 = getelementptr inbounds i64, ptr %123, i64 %244
  %246 = load i64, ptr %245, align 8, !tbaa !11
  call void @_ZN13TPPLPartition11AddDiagonalEPNS_14MonotoneVertexEPlllP14TPPLVertexTypePSt23_Rb_tree_const_iteratorINS_12ScanLineEdgeEEPSt3setIS6_St4lessIS6_ESaIS6_EES2_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull %40, ptr noundef nonnull %5, i64 noundef %.0289, i64 noundef %246, ptr noundef nonnull %91, ptr noundef nonnull %124, ptr noundef nonnull %10, ptr noundef nonnull %123)
  br label %247

247:                                              ; preds = %242, %233
  %248 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #10
  %249 = load i64, ptr %248, align 8, !tbaa !33
  br label %.sink.split

250:                                              ; preds = %142
  %251 = getelementptr inbounds i8, ptr %145, i64 24
  %252 = load i64, ptr %251, align 8, !tbaa !25
  %253 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %40, i64 %252
  %254 = call noundef zeroext i1 @_ZN13TPPLPartition5BelowER9TPPLPointS1_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull align 8 dereferenceable(24) %145, ptr noundef nonnull align 8 dereferenceable(24) %253)
  br i1 %254, label %255, label %286

255:                                              ; preds = %250
  %256 = load i64, ptr %251, align 8, !tbaa !25
  %257 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %124, i64 %256
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #10
  %258 = call ptr @_ZNKSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %10) #10
  store ptr %258, ptr %19, align 8
  %259 = call noundef zeroext i1 @_ZSteqRKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEES4_(ptr noundef nonnull align 8 dereferenceable(8) %257, ptr noundef nonnull align 8 dereferenceable(8) %19) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #10
  br i1 %259, label %.thread, label %260

260:                                              ; preds = %255
  %261 = load i64, ptr %251, align 8, !tbaa !25
  %262 = getelementptr inbounds i64, ptr %123, i64 %261
  %263 = load i64, ptr %262, align 8, !tbaa !11
  %264 = getelementptr inbounds i32, ptr %91, i64 %263
  %265 = load i32, ptr %264, align 4, !tbaa !29
  %266 = icmp eq i32 %265, 4
  br i1 %266, label %267, label %271

267:                                              ; preds = %260
  call void @_ZN13TPPLPartition11AddDiagonalEPNS_14MonotoneVertexEPlllP14TPPLVertexTypePSt23_Rb_tree_const_iteratorINS_12ScanLineEdgeEEPSt3setIS6_St4lessIS6_ESaIS6_EES2_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull %40, ptr noundef nonnull %5, i64 noundef %144, i64 noundef %263, ptr noundef nonnull %91, ptr noundef nonnull %124, ptr noundef nonnull %10, ptr noundef nonnull %123)
  %268 = load i64, ptr %5, align 8, !tbaa !11
  %269 = add nsw i64 %268, -2
  %270 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %40, i64 %269
  %.pre = load i64, ptr %251, align 8, !tbaa !25
  br label %271

271:                                              ; preds = %267, %260
  %272 = phi i64 [ %.pre, %267 ], [ %261, %260 ]
  %.0292 = phi ptr [ %270, %267 ], [ %145, %260 ]
  %.1290 = phi i64 [ %269, %267 ], [ %144, %260 ]
  %273 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %124, i64 %272
  %.sroa.012.0.copyload = load ptr, ptr %273, align 8, !tbaa !5
  %274 = invoke ptr @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIS1_E(ptr noundef nonnull align 8 dereferenceable(48) %10, ptr %.sroa.012.0.copyload)
          to label %275 unwind label %140

275:                                              ; preds = %271
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %133, ptr noundef nonnull align 8 dereferenceable(24) %.0292, i64 24, i1 false), !tbaa.struct !13
  %276 = getelementptr inbounds i8, ptr %.0292, i64 32
  %277 = load i64, ptr %276, align 8, !tbaa !28
  %278 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %40, i64 %277
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %134, ptr noundef nonnull align 8 dereferenceable(24) %278, i64 24, i1 false), !tbaa.struct !13
  store i64 %.1290, ptr %6, align 8, !tbaa !33
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %20) #10
  %279 = invoke { ptr, i8 } @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE6insertERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %10, ptr noundef nonnull align 8 dereferenceable(56) %6)
          to label %280 unwind label %284

280:                                              ; preds = %275
  %.fca.0.extract = extractvalue { ptr, i8 } %279, 0
  %.fca.1.extract = extractvalue { ptr, i8 } %279, 1
  store ptr %.fca.0.extract, ptr %20, align 8
  store i8 %.fca.1.extract, ptr %.sroa.2.0..sroa_idx, align 8
  %281 = call noundef nonnull align 8 dereferenceable(9) ptr @_ZNSt4pairISt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEbEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(9) %12, ptr noundef nonnull align 8 dereferenceable(9) %20) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #10
  %282 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %124, i64 %.1290
  %283 = load i64, ptr %12, align 8, !tbaa !5
  store i64 %283, ptr %282, align 8, !tbaa !5
  br label %.sink.split

284:                                              ; preds = %275
  %285 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %20) #10
  br label %348

286:                                              ; preds = %250
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %133, ptr noundef nonnull align 8 dereferenceable(24) %145, i64 24, i1 false), !tbaa.struct !13
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %134, ptr noundef nonnull align 8 dereferenceable(24) %145, i64 24, i1 false), !tbaa.struct !13
  %287 = invoke ptr @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE11lower_boundERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %10, ptr noundef nonnull align 8 dereferenceable(56) %6)
          to label %288 unwind label %291

288:                                              ; preds = %286
  store ptr %287, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #10
  %289 = call ptr @_ZNKSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %10) #10
  store ptr %289, ptr %21, align 8
  %290 = call noundef zeroext i1 @_ZSteqRKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEES4_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %21) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #10
  br i1 %290, label %.thread, label %293

291:                                              ; preds = %286
  %292 = landingpad { ptr, i32 }
          cleanup
  br label %348

293:                                              ; preds = %288
  %294 = call ptr @_ZNSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEmmEi(ptr noundef nonnull align 8 dereferenceable(8) %11, i32 noundef 0) #10
  %295 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #10
  %296 = load i64, ptr %295, align 8, !tbaa !33
  %297 = getelementptr inbounds i64, ptr %123, i64 %296
  %298 = load i64, ptr %297, align 8, !tbaa !11
  %299 = getelementptr inbounds i32, ptr %91, i64 %298
  %300 = load i32, ptr %299, align 4, !tbaa !29
  %301 = icmp eq i32 %300, 4
  br i1 %301, label %302, label %307

302:                                              ; preds = %293
  %303 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #10
  %304 = load i64, ptr %303, align 8, !tbaa !33
  %305 = getelementptr inbounds i64, ptr %123, i64 %304
  %306 = load i64, ptr %305, align 8, !tbaa !11
  call void @_ZN13TPPLPartition11AddDiagonalEPNS_14MonotoneVertexEPlllP14TPPLVertexTypePSt23_Rb_tree_const_iteratorINS_12ScanLineEdgeEEPSt3setIS6_St4lessIS6_ESaIS6_EES2_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull %40, ptr noundef nonnull %5, i64 noundef %144, i64 noundef %306, ptr noundef nonnull %91, ptr noundef nonnull %124, ptr noundef nonnull %10, ptr noundef nonnull %123)
  br label %307

307:                                              ; preds = %302, %293
  %308 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #10
  %309 = load i64, ptr %308, align 8, !tbaa !33
  br label %.sink.split

.sink.split:                                      ; preds = %280, %307, %247, %200, %153
  %.sink388 = phi i64 [ %144, %153 ], [ %191, %200 ], [ %249, %247 ], [ %309, %307 ], [ %.1290, %280 ]
  %.sink = phi i64 [ %144, %153 ], [ %191, %200 ], [ %.0289, %247 ], [ %144, %307 ], [ %144, %280 ]
  %310 = getelementptr inbounds i64, ptr %123, i64 %.sink388
  store i64 %.sink, ptr %310, align 8, !tbaa !11
  br label %311

311:                                              ; preds = %.sink.split, %142, %173
  %312 = add nuw nsw i64 %.4341, 1
  %exitcond378.not = icmp eq i64 %312, %.0288.lcssa
  br i1 %exitcond378.not, label %.thread, label %142, !llvm.loop !35

.thread:                                          ; preds = %311, %159, %179, %206, %228, %255, %288, %.loopexit, %.loopexit.thread, %.preheader317
  %.2297 = phi i1 [ false, %.preheader317 ], [ false, %.loopexit.thread ], [ false, %.loopexit ], [ true, %288 ], [ true, %255 ], [ true, %228 ], [ true, %206 ], [ true, %179 ], [ true, %159 ], [ false, %311 ]
  %313 = load i64, ptr %5, align 8, !tbaa !11
  %314 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %313) #11
          to label %315 unwind label %322

315:                                              ; preds = %.thread
  call void @llvm.memset.p0.i64(ptr nonnull align 1 %314, i8 0, i64 %313, i1 false)
  br i1 %.2297, label %347, label %316

316:                                              ; preds = %315
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %22) #10
  invoke void @_ZN8TPPLPolyC1Ev(ptr noundef nonnull align 8 dereferenceable(17) %22)
          to label %.preheader unwind label %324

.preheader:                                       ; preds = %316
  %317 = load i64, ptr %5, align 8, !tbaa !11
  %318 = icmp sgt i64 %317, 0
  br i1 %318, label %.lr.ph372, label %._crit_edge373

.lr.ph372:                                        ; preds = %.preheader, %342
  %319 = phi i64 [ %343, %342 ], [ %317, %.preheader ]
  %.5370 = phi i64 [ %344, %342 ], [ 0, %.preheader ]
  %320 = getelementptr inbounds i8, ptr %314, i64 %.5370
  %321 = load i8, ptr %320, align 1, !tbaa !36
  %.not = icmp eq i8 %321, 0
  br i1 %.not, label %326, label %342

322:                                              ; preds = %.thread
  %323 = landingpad { ptr, i32 }
          cleanup
  br label %348

324:                                              ; preds = %316
  %325 = landingpad { ptr, i32 }
          cleanup
  br label %346

326:                                              ; preds = %.lr.ph372
  %327 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %40, i64 %.5370
  %328 = getelementptr inbounds i8, ptr %327, i64 32
  %.pn356 = load i64, ptr %328, align 8, !tbaa !28
  %.not308357 = icmp eq i64 %.pn356, %.5370
  br i1 %.not308357, label %._crit_edge362, label %.lr.ph361

.lr.ph361:                                        ; preds = %326, %.lr.ph361
  %.pn359 = phi i64 [ %.pn, %.lr.ph361 ], [ %.pn356, %326 ]
  %.0358 = phi i64 [ %330, %.lr.ph361 ], [ 1, %326 ]
  %329 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %40, i64 %.pn359, i32 2
  %330 = add nuw nsw i64 %.0358, 1
  %.pn = load i64, ptr %329, align 8, !tbaa !28
  %.not308 = icmp eq i64 %.pn, %.5370
  br i1 %.not308, label %._crit_edge362, label %.lr.ph361, !llvm.loop !37

._crit_edge362:                                   ; preds = %.lr.ph361, %326
  %.0.lcssa = phi i64 [ 1, %326 ], [ %330, %.lr.ph361 ]
  invoke void @_ZN8TPPLPoly4InitEl(ptr noundef nonnull align 8 dereferenceable(17) %22, i64 noundef %.0.lcssa)
          to label %331 unwind label %340

331:                                              ; preds = %._crit_edge362
  %332 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPolyixEi(ptr noundef nonnull align 8 dereferenceable(17) %22, i32 noundef 0)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %332, ptr noundef nonnull align 8 dereferenceable(24) %327, i64 24, i1 false), !tbaa.struct !13
  %333 = load i64, ptr %328, align 8, !tbaa !28
  store i8 1, ptr %320, align 1, !tbaa !36
  %334 = getelementptr inbounds i8, ptr %314, i64 %333
  store i8 1, ptr %334, align 1, !tbaa !36
  %.not310364 = icmp eq i64 %333, %.5370
  br i1 %.not310364, label %._crit_edge369, label %.lr.ph368

.lr.ph368:                                        ; preds = %331, %.lr.ph368
  %.1366 = phi i32 [ %339, %.lr.ph368 ], [ 1, %331 ]
  %.pn309365 = phi i64 [ %337, %.lr.ph368 ], [ %333, %331 ]
  %.1294 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %40, i64 %.pn309365
  %335 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPolyixEi(ptr noundef nonnull align 8 dereferenceable(17) %22, i32 noundef %.1366)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %335, ptr noundef nonnull align 8 dereferenceable(24) %.1294, i64 24, i1 false), !tbaa.struct !13
  %336 = getelementptr inbounds i8, ptr %.1294, i64 32
  %337 = load i64, ptr %336, align 8, !tbaa !28
  %338 = getelementptr inbounds i8, ptr %314, i64 %337
  store i8 1, ptr %338, align 1, !tbaa !36
  %339 = add i32 %.1366, 1
  %.not310 = icmp eq i64 %337, %.5370
  br i1 %.not310, label %._crit_edge369, label %.lr.ph368, !llvm.loop !38

340:                                              ; preds = %._crit_edge369, %._crit_edge362
  %341 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN8TPPLPolyD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %22) #10
  br label %346

._crit_edge369:                                   ; preds = %.lr.ph368, %331
  invoke void @_ZNSt7__cxx114listI8TPPLPolySaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(17) %22)
          to label %._crit_edge369._crit_edge unwind label %340

._crit_edge369._crit_edge:                        ; preds = %._crit_edge369
  %.pre384 = load i64, ptr %5, align 8, !tbaa !11
  br label %342

342:                                              ; preds = %._crit_edge369._crit_edge, %.lr.ph372
  %343 = phi i64 [ %.pre384, %._crit_edge369._crit_edge ], [ %319, %.lr.ph372 ]
  %344 = add nuw nsw i64 %.5370, 1
  %345 = icmp slt i64 %344, %343
  br i1 %345, label %.lr.ph372, label %._crit_edge373, !llvm.loop !39

._crit_edge373:                                   ; preds = %342, %.preheader
  call void @_ZN8TPPLPolyD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %22) #10
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %22) #10
  br label %347

346:                                              ; preds = %340, %324
  %.pn311 = phi { ptr, i32 } [ %341, %340 ], [ %325, %324 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %22) #10
  br label %348

347:                                              ; preds = %315, %._crit_edge373
  call void @_ZdaPv(ptr noundef nonnull %40) #12
  call void @_ZdaPv(ptr noundef nonnull %79) #12
  call void @_ZdaPv(ptr noundef nonnull %91) #12
  call void @_ZdaPv(ptr noundef nonnull %124) #12
  call void @_ZdaPv(ptr noundef nonnull %123) #12
  call void @_ZdaPv(ptr noundef nonnull %314) #12
  %not..2297 = xor i1 %.2297, true
  %.0284 = zext i1 %not..2297 to i32
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #10
  call void @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %10) #10
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %10) #10
  br label %.loopexit318

348:                                              ; preds = %322, %346, %291, %284, %231, %204, %182, %157, %140
  %.pn311.pn.pn = phi { ptr, i32 } [ %285, %284 ], [ %141, %140 ], [ %292, %291 ], [ %232, %231 ], [ %205, %204 ], [ %183, %182 ], [ %158, %157 ], [ %.pn311, %346 ], [ %323, %322 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #10
  br label %349

349:                                              ; preds = %348, %138
  %.pn311.pn.pn.pn = phi { ptr, i32 } [ %.pn311.pn.pn, %348 ], [ %139, %138 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #10
  call void @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %10) #10
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %10) #10
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %6) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #10
  resume { ptr, i32 } %.pn311.pn.pn.pn

.loopexit318:                                     ; preds = %.lr.ph, %347
  %.1285 = phi i32 [ %.0284, %347 ], [ 0, %.lr.ph ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %6) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #10
  ret i32 %.1285
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIPlN13TPPLPartition12VertexSorterEEvT_S3_T0_(ptr noundef, ptr noundef, ptr) local_unnamed_addr #8

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE6insertERKS1_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN13TPPLPartition11AddDiagonalEPNS_14MonotoneVertexEPlllP14TPPLVertexTypePSt23_Rb_tree_const_iteratorINS_12ScanLineEdgeEEPSt3setIS6_St4lessIS6_ESaIS6_EES2_(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef, ptr noundef, i64 noundef, i64 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #6 align 2

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

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

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

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #9

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

declare void @_ZN8TPPLPolyC1Ev(ptr) local_unnamed_addr

declare void @_ZN8TPPLPolyD1Ev(ptr) local_unnamed_addr

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{i64 0, i64 8, !14, i64 8, i64 8, !14, i64 16, i64 4, !16}
!14 = !{!15, !15, i64 0}
!15 = !{!"double", !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"int", !7, i64 0}
!18 = distinct !{!18, !10, !19}
!19 = !{!"llvm.loop.peeled.count", i32 1}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10, !22, !23}
!22 = !{!"llvm.loop.isvectorized", i32 1}
!23 = !{!"llvm.loop.unroll.runtime.disable"}
!24 = distinct !{!24, !10, !23, !22}
!25 = !{!26, !12, i64 24}
!26 = !{!"_ZTSN13TPPLPartition14MonotoneVertexE", !27, i64 0, !12, i64 24, !12, i64 32}
!27 = !{!"_ZTS9TPPLPoint", !15, i64 0, !15, i64 8, !17, i64 16}
!28 = !{!26, !12, i64 32}
!29 = !{!30, !30, i64 0}
!30 = !{!"_ZTS14TPPLVertexType", !7, i64 0}
!31 = distinct !{!31, !10}
!32 = distinct !{!32, !10}
!33 = !{!34, !12, i64 0}
!34 = !{!"_ZTSN13TPPLPartition12ScanLineEdgeE", !12, i64 0, !27, i64 8, !27, i64 32}
!35 = distinct !{!35, !10}
!36 = !{!7, !7, i64 0}
!37 = distinct !{!37, !10}
!38 = distinct !{!38, !10}
!39 = distinct !{!39, !10}


; Effective O3 passes: AggressiveInstCombinePass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopFullUnrollPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,MergedLoadStoreMotionPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass