; LLVM IR from mackorone/mms :: old/v2/src/lib/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 }
%"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

; 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

declare i32 @__gxx_personality_v0(...)

; 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 @_ZN8TPPLPoly12GetNumPointsEv(ptr noundef nonnull align 8 dereferenceable(17)) #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) 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(16) 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(16), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #6 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 %"struct.std::_List_iterator", align 8
  %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 ptr, align 8
  %32 = alloca %"class.TPPLPartition::VertexSorter", align 8
  %33 = alloca ptr, align 8
  %34 = alloca ptr, align 8
  %35 = alloca %"class.std::set", align 8
  %36 = alloca ptr, align 8
  %37 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %38 = alloca ptr, align 8
  %39 = alloca i32, align 4
  %40 = alloca %"struct.std::pair", align 8
  %41 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %42 = alloca %"struct.std::pair", align 8
  %43 = alloca { ptr, i8 }, align 8
  %44 = alloca %"struct.std::_Rb_tree_const_iterator", 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::pair", align 8
  %50 = alloca { ptr, i8 }, align 8
  %51 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %52 = alloca %"struct.std::_Rb_tree_const_iterator", 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::pair", align 8
  %59 = alloca { ptr, i8 }, 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::_Rb_tree_const_iterator", align 8
  %63 = alloca ptr, align 8
  %64 = alloca i64, align 8
  %65 = alloca %class.TPPLPoly, align 8
  %66 = alloca i32, align 4
  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
  %67 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #9
  call void @_ZNSt14_List_iteratorI8TPPLPolyEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #9
  call void @llvm.lifetime.start.p0(i64 40, ptr %23) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %24) #9
  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) #9
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  %69 = call ptr @_ZNSt7__cxx114listI8TPPLPolySaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %68) #9
  %70 = getelementptr inbounds %"struct.std::_List_iterator", ptr %25, i32 0, i32 0
  store ptr %69, ptr %70, 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) #9
  br label %71

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

76:                                               ; preds = %71
  %77 = call noundef ptr @_ZNKSt14_List_iteratorI8TPPLPolyEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #9
  %78 = call noundef i64 @_ZN8TPPLPoly12GetNumPointsEv(ptr noundef nonnull align 8 dereferenceable(17) %77)
  %79 = load i64, ptr %11, align 8, !tbaa !11
  %80 = add nsw i64 %79, %78
  store i64 %80, ptr %11, align 8, !tbaa !11
  br label %81

81:                                               ; preds = %76
  %82 = call ptr @_ZNSt14_List_iteratorI8TPPLPolyEppEi(ptr noundef nonnull align 8 dereferenceable(8) %8, i32 noundef 0) #9
  %83 = getelementptr inbounds %"struct.std::_List_iterator", ptr %27, i32 0, i32 0
  store ptr %82, ptr %83, align 8
  br label %71, !llvm.loop !14

84:                                               ; preds = %71
  %85 = load i64, ptr %11, align 8, !tbaa !11
  %86 = mul nsw i64 %85, 3
  store i64 %86, ptr %15, align 8, !tbaa !11
  %87 = load i64, ptr %15, align 8, !tbaa !11
  %88 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %87, i64 32)
  %89 = extractvalue { i64, i1 } %88, 1
  %90 = extractvalue { i64, i1 } %88, 0
  %91 = select i1 %89, i64 -1, i64 %90
  %92 = call noalias noundef nonnull ptr @_Znam(i64 noundef %91) #10
  store ptr %92, ptr %9, align 8, !tbaa !5
  %93 = load i64, ptr %11, align 8, !tbaa !11
  store i64 %93, ptr %14, align 8, !tbaa !11
  store i64 0, ptr %16, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #9
  %94 = load ptr, ptr %6, align 8, !tbaa !5
  %95 = call ptr @_ZNSt7__cxx114listI8TPPLPolySaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %94) #9
  %96 = getelementptr inbounds %"struct.std::_List_iterator", ptr %28, i32 0, i32 0
  store ptr %95, ptr %96, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %8, ptr align 8 %28, i64 8, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #9
  br label %97

97:                                               ; preds = %177, %84
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #9
  %98 = load ptr, ptr %6, align 8, !tbaa !5
  %99 = call ptr @_ZNSt7__cxx114listI8TPPLPolySaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %98) #9
  %100 = getelementptr inbounds %"struct.std::_List_iterator", ptr %29, i32 0, i32 0
  store ptr %99, ptr %100, align 8
  %101 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorI8TPPLPolyES3_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %29) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #9
  br i1 %101, label %102, label %180

102:                                              ; preds = %97
  %103 = call noundef nonnull align 8 dereferenceable(17) ptr @_ZNKSt14_List_iteratorI8TPPLPolyEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #9
  store ptr %103, ptr %18, align 8, !tbaa !5
  %104 = load i64, ptr %16, align 8, !tbaa !11
  %105 = load ptr, ptr %18, align 8, !tbaa !5
  %106 = call noundef i64 @_ZN8TPPLPoly12GetNumPointsEv(ptr noundef nonnull align 8 dereferenceable(17) %105)
  %107 = add nsw i64 %104, %106
  %108 = sub nsw i64 %107, 1
  store i64 %108, ptr %17, align 8, !tbaa !11
  store i64 0, ptr %10, align 8, !tbaa !11
  br label %109

109:                                              ; preds = %171, %102
  %110 = load i64, ptr %10, align 8, !tbaa !11
  %111 = load ptr, ptr %18, align 8, !tbaa !5
  %112 = call noundef i64 @_ZN8TPPLPoly12GetNumPointsEv(ptr noundef nonnull align 8 dereferenceable(17) %111)
  %113 = icmp slt i64 %110, %112
  br i1 %113, label %114, label %174

114:                                              ; preds = %109
  %115 = load ptr, ptr %18, align 8, !tbaa !5
  %116 = load i64, ptr %10, align 8, !tbaa !11
  %117 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %115, i64 noundef %116)
  %118 = load ptr, ptr %9, align 8, !tbaa !5
  %119 = load i64, ptr %10, align 8, !tbaa !11
  %120 = load i64, ptr %16, align 8, !tbaa !11
  %121 = add nsw i64 %119, %120
  %122 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %118, i64 %121
  %123 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %122, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %123, ptr align 8 %117, i64 16, i1 false), !tbaa.struct !16
  %124 = load i64, ptr %10, align 8, !tbaa !11
  %125 = icmp eq i64 %124, 0
  br i1 %125, label %126, label %134

126:                                              ; preds = %114
  %127 = load i64, ptr %17, align 8, !tbaa !11
  %128 = load ptr, ptr %9, align 8, !tbaa !5
  %129 = load i64, ptr %10, align 8, !tbaa !11
  %130 = load i64, ptr %16, align 8, !tbaa !11
  %131 = add nsw i64 %129, %130
  %132 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %128, i64 %131
  %133 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %132, i32 0, i32 1
  store i64 %127, ptr %133, align 8, !tbaa !19
  br label %145

134:                                              ; preds = %114
  %135 = load i64, ptr %10, align 8, !tbaa !11
  %136 = load i64, ptr %16, align 8, !tbaa !11
  %137 = add nsw i64 %135, %136
  %138 = sub nsw i64 %137, 1
  %139 = load ptr, ptr %9, align 8, !tbaa !5
  %140 = load i64, ptr %10, align 8, !tbaa !11
  %141 = load i64, ptr %16, align 8, !tbaa !11
  %142 = add nsw i64 %140, %141
  %143 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %139, i64 %142
  %144 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %143, i32 0, i32 1
  store i64 %138, ptr %144, align 8, !tbaa !19
  br label %145

145:                                              ; preds = %134, %126
  %146 = load i64, ptr %10, align 8, !tbaa !11
  %147 = load ptr, ptr %18, align 8, !tbaa !5
  %148 = call noundef i64 @_ZN8TPPLPoly12GetNumPointsEv(ptr noundef nonnull align 8 dereferenceable(17) %147)
  %149 = sub nsw i64 %148, 1
  %150 = icmp eq i64 %146, %149
  br i1 %150, label %151, label %159

151:                                              ; preds = %145
  %152 = load i64, ptr %16, align 8, !tbaa !11
  %153 = load ptr, ptr %9, align 8, !tbaa !5
  %154 = load i64, ptr %10, align 8, !tbaa !11
  %155 = load i64, ptr %16, align 8, !tbaa !11
  %156 = add nsw i64 %154, %155
  %157 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %153, i64 %156
  %158 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %157, i32 0, i32 2
  store i64 %152, ptr %158, align 8, !tbaa !22
  br label %170

159:                                              ; preds = %145
  %160 = load i64, ptr %10, align 8, !tbaa !11
  %161 = load i64, ptr %16, align 8, !tbaa !11
  %162 = add nsw i64 %160, %161
  %163 = add nsw i64 %162, 1
  %164 = load ptr, ptr %9, align 8, !tbaa !5
  %165 = load i64, ptr %10, align 8, !tbaa !11
  %166 = load i64, ptr %16, align 8, !tbaa !11
  %167 = add nsw i64 %165, %166
  %168 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %164, i64 %167
  %169 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %168, i32 0, i32 2
  store i64 %163, ptr %169, align 8, !tbaa !22
  br label %170

170:                                              ; preds = %159, %151
  br label %171

171:                                              ; preds = %170
  %172 = load i64, ptr %10, align 8, !tbaa !11
  %173 = add nsw i64 %172, 1
  store i64 %173, ptr %10, align 8, !tbaa !11
  br label %109, !llvm.loop !23

174:                                              ; preds = %109
  %175 = load i64, ptr %17, align 8, !tbaa !11
  %176 = add nsw i64 %175, 1
  store i64 %176, ptr %16, align 8, !tbaa !11
  br label %177

177:                                              ; preds = %174
  %178 = call ptr @_ZNSt14_List_iteratorI8TPPLPolyEppEi(ptr noundef nonnull align 8 dereferenceable(8) %8, i32 noundef 0) #9
  %179 = getelementptr inbounds %"struct.std::_List_iterator", ptr %30, i32 0, i32 0
  store ptr %178, ptr %179, align 8
  br label %97, !llvm.loop !24

180:                                              ; preds = %97
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #9
  %181 = load i64, ptr %11, align 8, !tbaa !11
  %182 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %181, i64 8)
  %183 = extractvalue { i64, i1 } %182, 1
  %184 = extractvalue { i64, i1 } %182, 0
  %185 = select i1 %183, i64 -1, i64 %184
  %186 = call noalias noundef nonnull ptr @_Znam(i64 noundef %185) #10
  store ptr %186, ptr %31, align 8, !tbaa !5
  store i64 0, ptr %10, align 8, !tbaa !11
  br label %187

187:                                              ; preds = %196, %180
  %188 = load i64, ptr %10, align 8, !tbaa !11
  %189 = load i64, ptr %11, align 8, !tbaa !11
  %190 = icmp slt i64 %188, %189
  br i1 %190, label %191, label %199

191:                                              ; preds = %187
  %192 = load i64, ptr %10, align 8, !tbaa !11
  %193 = load ptr, ptr %31, align 8, !tbaa !5
  %194 = load i64, ptr %10, align 8, !tbaa !11
  %195 = getelementptr inbounds i64, ptr %193, i64 %194
  store i64 %192, ptr %195, align 8, !tbaa !11
  br label %196

196:                                              ; preds = %191
  %197 = load i64, ptr %10, align 8, !tbaa !11
  %198 = add nsw i64 %197, 1
  store i64 %198, ptr %10, align 8, !tbaa !11
  br label %187, !llvm.loop !25

199:                                              ; preds = %187
  %200 = load ptr, ptr %31, align 8, !tbaa !5
  %201 = load ptr, ptr %31, align 8, !tbaa !5
  %202 = load i64, ptr %11, align 8, !tbaa !11
  %203 = getelementptr inbounds i64, ptr %201, i64 %202
  %204 = load ptr, ptr %9, align 8, !tbaa !5
  call void @_ZN13TPPLPartition12VertexSorterC2EPNS_14MonotoneVertexE(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef %204)
  %205 = getelementptr inbounds %"class.TPPLPartition::VertexSorter", ptr %32, i32 0, i32 0
  %206 = load ptr, ptr %205, align 8
  call void @_ZSt4sortIPlN13TPPLPartition12VertexSorterEEvT_S3_T0_(ptr noundef %200, ptr noundef %203, ptr %206)
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #9
  %207 = load i64, ptr %15, align 8, !tbaa !11
  %208 = call noalias noundef nonnull ptr @_Znam(i64 noundef %207) #10
  store ptr %208, ptr %33, align 8, !tbaa !5
  store i64 0, ptr %10, align 8, !tbaa !11
  br label %209

209:                                              ; preds = %290, %199
  %210 = load i64, ptr %10, align 8, !tbaa !11
  %211 = load i64, ptr %11, align 8, !tbaa !11
  %212 = icmp slt i64 %210, %211
  br i1 %212, label %213, label %293

213:                                              ; preds = %209
  %214 = load ptr, ptr %9, align 8, !tbaa !5
  %215 = load i64, ptr %10, align 8, !tbaa !11
  %216 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %214, i64 %215
  store ptr %216, ptr %19, align 8, !tbaa !5
  %217 = load ptr, ptr %9, align 8, !tbaa !5
  %218 = load ptr, ptr %19, align 8, !tbaa !5
  %219 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %218, i32 0, i32 1
  %220 = load i64, ptr %219, align 8, !tbaa !19
  %221 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %217, i64 %220
  store ptr %221, ptr %21, align 8, !tbaa !5
  %222 = load ptr, ptr %9, align 8, !tbaa !5
  %223 = load ptr, ptr %19, align 8, !tbaa !5
  %224 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %223, i32 0, i32 2
  %225 = load i64, ptr %224, align 8, !tbaa !22
  %226 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %222, i64 %225
  store ptr %226, ptr %22, align 8, !tbaa !5
  %227 = load ptr, ptr %21, align 8, !tbaa !5
  %228 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %227, i32 0, i32 0
  %229 = load ptr, ptr %19, align 8, !tbaa !5
  %230 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %229, i32 0, i32 0
  %231 = call noundef zeroext i1 @_ZN13TPPLPartition5BelowER9TPPLPointS1_(ptr noundef nonnull align 1 dereferenceable(1) %67, ptr noundef nonnull align 8 dereferenceable(16) %228, ptr noundef nonnull align 8 dereferenceable(16) %230)
  br i1 %231, label %232, label %255

