; 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.TPPLPoint = type { double, double }
%"struct.TPPLPartition::Diagonal" = type { i64, i64 }
%"class.std::__cxx11::list.0" = type { %"class.std::__cxx11::_List_base.1" }
%"class.std::__cxx11::_List_base.1" = type { %"struct.std::__cxx11::_List_base<TPPLPartition::Diagonal, std::allocator<TPPLPartition::Diagonal>>::_List_impl" }
%"struct.std::__cxx11::_List_base<TPPLPartition::Diagonal, std::allocator<TPPLPartition::Diagonal>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { ptr, ptr }
%class.TPPLPoly = type <{ ptr, i64, i8, [7 x i8] }>
%"struct.std::_List_iterator.5" = type { ptr }
%"struct.TPPLPartition::DPState" = type { i8, double, i64 }

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

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

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

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

; 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 noundef double @_ZN13TPPLPartition8DistanceERK9TPPLPointS2_(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 uwtable
declare dso_local noundef i32 @_ZN13TPPLPartition10IntersectsER9TPPLPointS1_S1_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), ptr noundef nonnull align 8 dereferenceable(16)) #3 align 2

declare i32 @__gxx_personality_v0(...)

; 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)) #3 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 zeroext i1 @_ZN13TPPLPartition6InConeER9TPPLPointS1_S1_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), ptr noundef nonnull align 8 dereferenceable(16)) #6 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN13TPPLPartition15Triangulate_OPTEP8TPPLPolyPNSt7__cxx114listIS0_SaIS0_EEE(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef %1, ptr noundef %2) #3 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 i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca ptr, align 8
  %14 = alloca %struct.TPPLPoint, align 8
  %15 = alloca %struct.TPPLPoint, align 8
  %16 = alloca %struct.TPPLPoint, align 8
  %17 = alloca %struct.TPPLPoint, align 8
  %18 = alloca i64, align 8
  %19 = alloca double, align 8
  %20 = alloca double, align 8
  %21 = alloca double, align 8
  %22 = alloca double, align 8
  %23 = alloca %"struct.TPPLPartition::Diagonal", align 8
  %24 = alloca %"struct.TPPLPartition::Diagonal", align 8
  %25 = alloca %"class.std::__cxx11::list.0", align 8
  %26 = alloca %class.TPPLPoly, align 8
  %27 = alloca ptr, align 8
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca %"struct.std::_List_iterator.5", align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  %32 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %25) #7
  call void @_ZNSt7__cxx114listIN13TPPLPartition8DiagonalESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %26) #7
  invoke void @_ZN8TPPLPolyC1Ev(ptr noundef nonnull align 8 dereferenceable(17) %26)
          to label %33 unwind label %62

33:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #7
  store i32 1, ptr %29, align 4, !tbaa !9
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  %35 = invoke noundef i64 @_ZN8TPPLPoly12GetNumPointsEv(ptr noundef nonnull align 8 dereferenceable(17) %34)
          to label %36 unwind label %66

36:                                               ; preds = %33
  store i64 %35, ptr %12, align 8, !tbaa !11
  %37 = load i64, ptr %12, align 8, !tbaa !11
  %38 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %37, i64 8)
  %39 = extractvalue { i64, i1 } %38, 1
  %40 = extractvalue { i64, i1 } %38, 0
  %41 = select i1 %39, i64 -1, i64 %40
  %42 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %41) #8
          to label %43 unwind label %66

43:                                               ; preds = %36
  store ptr %42, ptr %13, align 8, !tbaa !5
  store i64 1, ptr %8, align 8, !tbaa !11
  br label %44

44:                                               ; preds = %59, %43
  %45 = load i64, ptr %8, align 8, !tbaa !11
  %46 = load i64, ptr %12, align 8, !tbaa !11
  %47 = icmp slt i64 %45, %46
  br i1 %47, label %48, label %70

48:                                               ; preds = %44
  %49 = load i64, ptr %8, align 8, !tbaa !11
  %50 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %49, i64 24)
  %51 = extractvalue { i64, i1 } %50, 1
  %52 = extractvalue { i64, i1 } %50, 0
  %53 = select i1 %51, i64 -1, i64 %52
  %54 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %53) #8
          to label %55 unwind label %66

55:                                               ; preds = %48
  %56 = load ptr, ptr %13, align 8, !tbaa !5
  %57 = load i64, ptr %8, align 8, !tbaa !11
  %58 = getelementptr inbounds ptr, ptr %56, i64 %57
  store ptr %54, ptr %58, align 8, !tbaa !5
  br label %59

59:                                               ; preds = %55
  %60 = load i64, ptr %8, align 8, !tbaa !11
  %61 = add nsw i64 %60, 1
  store i64 %61, ptr %8, align 8, !tbaa !11
  br label %44, !llvm.loop !13

62:                                               ; preds = %3
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %27, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %28, align 4
  br label %531

66:                                               ; preds = %499, %486, %478, %477, %472, %468, %463, %437, %348, %344, %332, %328, %221, %215, %211, %202, %181, %177, %166, %160, %141, %137, %126, %120, %113, %76, %48, %36, %33
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %27, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %28, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #7
  call void @_ZN8TPPLPolyD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %26) #7
  br label %531

70:                                               ; preds = %44
  store i64 0, ptr %8, align 8, !tbaa !11
  br label %71

71:                                               ; preds = %243, %70
  %72 = load i64, ptr %8, align 8, !tbaa !11
  %73 = load i64, ptr %12, align 8, !tbaa !11
  %74 = sub nsw i64 %73, 1
  %75 = icmp slt i64 %72, %74
  br i1 %75, label %76, label %246

76:                                               ; preds = %71
  %77 = load ptr, ptr %6, align 8, !tbaa !5
  %78 = load i64, ptr %8, align 8, !tbaa !11
  %79 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %77, i64 noundef %78)
          to label %80 unwind label %66

80:                                               ; preds = %76
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %14, ptr align 8 %79, i64 16, i1 false), !tbaa.struct !15
  %81 = load i64, ptr %8, align 8, !tbaa !11
  %82 = add nsw i64 %81, 1
  store i64 %82, ptr %9, align 8, !tbaa !11
  br label %83

83:                                               ; preds = %239, %80
  %84 = load i64, ptr %9, align 8, !tbaa !11
  %85 = load i64, ptr %12, align 8, !tbaa !11
  %86 = icmp slt i64 %84, %85
  br i1 %86, label %87, label %242

87:                                               ; preds = %83
  %88 = load ptr, ptr %13, align 8, !tbaa !5
  %89 = load i64, ptr %9, align 8, !tbaa !11
  %90 = getelementptr inbounds ptr, ptr %88, i64 %89
  %91 = load ptr, ptr %90, align 8, !tbaa !5
  %92 = load i64, ptr %8, align 8, !tbaa !11
  %93 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %91, i64 %92
  %94 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %93, i32 0, i32 0
  store i8 1, ptr %94, align 8, !tbaa !18
  %95 = load ptr, ptr %13, align 8, !tbaa !5
  %96 = load i64, ptr %9, align 8, !tbaa !11
  %97 = getelementptr inbounds ptr, ptr %95, i64 %96
  %98 = load ptr, ptr %97, align 8, !tbaa !5
  %99 = load i64, ptr %8, align 8, !tbaa !11
  %100 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %98, i64 %99
  %101 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %100, i32 0, i32 1
  store double 0.000000e+00, ptr %101, align 8, !tbaa !21
  %102 = load ptr, ptr %13, align 8, !tbaa !5
  %103 = load i64, ptr %9, align 8, !tbaa !11
  %104 = getelementptr inbounds ptr, ptr %102, i64 %103
  %105 = load ptr, ptr %104, align 8, !tbaa !5
  %106 = load i64, ptr %8, align 8, !tbaa !11
  %107 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %105, i64 %106
  %108 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %107, i32 0, i32 2
  store i64 -1, ptr %108, align 8, !tbaa !22
  %109 = load i64, ptr %9, align 8, !tbaa !11
  %110 = load i64, ptr %8, align 8, !tbaa !11
  %111 = add nsw i64 %110, 1
  %112 = icmp ne i64 %109, %111
  br i1 %112, label %113, label %238

113:                                              ; preds = %87
  %114 = load ptr, ptr %6, align 8, !tbaa !5
  %115 = load i64, ptr %9, align 8, !tbaa !11
  %116 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %114, i64 noundef %115)
          to label %117 unwind label %66

117:                                              ; preds = %113
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %15, ptr align 8 %116, i64 16, i1 false), !tbaa.struct !15
  %118 = load i64, ptr %8, align 8, !tbaa !11
  %119 = icmp eq i64 %118, 0
  br i1 %119, label %120, label %126