232:                                              ; preds = %213
  %233 = load ptr, ptr %22, align 8, !tbaa !5
  %234 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %233, i32 0, i32 0
  %235 = load ptr, ptr %19, align 8, !tbaa !5
  %236 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %235, i32 0, i32 0
  %237 = call noundef zeroext i1 @_ZN13TPPLPartition5BelowER9TPPLPointS1_(ptr noundef nonnull align 1 dereferenceable(1) %67, ptr noundef nonnull align 8 dereferenceable(16) %234, ptr noundef nonnull align 8 dereferenceable(16) %236)
  br i1 %237, label %238, label %255

238:                                              ; preds = %232
  %239 = load ptr, ptr %22, align 8, !tbaa !5
  %240 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %239, i32 0, i32 0
  %241 = load ptr, ptr %21, align 8, !tbaa !5
  %242 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %241, i32 0, i32 0
  %243 = load ptr, ptr %19, align 8, !tbaa !5
  %244 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %243, i32 0, i32 0
  %245 = call noundef zeroext i1 @_ZN13TPPLPartition8IsConvexER9TPPLPointS1_S1_(ptr noundef nonnull align 1 dereferenceable(1) %67, ptr noundef nonnull align 8 dereferenceable(16) %240, ptr noundef nonnull align 8 dereferenceable(16) %242, ptr noundef nonnull align 8 dereferenceable(16) %244)
  br i1 %245, label %246, label %250

246:                                              ; preds = %238
  %247 = load ptr, ptr %33, align 8, !tbaa !5
  %248 = load i64, ptr %10, align 8, !tbaa !11
  %249 = getelementptr inbounds i8, ptr %247, i64 %248
  store i8 1, ptr %249, align 1, !tbaa !26
  br label %254

250:                                              ; preds = %238
  %251 = load ptr, ptr %33, align 8, !tbaa !5
  %252 = load i64, ptr %10, align 8, !tbaa !11
  %253 = getelementptr inbounds i8, ptr %251, i64 %252
  store i8 3, ptr %253, align 1, !tbaa !26
  br label %254

254:                                              ; preds = %250, %246
  br label %289

255:                                              ; preds = %232, %213
  %256 = load ptr, ptr %19, align 8, !tbaa !5
  %257 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %256, i32 0, i32 0
  %258 = load ptr, ptr %21, align 8, !tbaa !5
  %259 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %258, i32 0, i32 0
  %260 = call noundef zeroext i1 @_ZN13TPPLPartition5BelowER9TPPLPointS1_(ptr noundef nonnull align 1 dereferenceable(1) %67, ptr noundef nonnull align 8 dereferenceable(16) %257, ptr noundef nonnull align 8 dereferenceable(16) %259)
  br i1 %260, label %261, label %284

261:                                              ; preds = %255
  %262 = load ptr, ptr %19, align 8, !tbaa !5
  %263 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %262, i32 0, i32 0
  %264 = load ptr, ptr %22, align 8, !tbaa !5
  %265 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %264, i32 0, i32 0
  %266 = call noundef zeroext i1 @_ZN13TPPLPartition5BelowER9TPPLPointS1_(ptr noundef nonnull align 1 dereferenceable(1) %67, ptr noundef nonnull align 8 dereferenceable(16) %263, ptr noundef nonnull align 8 dereferenceable(16) %265)
  br i1 %266, label %267, label %284

267:                                              ; preds = %261
  %268 = load ptr, ptr %22, align 8, !tbaa !5
  %269 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %268, i32 0, i32 0
  %270 = load ptr, ptr %21, align 8, !tbaa !5
  %271 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %270, i32 0, i32 0
  %272 = load ptr, ptr %19, align 8, !tbaa !5
  %273 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %272, i32 0, i32 0
  %274 = call noundef zeroext i1 @_ZN13TPPLPartition8IsConvexER9TPPLPointS1_S1_(ptr noundef nonnull align 1 dereferenceable(1) %67, ptr noundef nonnull align 8 dereferenceable(16) %269, ptr noundef nonnull align 8 dereferenceable(16) %271, ptr noundef nonnull align 8 dereferenceable(16) %273)
  br i1 %274, label %275, label %279

275:                                              ; preds = %267
  %276 = load ptr, ptr %33, align 8, !tbaa !5
  %277 = load i64, ptr %10, align 8, !tbaa !11
  %278 = getelementptr inbounds i8, ptr %276, i64 %277
  store i8 2, ptr %278, align 1, !tbaa !26
  br label %283

279:                                              ; preds = %267
  %280 = load ptr, ptr %33, align 8, !tbaa !5
  %281 = load i64, ptr %10, align 8, !tbaa !11
  %282 = getelementptr inbounds i8, ptr %280, i64 %281
  store i8 4, ptr %282, align 1, !tbaa !26
  br label %283

283:                                              ; preds = %279, %275
  br label %288

284:                                              ; preds = %261, %255
  %285 = load ptr, ptr %33, align 8, !tbaa !5
  %286 = load i64, ptr %10, align 8, !tbaa !11
  %287 = getelementptr inbounds i8, ptr %285, i64 %286
  store i8 0, ptr %287, align 1, !tbaa !26
  br label %288

288:                                              ; preds = %284, %283
  br label %289

289:                                              ; preds = %288, %254
  br label %290

290:                                              ; preds = %289
  %291 = load i64, ptr %10, align 8, !tbaa !11
  %292 = add nsw i64 %291, 1
  store i64 %292, ptr %10, align 8, !tbaa !11
  br label %209, !llvm.loop !27

293:                                              ; preds = %209
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #9
  %294 = load i64, ptr %15, align 8, !tbaa !11
  %295 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %294, i64 8)
  %296 = extractvalue { i64, i1 } %295, 1
  %297 = extractvalue { i64, i1 } %295, 0
  %298 = select i1 %296, i64 -1, i64 %297
  %299 = call noalias noundef nonnull ptr @_Znam(i64 noundef %298) #10
  store ptr %299, ptr %34, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 48, ptr %35) #9
  call void @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %35) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #9
  call void @_ZNSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %37) #9
  %300 = load i64, ptr %15, align 8, !tbaa !11
  %301 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %300, i64 8)
  %302 = extractvalue { i64, i1 } %301, 1
  %303 = extractvalue { i64, i1 } %301, 0
  %304 = select i1 %302, i64 -1, i64 %303
  %305 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %304) #10
          to label %306 unwind label %329

306:                                              ; preds = %293
  %307 = icmp eq i64 %300, 0
  br i1 %307, label %314, label %308

308:                                              ; preds = %306
  %309 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %305, i64 %300
  br label %310

310:                                              ; preds = %310, %308
  %311 = phi ptr [ %305, %308 ], [ %312, %310 ]
  call void @_ZNSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %311) #9
  %312 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %311, i64 1
  %313 = icmp eq ptr %312, %309
  br i1 %313, label %314, label %310

314:                                              ; preds = %310, %306
  store ptr %305, ptr %36, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %40) #9
  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) %40)
          to label %315 unwind label %333

315:                                              ; preds = %314
  store i64 0, ptr %10, align 8, !tbaa !11
  br label %316

316:                                              ; preds = %326, %315
  %317 = load i64, ptr %10, align 8, !tbaa !11
  %318 = load i64, ptr %11, align 8, !tbaa !11
  %319 = icmp slt i64 %317, %318
  br i1 %319, label %320, label %337

320:                                              ; preds = %316
  call void @llvm.lifetime.start.p0(i64 8, ptr %41) #9
  %321 = call ptr @_ZNKSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %35) #9
  %322 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %41, i32 0, i32 0
  store ptr %321, ptr %322, align 8
  %323 = load ptr, ptr %36, align 8, !tbaa !5
  %324 = load i64, ptr %10, align 8, !tbaa !11
  %325 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %323, i64 %324
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %325, ptr align 8 %41, i64 8, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %41) #9
  br label %326

326:                                              ; preds = %320
  %327 = load i64, ptr %10, align 8, !tbaa !11
  %328 = add nsw i64 %327, 1
  store i64 %328, ptr %10, align 8, !tbaa !11
  br label %316, !llvm.loop !28

329:                                              ; preds = %293
  %330 = landingpad { ptr, i32 }
          cleanup
  %331 = extractvalue { ptr, i32 } %330, 0
  store ptr %331, ptr %38, align 8
  %332 = extractvalue { ptr, i32 } %330, 1
  store i32 %332, ptr %39, align 4
  br label %866

333:                                              ; preds = %695, %625, %607, %584, %564, %522, %504, %439, %410, %397, %314
  %334 = landingpad { ptr, i32 }
          cleanup
  %335 = extractvalue { ptr, i32 } %334, 0
  store ptr %335, ptr %38, align 8
  %336 = extractvalue { ptr, i32 } %334, 1
  store i32 %336, ptr %39, align 4
  br label %865

337:                                              ; preds = %316
  store i64 0, ptr %10, align 8, !tbaa !11
  br label %338

338:                                              ; preds = %721, %337
  %339 = load i64, ptr %10, align 8, !tbaa !11
  %340 = load i64, ptr %11, align 8, !tbaa !11
  %341 = icmp slt i64 %339, %340
  br i1 %341, label %342, label %724

342:                                              ; preds = %338
  %343 = load ptr, ptr %31, align 8, !tbaa !5
  %344 = load i64, ptr %10, align 8, !tbaa !11
  %345 = getelementptr inbounds i64, ptr %343, i64 %344
  %346 = load i64, ptr %345, align 8, !tbaa !11
  store i64 %346, ptr %12, align 8, !tbaa !11
  %347 = load ptr, ptr %9, align 8, !tbaa !5
  %348 = load i64, ptr %12, align 8, !tbaa !11
  %349 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %347, i64 %348
  store ptr %349, ptr %19, align 8, !tbaa !5
  %350 = load i64, ptr %12, align 8, !tbaa !11
  store i64 %350, ptr %13, align 8, !tbaa !11
  %351 = load ptr, ptr %19, align 8, !tbaa !5
  store ptr %351, ptr %20, align 8, !tbaa !5
  %352 = load ptr, ptr %33, align 8, !tbaa !5
  %353 = load i64, ptr %12, align 8, !tbaa !11
  %354 = getelementptr inbounds i8, ptr %352, i64 %353
  %355 = load i8, ptr %354, align 1, !tbaa !26
  %356 = sext i8 %355 to i32
  switch i32 %356, label %716 [
    i32 1, label %357
    i32 2, label %385
    i32 3, label %421
    i32 4, label %492
    i32 0, label %584
  ]

357:                                              ; preds = %342
  %358 = load ptr, ptr %19, align 8, !tbaa !5
  %359 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %358, i32 0, i32 0
  %360 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %23, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %360, ptr align 8 %359, i64 16, i1 false), !tbaa.struct !16
  %361 = load ptr, ptr %9, align 8, !tbaa !5
  %362 = load ptr, ptr %19, align 8, !tbaa !5
  %363 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %362, i32 0, i32 2
  %364 = load i64, ptr %363, align 8, !tbaa !22
  %365 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %361, i64 %364
  %366 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %365, i32 0, i32 0
  %367 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %23, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %367, ptr align 8 %366, i64 16, i1 false), !tbaa.struct !16
  %368 = load i64, ptr %12, align 8, !tbaa !11
  %369 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %23, i32 0, i32 0
  store i64 %368, ptr %369, align 8, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 16, ptr %42) #9
  %370 = invoke { ptr, i8 } @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE6insertERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %35, ptr noundef nonnull align 8 dereferenceable(40) %23)
          to label %371 unwind label %381

371:                                              ; preds = %357
  store { ptr, i8 } %370, ptr %43, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %42, ptr align 8 %43, i64 9, i1 false)
  %372 = call noundef nonnull align 8 dereferenceable(9) ptr @_ZNSt4pairISt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEbEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(9) %40, ptr noundef nonnull align 8 dereferenceable(9) %42) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %42) #9
  %373 = getelementptr inbounds %"struct.std::pair", ptr %40, i32 0, i32 0
  %374 = load ptr, ptr %36, align 8, !tbaa !5
  %375 = load i64, ptr %12, align 8, !tbaa !11
  %376 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %374, i64 %375
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %376, ptr align 8 %373, i64 8, i1 false), !tbaa.struct !13
  %377 = load i64, ptr %12, align 8, !tbaa !11
  %378 = load ptr, ptr %34, align 8, !tbaa !5
  %379 = load i64, ptr %12, align 8, !tbaa !11
  %380 = getelementptr inbounds i64, ptr %378, i64 %379
  store i64 %377, ptr %380, align 8, !tbaa !11
  br label %716

381:                                              ; preds = %357
  %382 = landingpad { ptr, i32 }
          cleanup
  %383 = extractvalue { ptr, i32 } %382, 0
  store ptr %383, ptr %38, align 8
  %384 = extractvalue { ptr, i32 } %382, 1
  store i32 %384, ptr %39, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %42) #9
  br label %865

385:                                              ; preds = %342
  %386 = load ptr, ptr %33, align 8, !tbaa !5
  %387 = load ptr, ptr %34, align 8, !tbaa !5
  %388 = load ptr, ptr %19, align 8, !tbaa !5
  %389 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %388, i32 0, i32 1
  %390 = load i64, ptr %389, align 8, !tbaa !19
  %391 = getelementptr inbounds i64, ptr %387, i64 %390
  %392 = load i64, ptr %391, align 8, !tbaa !11
  %393 = getelementptr inbounds i8, ptr %386, i64 %392
  %394 = load i8, ptr %393, align 1, !tbaa !26
  %395 = sext i8 %394 to i32
  %396 = icmp eq i32 %395, 4
  br i1 %396, label %397, label %410

397:                                              ; preds = %385
  %398 = load ptr, ptr %9, align 8, !tbaa !5
  %399 = load i64, ptr %12, align 8, !tbaa !11
  %400 = load ptr, ptr %34, align 8, !tbaa !5
  %401 = load ptr, ptr %19, align 8, !tbaa !5
  %402 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %401, i32 0, i32 1
  %403 = load i64, ptr %402, align 8, !tbaa !19
  %404 = getelementptr inbounds i64, ptr %400, i64 %403
  %405 = load i64, ptr %404, align 8, !tbaa !11
  %406 = load ptr, ptr %33, align 8, !tbaa !5
  %407 = load ptr, ptr %36, align 8, !tbaa !5
  %408 = load ptr, ptr %34, align 8, !tbaa !5
  invoke void @_ZN13TPPLPartition11AddDiagonalEPNS_14MonotoneVertexEPlllPcPSt23_Rb_tree_const_iteratorINS_12ScanLineEdgeEEPSt3setIS5_St4lessIS5_ESaIS5_EES2_(ptr noundef nonnull align 1 dereferenceable(1) %67, ptr noundef %398, ptr noundef %14, i64 noundef %399, i64 noundef %405, ptr noundef %406, ptr noundef %407, ptr noundef %35, ptr noundef %408)
          to label %409 unwind label %333

409:                                              ; preds = %397
  br label %410

410:                                              ; preds = %409, %385
  %411 = load ptr, ptr %36, align 8, !tbaa !5
  %412 = load ptr, ptr %19, align 8, !tbaa !5
  %413 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %412, i32 0, i32 1
  %414 = load i64, ptr %413, align 8, !tbaa !19
  %415 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %411, i64 %414
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %44, ptr align 8 %415, i64 8, i1 false), !tbaa.struct !13
  %416 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %44, i32 0, i32 0
  %417 = load ptr, ptr %416, align 8
  %418 = invoke ptr @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIS1_E(ptr noundef nonnull align 8 dereferenceable(48) %35, ptr %417)
          to label %419 unwind label %333

419:                                              ; preds = %410
  %420 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %45, i32 0, i32 0
  store ptr %418, ptr %420, align 8
  br label %716

421:                                              ; preds = %342
  %422 = load ptr, ptr %19, align 8, !tbaa !5
  %423 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %422, i32 0, i32 0
  %424 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %23, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %424, ptr align 8 %423, i64 16, i1 false), !tbaa.struct !16
  %425 = load ptr, ptr %19, align 8, !tbaa !5
  %426 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %425, i32 0, i32 0
  %427 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %23, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %427, ptr align 8 %426, i64 16, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %46) #9
  %428 = invoke ptr @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE11lower_boundERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %35, ptr noundef nonnull align 8 dereferenceable(40) %23)
          to label %429 unwind label %435

429:                                              ; preds = %421
  %430 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %46, i32 0, i32 0
  store ptr %428, ptr %430, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %37, ptr align 8 %46, i64 8, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %47) #9
  %431 = call ptr @_ZNKSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %35) #9
  %432 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %47, i32 0, i32 0
  store ptr %431, ptr %432, align 8
  %433 = call noundef zeroext i1 @_ZSteqRKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEES4_(ptr noundef nonnull align 8 dereferenceable(8) %37, ptr noundef nonnull align 8 dereferenceable(8) %47) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %47) #9
  br i1 %433, label %434, label %439

434:                                              ; preds = %429
  store i8 1, ptr %24, align 1, !tbaa !9
  br label %716

435:                                              ; preds = %421
  %436 = landingpad { ptr, i32 }
          cleanup
  %437 = extractvalue { ptr, i32 } %436, 0
  store ptr %437, ptr %38, align 8
  %438 = extractvalue { ptr, i32 } %436, 1
  store i32 %438, ptr %39, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #9
  br label %865

439:                                              ; preds = %429
  %440 = call ptr @_ZNSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEmmEi(ptr noundef nonnull align 8 dereferenceable(8) %37, i32 noundef 0) #9
  %441 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %48, i32 0, i32 0
  store ptr %440, ptr %441, align 8
  %442 = load ptr, ptr %9, align 8, !tbaa !5
  %443 = load i64, ptr %12, align 8, !tbaa !11
  %444 = load ptr, ptr %34, align 8, !tbaa !5
  %445 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %37) #9
  %446 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %445, i32 0, i32 0
  %447 = load i64, ptr %446, align 8, !tbaa !29
  %448 = getelementptr inbounds i64, ptr %444, i64 %447
  %449 = load i64, ptr %448, align 8, !tbaa !11
  %450 = load ptr, ptr %33, align 8, !tbaa !5
  %451 = load ptr, ptr %36, align 8, !tbaa !5
  %452 = load ptr, ptr %34, align 8, !tbaa !5
  invoke void @_ZN13TPPLPartition11AddDiagonalEPNS_14MonotoneVertexEPlllPcPSt23_Rb_tree_const_iteratorINS_12ScanLineEdgeEEPSt3setIS5_St4lessIS5_ESaIS5_EES2_(ptr noundef nonnull align 1 dereferenceable(1) %67, ptr noundef %442, ptr noundef %14, i64 noundef %443, i64 noundef %449, ptr noundef %450, ptr noundef %451, ptr noundef %35, ptr noundef %452)
          to label %453 unwind label %333

453:                                              ; preds = %439
  %454 = load i64, ptr %14, align 8, !tbaa !11
  %455 = sub nsw i64 %454, 2
  store i64 %455, ptr %13, align 8, !tbaa !11
  %456 = load ptr, ptr %9, align 8, !tbaa !5
  %457 = load i64, ptr %13, align 8, !tbaa !11
  %458 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %456, i64 %457
  store ptr %458, ptr %20, align 8, !tbaa !5
  %459 = load i64, ptr %12, align 8, !tbaa !11
  %460 = load ptr, ptr %34, align 8, !tbaa !5
  %461 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %37) #9
  %462 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %461, i32 0, i32 0
  %463 = load i64, ptr %462, align 8, !tbaa !29
  %464 = getelementptr inbounds i64, ptr %460, i64 %463
  store i64 %459, ptr %464, align 8, !tbaa !11
  %465 = load ptr, ptr %20, align 8, !tbaa !5
  %466 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %465, i32 0, i32 0
  %467 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %23, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %467, ptr align 8 %466, i64 16, i1 false), !tbaa.struct !16
  %468 = load ptr, ptr %9, align 8, !tbaa !5
  %469 = load ptr, ptr %20, align 8, !tbaa !5
  %470 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %469, i32 0, i32 2
  %471 = load i64, ptr %470, align 8, !tbaa !22
  %472 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %468, i64 %471
  %473 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %472, i32 0, i32 0
  %474 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %23, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %474, ptr align 8 %473, i64 16, i1 false), !tbaa.struct !16
  %475 = load i64, ptr %13, align 8, !tbaa !11
  %476 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %23, i32 0, i32 0
  store i64 %475, ptr %476, align 8, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 16, ptr %49) #9
  %477 = invoke { ptr, i8 } @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE6insertERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %35, ptr noundef nonnull align 8 dereferenceable(40) %23)
          to label %478 unwind label %488

478:                                              ; preds = %453
  store { ptr, i8 } %477, ptr %50, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %49, ptr align 8 %50, i64 9, i1 false)
  %479 = call noundef nonnull align 8 dereferenceable(9) ptr @_ZNSt4pairISt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEbEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(9) %40, ptr noundef nonnull align 8 dereferenceable(9) %49) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %49) #9
  %480 = getelementptr inbounds %"struct.std::pair", ptr %40, i32 0, i32 0
  %481 = load ptr, ptr %36, align 8, !tbaa !5
  %482 = load i64, ptr %13, align 8, !tbaa !11
  %483 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %481, i64 %482
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %483, ptr align 8 %480, i64 8, i1 false), !tbaa.struct !13
  %484 = load i64, ptr %13, align 8, !tbaa !11
  %485 = load ptr, ptr %34, align 8, !tbaa !5
  %486 = load i64, ptr %13, align 8, !tbaa !11
  %487 = getelementptr inbounds i64, ptr %485, i64 %486
  store i64 %484, ptr %487, align 8, !tbaa !11
  br label %716

488:                                              ; preds = %453
  %489 = landingpad { ptr, i32 }
          cleanup
  %490 = extractvalue { ptr, i32 } %489, 0
  store ptr %490, ptr %38, align 8
  %491 = extractvalue { ptr, i32 } %489, 1
  store i32 %491, ptr %39, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %49) #9
  br label %865

492:                                              ; preds = %342
  %493 = load ptr, ptr %33, align 8, !tbaa !5
  %494 = load ptr, ptr %34, align 8, !tbaa !5
  %495 = load ptr, ptr %19, align 8, !tbaa !5
  %496 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %495, i32 0, i32 1
  %497 = load i64, ptr %496, align 8, !tbaa !19
  %498 = getelementptr inbounds i64, ptr %494, i64 %497
  %499 = load i64, ptr %498, align 8, !tbaa !11
  %500 = getelementptr inbounds i8, ptr %493, i64 %499
  %501 = load i8, ptr %500, align 1, !tbaa !26
  %502 = sext i8 %501 to i32
  %503 = icmp eq i32 %502, 4
  br i1 %503, label %504, label %522

504:                                              ; preds = %492
  %505 = load ptr, ptr %9, align 8, !tbaa !5
  %506 = load i64, ptr %12, align 8, !tbaa !11
  %507 = load ptr, ptr %34, align 8, !tbaa !5
  %508 = load ptr, ptr %19, align 8, !tbaa !5
  %509 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %508, i32 0, i32 1
  %510 = load i64, ptr %509, align 8, !tbaa !19
  %511 = getelementptr inbounds i64, ptr %507, i64 %510
  %512 = load i64, ptr %511, align 8, !tbaa !11
  %513 = load ptr, ptr %33, align 8, !tbaa !5
  %514 = load ptr, ptr %36, align 8, !tbaa !5
  %515 = load ptr, ptr %34, align 8, !tbaa !5
  invoke void @_ZN13TPPLPartition11AddDiagonalEPNS_14MonotoneVertexEPlllPcPSt23_Rb_tree_const_iteratorINS_12ScanLineEdgeEEPSt3setIS5_St4lessIS5_ESaIS5_EES2_(ptr noundef nonnull align 1 dereferenceable(1) %67, ptr noundef %505, ptr noundef %14, i64 noundef %506, i64 noundef %512, ptr noundef %513, ptr noundef %514, ptr noundef %35, ptr noundef %515)
          to label %516 unwind label %333

516:                                              ; preds = %504
  %517 = load i64, ptr %14, align 8, !tbaa !11
  %518 = sub nsw i64 %517, 2
  store i64 %518, ptr %13, align 8, !tbaa !11
  %519 = load ptr, ptr %9, align 8, !tbaa !5
  %520 = load i64, ptr %13, align 8, !tbaa !11
  %521 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %519, i64 %520
  store ptr %521, ptr %20, align 8, !tbaa !5
  br label %522

522:                                              ; preds = %516, %492
  %523 = load ptr, ptr %36, 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 !19
  %527 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %523, i64 %526
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %51, ptr align 8 %527, i64 8, i1 false), !tbaa.struct !13
  %528 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %51, i32 0, i32 0
  %529 = load ptr, ptr %528, align 8
  %530 = invoke ptr @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIS1_E(ptr noundef nonnull align 8 dereferenceable(48) %35, ptr %529)
          to label %531 unwind label %333

531:                                              ; preds = %522
  %532 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %52, i32 0, i32 0
  store ptr %530, ptr %532, align 8
  %533 = load ptr, ptr %19, align 8, !tbaa !5
  %534 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %533, i32 0, i32 0
  %535 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %23, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %535, ptr align 8 %534, i64 16, i1 false), !tbaa.struct !16
  %536 = load ptr, ptr %19, align 8, !tbaa !5
  %537 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %536, i32 0, i32 0
  %538 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %23, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %538, ptr align 8 %537, i64 16, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %53) #9
  %539 = invoke ptr @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE11lower_boundERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %35, ptr noundef nonnull align 8 dereferenceable(40) %23)
          to label %540 unwind label %546

540:                                              ; preds = %531
  %541 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %53, i32 0, i32 0
  store ptr %539, ptr %541, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %37, ptr align 8 %53, i64 8, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %54) #9
  %542 = call ptr @_ZNKSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %35) #9
  %543 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %54, i32 0, i32 0
  store ptr %542, ptr %543, align 8
  %544 = call noundef zeroext i1 @_ZSteqRKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEES4_(ptr noundef nonnull align 8 dereferenceable(8) %37, ptr noundef nonnull align 8 dereferenceable(8) %54) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #9
  br i1 %544, label %545, label %550

545:                                              ; preds = %540
  store i8 1, ptr %24, align 1, !tbaa !9
  br label %716

546:                                              ; preds = %531
  %547 = landingpad { ptr, i32 }
          cleanup
  %548 = extractvalue { ptr, i32 } %547, 0
  store ptr %548, ptr %38, align 8
  %549 = extractvalue { ptr, i32 } %547, 1
  store i32 %549, ptr %39, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #9
  br label %865

550:                                              ; preds = %540
  %551 = call ptr @_ZNSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEmmEi(ptr noundef nonnull align 8 dereferenceable(8) %37, i32 noundef 0) #9
  %552 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %55, i32 0, i32 0
  store ptr %551, ptr %552, align 8
  %553 = load ptr, ptr %33, align 8, !tbaa !5
  %554 = load ptr, ptr %34, align 8, !tbaa !5
  %555 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %37) #9
  %556 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %555, i32 0, i32 0
  %557 = load i64, ptr %556, align 8, !tbaa !29
  %558 = getelementptr inbounds i64, ptr %554, i64 %557
  %559 = load i64, ptr %558, align 8, !tbaa !11
  %560 = getelementptr inbounds i8, ptr %553, i64 %559
  %561 = load i8, ptr %560, align 1, !tbaa !26
  %562 = sext i8 %561 to i32
  %563 = icmp eq i32 %562, 4
  br i1 %563, label %564, label %577