120:                                              ; preds = %117
  %121 = load ptr, ptr %6, align 8, !tbaa !5
  %122 = load i64, ptr %12, align 8, !tbaa !11
  %123 = sub nsw i64 %122, 1
  %124 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %121, i64 noundef %123)
          to label %125 unwind label %66

125:                                              ; preds = %120
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %16, ptr align 8 %124, i64 16, i1 false), !tbaa.struct !15
  br label %132

126:                                              ; preds = %117
  %127 = load ptr, ptr %6, align 8, !tbaa !5
  %128 = load i64, ptr %8, align 8, !tbaa !11
  %129 = sub nsw i64 %128, 1
  %130 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %127, i64 noundef %129)
          to label %131 unwind label %66

131:                                              ; preds = %126
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %16, ptr align 8 %130, i64 16, i1 false), !tbaa.struct !15
  br label %132

132:                                              ; preds = %131, %125
  %133 = load i64, ptr %8, align 8, !tbaa !11
  %134 = load i64, ptr %12, align 8, !tbaa !11
  %135 = sub nsw i64 %134, 1
  %136 = icmp eq i64 %133, %135
  br i1 %136, label %137, label %141

137:                                              ; preds = %132
  %138 = load ptr, ptr %6, align 8, !tbaa !5
  %139 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %138, i64 noundef 0)
          to label %140 unwind label %66

140:                                              ; preds = %137
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %17, ptr align 8 %139, i64 16, i1 false), !tbaa.struct !15
  br label %147

141:                                              ; preds = %132
  %142 = load ptr, ptr %6, align 8, !tbaa !5
  %143 = load i64, ptr %8, align 8, !tbaa !11
  %144 = add nsw i64 %143, 1
  %145 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %142, i64 noundef %144)
          to label %146 unwind label %66

146:                                              ; preds = %141
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %17, ptr align 8 %145, i64 16, i1 false), !tbaa.struct !15
  br label %147

147:                                              ; preds = %146, %140
  %148 = call noundef zeroext i1 @_ZN13TPPLPartition6InConeER9TPPLPointS1_S1_S1_(ptr noundef nonnull align 1 dereferenceable(1) %32, ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(16) %15)
  br i1 %148, label %157, label %149

149:                                              ; preds = %147
  %150 = load ptr, ptr %13, align 8, !tbaa !5
  %151 = load i64, ptr %9, align 8, !tbaa !11
  %152 = getelementptr inbounds ptr, ptr %150, i64 %151
  %153 = load ptr, ptr %152, align 8, !tbaa !5
  %154 = load i64, ptr %8, align 8, !tbaa !11
  %155 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %153, i64 %154
  %156 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %155, i32 0, i32 0
  store i8 0, ptr %156, align 8, !tbaa !18
  br label %239

157:                                              ; preds = %147
  %158 = load i64, ptr %9, align 8, !tbaa !11
  %159 = icmp eq i64 %158, 0
  br i1 %159, label %160, label %166

160:                                              ; preds = %157
  %161 = load ptr, ptr %6, align 8, !tbaa !5
  %162 = load i64, ptr %12, align 8, !tbaa !11
  %163 = sub nsw i64 %162, 1
  %164 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %161, i64 noundef %163)
          to label %165 unwind label %66

165:                                              ; preds = %160
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %16, ptr align 8 %164, i64 16, i1 false), !tbaa.struct !15
  br label %172

166:                                              ; preds = %157
  %167 = load ptr, ptr %6, align 8, !tbaa !5
  %168 = load i64, ptr %9, align 8, !tbaa !11
  %169 = sub nsw i64 %168, 1
  %170 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %167, i64 noundef %169)
          to label %171 unwind label %66

171:                                              ; preds = %166
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %16, ptr align 8 %170, i64 16, i1 false), !tbaa.struct !15
  br label %172

172:                                              ; preds = %171, %165
  %173 = load i64, ptr %9, align 8, !tbaa !11
  %174 = load i64, ptr %12, align 8, !tbaa !11
  %175 = sub nsw i64 %174, 1
  %176 = icmp eq i64 %173, %175
  br i1 %176, label %177, label %181

177:                                              ; preds = %172
  %178 = load ptr, ptr %6, align 8, !tbaa !5
  %179 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %178, i64 noundef 0)
          to label %180 unwind label %66

180:                                              ; preds = %177
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %17, ptr align 8 %179, i64 16, i1 false), !tbaa.struct !15
  br label %187

181:                                              ; preds = %172
  %182 = load ptr, ptr %6, align 8, !tbaa !5
  %183 = load i64, ptr %9, align 8, !tbaa !11
  %184 = add nsw i64 %183, 1
  %185 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %182, i64 noundef %184)
          to label %186 unwind label %66

186:                                              ; preds = %181
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %17, ptr align 8 %185, i64 16, i1 false), !tbaa.struct !15
  br label %187

187:                                              ; preds = %186, %180
  %188 = call noundef zeroext i1 @_ZN13TPPLPartition6InConeER9TPPLPointS1_S1_S1_(ptr noundef nonnull align 1 dereferenceable(1) %32, ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(16) %14)
  br i1 %188, label %197, label %189

189:                                              ; preds = %187
  %190 = load ptr, ptr %13, align 8, !tbaa !5
  %191 = load i64, ptr %9, align 8, !tbaa !11
  %192 = getelementptr inbounds ptr, ptr %190, i64 %191
  %193 = load ptr, ptr %192, align 8, !tbaa !5
  %194 = load i64, ptr %8, align 8, !tbaa !11
  %195 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %193, i64 %194
  %196 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %195, i32 0, i32 0
  store i8 0, ptr %196, align 8, !tbaa !18
  br label %239

197:                                              ; preds = %187
  store i64 0, ptr %10, align 8, !tbaa !11
  br label %198

198:                                              ; preds = %234, %197
  %199 = load i64, ptr %10, align 8, !tbaa !11
  %200 = load i64, ptr %12, align 8, !tbaa !11
  %201 = icmp slt i64 %199, %200
  br i1 %201, label %202, label %237

202:                                              ; preds = %198
  %203 = load ptr, ptr %6, align 8, !tbaa !5
  %204 = load i64, ptr %10, align 8, !tbaa !11
  %205 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %203, i64 noundef %204)
          to label %206 unwind label %66

206:                                              ; preds = %202
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %16, ptr align 8 %205, i64 16, i1 false), !tbaa.struct !15
  %207 = load i64, ptr %10, align 8, !tbaa !11
  %208 = load i64, ptr %12, align 8, !tbaa !11
  %209 = sub nsw i64 %208, 1
  %210 = icmp eq i64 %207, %209
  br i1 %210, label %211, label %215

211:                                              ; preds = %206
  %212 = load ptr, ptr %6, align 8, !tbaa !5
  %213 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %212, i64 noundef 0)
          to label %214 unwind label %66

214:                                              ; preds = %211
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %17, ptr align 8 %213, i64 16, i1 false), !tbaa.struct !15
  br label %221

215:                                              ; preds = %206
  %216 = load ptr, ptr %6, align 8, !tbaa !5
  %217 = load i64, ptr %10, align 8, !tbaa !11
  %218 = add nsw i64 %217, 1
  %219 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %216, i64 noundef %218)
          to label %220 unwind label %66

220:                                              ; preds = %215
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %17, ptr align 8 %219, i64 16, i1 false), !tbaa.struct !15
  br label %221

221:                                              ; preds = %220, %214
  %222 = invoke noundef i32 @_ZN13TPPLPartition10IntersectsER9TPPLPointS1_S1_S1_(ptr noundef nonnull align 1 dereferenceable(1) %32, ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(16) %17)
          to label %223 unwind label %66

223:                                              ; preds = %221
  %224 = icmp ne i32 %222, 0
  br i1 %224, label %225, label %233

225:                                              ; preds = %223
  %226 = load ptr, ptr %13, align 8, !tbaa !5
  %227 = load i64, ptr %9, align 8, !tbaa !11
  %228 = getelementptr inbounds ptr, ptr %226, i64 %227
  %229 = load ptr, ptr %228, align 8, !tbaa !5
  %230 = load i64, ptr %8, align 8, !tbaa !11
  %231 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %229, i64 %230
  %232 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %231, i32 0, i32 0
  store i8 0, ptr %232, align 8, !tbaa !18
  br label %237

233:                                              ; preds = %223
  br label %234

234:                                              ; preds = %233
  %235 = load i64, ptr %10, align 8, !tbaa !11
  %236 = add nsw i64 %235, 1
  store i64 %236, ptr %10, align 8, !tbaa !11
  br label %198, !llvm.loop !23

237:                                              ; preds = %225, %198
  br label %238

238:                                              ; preds = %237, %87
  br label %239

239:                                              ; preds = %238, %189, %149
  %240 = load i64, ptr %9, align 8, !tbaa !11
  %241 = add nsw i64 %240, 1
  store i64 %241, ptr %9, align 8, !tbaa !11
  br label %83, !llvm.loop !24