564:                                              ; preds = %550
  %565 = load ptr, ptr %9, align 8, !tbaa !5
  %566 = load i64, ptr %13, align 8, !tbaa !11
  %567 = load ptr, ptr %34, align 8, !tbaa !5
  %568 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %37) #9
  %569 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %568, i32 0, i32 0
  %570 = load i64, ptr %569, align 8, !tbaa !29
  %571 = getelementptr inbounds i64, ptr %567, i64 %570
  %572 = load i64, ptr %571, align 8, !tbaa !11
  %573 = load ptr, ptr %33, align 8, !tbaa !5
  %574 = load ptr, ptr %36, align 8, !tbaa !5
  %575 = load ptr, ptr %34, align 8, !tbaa !5
  invoke void @_ZN13TPPLPartition11AddDiagonalEPNS_14MonotoneVertexEPlllPcPSt23_Rb_tree_const_iteratorINS_12ScanLineEdgeEEPSt3setIS5_St4lessIS5_ESaIS5_EES2_(ptr noundef nonnull align 1 dereferenceable(1) %67, ptr noundef %565, ptr noundef %14, i64 noundef %566, i64 noundef %572, ptr noundef %573, ptr noundef %574, ptr noundef %35, ptr noundef %575)
          to label %576 unwind label %333

576:                                              ; preds = %564
  br label %577

577:                                              ; preds = %576, %550
  %578 = load i64, ptr %13, align 8, !tbaa !11
  %579 = load ptr, ptr %34, align 8, !tbaa !5
  %580 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %37) #9
  %581 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %580, i32 0, i32 0
  %582 = load i64, ptr %581, align 8, !tbaa !29
  %583 = getelementptr inbounds i64, ptr %579, i64 %582
  store i64 %578, ptr %583, align 8, !tbaa !11
  br label %716

584:                                              ; preds = %342
  %585 = load ptr, ptr %19, align 8, !tbaa !5
  %586 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %585, i32 0, i32 0
  %587 = load ptr, ptr %9, align 8, !tbaa !5
  %588 = load ptr, ptr %19, align 8, !tbaa !5
  %589 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %588, i32 0, i32 1
  %590 = load i64, ptr %589, align 8, !tbaa !19
  %591 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %587, i64 %590
  %592 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %591, i32 0, i32 0
  %593 = invoke noundef zeroext i1 @_ZN13TPPLPartition5BelowER9TPPLPointS1_(ptr noundef nonnull align 1 dereferenceable(1) %67, ptr noundef nonnull align 8 dereferenceable(16) %586, ptr noundef nonnull align 8 dereferenceable(16) %592)
          to label %594 unwind label %333

594:                                              ; preds = %584
  br i1 %593, label %595, label %663

595:                                              ; preds = %594
  %596 = load ptr, ptr %33, align 8, !tbaa !5
  %597 = load ptr, ptr %34, align 8, !tbaa !5
  %598 = load ptr, ptr %19, align 8, !tbaa !5
  %599 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %598, i32 0, i32 1
  %600 = load i64, ptr %599, align 8, !tbaa !19
  %601 = getelementptr inbounds i64, ptr %597, i64 %600
  %602 = load i64, ptr %601, align 8, !tbaa !11
  %603 = getelementptr inbounds i8, ptr %596, i64 %602
  %604 = load i8, ptr %603, align 1, !tbaa !26
  %605 = sext i8 %604 to i32
  %606 = icmp eq i32 %605, 4
  br i1 %606, label %607, label %625

607:                                              ; preds = %595
  %608 = load ptr, ptr %9, align 8, !tbaa !5
  %609 = load i64, ptr %12, align 8, !tbaa !11
  %610 = load ptr, ptr %34, align 8, !tbaa !5
  %611 = load ptr, ptr %19, align 8, !tbaa !5
  %612 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %611, i32 0, i32 1
  %613 = load i64, ptr %612, align 8, !tbaa !19
  %614 = getelementptr inbounds i64, ptr %610, i64 %613
  %615 = load i64, ptr %614, align 8, !tbaa !11
  %616 = load ptr, ptr %33, align 8, !tbaa !5
  %617 = load ptr, ptr %36, align 8, !tbaa !5
  %618 = load ptr, ptr %34, align 8, !tbaa !5
  invoke void @_ZN13TPPLPartition11AddDiagonalEPNS_14MonotoneVertexEPlllPcPSt23_Rb_tree_const_iteratorINS_12ScanLineEdgeEEPSt3setIS5_St4lessIS5_ESaIS5_EES2_(ptr noundef nonnull align 1 dereferenceable(1) %67, ptr noundef %608, ptr noundef %14, i64 noundef %609, i64 noundef %615, ptr noundef %616, ptr noundef %617, ptr noundef %35, ptr noundef %618)
          to label %619 unwind label %333

619:                                              ; preds = %607
  %620 = load i64, ptr %14, align 8, !tbaa !11
  %621 = sub nsw i64 %620, 2
  store i64 %621, ptr %13, align 8, !tbaa !11
  %622 = load ptr, ptr %9, align 8, !tbaa !5
  %623 = load i64, ptr %13, align 8, !tbaa !11
  %624 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %622, i64 %623
  store ptr %624, ptr %20, align 8, !tbaa !5
  br label %625

625:                                              ; preds = %619, %595
  %626 = load ptr, ptr %36, align 8, !tbaa !5
  %627 = load ptr, ptr %19, align 8, !tbaa !5
  %628 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %627, i32 0, i32 1
  %629 = load i64, ptr %628, align 8, !tbaa !19
  %630 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %626, i64 %629
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %56, ptr align 8 %630, i64 8, i1 false), !tbaa.struct !13
  %631 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %56, i32 0, i32 0
  %632 = load ptr, ptr %631, align 8
  %633 = invoke ptr @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE5eraseB5cxx11ESt23_Rb_tree_const_iteratorIS1_E(ptr noundef nonnull align 8 dereferenceable(48) %35, ptr %632)
          to label %634 unwind label %333

634:                                              ; preds = %625
  %635 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %57, i32 0, i32 0
  store ptr %633, ptr %635, align 8
  %636 = load ptr, ptr %20, align 8, !tbaa !5
  %637 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %636, i32 0, i32 0
  %638 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %23, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %638, ptr align 8 %637, i64 16, i1 false), !tbaa.struct !16
  %639 = load ptr, ptr %9, align 8, !tbaa !5
  %640 = load ptr, ptr %20, align 8, !tbaa !5
  %641 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %640, i32 0, i32 2
  %642 = load i64, ptr %641, align 8, !tbaa !22
  %643 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %639, i64 %642
  %644 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %643, i32 0, i32 0
  %645 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %23, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %645, ptr align 8 %644, i64 16, i1 false), !tbaa.struct !16
  %646 = load i64, ptr %13, align 8, !tbaa !11
  %647 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %23, i32 0, i32 0
  store i64 %646, ptr %647, align 8, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 16, ptr %58) #9
  %648 = invoke { ptr, i8 } @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE6insertERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %35, ptr noundef nonnull align 8 dereferenceable(40) %23)
          to label %649 unwind label %659

649:                                              ; preds = %634
  store { ptr, i8 } %648, ptr %59, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %58, ptr align 8 %59, i64 9, i1 false)
  %650 = call noundef nonnull align 8 dereferenceable(9) ptr @_ZNSt4pairISt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEbEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(9) %40, ptr noundef nonnull align 8 dereferenceable(9) %58) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %58) #9
  %651 = getelementptr inbounds %"struct.std::pair", ptr %40, i32 0, i32 0
  %652 = load ptr, ptr %36, align 8, !tbaa !5
  %653 = load i64, ptr %13, align 8, !tbaa !11
  %654 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %652, i64 %653
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %654, ptr align 8 %651, i64 8, i1 false), !tbaa.struct !13
  %655 = load i64, ptr %12, align 8, !tbaa !11
  %656 = load ptr, ptr %34, align 8, !tbaa !5
  %657 = load i64, ptr %13, align 8, !tbaa !11
  %658 = getelementptr inbounds i64, ptr %656, i64 %657
  store i64 %655, ptr %658, align 8, !tbaa !11
  br label %715

659:                                              ; preds = %634
  %660 = landingpad { ptr, i32 }
          cleanup
  %661 = extractvalue { ptr, i32 } %660, 0
  store ptr %661, ptr %38, align 8
  %662 = extractvalue { ptr, i32 } %660, 1
  store i32 %662, ptr %39, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %58) #9
  br label %865

663:                                              ; preds = %594
  %664 = load ptr, ptr %19, align 8, !tbaa !5
  %665 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %664, i32 0, i32 0
  %666 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %23, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %666, ptr align 8 %665, i64 16, i1 false), !tbaa.struct !16
  %667 = load ptr, ptr %19, align 8, !tbaa !5
  %668 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %667, i32 0, i32 0
  %669 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %23, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %669, ptr align 8 %668, i64 16, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %60) #9
  %670 = invoke ptr @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE11lower_boundERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %35, ptr noundef nonnull align 8 dereferenceable(40) %23)
          to label %671 unwind label %677

671:                                              ; preds = %663
  %672 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %60, i32 0, i32 0
  store ptr %670, ptr %672, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %37, ptr align 8 %60, i64 8, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %60) #9
  call void @llvm.lifetime.start.p0(i64 8, ptr %61) #9
  %673 = call ptr @_ZNKSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %35) #9
  %674 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %61, i32 0, i32 0
  store ptr %673, ptr %674, align 8
  %675 = call noundef zeroext i1 @_ZSteqRKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEES4_(ptr noundef nonnull align 8 dereferenceable(8) %37, ptr noundef nonnull align 8 dereferenceable(8) %61) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %61) #9
  br i1 %675, label %676, label %681

676:                                              ; preds = %671
  store i8 1, ptr %24, align 1, !tbaa !9
  br label %716

677:                                              ; preds = %663
  %678 = landingpad { ptr, i32 }
          cleanup
  %679 = extractvalue { ptr, i32 } %678, 0
  store ptr %679, ptr %38, align 8
  %680 = extractvalue { ptr, i32 } %678, 1
  store i32 %680, ptr %39, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %60) #9
  br label %865

681:                                              ; preds = %671
  %682 = call ptr @_ZNSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEmmEi(ptr noundef nonnull align 8 dereferenceable(8) %37, i32 noundef 0) #9
  %683 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %62, i32 0, i32 0
  store ptr %682, ptr %683, align 8
  %684 = load ptr, ptr %33, align 8, !tbaa !5
  %685 = load ptr, ptr %34, align 8, !tbaa !5
  %686 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %37) #9
  %687 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %686, i32 0, i32 0
  %688 = load i64, ptr %687, align 8, !tbaa !29
  %689 = getelementptr inbounds i64, ptr %685, i64 %688
  %690 = load i64, ptr %689, align 8, !tbaa !11
  %691 = getelementptr inbounds i8, ptr %684, i64 %690
  %692 = load i8, ptr %691, align 1, !tbaa !26
  %693 = sext i8 %692 to i32
  %694 = icmp eq i32 %693, 4
  br i1 %694, label %695, label %708

695:                                              ; preds = %681
  %696 = load ptr, ptr %9, align 8, !tbaa !5
  %697 = load i64, ptr %12, align 8, !tbaa !11
  %698 = load ptr, ptr %34, align 8, !tbaa !5
  %699 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %37) #9
  %700 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %699, i32 0, i32 0
  %701 = load i64, ptr %700, align 8, !tbaa !29
  %702 = getelementptr inbounds i64, ptr %698, i64 %701
  %703 = load i64, ptr %702, align 8, !tbaa !11
  %704 = load ptr, ptr %33, align 8, !tbaa !5
  %705 = load ptr, ptr %36, align 8, !tbaa !5
  %706 = load ptr, ptr %34, align 8, !tbaa !5
  invoke void @_ZN13TPPLPartition11AddDiagonalEPNS_14MonotoneVertexEPlllPcPSt23_Rb_tree_const_iteratorINS_12ScanLineEdgeEEPSt3setIS5_St4lessIS5_ESaIS5_EES2_(ptr noundef nonnull align 1 dereferenceable(1) %67, ptr noundef %696, ptr noundef %14, i64 noundef %697, i64 noundef %703, ptr noundef %704, ptr noundef %705, ptr noundef %35, ptr noundef %706)
          to label %707 unwind label %333

707:                                              ; preds = %695
  br label %708

708:                                              ; preds = %707, %681
  %709 = load i64, ptr %12, align 8, !tbaa !11
  %710 = load ptr, ptr %34, align 8, !tbaa !5
  %711 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %37) #9
  %712 = getelementptr inbounds %"struct.TPPLPartition::ScanLineEdge", ptr %711, i32 0, i32 0
  %713 = load i64, ptr %712, align 8, !tbaa !29
  %714 = getelementptr inbounds i64, ptr %710, i64 %713
  store i64 %709, ptr %714, align 8, !tbaa !11
  br label %715

715:                                              ; preds = %708, %649
  br label %716

716:                                              ; preds = %715, %676, %577, %545, %478, %434, %419, %371, %342
  %717 = load i8, ptr %24, align 1, !tbaa !9, !range !31, !noundef !32
  %718 = trunc i8 %717 to i1
  br i1 %718, label %719, label %720

719:                                              ; preds = %716
  br label %724

720:                                              ; preds = %716
  br label %721

721:                                              ; preds = %720
  %722 = load i64, ptr %10, align 8, !tbaa !11
  %723 = add nsw i64 %722, 1
  store i64 %723, ptr %10, align 8, !tbaa !11
  br label %338, !llvm.loop !33

724:                                              ; preds = %719, %338
  call void @llvm.lifetime.start.p0(i64 8, ptr %63) #9
  %725 = load i64, ptr %14, align 8, !tbaa !11
  %726 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %725) #10
          to label %727 unwind label %746