242:                                              ; preds = %83
  br label %243

243:                                              ; preds = %242
  %244 = load i64, ptr %8, align 8, !tbaa !11
  %245 = add nsw i64 %244, 1
  store i64 %245, ptr %8, align 8, !tbaa !11
  br label %71, !llvm.loop !25

246:                                              ; preds = %71
  %247 = load ptr, ptr %13, align 8, !tbaa !5
  %248 = load i64, ptr %12, align 8, !tbaa !11
  %249 = sub nsw i64 %248, 1
  %250 = getelementptr inbounds ptr, ptr %247, i64 %249
  %251 = load ptr, ptr %250, align 8, !tbaa !5
  %252 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %251, i64 0
  %253 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %252, i32 0, i32 0
  store i8 1, ptr %253, align 8, !tbaa !18
  %254 = load ptr, ptr %13, align 8, !tbaa !5
  %255 = load i64, ptr %12, align 8, !tbaa !11
  %256 = sub nsw i64 %255, 1
  %257 = getelementptr inbounds ptr, ptr %254, i64 %256
  %258 = load ptr, ptr %257, align 8, !tbaa !5
  %259 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %258, i64 0
  %260 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %259, i32 0, i32 1
  store double 0.000000e+00, ptr %260, align 8, !tbaa !21
  %261 = load ptr, ptr %13, align 8, !tbaa !5
  %262 = load i64, ptr %12, align 8, !tbaa !11
  %263 = sub nsw i64 %262, 1
  %264 = getelementptr inbounds ptr, ptr %261, i64 %263
  %265 = load ptr, ptr %264, align 8, !tbaa !5
  %266 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %265, i64 0
  %267 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %266, i32 0, i32 2
  store i64 -1, ptr %267, align 8, !tbaa !22
  store i64 2, ptr %11, align 8, !tbaa !11
  br label %268

268:                                              ; preds = %434, %246
  %269 = load i64, ptr %11, align 8, !tbaa !11
  %270 = load i64, ptr %12, align 8, !tbaa !11
  %271 = icmp slt i64 %269, %270
  br i1 %271, label %272, label %437

272:                                              ; preds = %268
  store i64 0, ptr %8, align 8, !tbaa !11
  br label %273

273:                                              ; preds = %430, %272
  %274 = load i64, ptr %8, align 8, !tbaa !11
  %275 = load i64, ptr %12, align 8, !tbaa !11
  %276 = load i64, ptr %11, align 8, !tbaa !11
  %277 = sub nsw i64 %275, %276
  %278 = icmp slt i64 %274, %277
  br i1 %278, label %279, label %433

279:                                              ; preds = %273
  %280 = load i64, ptr %8, align 8, !tbaa !11
  %281 = load i64, ptr %11, align 8, !tbaa !11
  %282 = add nsw i64 %280, %281
  store i64 %282, ptr %9, align 8, !tbaa !11
  %283 = load ptr, ptr %13, align 8, !tbaa !5
  %284 = load i64, ptr %9, align 8, !tbaa !11
  %285 = getelementptr inbounds ptr, ptr %283, i64 %284
  %286 = load ptr, ptr %285, align 8, !tbaa !5
  %287 = load i64, ptr %8, align 8, !tbaa !11
  %288 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %286, i64 %287
  %289 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %288, i32 0, i32 0
  %290 = load i8, ptr %289, align 8, !tbaa !18, !range !26, !noundef !27
  %291 = trunc i8 %290 to i1
  br i1 %291, label %293, label %292

292:                                              ; preds = %279
  br label %430

293:                                              ; preds = %279
  store i64 -1, ptr %18, align 8, !tbaa !11
  %294 = load i64, ptr %8, align 8, !tbaa !11
  %295 = add nsw i64 %294, 1
  store i64 %295, ptr %10, align 8, !tbaa !11
  br label %296

296:                                              ; preds = %386, %293
  %297 = load i64, ptr %10, align 8, !tbaa !11
  %298 = load i64, ptr %9, align 8, !tbaa !11
  %299 = icmp slt i64 %297, %298
  br i1 %299, label %300, label %389

300:                                              ; preds = %296
  %301 = load ptr, ptr %13, align 8, !tbaa !5
  %302 = load i64, ptr %10, align 8, !tbaa !11
  %303 = getelementptr inbounds ptr, ptr %301, i64 %302
  %304 = load ptr, ptr %303, align 8, !tbaa !5
  %305 = load i64, ptr %8, align 8, !tbaa !11
  %306 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %304, i64 %305
  %307 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %306, i32 0, i32 0
  %308 = load i8, ptr %307, align 8, !tbaa !18, !range !26, !noundef !27
  %309 = trunc i8 %308 to i1
  br i1 %309, label %311, label %310

310:                                              ; preds = %300
  br label %386

311:                                              ; preds = %300
  %312 = load ptr, ptr %13, align 8, !tbaa !5
  %313 = load i64, ptr %9, align 8, !tbaa !11
  %314 = getelementptr inbounds ptr, ptr %312, i64 %313
  %315 = load ptr, ptr %314, align 8, !tbaa !5
  %316 = load i64, ptr %10, align 8, !tbaa !11
  %317 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %315, i64 %316
  %318 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %317, i32 0, i32 0
  %319 = load i8, ptr %318, align 8, !tbaa !18, !range !26, !noundef !27
  %320 = trunc i8 %319 to i1
  br i1 %320, label %322, label %321

321:                                              ; preds = %311
  br label %386

322:                                              ; preds = %311
  %323 = load i64, ptr %10, align 8, !tbaa !11
  %324 = load i64, ptr %8, align 8, !tbaa !11
  %325 = add nsw i64 %324, 1
  %326 = icmp sle i64 %323, %325
  br i1 %326, label %327, label %328

327:                                              ; preds = %322
  store double 0.000000e+00, ptr %21, align 8, !tbaa !16
  br label %338

328:                                              ; preds = %322
  %329 = load ptr, ptr %6, align 8, !tbaa !5
  %330 = load i64, ptr %8, align 8, !tbaa !11
  %331 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %329, i64 noundef %330)
          to label %332 unwind label %66

332:                                              ; preds = %328
  %333 = load ptr, ptr %6, align 8, !tbaa !5
  %334 = load i64, ptr %10, align 8, !tbaa !11
  %335 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %333, i64 noundef %334)
          to label %336 unwind label %66

336:                                              ; preds = %332
  %337 = call noundef double @_ZN13TPPLPartition8DistanceERK9TPPLPointS2_(ptr noundef nonnull align 1 dereferenceable(1) %32, ptr noundef nonnull align 8 dereferenceable(16) %331, ptr noundef nonnull align 8 dereferenceable(16) %335)
  store double %337, ptr %21, align 8, !tbaa !16
  br label %338

338:                                              ; preds = %336, %327
  %339 = load i64, ptr %9, align 8, !tbaa !11
  %340 = load i64, ptr %10, align 8, !tbaa !11
  %341 = add nsw i64 %340, 1
  %342 = icmp sle i64 %339, %341
  br i1 %342, label %343, label %344

343:                                              ; preds = %338
  store double 0.000000e+00, ptr %22, align 8, !tbaa !16
  br label %354

344:                                              ; preds = %338
  %345 = load ptr, ptr %6, align 8, !tbaa !5
  %346 = load i64, ptr %10, align 8, !tbaa !11
  %347 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %345, i64 noundef %346)
          to label %348 unwind label %66

348:                                              ; preds = %344
  %349 = load ptr, ptr %6, align 8, !tbaa !5
  %350 = load i64, ptr %9, align 8, !tbaa !11
  %351 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %349, i64 noundef %350)
          to label %352 unwind label %66

352:                                              ; preds = %348
  %353 = call noundef double @_ZN13TPPLPartition8DistanceERK9TPPLPointS2_(ptr noundef nonnull align 1 dereferenceable(1) %32, ptr noundef nonnull align 8 dereferenceable(16) %347, ptr noundef nonnull align 8 dereferenceable(16) %351)
  store double %353, ptr %22, align 8, !tbaa !16
  br label %354

354:                                              ; preds = %352, %343
  %355 = load ptr, ptr %13, align 8, !tbaa !5
  %356 = load i64, ptr %10, align 8, !tbaa !11
  %357 = getelementptr inbounds ptr, ptr %355, i64 %356
  %358 = load ptr, ptr %357, align 8, !tbaa !5
  %359 = load i64, ptr %8, align 8, !tbaa !11
  %360 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %358, i64 %359
  %361 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %360, i32 0, i32 1
  %362 = load double, ptr %361, align 8, !tbaa !21
  %363 = load ptr, ptr %13, align 8, !tbaa !5
  %364 = load i64, ptr %9, align 8, !tbaa !11
  %365 = getelementptr inbounds ptr, ptr %363, i64 %364
  %366 = load ptr, ptr %365, align 8, !tbaa !5
  %367 = load i64, ptr %10, align 8, !tbaa !11
  %368 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %366, i64 %367
  %369 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %368, i32 0, i32 1
  %370 = load double, ptr %369, align 8, !tbaa !21
  %371 = fadd double %362, %370
  %372 = load double, ptr %21, align 8, !tbaa !16
  %373 = fadd double %371, %372
  %374 = load double, ptr %22, align 8, !tbaa !16
  %375 = fadd double %373, %374
  store double %375, ptr %19, align 8, !tbaa !16
  %376 = load i64, ptr %18, align 8, !tbaa !11
  %377 = icmp eq i64 %376, -1
  br i1 %377, label %382, label %378

378:                                              ; preds = %354
  %379 = load double, ptr %19, align 8, !tbaa !16
  %380 = load double, ptr %20, align 8, !tbaa !16
  %381 = fcmp olt double %379, %380
  br i1 %381, label %382, label %385

382:                                              ; preds = %378, %354
  %383 = load i64, ptr %10, align 8, !tbaa !11
  store i64 %383, ptr %18, align 8, !tbaa !11
  %384 = load double, ptr %19, align 8, !tbaa !16
  store double %384, ptr %20, align 8, !tbaa !16
  br label %385

385:                                              ; preds = %382, %378
  br label %386

386:                                              ; preds = %385, %321, %310
  %387 = load i64, ptr %10, align 8, !tbaa !11
  %388 = add nsw i64 %387, 1
  store i64 %388, ptr %10, align 8, !tbaa !11
  br label %296, !llvm.loop !28

389:                                              ; preds = %296
  %390 = load i64, ptr %18, align 8, !tbaa !11
  %391 = icmp eq i64 %390, -1
  br i1 %391, label %392, label %413

392:                                              ; preds = %389
  store i64 1, ptr %8, align 8, !tbaa !11
  br label %393

393:                                              ; preds = %405, %392
  %394 = load i64, ptr %8, align 8, !tbaa !11
  %395 = load i64, ptr %12, align 8, !tbaa !11
  %396 = icmp slt i64 %394, %395
  br i1 %396, label %397, label %408

397:                                              ; preds = %393
  %398 = load ptr, ptr %13, align 8, !tbaa !5
  %399 = load i64, ptr %8, align 8, !tbaa !11
  %400 = getelementptr inbounds ptr, ptr %398, i64 %399
  %401 = load ptr, ptr %400, align 8, !tbaa !5
  %402 = icmp eq ptr %401, null
  br i1 %402, label %404, label %403

403:                                              ; preds = %397
  call void @_ZdaPv(ptr noundef %401) #9
  br label %404

404:                                              ; preds = %403, %397
  br label %405

405:                                              ; preds = %404
  %406 = load i64, ptr %8, align 8, !tbaa !11
  %407 = add nsw i64 %406, 1
  store i64 %407, ptr %8, align 8, !tbaa !11
  br label %393, !llvm.loop !29

408:                                              ; preds = %393
  %409 = load ptr, ptr %13, align 8, !tbaa !5
  %410 = icmp eq ptr %409, null
  br i1 %410, label %412, label %411

411:                                              ; preds = %408
  call void @_ZdaPv(ptr noundef %409) #9
  br label %412

412:                                              ; preds = %411, %408
  store i32 0, ptr %4, align 4
  store i32 1, ptr %30, align 4
  br label %529

413:                                              ; preds = %389
  %414 = load i64, ptr %18, align 8, !tbaa !11
  %415 = load ptr, ptr %13, align 8, !tbaa !5
  %416 = load i64, ptr %9, align 8, !tbaa !11
  %417 = getelementptr inbounds ptr, ptr %415, i64 %416
  %418 = load ptr, ptr %417, align 8, !tbaa !5
  %419 = load i64, ptr %8, align 8, !tbaa !11
  %420 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %418, i64 %419
  %421 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %420, i32 0, i32 2
  store i64 %414, ptr %421, align 8, !tbaa !22
  %422 = load double, ptr %20, align 8, !tbaa !16
  %423 = load ptr, ptr %13, align 8, !tbaa !5
  %424 = load i64, ptr %9, align 8, !tbaa !11
  %425 = getelementptr inbounds ptr, ptr %423, i64 %424
  %426 = load ptr, ptr %425, align 8, !tbaa !5
  %427 = load i64, ptr %8, align 8, !tbaa !11
  %428 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %426, i64 %427
  %429 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %428, i32 0, i32 1
  store double %422, ptr %429, align 8, !tbaa !21
  br label %430

430:                                              ; preds = %413, %292
  %431 = load i64, ptr %8, align 8, !tbaa !11
  %432 = add nsw i64 %431, 1
  store i64 %432, ptr %8, align 8, !tbaa !11
  br label %273, !llvm.loop !30

433:                                              ; preds = %273
  br label %434

434:                                              ; preds = %433
  %435 = load i64, ptr %11, align 8, !tbaa !11
  %436 = add nsw i64 %435, 1
  store i64 %436, ptr %11, align 8, !tbaa !11
  br label %268, !llvm.loop !31

437:                                              ; preds = %268
  %438 = getelementptr inbounds %"struct.TPPLPartition::Diagonal", ptr %24, i32 0, i32 0
  store i64 0, ptr %438, align 8, !tbaa !32
  %439 = load i64, ptr %12, align 8, !tbaa !11
  %440 = sub nsw i64 %439, 1
  %441 = getelementptr inbounds %"struct.TPPLPartition::Diagonal", ptr %24, i32 0, i32 1
  store i64 %440, ptr %441, align 8, !tbaa !34
  invoke void @_ZNSt7__cxx114listIN13TPPLPartition8DiagonalESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %25, ptr noundef nonnull align 8 dereferenceable(16) %24)
          to label %442 unwind label %66

442:                                              ; preds = %437
  br label %443

443:                                              ; preds = %506, %442
  %444 = call noundef zeroext i1 @_ZNKSt7__cxx114listIN13TPPLPartition8DiagonalESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #7
  %445 = xor i1 %444, true
  br i1 %445, label %446, label %507

446:                                              ; preds = %443
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #7
  %447 = call ptr @_ZNSt7__cxx114listIN13TPPLPartition8DiagonalESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #7
  %448 = getelementptr inbounds %"struct.std::_List_iterator.5", ptr %31, i32 0, i32 0
  store ptr %447, ptr %448, align 8
  %449 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt14_List_iteratorIN13TPPLPartition8DiagonalEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %31) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %23, ptr align 8 %449, i64 16, i1 false), !tbaa.struct !35
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #7
  call void @_ZNSt7__cxx114listIN13TPPLPartition8DiagonalESaIS2_EE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #7
  %450 = load ptr, ptr %13, align 8, !tbaa !5
  %451 = getelementptr inbounds %"struct.TPPLPartition::Diagonal", ptr %23, i32 0, i32 1
  %452 = load i64, ptr %451, align 8, !tbaa !34
  %453 = getelementptr inbounds ptr, ptr %450, i64 %452
  %454 = load ptr, ptr %453, align 8, !tbaa !5
  %455 = getelementptr inbounds %"struct.TPPLPartition::Diagonal", ptr %23, i32 0, i32 0
  %456 = load i64, ptr %455, align 8, !tbaa !32
  %457 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %454, i64 %456
  %458 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %457, i32 0, i32 2
  %459 = load i64, ptr %458, align 8, !tbaa !22
  store i64 %459, ptr %18, align 8, !tbaa !11
  %460 = load i64, ptr %18, align 8, !tbaa !11
  %461 = icmp eq i64 %460, -1
  br i1 %461, label %462, label %463

462:                                              ; preds = %446
  store i32 0, ptr %29, align 4, !tbaa !9
  br label %507

463:                                              ; preds = %446
  %464 = load ptr, ptr %6, align 8, !tbaa !5
  %465 = getelementptr inbounds %"struct.TPPLPartition::Diagonal", ptr %23, i32 0, i32 0
  %466 = load i64, ptr %465, align 8, !tbaa !32
  %467 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %464, i64 noundef %466)
          to label %468 unwind label %66

468:                                              ; preds = %463
  %469 = load ptr, ptr %6, align 8, !tbaa !5
  %470 = load i64, ptr %18, align 8, !tbaa !11
  %471 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %469, i64 noundef %470)
          to label %472 unwind label %66

472:                                              ; preds = %468
  %473 = load ptr, ptr %6, align 8, !tbaa !5
  %474 = getelementptr inbounds %"struct.TPPLPartition::Diagonal", ptr %23, i32 0, i32 1
  %475 = load i64, ptr %474, align 8, !tbaa !34
  %476 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %473, i64 noundef %475)
          to label %477 unwind label %66