727:                                              ; preds = %724
  store ptr %726, ptr %63, align 8, !tbaa !5
  %728 = load ptr, ptr %63, align 8, !tbaa !5
  %729 = load i64, ptr %14, align 8, !tbaa !11
  %730 = mul i64 %729, 1
  call void @llvm.memset.p0.i64(ptr align 1 %728, i8 0, i64 %730, i1 false)
  %731 = load i8, ptr %24, align 1, !tbaa !9, !range !31, !noundef !32
  %732 = trunc i8 %731 to i1
  br i1 %732, label %833, label %733

733:                                              ; preds = %727
  call void @llvm.lifetime.start.p0(i64 8, ptr %64) #9
  call void @llvm.lifetime.start.p0(i64 24, ptr %65) #9
  invoke void @_ZN8TPPLPolyC1Ev(ptr noundef nonnull align 8 dereferenceable(17) %65)
          to label %734 unwind label %750

734:                                              ; preds = %733
  store i64 0, ptr %10, align 8, !tbaa !11
  br label %735

735:                                              ; preds = %828, %734
  %736 = load i64, ptr %10, align 8, !tbaa !11
  %737 = load i64, ptr %14, align 8, !tbaa !11
  %738 = icmp slt i64 %736, %737
  br i1 %738, label %739, label %831

739:                                              ; preds = %735
  %740 = load ptr, ptr %63, align 8, !tbaa !5
  %741 = load i64, ptr %10, align 8, !tbaa !11
  %742 = getelementptr inbounds i8, ptr %740, i64 %741
  %743 = load i8, ptr %742, align 1, !tbaa !26
  %744 = icmp ne i8 %743, 0
  br i1 %744, label %745, label %754

745:                                              ; preds = %739
  br label %828

746:                                              ; preds = %724
  %747 = landingpad { ptr, i32 }
          cleanup
  %748 = extractvalue { ptr, i32 } %747, 0
  store ptr %748, ptr %38, align 8
  %749 = extractvalue { ptr, i32 } %747, 1
  store i32 %749, ptr %39, align 4
  br label %864

750:                                              ; preds = %733
  %751 = landingpad { ptr, i32 }
          cleanup
  %752 = extractvalue { ptr, i32 } %751, 0
  store ptr %752, ptr %38, align 8
  %753 = extractvalue { ptr, i32 } %751, 1
  store i32 %753, ptr %39, align 4
  br label %832

754:                                              ; preds = %739
  %755 = load ptr, ptr %9, align 8, !tbaa !5
  %756 = load i64, ptr %10, align 8, !tbaa !11
  %757 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %755, i64 %756
  store ptr %757, ptr %19, align 8, !tbaa !5
  %758 = load ptr, ptr %9, align 8, !tbaa !5
  %759 = load ptr, ptr %19, align 8, !tbaa !5
  %760 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %759, i32 0, i32 2
  %761 = load i64, ptr %760, align 8, !tbaa !22
  %762 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %758, i64 %761
  store ptr %762, ptr %22, align 8, !tbaa !5
  store i64 1, ptr %64, align 8, !tbaa !11
  br label %763

763:                                              ; preds = %767, %754
  %764 = load ptr, ptr %22, align 8, !tbaa !5
  %765 = load ptr, ptr %19, align 8, !tbaa !5
  %766 = icmp ne ptr %764, %765
  br i1 %766, label %767, label %775

767:                                              ; preds = %763
  %768 = load ptr, ptr %9, align 8, !tbaa !5
  %769 = load ptr, ptr %22, align 8, !tbaa !5
  %770 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %769, i32 0, i32 2
  %771 = load i64, ptr %770, align 8, !tbaa !22
  %772 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %768, i64 %771
  store ptr %772, ptr %22, align 8, !tbaa !5
  %773 = load i64, ptr %64, align 8, !tbaa !11
  %774 = add nsw i64 %773, 1
  store i64 %774, ptr %64, align 8, !tbaa !11
  br label %763, !llvm.loop !34

775:                                              ; preds = %763
  %776 = load i64, ptr %64, align 8, !tbaa !11
  invoke void @_ZN8TPPLPoly4InitEl(ptr noundef nonnull align 8 dereferenceable(17) %65, i64 noundef %776)
          to label %777 unwind label %821

777:                                              ; preds = %775
  %778 = load ptr, ptr %9, align 8, !tbaa !5
  %779 = load i64, ptr %10, align 8, !tbaa !11
  %780 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %778, i64 %779
  store ptr %780, ptr %19, align 8, !tbaa !5
  %781 = load ptr, ptr %19, align 8, !tbaa !5
  %782 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %781, i32 0, i32 0
  %783 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPolyixEi(ptr noundef nonnull align 8 dereferenceable(17) %65, i32 noundef 0)
          to label %784 unwind label %821

784:                                              ; preds = %777
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %783, ptr align 8 %782, i64 16, i1 false), !tbaa.struct !16
  %785 = load ptr, ptr %9, align 8, !tbaa !5
  %786 = load ptr, ptr %19, align 8, !tbaa !5
  %787 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %786, i32 0, i32 2
  %788 = load i64, ptr %787, align 8, !tbaa !22
  %789 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %785, i64 %788
  store ptr %789, ptr %22, align 8, !tbaa !5
  store i64 1, ptr %64, align 8, !tbaa !11
  %790 = load ptr, ptr %63, align 8, !tbaa !5
  %791 = load i64, ptr %10, align 8, !tbaa !11
  %792 = getelementptr inbounds i8, ptr %790, i64 %791
  store i8 1, ptr %792, align 1, !tbaa !26
  %793 = load ptr, ptr %63, align 8, !tbaa !5
  %794 = load ptr, ptr %19, align 8, !tbaa !5
  %795 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %794, i32 0, i32 2
  %796 = load i64, ptr %795, align 8, !tbaa !22
  %797 = getelementptr inbounds i8, ptr %793, i64 %796
  store i8 1, ptr %797, align 1, !tbaa !26
  br label %798

798:                                              ; preds = %808, %784
  %799 = load ptr, ptr %22, align 8, !tbaa !5
  %800 = load ptr, ptr %19, align 8, !tbaa !5
  %801 = icmp ne ptr %799, %800
  br i1 %801, label %802, label %825

802:                                              ; preds = %798
  %803 = load ptr, ptr %22, align 8, !tbaa !5
  %804 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %803, i32 0, i32 0
  %805 = load i64, ptr %64, align 8, !tbaa !11
  %806 = trunc i64 %805 to i32
  %807 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPolyixEi(ptr noundef nonnull align 8 dereferenceable(17) %65, i32 noundef %806)
          to label %808 unwind label %821

808:                                              ; preds = %802
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %807, ptr align 8 %804, i64 16, i1 false), !tbaa.struct !16
  %809 = load ptr, ptr %63, align 8, !tbaa !5
  %810 = load ptr, ptr %22, align 8, !tbaa !5
  %811 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %810, i32 0, i32 2
  %812 = load i64, ptr %811, align 8, !tbaa !22
  %813 = getelementptr inbounds i8, ptr %809, i64 %812
  store i8 1, ptr %813, align 1, !tbaa !26
  %814 = load ptr, ptr %9, align 8, !tbaa !5
  %815 = load ptr, ptr %22, align 8, !tbaa !5
  %816 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %815, i32 0, i32 2
  %817 = load i64, ptr %816, align 8, !tbaa !22
  %818 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %814, i64 %817
  store ptr %818, ptr %22, align 8, !tbaa !5
  %819 = load i64, ptr %64, align 8, !tbaa !11
  %820 = add nsw i64 %819, 1
  store i64 %820, ptr %64, align 8, !tbaa !11
  br label %798, !llvm.loop !35

821:                                              ; preds = %825, %802, %777, %775
  %822 = landingpad { ptr, i32 }
          cleanup
  %823 = extractvalue { ptr, i32 } %822, 0
  store ptr %823, ptr %38, align 8
  %824 = extractvalue { ptr, i32 } %822, 1
  store i32 %824, ptr %39, align 4
  call void @_ZN8TPPLPolyD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %65) #9
  br label %832

825:                                              ; preds = %798
  %826 = load ptr, ptr %7, align 8, !tbaa !5
  invoke void @_ZNSt7__cxx114listI8TPPLPolySaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %826, ptr noundef nonnull align 8 dereferenceable(17) %65)
          to label %827 unwind label %821

827:                                              ; preds = %825
  br label %828

828:                                              ; preds = %827, %745
  %829 = load i64, ptr %10, align 8, !tbaa !11
  %830 = add nsw i64 %829, 1
  store i64 %830, ptr %10, align 8, !tbaa !11
  br label %735, !llvm.loop !36

831:                                              ; preds = %735
  call void @_ZN8TPPLPolyD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %65) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %65) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %64) #9
  br label %833

832:                                              ; preds = %821, %750
  call void @llvm.lifetime.end.p0(i64 24, ptr %65) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %64) #9
  br label %864

833:                                              ; preds = %831, %727
  %834 = load ptr, ptr %9, align 8, !tbaa !5
  %835 = icmp eq ptr %834, null
  br i1 %835, label %837, label %836

836:                                              ; preds = %833
  call void @_ZdaPv(ptr noundef %834) #11
  br label %837

837:                                              ; preds = %836, %833
  %838 = load ptr, ptr %31, align 8, !tbaa !5
  %839 = icmp eq ptr %838, null
  br i1 %839, label %841, label %840

840:                                              ; preds = %837
  call void @_ZdaPv(ptr noundef %838) #11
  br label %841

841:                                              ; preds = %840, %837
  %842 = load ptr, ptr %33, align 8, !tbaa !5
  %843 = icmp eq ptr %842, null
  br i1 %843, label %845, label %844

844:                                              ; preds = %841
  call void @_ZdaPv(ptr noundef %842) #11
  br label %845

845:                                              ; preds = %844, %841
  %846 = load ptr, ptr %36, align 8, !tbaa !5
  %847 = icmp eq ptr %846, null
  br i1 %847, label %849, label %848

848:                                              ; preds = %845
  call void @_ZdaPv(ptr noundef %846) #11
  br label %849

849:                                              ; preds = %848, %845
  %850 = load ptr, ptr %34, align 8, !tbaa !5
  %851 = icmp eq ptr %850, null
  br i1 %851, label %853, label %852

852:                                              ; preds = %849
  call void @_ZdaPv(ptr noundef %850) #11
  br label %853

853:                                              ; preds = %852, %849
  %854 = load ptr, ptr %63, align 8, !tbaa !5
  %855 = icmp eq ptr %854, null
  br i1 %855, label %857, label %856

856:                                              ; preds = %853
  call void @_ZdaPv(ptr noundef %854) #11
  br label %857

857:                                              ; preds = %856, %853
  %858 = load i8, ptr %24, align 1, !tbaa !9, !range !31, !noundef !32
  %859 = trunc i8 %858 to i1
  br i1 %859, label %860, label %861

860:                                              ; preds = %857
  store i32 0, ptr %4, align 4
  store i32 1, ptr %66, align 4
  br label %862

861:                                              ; preds = %857
  store i32 1, ptr %4, align 4
  store i32 1, ptr %66, align 4
  br label %862

862:                                              ; preds = %861, %860
  call void @llvm.lifetime.end.p0(i64 8, ptr %63) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %40) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #9
  call void @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %35) #9
  call void @llvm.lifetime.end.p0(i64 48, ptr %35) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 40, ptr %23) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #9
  %863 = load i32, ptr %4, align 4
  ret i32 %863

864:                                              ; preds = %832, %746
  call void @llvm.lifetime.end.p0(i64 8, ptr %63) #9
  br label %865

865:                                              ; preds = %864, %677, %659, %546, %488, %435, %381, %333
  call void @llvm.lifetime.end.p0(i64 16, ptr %40) #9
  br label %866

866:                                              ; preds = %865, %329
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #9
  call void @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %35) #9
  call void @llvm.lifetime.end.p0(i64 48, ptr %35) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 40, ptr %23) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #9
  br label %867

867:                                              ; preds = %866
  %868 = load ptr, ptr %38, align 8
  %869 = load i32, ptr %39, align 4
  %870 = insertvalue { ptr, i32 } poison, ptr %868, 0
  %871 = insertvalue { ptr, i32 } %870, i32 %869, 1
  resume { ptr, i32 } %871
}

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

; 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(16), ptr noundef nonnull align 8 dereferenceable(16)) #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(40)) #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 void @_ZN13TPPLPartition11AddDiagonalEPNS_14MonotoneVertexEPlllPcPSt23_Rb_tree_const_iteratorINS_12ScanLineEdgeEEPSt3setIS5_St4lessIS5_ESaIS5_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(40)) #1 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 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) #8

; 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 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #9 = { nounwind }
attributes #10 = { builtin allocsize(0) }
attributes #11 = { 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}
!17 = !{!18, !18, i64 0}
!18 = !{!"double", !7, i64 0}
!19 = !{!20, !12, i64 16}
!20 = !{!"_ZTSN13TPPLPartition14MonotoneVertexE", !21, i64 0, !12, i64 16, !12, i64 24}
!21 = !{!"_ZTS9TPPLPoint", !18, i64 0, !18, i64 8}
!22 = !{!20, !12, i64 24}
!23 = distinct !{!23, !15}
!24 = distinct !{!24, !15}
!25 = distinct !{!25, !15}
!26 = !{!7, !7, i64 0}
!27 = distinct !{!27, !15}
!28 = distinct !{!28, !15}
!29 = !{!30, !12, i64 0}
!30 = !{!"_ZTSN13TPPLPartition12ScanLineEdgeE", !12, i64 0, !21, i64 8, !21, i64 24}
!31 = !{i8 0, i8 2}
!32 = !{}
!33 = distinct !{!33, !15}
!34 = distinct !{!34, !15}
!35 = distinct !{!35, !15}
!36 = distinct !{!36, !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 }
%"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: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #2

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt7__cxx114listI8TPPLPolySaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #5 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 #5 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 #5 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 #5 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPolyixEi(ptr noundef nonnull align 8 dereferenceable(17), i32 noundef) local_unnamed_addr #5 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(16), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #5 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::pair", align 8
  %16 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %17 = alloca %"struct.std::pair", align 8
  %18 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %19 = alloca %class.TPPLPoly, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  call void @_ZNSt14_List_iteratorI8TPPLPolyEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #8
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %6) #8
  %20 = call ptr @_ZNSt7__cxx114listI8TPPLPolySaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #8
  store ptr %20, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  %21 = call ptr @_ZNSt7__cxx114listI8TPPLPolySaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #8
  store ptr %21, ptr %7, align 8
  %22 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorI8TPPLPolyES3_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  br i1 %22, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %3, %.lr.ph
  %.0283313 = phi i64 [ %25, %.lr.ph ], [ 0, %3 ]
  %23 = call noundef ptr @_ZNKSt14_List_iteratorI8TPPLPolyEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  %24 = call noundef i64 @_ZN8TPPLPoly12GetNumPointsEv(ptr noundef nonnull align 8 dereferenceable(17) %23)
  %25 = add nsw i64 %24, %.0283313
  %26 = call ptr @_ZNSt14_List_iteratorI8TPPLPolyEppEi(ptr noundef nonnull align 8 dereferenceable(8) %4, i32 noundef 0) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #8
  %27 = call ptr @_ZNSt7__cxx114listI8TPPLPolySaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #8
  store ptr %27, ptr %7, align 8
  %28 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorI8TPPLPolyES3_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %7) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #8
  br i1 %28, label %.lr.ph, label %._crit_edge, !llvm.loop !9