477:                                              ; preds = %472
  invoke void @_ZN8TPPLPoly8TriangleER9TPPLPointS1_S1_(ptr noundef nonnull align 8 dereferenceable(17) %26, ptr noundef nonnull align 8 dereferenceable(16) %467, ptr noundef nonnull align 8 dereferenceable(16) %471, ptr noundef nonnull align 8 dereferenceable(16) %476)
          to label %478 unwind label %66

478:                                              ; preds = %477
  %479 = load ptr, ptr %7, align 8, !tbaa !5
  invoke void @_ZNSt7__cxx114listI8TPPLPolySaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %479, ptr noundef nonnull align 8 dereferenceable(17) %26)
          to label %480 unwind label %66

480:                                              ; preds = %478
  %481 = load i64, ptr %18, align 8, !tbaa !11
  %482 = getelementptr inbounds %"struct.TPPLPartition::Diagonal", ptr %23, i32 0, i32 0
  %483 = load i64, ptr %482, align 8, !tbaa !32
  %484 = add nsw i64 %483, 1
  %485 = icmp sgt i64 %481, %484
  br i1 %485, label %486, label %493

486:                                              ; preds = %480
  %487 = getelementptr inbounds %"struct.TPPLPartition::Diagonal", ptr %23, i32 0, i32 0
  %488 = load i64, ptr %487, align 8, !tbaa !32
  %489 = getelementptr inbounds %"struct.TPPLPartition::Diagonal", ptr %24, i32 0, i32 0
  store i64 %488, ptr %489, align 8, !tbaa !32
  %490 = load i64, ptr %18, align 8, !tbaa !11
  %491 = getelementptr inbounds %"struct.TPPLPartition::Diagonal", ptr %24, i32 0, i32 1
  store i64 %490, ptr %491, align 8, !tbaa !34
  invoke void @_ZNSt7__cxx114listIN13TPPLPartition8DiagonalESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %25, ptr noundef nonnull align 8 dereferenceable(16) %24)
          to label %492 unwind label %66

492:                                              ; preds = %486
  br label %493

493:                                              ; preds = %492, %480
  %494 = getelementptr inbounds %"struct.TPPLPartition::Diagonal", ptr %23, i32 0, i32 1
  %495 = load i64, ptr %494, align 8, !tbaa !34
  %496 = load i64, ptr %18, align 8, !tbaa !11
  %497 = add nsw i64 %496, 1
  %498 = icmp sgt i64 %495, %497
  br i1 %498, label %499, label %506

499:                                              ; preds = %493
  %500 = load i64, ptr %18, align 8, !tbaa !11
  %501 = getelementptr inbounds %"struct.TPPLPartition::Diagonal", ptr %24, i32 0, i32 0
  store i64 %500, ptr %501, align 8, !tbaa !32
  %502 = getelementptr inbounds %"struct.TPPLPartition::Diagonal", ptr %23, i32 0, i32 1
  %503 = load i64, ptr %502, align 8, !tbaa !34
  %504 = getelementptr inbounds %"struct.TPPLPartition::Diagonal", ptr %24, i32 0, i32 1
  store i64 %503, ptr %504, align 8, !tbaa !34
  invoke void @_ZNSt7__cxx114listIN13TPPLPartition8DiagonalESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %25, ptr noundef nonnull align 8 dereferenceable(16) %24)
          to label %505 unwind label %66

505:                                              ; preds = %499
  br label %506

506:                                              ; preds = %505, %493
  br label %443, !llvm.loop !36

507:                                              ; preds = %462, %443
  store i64 1, ptr %8, align 8, !tbaa !11
  br label %508

508:                                              ; preds = %520, %507
  %509 = load i64, ptr %8, align 8, !tbaa !11
  %510 = load i64, ptr %12, align 8, !tbaa !11
  %511 = icmp slt i64 %509, %510
  br i1 %511, label %512, label %523

512:                                              ; preds = %508
  %513 = load ptr, ptr %13, align 8, !tbaa !5
  %514 = load i64, ptr %8, align 8, !tbaa !11
  %515 = getelementptr inbounds ptr, ptr %513, i64 %514
  %516 = load ptr, ptr %515, align 8, !tbaa !5
  %517 = icmp eq ptr %516, null
  br i1 %517, label %519, label %518

518:                                              ; preds = %512
  call void @_ZdaPv(ptr noundef %516) #9
  br label %519

519:                                              ; preds = %518, %512
  br label %520

520:                                              ; preds = %519
  %521 = load i64, ptr %8, align 8, !tbaa !11
  %522 = add nsw i64 %521, 1
  store i64 %522, ptr %8, align 8, !tbaa !11
  br label %508, !llvm.loop !37

523:                                              ; preds = %508
  %524 = load ptr, ptr %13, align 8, !tbaa !5
  %525 = icmp eq ptr %524, null
  br i1 %525, label %527, label %526

526:                                              ; preds = %523
  call void @_ZdaPv(ptr noundef %524) #9
  br label %527

527:                                              ; preds = %526, %523
  %528 = load i32, ptr %29, align 4, !tbaa !9
  store i32 %528, ptr %4, align 4
  store i32 1, ptr %30, align 4
  br label %529

529:                                              ; preds = %527, %412
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #7
  call void @_ZN8TPPLPolyD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %26) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %26) #7
  call void @_ZNSt7__cxx1110_List_baseIN13TPPLPartition8DiagonalESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  %530 = load i32, ptr %4, align 4
  ret i32 %530

531:                                              ; preds = %66, %62
  call void @llvm.lifetime.end.p0(i64 24, ptr %26) #7
  call void @_ZNSt7__cxx1110_List_baseIN13TPPLPartition8DiagonalESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %532

532:                                              ; preds = %531
  %533 = load ptr, ptr %27, align 8
  %534 = load i32, ptr %28, align 4
  %535 = insertvalue { ptr, i32 } poison, ptr %533, 0
  %536 = insertvalue { ptr, i32 } %535, i32 %534, 1
  resume { ptr, i32 } %536
}

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt7__cxx1110_List_baseIN13TPPLPartition8DiagonalESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = !{i64 0, i64 8, !16, i64 8, i64 8, !16}
!16 = !{!17, !17, i64 0}
!17 = !{!"double", !7, i64 0}
!18 = !{!19, !20, i64 0}
!19 = !{!"_ZTSN13TPPLPartition7DPStateE", !20, i64 0, !17, i64 8, !12, i64 16}
!20 = !{!"bool", !7, i64 0}
!21 = !{!19, !17, i64 8}
!22 = !{!19, !12, i64 16}
!23 = distinct !{!23, !14}
!24 = distinct !{!24, !14}
!25 = distinct !{!25, !14}
!26 = !{i8 0, i8 2}
!27 = !{}
!28 = distinct !{!28, !14}
!29 = distinct !{!29, !14}
!30 = distinct !{!30, !14}
!31 = distinct !{!31, !14}
!32 = !{!33, !12, i64 0}
!33 = !{!"_ZTSN13TPPLPartition8DiagonalE", !12, i64 0, !12, i64 8}
!34 = !{!33, !12, i64 8}
!35 = !{i64 0, i64 8, !11, i64 8, i64 8, !11}
!36 = distinct !{!36, !14}
!37 = distinct !{!37, !14}


; 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.TPPLPoint = type { double, double }
%"struct.TPPLPartition::Diagonal" = type { i64, i64 }
%"class.std::__cxx11::list.0" = type { %"class.std::__cxx11::_List_base.1" }
%"class.std::__cxx11::_List_base.1" = type { %"struct.std::__cxx11::_List_base<TPPLPartition::Diagonal, std::allocator<TPPLPartition::Diagonal>>::_List_impl" }
%"struct.std::__cxx11::_List_base<TPPLPartition::Diagonal, std::allocator<TPPLPartition::Diagonal>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { ptr, ptr }
%class.TPPLPoly = type <{ ptr, i64, i8, [7 x i8] }>
%"struct.std::_List_iterator.5" = type { ptr }
%"struct.TPPLPartition::DPState" = type { i8, double, i64 }

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8TPPLPoly8TriangleER9TPPLPointS1_S1_(ptr noundef nonnull align 8 dereferenceable(17), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3 align 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) #4

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef double @_ZN13TPPLPartition8DistanceERK9TPPLPointS2_(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #6 align 2

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 2) i32 @_ZN13TPPLPartition15Triangulate_OPTEP8TPPLPolyPNSt7__cxx114listIS0_SaIS0_EEE(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %struct.TPPLPoint, align 8
  %5 = alloca %struct.TPPLPoint, align 8
  %6 = alloca %struct.TPPLPoint, align 8
  %7 = alloca %struct.TPPLPoint, align 8
  %8 = alloca %"struct.TPPLPartition::Diagonal", align 8
  %9 = alloca %"class.std::__cxx11::list.0", align 8
  %10 = alloca %class.TPPLPoly, align 8
  %11 = alloca %"struct.std::_List_iterator.5", align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #7
  call void @_ZNSt7__cxx114listIN13TPPLPartition8DiagonalESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #7
  invoke void @_ZN8TPPLPolyC1Ev(ptr noundef nonnull align 8 dereferenceable(17) %10)
          to label %12 unwind label %29

12:                                               ; preds = %3
  %13 = call noundef i64 @_ZN8TPPLPoly12GetNumPointsEv(ptr noundef nonnull align 8 dereferenceable(17) %1)
  %14 = icmp ugt i64 %13, 2305843009213693951
  %15 = shl nuw i64 %13, 3
  %16 = select i1 %14, i64 -1, i64 %15
  %17 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %16) #8
          to label %.preheader203 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp

.preheader203:                                    ; preds = %12
  %18 = icmp sgt i64 %13, 1
  br i1 %18, label %.lr.ph, label %.preheader202.thread

.preheader202.thread:                             ; preds = %.preheader203
  %19 = add i64 %13, -1
  br label %._crit_edge.thread

.preheader202:                                    ; preds = %26
  %20 = add nsw i64 %13, -1
  br i1 %18, label %.lr.ph213, label %._crit_edge.thread

.lr.ph:                                           ; preds = %.preheader203, %26
  %.0168208 = phi i64 [ %28, %26 ], [ 1, %.preheader203 ]
  %21 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %.0168208, i64 24)
  %22 = extractvalue { i64, i1 } %21, 1
  %23 = extractvalue { i64, i1 } %21, 0
  %24 = select i1 %22, i64 -1, i64 %23
  %25 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %24) #8
          to label %26 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit

26:                                               ; preds = %.lr.ph
  %27 = getelementptr inbounds ptr, ptr %17, i64 %.0168208
  store ptr %25, ptr %27, align 8, !tbaa !5
  %28 = add nuw nsw i64 %.0168208, 1
  %exitcond.not = icmp eq i64 %28, %13
  br i1 %exitcond.not, label %.preheader202, label %.lr.ph, !llvm.loop !9

29:                                               ; preds = %3
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %190

.loopexit:                                        ; preds = %169, %173, %177, %181
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit:                      ; preds = %.lr.ph210
  %lpad.loopexit198 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit.split-lp.loopexit:    ; preds = %.lr.ph
  %lpad.loopexit204 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp: ; preds = %12, %._crit_edge226
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp:                               ; preds = %.loopexit.split-lp.loopexit, %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp, %.loopexit.split-lp.loopexit.split-lp.loopexit, %.loopexit
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit198, %.loopexit.split-lp.loopexit ], [ %lpad.loopexit204, %.loopexit.split-lp.loopexit.split-lp.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp ]
  call void @_ZN8TPPLPolyD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %10) #7
  br label %190

.loopexit201:                                     ; preds = %.loopexit197
  %exitcond240.not = icmp eq i64 %32, %20
  br i1 %exitcond240.not, label %._crit_edge, label %.lr.ph213, !llvm.loop !11

.lr.ph213:                                        ; preds = %.preheader202, %.loopexit201
  %.1214 = phi i64 [ %32, %.loopexit201 ], [ 0, %.preheader202 ]
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %1, i64 noundef %.1214)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(16) %31, i64 16, i1 false), !tbaa.struct !12
  %32 = add nuw nsw i64 %.1214, 1
  %33 = icmp eq i64 %.1214, 0
  %34 = add nsw i64 %.1214, -1
  %. = select i1 %33, i64 %20, i64 %34
  br label %35

35:                                               ; preds = %.lr.ph213, %.loopexit197
  %.0176211 = phi i64 [ %32, %.lr.ph213 ], [ %63, %.loopexit197 ]
  %36 = getelementptr inbounds ptr, ptr %17, i64 %.0176211
  %37 = load ptr, ptr %36, align 8, !tbaa !5
  %38 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %37, i64 %.1214
  store i8 1, ptr %38, align 8, !tbaa !15
  %39 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %37, i64 %.1214, i32 1
  store double 0.000000e+00, ptr %39, align 8, !tbaa !19
  %40 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %37, i64 %.1214, i32 2
  store i64 -1, ptr %40, align 8, !tbaa !20
  %.not191 = icmp eq i64 %.0176211, %32
  br i1 %.not191, label %.loopexit197, label %41

41:                                               ; preds = %35
  %42 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %1, i64 noundef %.0176211)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %42, i64 16, i1 false), !tbaa.struct !12
  %43 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %1, i64 noundef %.)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %43, i64 16, i1 false)
  %44 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %1, i64 noundef %32)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %44, i64 16, i1 false), !tbaa.struct !12
  %45 = call noundef zeroext i1 @_ZN13TPPLPartition6InConeER9TPPLPointS1_S1_S1_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %5)
  br i1 %45, label %46, label %.loopexit197.sink.split

46:                                               ; preds = %41
  %47 = add nsw i64 %.0176211, -1
  %48 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %1, i64 noundef %47)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %48, i64 16, i1 false), !tbaa.struct !12
  %49 = icmp eq i64 %.0176211, %20
  %50 = add nuw nsw i64 %.0176211, 1
  %.sink253 = select i1 %49, i64 0, i64 %50
  %51 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %1, i64 noundef %.sink253)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %51, i64 16, i1 false)
  %52 = call noundef zeroext i1 @_ZN13TPPLPartition6InConeER9TPPLPointS1_S1_S1_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %4)
  br i1 %52, label %.lr.ph210, label %.loopexit197.sink.split

53:                                               ; preds = %60
  %54 = add nuw nsw i64 %.0179209, 1
  %exitcond239.not = icmp eq i64 %54, %13
  br i1 %exitcond239.not, label %.loopexit197, label %.lr.ph210, !llvm.loop !21

.lr.ph210:                                        ; preds = %46, %53
  %.0179209 = phi i64 [ %54, %53 ], [ 0, %46 ]
  %55 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %1, i64 noundef %.0179209)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %55, i64 16, i1 false), !tbaa.struct !12
  %56 = icmp eq i64 %.0179209, %20
  %57 = add nuw nsw i64 %.0179209, 1
  %.sink254 = select i1 %56, i64 0, i64 %57
  %58 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %1, i64 noundef %.sink254)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %58, i64 16, i1 false)
  %59 = invoke noundef i32 @_ZN13TPPLPartition10IntersectsER9TPPLPointS1_S1_S1_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %7)
          to label %60 unwind label %.loopexit.split-lp.loopexit

60:                                               ; preds = %.lr.ph210
  %.not192 = icmp eq i32 %59, 0
  br i1 %.not192, label %53, label %.loopexit197.sink.split

.loopexit197.sink.split:                          ; preds = %60, %46, %41
  %61 = load ptr, ptr %36, align 8, !tbaa !5
  %62 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %61, i64 %.1214
  store i8 0, ptr %62, align 8, !tbaa !15
  br label %.loopexit197

.loopexit197:                                     ; preds = %53, %.loopexit197.sink.split, %35
  %63 = add nuw nsw i64 %.0176211, 1
  %64 = icmp slt i64 %63, %13
  br i1 %64, label %35, label %.loopexit201, !llvm.loop !22

._crit_edge.thread:                               ; preds = %.preheader202.thread, %.preheader202
  %.ph = phi i64 [ %20, %.preheader202 ], [ %19, %.preheader202.thread ]
  %65 = getelementptr inbounds ptr, ptr %17, i64 %.ph
  %66 = load ptr, ptr %65, align 8, !tbaa !5
  store i8 1, ptr %66, align 8, !tbaa !15
  %67 = getelementptr inbounds i8, ptr %66, i64 8
  store double 0.000000e+00, ptr %67, align 8, !tbaa !19
  %68 = getelementptr inbounds i8, ptr %66, i64 16
  store i64 -1, ptr %68, align 8, !tbaa !20
  br label %._crit_edge226

._crit_edge:                                      ; preds = %.loopexit201
  %69 = getelementptr inbounds ptr, ptr %17, i64 %20
  %70 = load ptr, ptr %69, align 8, !tbaa !5
  store i8 1, ptr %70, align 8, !tbaa !15
  %71 = getelementptr inbounds i8, ptr %70, i64 8
  store double 0.000000e+00, ptr %71, align 8, !tbaa !19
  %72 = getelementptr inbounds i8, ptr %70, i64 16
  store i64 -1, ptr %72, align 8, !tbaa !20
  %.not256 = icmp eq i64 %13, 2
  br i1 %.not256, label %._crit_edge226, label %.preheader195

.preheader195:                                    ; preds = %._crit_edge, %._crit_edge222
  %.0171225 = phi double [ %.1172.lcssa, %._crit_edge222 ], [ undef, %._crit_edge ]
  %.0181224 = phi i64 [ %158, %._crit_edge222 ], [ 2, %._crit_edge ]
  %73 = sub nsw i64 %13, %.0181224
  %74 = icmp sgt i64 %73, 0
  br i1 %74, label %.lr.ph221.preheader, label %._crit_edge222