._crit_edge:                                      ; preds = %.lr.ph, %3
  %.0283.lcssa = phi i64 [ 0, %3 ], [ %25, %.lr.ph ]
  %29 = mul nsw i64 %.0283.lcssa, 3
  %30 = icmp ugt i64 %29, 576460752303423487
  %31 = mul i64 %.0283.lcssa, 96
  %32 = select i1 %30, i64 -1, i64 %31
  %33 = call noalias noundef nonnull ptr @_Znam(i64 noundef %32) #9
  store i64 %.0283.lcssa, ptr %5, align 8, !tbaa !11
  %34 = call ptr @_ZNSt7__cxx114listI8TPPLPolySaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #8
  store ptr %34, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #8
  %35 = call ptr @_ZNSt7__cxx114listI8TPPLPolySaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #8
  store ptr %35, ptr %8, align 8
  %36 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorI8TPPLPolyES3_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  br i1 %36, label %.lr.ph320, label %._crit_edge321

.lr.ph320:                                        ; preds = %._crit_edge, %._crit_edge317
  %.0286318 = phi i64 [ %39, %._crit_edge317 ], [ 0, %._crit_edge ]
  %37 = call noundef nonnull align 8 dereferenceable(17) ptr @_ZNKSt14_List_iteratorI8TPPLPolyEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  %38 = call noundef i64 @_ZN8TPPLPoly12GetNumPointsEv(ptr noundef nonnull align 8 dereferenceable(17) %37)
  %39 = add nsw i64 %38, %.0286318
  %40 = call noundef i64 @_ZN8TPPLPoly12GetNumPointsEv(ptr noundef nonnull align 8 dereferenceable(17) %37)
  %41 = icmp sgt i64 %40, 0
  br i1 %41, label %42, label %._crit_edge317

42:                                               ; preds = %.lr.ph320
  %43 = add nsw i64 %39, -1
  %44 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %37, i64 noundef 0)
  %45 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %33, i64 %.0286318
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %45, ptr noundef nonnull align 8 dereferenceable(16) %44, i64 16, i1 false), !tbaa.struct !13
  %46 = getelementptr inbounds i8, ptr %45, i64 16
  store i64 %43, ptr %46, align 8
  %47 = call noundef i64 @_ZN8TPPLPoly12GetNumPointsEv(ptr noundef nonnull align 8 dereferenceable(17) %37)
  %48 = icmp ne i64 %47, 1
  %49 = zext i1 %48 to i64
  %spec.select = add nsw i64 %.0286318, %49
  %50 = getelementptr inbounds i8, ptr %45, i64 24
  store i64 %spec.select, ptr %50, align 8
  %51 = call noundef i64 @_ZN8TPPLPoly12GetNumPointsEv(ptr noundef nonnull align 8 dereferenceable(17) %37)
  %52 = icmp sgt i64 %51, 1
  br i1 %52, label %.lr.ph316.peel.next, label %._crit_edge317

.lr.ph316.peel.next:                              ; preds = %42, %.lr.ph316.peel.next
  %.0281314 = phi i64 [ %63, %.lr.ph316.peel.next ], [ 1, %42 ]
  %53 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %37, i64 noundef %.0281314)
  %54 = add nsw i64 %.0281314, %.0286318
  %55 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %33, i64 %54
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %55, ptr noundef nonnull align 8 dereferenceable(16) %53, i64 16, i1 false), !tbaa.struct !13
  %56 = add nsw i64 %54, -1
  %57 = getelementptr inbounds i8, ptr %55, i64 16
  store i64 %56, ptr %57, align 8
  %58 = call noundef i64 @_ZN8TPPLPoly12GetNumPointsEv(ptr noundef nonnull align 8 dereferenceable(17) %37)
  %59 = add nsw i64 %58, -1
  %60 = icmp eq i64 %.0281314, %59
  %61 = add nsw i64 %54, 1
  %spec.select373 = select i1 %60, i64 %.0286318, i64 %61
  %62 = getelementptr inbounds i8, ptr %55, i64 24
  store i64 %spec.select373, ptr %62, align 8
  %63 = add nuw nsw i64 %.0281314, 1
  %64 = call noundef i64 @_ZN8TPPLPoly12GetNumPointsEv(ptr noundef nonnull align 8 dereferenceable(17) %37)
  %65 = icmp slt i64 %63, %64
  br i1 %65, label %.lr.ph316.peel.next, label %._crit_edge317, !llvm.loop !16

._crit_edge317:                                   ; preds = %.lr.ph316.peel.next, %42, %.lr.ph320
  %66 = call ptr @_ZNSt14_List_iteratorI8TPPLPolyEppEi(ptr noundef nonnull align 8 dereferenceable(8) %4, i32 noundef 0) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #8
  %67 = call ptr @_ZNSt7__cxx114listI8TPPLPolySaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #8
  store ptr %67, ptr %8, align 8
  %68 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorI8TPPLPolyES3_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #8
  br i1 %68, label %.lr.ph320, label %._crit_edge321, !llvm.loop !18

._crit_edge321:                                   ; preds = %._crit_edge317, %._crit_edge
  %69 = icmp ugt i64 %.0283.lcssa, 2305843009213693951
  %70 = shl i64 %.0283.lcssa, 3
  %71 = select i1 %69, i64 -1, i64 %70
  %72 = call noalias noundef nonnull ptr @_Znam(i64 noundef %71) #9
  %73 = icmp sgt i64 %.0283.lcssa, 0
  br i1 %73, label %.lr.ph324.preheader, label %._crit_edge325

.lr.ph324.preheader:                              ; preds = %._crit_edge321
  %min.iters.check = icmp ult i64 %.0283.lcssa, 4
  br i1 %min.iters.check, label %.lr.ph324.preheader378, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph324.preheader
  %n.vec = and i64 %.0283.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>
  %74 = getelementptr inbounds i64, ptr %72, i64 %index
  %75 = getelementptr inbounds i8, ptr %74, i64 16
  store <2 x i64> %vec.ind, ptr %74, align 8, !tbaa !11
  store <2 x i64> %step.add, ptr %75, align 8, !tbaa !11
  %index.next = add nuw i64 %index, 4
  %vec.ind.next = add <2 x i64> %vec.ind, <i64 4, i64 4>
  %76 = icmp eq i64 %index.next, %n.vec
  br i1 %76, label %middle.block, label %vector.body, !llvm.loop !19

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %.0283.lcssa, %n.vec
  br i1 %cmp.n, label %._crit_edge325, label %.lr.ph324.preheader378

.lr.ph324.preheader378:                           ; preds = %middle.block, %.lr.ph324.preheader
  %.1282322.ph = phi i64 [ 0, %.lr.ph324.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph324

.lr.ph324:                                        ; preds = %.lr.ph324.preheader378, %.lr.ph324
  %.1282322 = phi i64 [ %78, %.lr.ph324 ], [ %.1282322.ph, %.lr.ph324.preheader378 ]
  %77 = getelementptr inbounds i64, ptr %72, i64 %.1282322
  store i64 %.1282322, ptr %77, align 8, !tbaa !11
  %78 = add nuw nsw i64 %.1282322, 1
  %exitcond.not = icmp eq i64 %78, %.0283.lcssa
  br i1 %exitcond.not, label %._crit_edge325, label %.lr.ph324, !llvm.loop !22

._crit_edge325:                                   ; preds = %.lr.ph324, %middle.block, %._crit_edge321
  %79 = getelementptr inbounds i64, ptr %72, i64 %.0283.lcssa
  call void @_ZN13TPPLPartition12VertexSorterC2EPNS_14MonotoneVertexE(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull %33)
  %80 = load ptr, ptr %9, align 8
  call void @_ZSt4sortIPlN13TPPLPartition12VertexSorterEEvT_S3_T0_(ptr noundef nonnull %72, ptr noundef nonnull %79, ptr %80)
  %81 = call noalias noundef nonnull ptr @_Znam(i64 noundef %29) #9
  br i1 %73, label %.lr.ph329, label %._crit_edge330

.lr.ph329:                                        ; preds = %._crit_edge325, %108
  %.2326 = phi i64 [ %109, %108 ], [ 0, %._crit_edge325 ]
  %82 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %33, i64 %.2326
  %83 = getelementptr inbounds i8, ptr %82, i64 16
  %84 = load i64, ptr %83, align 8, !tbaa !23
  %85 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %33, i64 %84
  %86 = getelementptr inbounds i8, ptr %82, i64 24
  %87 = load i64, ptr %86, align 8, !tbaa !26
  %88 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %33, i64 %87
  %89 = call noundef zeroext i1 @_ZN13TPPLPartition5BelowER9TPPLPointS1_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull align 8 dereferenceable(16) %85, ptr noundef nonnull align 8 dereferenceable(16) %82)
  br i1 %89, label %90, label %97

90:                                               ; preds = %.lr.ph329
  %91 = call noundef zeroext i1 @_ZN13TPPLPartition5BelowER9TPPLPointS1_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull align 8 dereferenceable(16) %88, ptr noundef nonnull align 8 dereferenceable(16) %82)
  br i1 %91, label %92, label %97

92:                                               ; preds = %90
  %93 = call noundef zeroext i1 @_ZN13TPPLPartition8IsConvexER9TPPLPointS1_S1_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull align 8 dereferenceable(16) %88, ptr noundef nonnull align 8 dereferenceable(16) %85, ptr noundef nonnull align 8 dereferenceable(16) %82)
  %94 = getelementptr inbounds i8, ptr %81, i64 %.2326
  br i1 %93, label %95, label %96

95:                                               ; preds = %92
  store i8 1, ptr %94, align 1, !tbaa !27
  br label %108

96:                                               ; preds = %92
  store i8 3, ptr %94, align 1, !tbaa !27
  br label %108

97:                                               ; preds = %90, %.lr.ph329
  %98 = call noundef zeroext i1 @_ZN13TPPLPartition5BelowER9TPPLPointS1_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull align 8 dereferenceable(16) %82, ptr noundef nonnull align 8 dereferenceable(16) %85)
  br i1 %98, label %99, label %106

99:                                               ; preds = %97
  %100 = call noundef zeroext i1 @_ZN13TPPLPartition5BelowER9TPPLPointS1_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull align 8 dereferenceable(16) %82, ptr noundef nonnull align 8 dereferenceable(16) %88)
  br i1 %100, label %101, label %106

101:                                              ; preds = %99
  %102 = call noundef zeroext i1 @_ZN13TPPLPartition8IsConvexER9TPPLPointS1_S1_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull align 8 dereferenceable(16) %88, ptr noundef nonnull align 8 dereferenceable(16) %85, ptr noundef nonnull align 8 dereferenceable(16) %82)
  %103 = getelementptr inbounds i8, ptr %81, i64 %.2326
  br i1 %102, label %104, label %105

104:                                              ; preds = %101
  store i8 2, ptr %103, align 1, !tbaa !27
  br label %108

105:                                              ; preds = %101
  store i8 4, ptr %103, align 1, !tbaa !27
  br label %108

106:                                              ; preds = %99, %97
  %107 = getelementptr inbounds i8, ptr %81, i64 %.2326
  store i8 0, ptr %107, align 1, !tbaa !27
  br label %108

108:                                              ; preds = %96, %95, %104, %105, %106
  %109 = add nuw nsw i64 %.2326, 1
  %exitcond363.not = icmp eq i64 %109, %.0283.lcssa
  br i1 %exitcond363.not, label %._crit_edge330, label %.lr.ph329, !llvm.loop !28

._crit_edge330:                                   ; preds = %108, %._crit_edge325
  %110 = icmp ugt i64 %29, 2305843009213693951
  %111 = mul i64 %.0283.lcssa, 24
  %112 = select i1 %110, i64 -1, i64 %111
  %113 = call noalias noundef nonnull ptr @_Znam(i64 noundef %112) #9
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %10) #8
  call void @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %10) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #8
  call void @_ZNSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  %114 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %112) #9
          to label %115 unwind label %128

115:                                              ; preds = %._crit_edge330
  %116 = icmp eq i64 %.0283.lcssa, 0
  br i1 %116, label %.loopexit.thread, label %117

.loopexit.thread:                                 ; preds = %115
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #8
  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

117:                                              ; preds = %115
  %118 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %114, i64 %29
  br label %119

119:                                              ; preds = %119, %117
  %120 = phi ptr [ %114, %117 ], [ %121, %119 ]
  call void @_ZNSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %120) #8
  %121 = getelementptr inbounds i8, ptr %120, i64 8
  %122 = icmp eq ptr %121, %118
  br i1 %122, label %.loopexit, label %119