.lr.ph221.preheader:                              ; preds = %.preheader195
  %.not190.peel = icmp ugt i64 %.0181224, 2
  br label %.lr.ph221

.lr.ph221:                                        ; preds = %.lr.ph221.preheader, %.lr.ph221._crit_edge
  %indvars.iv = phi i64 [ %.0181224, %.lr.ph221.preheader ], [ %indvars.iv.next, %.lr.ph221._crit_edge ]
  %.2220 = phi i64 [ 0, %.lr.ph221.preheader ], [ %81, %.lr.ph221._crit_edge ]
  %.1172219 = phi double [ %.0171225, %.lr.ph221.preheader ], [ %.4175, %.lr.ph221._crit_edge ]
  %75 = add nuw nsw i64 %.2220, %.0181224
  %76 = getelementptr inbounds ptr, ptr %17, i64 %75
  %77 = load ptr, ptr %76, align 8, !tbaa !5
  %78 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %77, i64 %.2220
  %79 = load i8, ptr %78, align 8, !tbaa !15, !range !23, !noundef !24
  %80 = trunc nuw i8 %79 to i1
  %81 = add nuw nsw i64 %.2220, 1
  br i1 %80, label %.peel.begin, label %.lr.ph221._crit_edge

.peel.begin:                                      ; preds = %.lr.ph221
  %82 = getelementptr inbounds ptr, ptr %17, i64 %81
  %83 = load ptr, ptr %82, align 8, !tbaa !5
  %84 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %83, i64 %.2220
  %85 = load i8, ptr %84, align 8, !tbaa !15, !range !23, !noundef !24
  %86 = trunc nuw i8 %85 to i1
  br i1 %86, label %87, label %106

87:                                               ; preds = %.peel.begin
  %88 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %77, i64 %81
  %89 = load i8, ptr %88, align 8, !tbaa !15, !range !23, !noundef !24
  %90 = trunc nuw i8 %89 to i1
  br i1 %90, label %91, label %106

91:                                               ; preds = %87
  br i1 %.not190.peel, label %92, label %96

92:                                               ; preds = %91
  %93 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %1, i64 noundef %81)
  %94 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %1, i64 noundef %75)
  %95 = call noundef double @_ZN13TPPLPartition8DistanceERK9TPPLPointS2_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull align 8 dereferenceable(16) %93, ptr noundef nonnull align 8 dereferenceable(16) %94)
  %.pre = load ptr, ptr %82, align 8, !tbaa !5
  %.pre247 = load ptr, ptr %76, align 8, !tbaa !5
  br label %96

96:                                               ; preds = %91, %92
  %97 = phi ptr [ %.pre247, %92 ], [ %77, %91 ]
  %98 = phi ptr [ %.pre, %92 ], [ %83, %91 ]
  %.0169.peel = phi double [ %95, %92 ], [ 0.000000e+00, %91 ]
  %99 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %98, i64 %.2220, i32 1
  %100 = load double, ptr %99, align 8, !tbaa !19
  %101 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %97, i64 %81, i32 1
  %102 = load double, ptr %101, align 8, !tbaa !19
  %103 = fadd double %100, %102
  %104 = fadd double %103, 0.000000e+00
  %105 = fadd double %.0169.peel, %104
  br label %106

106:                                              ; preds = %96, %87, %.peel.begin
  %107 = phi ptr [ %97, %96 ], [ %77, %87 ], [ %77, %.peel.begin ]
  %.1178.peel = phi i64 [ %81, %96 ], [ -1, %87 ], [ -1, %.peel.begin ]
  %.3174.peel = phi double [ %105, %96 ], [ %.1172219, %87 ], [ %.1172219, %.peel.begin ]
  %108 = add nuw i64 %.2220, 2
  %exitcond241.peel.not = icmp eq i64 %108, %indvars.iv
  br i1 %exitcond241.peel.not, label %.loopexit243, label %.peel.next

.peel.next:                                       ; preds = %106, %143
  %109 = phi ptr [ %144, %143 ], [ %107, %106 ]
  %.2173218 = phi double [ %.3174, %143 ], [ %.3174.peel, %106 ]
  %.0177217 = phi i64 [ %.1178, %143 ], [ %.1178.peel, %106 ]
  %.1180216 = phi i64 [ %145, %143 ], [ %108, %106 ]
  %110 = getelementptr inbounds ptr, ptr %17, i64 %.1180216
  %111 = load ptr, ptr %110, align 8, !tbaa !5
  %112 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %111, i64 %.2220
  %113 = load i8, ptr %112, align 8, !tbaa !15, !range !23, !noundef !24
  %114 = trunc nuw i8 %113 to i1
  br i1 %114, label %115, label %143

115:                                              ; preds = %.peel.next
  %116 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %109, i64 %.1180216
  %117 = load i8, ptr %116, align 8, !tbaa !15, !range !23, !noundef !24
  %118 = trunc nuw i8 %117 to i1
  br i1 %118, label %119, label %143

119:                                              ; preds = %115
  %.not = icmp ugt i64 %.1180216, %81
  br i1 %.not, label %120, label %124

120:                                              ; preds = %119
  %121 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %1, i64 noundef %.2220)
  %122 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %1, i64 noundef %.1180216)
  %123 = call noundef double @_ZN13TPPLPartition8DistanceERK9TPPLPointS2_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull align 8 dereferenceable(16) %121, ptr noundef nonnull align 8 dereferenceable(16) %122)
  br label %124

124:                                              ; preds = %119, %120
  %.0170 = phi double [ %123, %120 ], [ 0.000000e+00, %119 ]
  %125 = add nuw nsw i64 %.1180216, 1
  %.not190 = icmp ugt i64 %75, %125
  br i1 %.not190, label %126, label %130

126:                                              ; preds = %124
  %127 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %1, i64 noundef %.1180216)
  %128 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %1, i64 noundef %75)
  %129 = call noundef double @_ZN13TPPLPartition8DistanceERK9TPPLPointS2_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull align 8 dereferenceable(16) %127, ptr noundef nonnull align 8 dereferenceable(16) %128)
  br label %130

130:                                              ; preds = %124, %126
  %.0169 = phi double [ %129, %126 ], [ 0.000000e+00, %124 ]
  %131 = load ptr, ptr %110, align 8, !tbaa !5
  %132 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %131, i64 %.2220, i32 1
  %133 = load double, ptr %132, align 8, !tbaa !19
  %134 = load ptr, ptr %76, align 8, !tbaa !5
  %135 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %134, i64 %.1180216, i32 1
  %136 = load double, ptr %135, align 8, !tbaa !19
  %137 = fadd double %133, %136
  %138 = fadd double %.0170, %137
  %139 = fadd double %.0169, %138
  %140 = icmp eq i64 %.0177217, -1
  %141 = fcmp olt double %139, %.2173218
  %or.cond = select i1 %140, i1 true, i1 %141
  br i1 %or.cond, label %142, label %143

142:                                              ; preds = %130
  br label %143

143:                                              ; preds = %130, %142, %115, %.peel.next
  %144 = phi ptr [ %134, %142 ], [ %109, %115 ], [ %109, %.peel.next ], [ %134, %130 ]
  %.1178 = phi i64 [ %.1180216, %142 ], [ %.0177217, %115 ], [ %.0177217, %.peel.next ], [ %.0177217, %130 ]
  %.3174 = phi double [ %139, %142 ], [ %.2173218, %115 ], [ %.2173218, %.peel.next ], [ %.2173218, %130 ]
  %145 = add nuw i64 %.1180216, 1
  %exitcond241.not = icmp eq i64 %145, %indvars.iv
  br i1 %exitcond241.not, label %.loopexit243, label %.peel.next, !llvm.loop !25

.loopexit243:                                     ; preds = %143, %106
  %146 = phi ptr [ %107, %106 ], [ %144, %143 ]
  %.1178.lcssa = phi i64 [ %.1178.peel, %106 ], [ %.1178, %143 ]
  %.3174.lcssa = phi double [ %.3174.peel, %106 ], [ %.3174, %143 ]
  %147 = icmp eq i64 %.1178.lcssa, -1
  br i1 %147, label %.lr.ph237, label %154

.lr.ph237:                                        ; preds = %.loopexit243, %152
  %.3236 = phi i64 [ %153, %152 ], [ 1, %.loopexit243 ]
  %148 = getelementptr inbounds ptr, ptr %17, i64 %.3236
  %149 = load ptr, ptr %148, align 8, !tbaa !5
  %150 = icmp eq ptr %149, null
  br i1 %150, label %152, label %151

151:                                              ; preds = %.lr.ph237
  call void @_ZdaPv(ptr noundef nonnull %149) #9
  br label %152