.loopexit:                                        ; preds = %119
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #8
  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 %73, label %.lr.ph333, label %.thread

.preheader312:                                    ; preds = %.lr.ph333
  br i1 %73, label %.lr.ph335, label %.thread

.lr.ph335:                                        ; preds = %.preheader312
  %123 = getelementptr inbounds i8, ptr %6, i64 8
  %124 = getelementptr inbounds i8, ptr %6, i64 24
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %17, i64 8
  %.sroa.220.0..sroa_idx = getelementptr inbounds i8, ptr %15, i64 8
  %.sroa.228.0..sroa_idx = getelementptr inbounds i8, ptr %13, i64 8
  br label %132

.lr.ph333:                                        ; preds = %.loopexit, %.lr.ph333
  %.3331 = phi i64 [ %127, %.lr.ph333 ], [ 0, %.loopexit ]
  %125 = call ptr @_ZNKSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %10) #8
  %126 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %114, i64 %.3331
  store ptr %125, ptr %126, align 8, !tbaa !5
  %127 = add nuw nsw i64 %.3331, 1
  %exitcond364.not = icmp eq i64 %127, %.0283.lcssa
  br i1 %exitcond364.not, label %.preheader312, label %.lr.ph333, !llvm.loop !29

128:                                              ; preds = %._crit_edge330
  %129 = landingpad { ptr, i32 }
          cleanup
  br label %324

130:                                              ; preds = %246, %202, %158
  %131 = landingpad { ptr, i32 }
          cleanup
  br label %323

132:                                              ; preds = %.lr.ph335, %286
  %.4334 = phi i64 [ 0, %.lr.ph335 ], [ %287, %286 ]
  %133 = getelementptr inbounds i64, ptr %72, i64 %.4334
  %134 = load i64, ptr %133, align 8, !tbaa !11
  %135 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %33, i64 %134
  %136 = getelementptr inbounds i8, ptr %81, i64 %134
  %137 = load i8, ptr %136, align 1, !tbaa !27
  switch i8 %137, label %286 [
    i8 1, label %138
    i8 2, label %149
    i8 3, label %162
    i8 4, label %191
    i8 0, label %230
  ]

138:                                              ; preds = %132
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %123, ptr noundef nonnull align 8 dereferenceable(16) %135, i64 16, i1 false), !tbaa.struct !13
  %139 = getelementptr inbounds i8, ptr %135, i64 24
  %140 = load i64, ptr %139, align 8, !tbaa !26
  %141 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %33, i64 %140
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %124, ptr noundef nonnull align 8 dereferenceable(16) %141, i64 16, i1 false), !tbaa.struct !13
  store i64 %134, ptr %6, align 8, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #8
  %142 = invoke { ptr, i8 } @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE6insertERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %10, ptr noundef nonnull align 8 dereferenceable(40) %6)
          to label %143 unwind label %147

143:                                              ; preds = %138
  %.fca.0.extract25 = extractvalue { ptr, i8 } %142, 0
  %.fca.1.extract26 = extractvalue { ptr, i8 } %142, 1
  store ptr %.fca.0.extract25, ptr %13, align 8
  store i8 %.fca.1.extract26, ptr %.sroa.228.0..sroa_idx, align 8
  %144 = 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) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #8
  %145 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %114, i64 %134
  %146 = load i64, ptr %12, align 8, !tbaa !5
  store i64 %146, ptr %145, align 8, !tbaa !5
  br label %.sink.split

147:                                              ; preds = %138
  %148 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #8
  br label %323

149:                                              ; preds = %132
  %150 = getelementptr inbounds i8, ptr %135, i64 16
  %151 = load i64, ptr %150, align 8, !tbaa !23
  %152 = getelementptr inbounds i64, ptr %113, i64 %151
  %153 = load i64, ptr %152, align 8, !tbaa !11
  %154 = getelementptr inbounds i8, ptr %81, i64 %153
  %155 = load i8, ptr %154, align 1, !tbaa !27
  %156 = icmp eq i8 %155, 4
  br i1 %156, label %157, label %158

157:                                              ; preds = %149
  call void @_ZN13TPPLPartition11AddDiagonalEPNS_14MonotoneVertexEPlllPcPSt23_Rb_tree_const_iteratorINS_12ScanLineEdgeEEPSt3setIS5_St4lessIS5_ESaIS5_EES2_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull %33, ptr noundef nonnull %5, i64 noundef %134, i64 noundef %153, ptr noundef nonnull %81, ptr noundef nonnull %114, ptr noundef nonnull %10, ptr noundef nonnull %113)
  %.pre370 = load i64, ptr %150, align 8, !tbaa !23
  br label %158

158:                                              ; preds = %157, %149
  %159 = phi i64 [ %.pre370, %157 ], [ %151, %149 ]
  %160 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %114, i64 %159
  %.sroa.024.0.copyload = load ptr, ptr %160, align 8, !tbaa !5
  %161 = 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 %286 unwind label %130

162:                                              ; preds = %132
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %123, ptr noundef nonnull align 8 dereferenceable(16) %135, i64 16, i1 false), !tbaa.struct !13
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %124, ptr noundef nonnull align 8 dereferenceable(16) %135, i64 16, i1 false), !tbaa.struct !13
  %163 = invoke ptr @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE11lower_boundERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %10, ptr noundef nonnull align 8 dereferenceable(40) %6)
          to label %164 unwind label %167

164:                                              ; preds = %162
  store ptr %163, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #8
  %165 = call ptr @_ZNKSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %10) #8
  store ptr %165, ptr %14, align 8
  %166 = call noundef zeroext i1 @_ZSteqRKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEES4_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #8
  br i1 %166, label %.thread, label %169

167:                                              ; preds = %162
  %168 = landingpad { ptr, i32 }
          cleanup
  br label %323

169:                                              ; preds = %164
  %170 = call ptr @_ZNSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEmmEi(ptr noundef nonnull align 8 dereferenceable(8) %11, i32 noundef 0) #8
  %171 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  %172 = load i64, ptr %171, align 8, !tbaa !30
  %173 = getelementptr inbounds i64, ptr %113, i64 %172
  %174 = load i64, ptr %173, align 8, !tbaa !11
  call void @_ZN13TPPLPartition11AddDiagonalEPNS_14MonotoneVertexEPlllPcPSt23_Rb_tree_const_iteratorINS_12ScanLineEdgeEEPSt3setIS5_St4lessIS5_ESaIS5_EES2_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull %33, ptr noundef nonnull %5, i64 noundef %134, i64 noundef %174, ptr noundef nonnull %81, ptr noundef nonnull %114, ptr noundef nonnull %10, ptr noundef nonnull %113)
  %175 = load i64, ptr %5, align 8, !tbaa !11
  %176 = add nsw i64 %175, -2
  %177 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %33, i64 %176
  %178 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  %179 = load i64, ptr %178, align 8, !tbaa !30
  %180 = getelementptr inbounds i64, ptr %113, i64 %179
  store i64 %134, ptr %180, align 8, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %123, ptr noundef nonnull align 8 dereferenceable(16) %177, i64 16, i1 false), !tbaa.struct !13
  %181 = getelementptr inbounds i8, ptr %177, i64 24
  %182 = load i64, ptr %181, align 8, !tbaa !26
  %183 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %33, i64 %182
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %124, ptr noundef nonnull align 8 dereferenceable(16) %183, i64 16, i1 false), !tbaa.struct !13
  store i64 %176, ptr %6, align 8, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #8
  %184 = invoke { ptr, i8 } @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE6insertERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %10, ptr noundef nonnull align 8 dereferenceable(40) %6)
          to label %185 unwind label %189

185:                                              ; preds = %169
  %.fca.0.extract17 = extractvalue { ptr, i8 } %184, 0
  %.fca.1.extract18 = extractvalue { ptr, i8 } %184, 1
  store ptr %.fca.0.extract17, ptr %15, align 8
  store i8 %.fca.1.extract18, ptr %.sroa.220.0..sroa_idx, align 8
  %186 = 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) %15) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #8
  %187 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %114, i64 %176
  %188 = load i64, ptr %12, align 8, !tbaa !5
  store i64 %188, ptr %187, align 8, !tbaa !5
  br label %.sink.split

189:                                              ; preds = %169
  %190 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #8
  br label %323

191:                                              ; preds = %132
  %192 = getelementptr inbounds i8, ptr %135, i64 16
  %193 = load i64, ptr %192, align 8, !tbaa !23
  %194 = getelementptr inbounds i64, ptr %113, i64 %193
  %195 = load i64, ptr %194, align 8, !tbaa !11
  %196 = getelementptr inbounds i8, ptr %81, i64 %195
  %197 = load i8, ptr %196, align 1, !tbaa !27
  %198 = icmp eq i8 %197, 4
  br i1 %198, label %199, label %202

199:                                              ; preds = %191
  call void @_ZN13TPPLPartition11AddDiagonalEPNS_14MonotoneVertexEPlllPcPSt23_Rb_tree_const_iteratorINS_12ScanLineEdgeEEPSt3setIS5_St4lessIS5_ESaIS5_EES2_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull %33, ptr noundef nonnull %5, i64 noundef %134, i64 noundef %195, ptr noundef nonnull %81, ptr noundef nonnull %114, ptr noundef nonnull %10, ptr noundef nonnull %113)
  %200 = load i64, ptr %5, align 8, !tbaa !11
  %201 = add nsw i64 %200, -2
  %.pre369 = load i64, ptr %192, align 8, !tbaa !23
  br label %202

202:                                              ; preds = %199, %191
  %203 = phi i64 [ %.pre369, %199 ], [ %193, %191 ]
  %.0284 = phi i64 [ %201, %199 ], [ %134, %191 ]
  %204 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %114, i64 %203
  %.sroa.016.0.copyload = load ptr, ptr %204, align 8, !tbaa !5
  %205 = 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 %206 unwind label %130

206:                                              ; preds = %202
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %123, ptr noundef nonnull align 8 dereferenceable(16) %135, i64 16, i1 false), !tbaa.struct !13
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %124, ptr noundef nonnull align 8 dereferenceable(16) %135, i64 16, i1 false), !tbaa.struct !13
  %207 = invoke ptr @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE11lower_boundERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %10, ptr noundef nonnull align 8 dereferenceable(40) %6)
          to label %208 unwind label %211

208:                                              ; preds = %206
  store ptr %207, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #8
  %209 = call ptr @_ZNKSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %10) #8
  store ptr %209, ptr %16, align 8
  %210 = call noundef zeroext i1 @_ZSteqRKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEES4_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #8
  br i1 %210, label %.thread, label %213

211:                                              ; preds = %206
  %212 = landingpad { ptr, i32 }
          cleanup
  br label %323

213:                                              ; preds = %208
  %214 = call ptr @_ZNSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEmmEi(ptr noundef nonnull align 8 dereferenceable(8) %11, i32 noundef 0) #8
  %215 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  %216 = load i64, ptr %215, align 8, !tbaa !30
  %217 = getelementptr inbounds i64, ptr %113, i64 %216
  %218 = load i64, ptr %217, align 8, !tbaa !11
  %219 = getelementptr inbounds i8, ptr %81, i64 %218
  %220 = load i8, ptr %219, align 1, !tbaa !27
  %221 = icmp eq i8 %220, 4
  br i1 %221, label %222, label %227

222:                                              ; preds = %213
  %223 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  %224 = load i64, ptr %223, align 8, !tbaa !30
  %225 = getelementptr inbounds i64, ptr %113, i64 %224
  %226 = load i64, ptr %225, align 8, !tbaa !11
  call void @_ZN13TPPLPartition11AddDiagonalEPNS_14MonotoneVertexEPlllPcPSt23_Rb_tree_const_iteratorINS_12ScanLineEdgeEEPSt3setIS5_St4lessIS5_ESaIS5_EES2_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull %33, ptr noundef nonnull %5, i64 noundef %.0284, i64 noundef %226, ptr noundef nonnull %81, ptr noundef nonnull %114, ptr noundef nonnull %10, ptr noundef nonnull %113)
  br label %227

227:                                              ; preds = %222, %213
  %228 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  %229 = load i64, ptr %228, align 8, !tbaa !30
  br label %.sink.split

230:                                              ; preds = %132
  %231 = getelementptr inbounds i8, ptr %135, i64 16
  %232 = load i64, ptr %231, align 8, !tbaa !23
  %233 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %33, i64 %232
  %234 = call noundef zeroext i1 @_ZN13TPPLPartition5BelowER9TPPLPointS1_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull align 8 dereferenceable(16) %135, ptr noundef nonnull align 8 dereferenceable(16) %233)
  br i1 %234, label %235, label %261

235:                                              ; preds = %230
  %236 = load i64, ptr %231, align 8, !tbaa !23
  %237 = getelementptr inbounds i64, ptr %113, i64 %236
  %238 = load i64, ptr %237, align 8, !tbaa !11
  %239 = getelementptr inbounds i8, ptr %81, i64 %238
  %240 = load i8, ptr %239, align 1, !tbaa !27
  %241 = icmp eq i8 %240, 4
  br i1 %241, label %242, label %246

242:                                              ; preds = %235
  call void @_ZN13TPPLPartition11AddDiagonalEPNS_14MonotoneVertexEPlllPcPSt23_Rb_tree_const_iteratorINS_12ScanLineEdgeEEPSt3setIS5_St4lessIS5_ESaIS5_EES2_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull %33, ptr noundef nonnull %5, i64 noundef %134, i64 noundef %238, ptr noundef nonnull %81, ptr noundef nonnull %114, ptr noundef nonnull %10, ptr noundef nonnull %113)
  %243 = load i64, ptr %5, align 8, !tbaa !11
  %244 = add nsw i64 %243, -2
  %245 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %33, i64 %244
  %.pre = load i64, ptr %231, align 8, !tbaa !23
  br label %246

246:                                              ; preds = %242, %235
  %247 = phi i64 [ %.pre, %242 ], [ %236, %235 ]
  %.0287 = phi ptr [ %245, %242 ], [ %135, %235 ]
  %.1285 = phi i64 [ %244, %242 ], [ %134, %235 ]
  %248 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %114, i64 %247
  %.sroa.012.0.copyload = load ptr, ptr %248, align 8, !tbaa !5
  %249 = 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 %250 unwind label %130