152:                                              ; preds = %.lr.ph237, %151
  %153 = add nuw nsw i64 %.3236, 1
  %exitcond246.not = icmp eq i64 %153, %13
  br i1 %exitcond246.not, label %._crit_edge238, label %.lr.ph237, !llvm.loop !27

154:                                              ; preds = %.loopexit243
  %155 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %146, i64 %.2220, i32 2
  store i64 %.1178.lcssa, ptr %155, align 8, !tbaa !20
  %156 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %146, i64 %.2220, i32 1
  store double %.3174.lcssa, ptr %156, align 8, !tbaa !19
  br label %.lr.ph221._crit_edge

.lr.ph221._crit_edge:                             ; preds = %.lr.ph221, %154
  %.4175 = phi double [ %.3174.lcssa, %154 ], [ %.1172219, %.lr.ph221 ]
  %157 = icmp slt i64 %81, %73
  %indvars.iv.next = add nuw i64 %indvars.iv, 1
  br i1 %157, label %.lr.ph221, label %._crit_edge222, !llvm.loop !28

._crit_edge222:                                   ; preds = %.lr.ph221._crit_edge, %.preheader195
  %.1172.lcssa = phi double [ %.0171225, %.preheader195 ], [ %.4175, %.lr.ph221._crit_edge ]
  %158 = add nuw nsw i64 %.0181224, 1
  %exitcond244.not = icmp eq i64 %158, %13
  br i1 %exitcond244.not, label %._crit_edge226, label %.preheader195, !llvm.loop !29

._crit_edge226:                                   ; preds = %._crit_edge222, %._crit_edge.thread, %._crit_edge
  %159 = phi i64 [ %.ph, %._crit_edge.thread ], [ %20, %._crit_edge ], [ %20, %._crit_edge222 ]
  store i64 0, ptr %8, align 8, !tbaa !30
  %160 = getelementptr inbounds i8, ptr %8, i64 8
  store i64 %159, ptr %160, align 8, !tbaa !32
  invoke void @_ZNSt7__cxx114listIN13TPPLPartition8DiagonalESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(16) %8)
          to label %.preheader194 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp

.preheader194:                                    ; preds = %._crit_edge226
  %161 = call noundef zeroext i1 @_ZNKSt7__cxx114listIN13TPPLPartition8DiagonalESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  br i1 %161, label %._crit_edge228, label %.lr.ph227

.lr.ph227:                                        ; preds = %.preheader194, %182
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #7
  %162 = call ptr @_ZNSt7__cxx114listIN13TPPLPartition8DiagonalESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  store ptr %162, ptr %11, align 8
  %163 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt14_List_iteratorIN13TPPLPartition8DiagonalEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  %.sroa.0.0.copyload = load i64, ptr %163, align 8, !tbaa !33
  %.sroa.8.0..sroa_idx = getelementptr inbounds i8, ptr %163, i64 8
  %.sroa.8.0.copyload = load i64, ptr %.sroa.8.0..sroa_idx, align 8, !tbaa !33
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  call void @_ZNSt7__cxx114listIN13TPPLPartition8DiagonalESaIS2_EE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  %164 = getelementptr inbounds ptr, ptr %17, i64 %.sroa.8.0.copyload
  %165 = load ptr, ptr %164, align 8, !tbaa !5
  %166 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %165, i64 %.sroa.0.0.copyload, i32 2
  %167 = load i64, ptr %166, align 8, !tbaa !20
  %168 = icmp eq i64 %167, -1
  br i1 %168, label %._crit_edge228, label %169

169:                                              ; preds = %.lr.ph227
  %170 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %1, i64 noundef %.sroa.0.0.copyload)
  %171 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %1, i64 noundef %167)
  %172 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %1, i64 noundef %.sroa.8.0.copyload)
  invoke void @_ZN8TPPLPoly8TriangleER9TPPLPointS1_S1_(ptr noundef nonnull align 8 dereferenceable(17) %10, ptr noundef nonnull align 8 dereferenceable(16) %170, ptr noundef nonnull align 8 dereferenceable(16) %171, ptr noundef nonnull align 8 dereferenceable(16) %172)
          to label %173 unwind label %.loopexit

173:                                              ; preds = %169
  invoke void @_ZNSt7__cxx114listI8TPPLPolySaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(17) %10)
          to label %174 unwind label %.loopexit

174:                                              ; preds = %173
  %175 = add nsw i64 %.sroa.0.0.copyload, 1
  %176 = icmp sgt i64 %167, %175
  br i1 %176, label %177, label %178

177:                                              ; preds = %174
  store i64 %.sroa.0.0.copyload, ptr %8, align 8, !tbaa !30
  store i64 %167, ptr %160, align 8, !tbaa !32
  invoke void @_ZNSt7__cxx114listIN13TPPLPartition8DiagonalESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(16) %8)
          to label %178 unwind label %.loopexit

178:                                              ; preds = %177, %174
  %179 = add nuw nsw i64 %167, 1
  %180 = icmp sgt i64 %.sroa.8.0.copyload, %179
  br i1 %180, label %181, label %182

181:                                              ; preds = %178
  store i64 %167, ptr %8, align 8, !tbaa !30
  store i64 %.sroa.8.0.copyload, ptr %160, align 8, !tbaa !32
  invoke void @_ZNSt7__cxx114listIN13TPPLPartition8DiagonalESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(16) %8)
          to label %182 unwind label %.loopexit

182:                                              ; preds = %181, %178
  %183 = call noundef zeroext i1 @_ZNKSt7__cxx114listIN13TPPLPartition8DiagonalESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  br i1 %183, label %._crit_edge228, label %.lr.ph227, !llvm.loop !34

._crit_edge228:                                   ; preds = %182, %.lr.ph227, %.preheader194
  %.0 = phi i32 [ 1, %.preheader194 ], [ 0, %.lr.ph227 ], [ 1, %182 ]
  br i1 %18, label %.lr.ph234, label %._crit_edge238

.lr.ph234:                                        ; preds = %._crit_edge228, %188
  %.4232 = phi i64 [ %189, %188 ], [ 1, %._crit_edge228 ]
  %184 = getelementptr inbounds ptr, ptr %17, i64 %.4232
  %185 = load ptr, ptr %184, align 8, !tbaa !5
  %186 = icmp eq ptr %185, null
  br i1 %186, label %188, label %187

187:                                              ; preds = %.lr.ph234
  call void @_ZdaPv(ptr noundef nonnull %185) #9
  br label %188

188:                                              ; preds = %.lr.ph234, %187
  %189 = add nuw nsw i64 %.4232, 1
  %exitcond245.not = icmp eq i64 %189, %13
  br i1 %exitcond245.not, label %._crit_edge238, label %.lr.ph234, !llvm.loop !35

._crit_edge238:                                   ; preds = %152, %188, %._crit_edge228
  %.0167 = phi i32 [ %.0, %._crit_edge228 ], [ %.0, %188 ], [ 0, %152 ]
  call void @_ZdaPv(ptr noundef nonnull %17) #9
  call void @_ZN8TPPLPolyD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %10) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #7
  call void @_ZNSt7__cxx1110_List_baseIN13TPPLPartition8DiagonalESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #7
  ret i32 %.0167

190:                                              ; preds = %.loopexit.split-lp, %29
  %.pn = phi { ptr, i32 } [ %lpad.phi, %.loopexit.split-lp ], [ %30, %29 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #7
  call void @_ZNSt7__cxx1110_List_baseIN13TPPLPartition8DiagonalESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #7
  resume { ptr, i32 } %.pn
}

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

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

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

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

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

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

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

declare void @_ZN8TPPLPolyC1Ev(ptr) local_unnamed_addr

declare void @_ZN8TPPLPolyD1Ev(ptr) local_unnamed_addr

attributes #0 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { 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 = distinct !{!11, !10}
!12 = !{i64 0, i64 8, !13, i64 8, i64 8, !13}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{!16, !17, i64 0}
!16 = !{!"_ZTSN13TPPLPartition7DPStateE", !17, i64 0, !14, i64 8, !18, i64 16}
!17 = !{!"bool", !7, i64 0}
!18 = !{!"long", !7, i64 0}
!19 = !{!16, !14, i64 8}
!20 = !{!16, !18, i64 16}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !10}
!23 = !{i8 0, i8 2}
!24 = !{}
!25 = distinct !{!25, !10, !26}
!26 = !{!"llvm.loop.peeled.count", i32 1}
!27 = distinct !{!27, !10}
!28 = distinct !{!28, !10}
!29 = distinct !{!29, !10}
!30 = !{!31, !18, i64 0}
!31 = !{!"_ZTSN13TPPLPartition8DiagonalE", !18, i64 0, !18, i64 8}
!32 = !{!31, !18, i64 8}
!33 = !{!18, !18, i64 0}
!34 = distinct !{!34, !10}
!35 = distinct !{!35, !10}


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