250:                                              ; preds = %246
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %123, ptr noundef nonnull align 8 dereferenceable(16) %.0287, i64 16, i1 false), !tbaa.struct !13
  %251 = getelementptr inbounds i8, ptr %.0287, i64 24
  %252 = load i64, ptr %251, align 8, !tbaa !26
  %253 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %33, i64 %252
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %124, ptr noundef nonnull align 8 dereferenceable(16) %253, i64 16, i1 false), !tbaa.struct !13
  store i64 %.1285, ptr %6, align 8, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %17) #8
  %254 = invoke { ptr, i8 } @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE6insertERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %10, ptr noundef nonnull align 8 dereferenceable(40) %6)
          to label %255 unwind label %259

255:                                              ; preds = %250
  %.fca.0.extract = extractvalue { ptr, i8 } %254, 0
  %.fca.1.extract = extractvalue { ptr, i8 } %254, 1
  store ptr %.fca.0.extract, ptr %17, align 8
  store i8 %.fca.1.extract, ptr %.sroa.2.0..sroa_idx, align 8
  %256 = 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) %17) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #8
  %257 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %114, i64 %.1285
  %258 = load i64, ptr %12, align 8, !tbaa !5
  store i64 %258, ptr %257, align 8, !tbaa !5
  br label %.sink.split

259:                                              ; preds = %250
  %260 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #8
  br label %323

261:                                              ; preds = %230
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %123, ptr noundef nonnull align 8 dereferenceable(16) %135, i64 16, i1 false), !tbaa.struct !13
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %124, ptr noundef nonnull align 8 dereferenceable(16) %135, i64 16, i1 false), !tbaa.struct !13
  %262 = invoke ptr @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE11lower_boundERKS1_(ptr noundef nonnull align 8 dereferenceable(48) %10, ptr noundef nonnull align 8 dereferenceable(40) %6)
          to label %263 unwind label %266

263:                                              ; preds = %261
  store ptr %262, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #8
  %264 = call ptr @_ZNKSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %10) #8
  store ptr %264, ptr %18, align 8
  %265 = 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) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #8
  br i1 %265, label %.thread, label %268

266:                                              ; preds = %261
  %267 = landingpad { ptr, i32 }
          cleanup
  br label %323

268:                                              ; preds = %263
  %269 = call ptr @_ZNSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEmmEi(ptr noundef nonnull align 8 dereferenceable(8) %11, i32 noundef 0) #8
  %270 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  %271 = load i64, ptr %270, align 8, !tbaa !30
  %272 = getelementptr inbounds i64, ptr %113, i64 %271
  %273 = load i64, ptr %272, align 8, !tbaa !11
  %274 = getelementptr inbounds i8, ptr %81, i64 %273
  %275 = load i8, ptr %274, align 1, !tbaa !27
  %276 = icmp eq i8 %275, 4
  br i1 %276, label %277, label %282

277:                                              ; preds = %268
  %278 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  %279 = load i64, ptr %278, align 8, !tbaa !30
  %280 = getelementptr inbounds i64, ptr %113, i64 %279
  %281 = load i64, ptr %280, align 8, !tbaa !11
  call void @_ZN13TPPLPartition11AddDiagonalEPNS_14MonotoneVertexEPlllPcPSt23_Rb_tree_const_iteratorINS_12ScanLineEdgeEEPSt3setIS5_St4lessIS5_ESaIS5_EES2_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull %33, ptr noundef nonnull %5, i64 noundef %134, i64 noundef %281, ptr noundef nonnull %81, ptr noundef nonnull %114, ptr noundef nonnull %10, ptr noundef nonnull %113)
  br label %282

282:                                              ; preds = %277, %268
  %283 = call noundef ptr @_ZNKSt23_Rb_tree_const_iteratorIN13TPPLPartition12ScanLineEdgeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  %284 = load i64, ptr %283, align 8, !tbaa !30
  br label %.sink.split

.sink.split:                                      ; preds = %255, %282, %227, %185, %143
  %.sink375 = phi i64 [ %134, %143 ], [ %176, %185 ], [ %229, %227 ], [ %284, %282 ], [ %.1285, %255 ]
  %.sink = phi i64 [ %134, %143 ], [ %176, %185 ], [ %.0284, %227 ], [ %134, %282 ], [ %134, %255 ]
  %285 = getelementptr inbounds i64, ptr %113, i64 %.sink375
  store i64 %.sink, ptr %285, align 8, !tbaa !11
  br label %286

286:                                              ; preds = %.sink.split, %132, %158
  %287 = add nuw nsw i64 %.4334, 1
  %exitcond365.not = icmp eq i64 %287, %.0283.lcssa
  br i1 %exitcond365.not, label %.thread, label %132, !llvm.loop !32

.thread:                                          ; preds = %286, %164, %208, %263, %.loopexit, %.loopexit.thread, %.preheader312
  %.2292 = phi i1 [ false, %.preheader312 ], [ false, %.loopexit.thread ], [ false, %.loopexit ], [ true, %263 ], [ true, %208 ], [ true, %164 ], [ false, %286 ]
  %288 = load i64, ptr %5, align 8, !tbaa !11
  %289 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %288) #9
          to label %290 unwind label %297

290:                                              ; preds = %.thread
  call void @llvm.memset.p0.i64(ptr nonnull align 1 %289, i8 0, i64 %288, i1 false)
  br i1 %.2292, label %322, label %291

291:                                              ; preds = %290
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %19) #8
  invoke void @_ZN8TPPLPolyC1Ev(ptr noundef nonnull align 8 dereferenceable(17) %19)
          to label %.preheader unwind label %299

.preheader:                                       ; preds = %291
  %292 = load i64, ptr %5, align 8, !tbaa !11
  %293 = icmp sgt i64 %292, 0
  br i1 %293, label %.lr.ph359, label %._crit_edge360

.lr.ph359:                                        ; preds = %.preheader, %317
  %294 = phi i64 [ %318, %317 ], [ %292, %.preheader ]
  %.5357 = phi i64 [ %319, %317 ], [ 0, %.preheader ]
  %295 = getelementptr inbounds i8, ptr %289, i64 %.5357
  %296 = load i8, ptr %295, align 1, !tbaa !27
  %.not = icmp eq i8 %296, 0
  br i1 %.not, label %301, label %317

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

299:                                              ; preds = %291
  %300 = landingpad { ptr, i32 }
          cleanup
  br label %321

301:                                              ; preds = %.lr.ph359
  %302 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %33, i64 %.5357
  %303 = getelementptr inbounds i8, ptr %302, i64 24
  %.pn343 = load i64, ptr %303, align 8, !tbaa !26
  %.not303344 = icmp eq i64 %.pn343, %.5357
  br i1 %.not303344, label %._crit_edge349, label %.lr.ph348

.lr.ph348:                                        ; preds = %301, %.lr.ph348
  %.pn346 = phi i64 [ %.pn, %.lr.ph348 ], [ %.pn343, %301 ]
  %.0345 = phi i64 [ %305, %.lr.ph348 ], [ 1, %301 ]
  %304 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %33, i64 %.pn346, i32 2
  %305 = add nuw nsw i64 %.0345, 1
  %.pn = load i64, ptr %304, align 8, !tbaa !26
  %.not303 = icmp eq i64 %.pn, %.5357
  br i1 %.not303, label %._crit_edge349, label %.lr.ph348, !llvm.loop !33

._crit_edge349:                                   ; preds = %.lr.ph348, %301
  %.0.lcssa = phi i64 [ 1, %301 ], [ %305, %.lr.ph348 ]
  invoke void @_ZN8TPPLPoly4InitEl(ptr noundef nonnull align 8 dereferenceable(17) %19, i64 noundef %.0.lcssa)
          to label %306 unwind label %315

306:                                              ; preds = %._crit_edge349
  %307 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPolyixEi(ptr noundef nonnull align 8 dereferenceable(17) %19, i32 noundef 0)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %307, ptr noundef nonnull align 8 dereferenceable(16) %302, i64 16, i1 false), !tbaa.struct !13
  %308 = load i64, ptr %303, align 8, !tbaa !26
  store i8 1, ptr %295, align 1, !tbaa !27
  %309 = getelementptr inbounds i8, ptr %289, i64 %308
  store i8 1, ptr %309, align 1, !tbaa !27
  %.not305351 = icmp eq i64 %308, %.5357
  br i1 %.not305351, label %._crit_edge356, label %.lr.ph355

.lr.ph355:                                        ; preds = %306, %.lr.ph355
  %.1353 = phi i32 [ %314, %.lr.ph355 ], [ 1, %306 ]
  %.pn304352 = phi i64 [ %312, %.lr.ph355 ], [ %308, %306 ]
  %.1289 = getelementptr inbounds %"struct.TPPLPartition::MonotoneVertex", ptr %33, i64 %.pn304352
  %310 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPolyixEi(ptr noundef nonnull align 8 dereferenceable(17) %19, i32 noundef %.1353)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %310, ptr noundef nonnull align 8 dereferenceable(16) %.1289, i64 16, i1 false), !tbaa.struct !13
  %311 = getelementptr inbounds i8, ptr %.1289, i64 24
  %312 = load i64, ptr %311, align 8, !tbaa !26
  %313 = getelementptr inbounds i8, ptr %289, i64 %312
  store i8 1, ptr %313, align 1, !tbaa !27
  %314 = add i32 %.1353, 1
  %.not305 = icmp eq i64 %312, %.5357
  br i1 %.not305, label %._crit_edge356, label %.lr.ph355, !llvm.loop !34

315:                                              ; preds = %._crit_edge356, %._crit_edge349
  %316 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN8TPPLPolyD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %19) #8
  br label %321

._crit_edge356:                                   ; preds = %.lr.ph355, %306
  invoke void @_ZNSt7__cxx114listI8TPPLPolySaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(17) %19)
          to label %._crit_edge356._crit_edge unwind label %315

._crit_edge356._crit_edge:                        ; preds = %._crit_edge356
  %.pre371 = load i64, ptr %5, align 8, !tbaa !11
  br label %317

317:                                              ; preds = %._crit_edge356._crit_edge, %.lr.ph359
  %318 = phi i64 [ %.pre371, %._crit_edge356._crit_edge ], [ %294, %.lr.ph359 ]
  %319 = add nuw nsw i64 %.5357, 1
  %320 = icmp slt i64 %319, %318
  br i1 %320, label %.lr.ph359, label %._crit_edge360, !llvm.loop !35

._crit_edge360:                                   ; preds = %317, %.preheader
  call void @_ZN8TPPLPolyD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %19) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %19) #8
  br label %322

321:                                              ; preds = %315, %299
  %.pn306 = phi { ptr, i32 } [ %316, %315 ], [ %300, %299 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %19) #8
  br label %323

322:                                              ; preds = %290, %._crit_edge360
  call void @_ZdaPv(ptr noundef nonnull %33) #10
  call void @_ZdaPv(ptr noundef nonnull %72) #10
  call void @_ZdaPv(ptr noundef nonnull %81) #10
  call void @_ZdaPv(ptr noundef nonnull %114) #10
  call void @_ZdaPv(ptr noundef nonnull %113) #10
  call void @_ZdaPv(ptr noundef nonnull %289) #10
  %not..2292 = xor i1 %.2292, true
  %.0280 = zext i1 %not..2292 to i32
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  call void @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %10) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  ret i32 %.0280

323:                                              ; preds = %297, %321, %266, %259, %211, %189, %167, %147, %130
  %.pn306.pn.pn = phi { ptr, i32 } [ %260, %259 ], [ %131, %130 ], [ %267, %266 ], [ %212, %211 ], [ %190, %189 ], [ %168, %167 ], [ %148, %147 ], [ %.pn306, %321 ], [ %298, %297 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #8
  br label %324

324:                                              ; preds = %323, %128
  %.pn306.pn.pn.pn = phi { ptr, i32 } [ %.pn306.pn.pn, %323 ], [ %129, %128 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  call void @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %10) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  resume { ptr, i32 } %.pn306.pn.pn.pn
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN13TPPLPartition12VertexSorterC2EPNS_14MonotoneVertexE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) unnamed_addr #5 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(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #5 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 #5 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 #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #5 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(40)) 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 #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN13TPPLPartition11AddDiagonalEPNS_14MonotoneVertexEPlllPcPSt23_Rb_tree_const_iteratorINS_12ScanLineEdgeEEPSt3setIS5_St4lessIS5_ESaIS5_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 #5 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(40)) local_unnamed_addr #1 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 #5

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt3setIN13TPPLPartition12ScanLineEdgeESt4lessIS1_ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #5 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 = { 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 #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { 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 #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #8 = { nounwind }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { 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}
!14 = !{!15, !15, i64 0}
!15 = !{!"double", !7, i64 0}
!16 = distinct !{!16, !10, !17}
!17 = !{!"llvm.loop.peeled.count", i32 1}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10, !20, !21}
!20 = !{!"llvm.loop.isvectorized", i32 1}
!21 = !{!"llvm.loop.unroll.runtime.disable"}
!22 = distinct !{!22, !10, !21, !20}
!23 = !{!24, !12, i64 16}
!24 = !{!"_ZTSN13TPPLPartition14MonotoneVertexE", !25, i64 0, !12, i64 16, !12, i64 24}
!25 = !{!"_ZTS9TPPLPoint", !15, i64 0, !15, i64 8}
!26 = !{!24, !12, i64 24}
!27 = !{!7, !7, i64 0}
!28 = distinct !{!28, !10}
!29 = distinct !{!29, !10}
!30 = !{!31, !12, i64 0}
!31 = !{!"_ZTSN13TPPLPartition12ScanLineEdgeE", !12, i64 0, !25, i64 8, !25, i64 24}
!32 = distinct !{!32, !10}
!33 = distinct !{!33, !10}
!34 = distinct !{!34, !10}
!35 = distinct !{!35, !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