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

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

%struct.TPPLPoint = type { double, double, i32 }
%"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(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_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
  %33 = load ptr, ptr %6, align 8, !tbaa !5
  %34 = call noundef zeroext i1 @_ZNK8TPPLPoly5ValidEv(ptr noundef nonnull align 8 dereferenceable(17) %33)
  br i1 %34, label %36, label %35

35:                                               ; preds = %3
  store i32 0, ptr %4, align 4
  br label %535

36:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #8
  store ptr null, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %17) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %25) #8
  call void @_ZNSt7__cxx114listIN13TPPLPartition8DiagonalESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %26) #8
  invoke void @_ZN8TPPLPolyC1Ev(ptr noundef nonnull align 8 dereferenceable(17) %26)
          to label %37 unwind label %66

37:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #8
  store i32 1, ptr %29, align 4, !tbaa !9
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = invoke noundef i64 @_ZNK8TPPLPoly12GetNumPointsEv(ptr noundef nonnull align 8 dereferenceable(17) %38)
          to label %40 unwind label %70

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

47:                                               ; preds = %40
  store ptr %46, ptr %13, align 8, !tbaa !5
  store i64 1, ptr %8, align 8, !tbaa !11
  br label %48

48:                                               ; preds = %63, %47
  %49 = load i64, ptr %8, align 8, !tbaa !11
  %50 = load i64, ptr %12, align 8, !tbaa !11
  %51 = icmp slt i64 %49, %50
  br i1 %51, label %52, label %74

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

59:                                               ; preds = %52
  %60 = load ptr, ptr %13, align 8, !tbaa !5
  %61 = load i64, ptr %8, align 8, !tbaa !11
  %62 = getelementptr inbounds ptr, ptr %60, i64 %61
  store ptr %58, ptr %62, align 8, !tbaa !5
  br label %63

63:                                               ; preds = %59
  %64 = load i64, ptr %8, align 8, !tbaa !11
  %65 = add nsw i64 %64, 1
  store i64 %65, ptr %8, align 8, !tbaa !11
  br label %48, !llvm.loop !13

66:                                               ; preds = %36
  %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
  br label %534

70:                                               ; preds = %503, %490, %482, %481, %476, %472, %467, %441, %352, %348, %336, %332, %225, %219, %215, %206, %185, %181, %170, %164, %145, %141, %130, %124, %117, %80, %52, %40, %37
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %27, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %28, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #8
  call void @_ZN8TPPLPolyD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %26) #8
  br label %534

74:                                               ; preds = %48
  store i64 0, ptr %8, align 8, !tbaa !11
  br label %75

75:                                               ; preds = %247, %74
  %76 = load i64, ptr %8, align 8, !tbaa !11
  %77 = load i64, ptr %12, align 8, !tbaa !11
  %78 = sub nsw i64 %77, 1
  %79 = icmp slt i64 %76, %78
  br i1 %79, label %80, label %250

80:                                               ; preds = %75
  %81 = load ptr, ptr %6, align 8, !tbaa !5
  %82 = load i64, ptr %8, align 8, !tbaa !11
  %83 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %81, i64 noundef %82)
          to label %84 unwind label %70

84:                                               ; preds = %80
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %14, ptr align 8 %83, i64 24, i1 false), !tbaa.struct !15
  %85 = load i64, ptr %8, align 8, !tbaa !11
  %86 = add nsw i64 %85, 1
  store i64 %86, ptr %9, align 8, !tbaa !11
  br label %87

87:                                               ; preds = %243, %84
  %88 = load i64, ptr %9, align 8, !tbaa !11
  %89 = load i64, ptr %12, align 8, !tbaa !11
  %90 = icmp slt i64 %88, %89
  br i1 %90, label %91, label %246

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

117:                                              ; preds = %91
  %118 = load ptr, ptr %6, align 8, !tbaa !5
  %119 = load i64, ptr %9, align 8, !tbaa !11
  %120 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %118, i64 noundef %119)
          to label %121 unwind label %70

121:                                              ; preds = %117
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %15, ptr align 8 %120, i64 24, i1 false), !tbaa.struct !15
  %122 = load i64, ptr %8, align 8, !tbaa !11
  %123 = icmp eq i64 %122, 0
  br i1 %123, label %124, label %130

124:                                              ; preds = %121
  %125 = load ptr, ptr %6, align 8, !tbaa !5
  %126 = load i64, ptr %12, align 8, !tbaa !11
  %127 = sub nsw i64 %126, 1
  %128 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %125, i64 noundef %127)
          to label %129 unwind label %70

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

130:                                              ; preds = %121
  %131 = load ptr, ptr %6, align 8, !tbaa !5
  %132 = load i64, ptr %8, align 8, !tbaa !11
  %133 = sub nsw i64 %132, 1
  %134 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %131, i64 noundef %133)
          to label %135 unwind label %70

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

136:                                              ; preds = %135, %129
  %137 = load i64, ptr %8, align 8, !tbaa !11
  %138 = load i64, ptr %12, align 8, !tbaa !11
  %139 = sub nsw i64 %138, 1
  %140 = icmp eq i64 %137, %139
  br i1 %140, label %141, label %145

141:                                              ; preds = %136
  %142 = load ptr, ptr %6, align 8, !tbaa !5
  %143 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %142, i64 noundef 0)
          to label %144 unwind label %70

144:                                              ; preds = %141
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %17, ptr align 8 %143, i64 24, i1 false), !tbaa.struct !15
  br label %151

145:                                              ; preds = %136
  %146 = load ptr, ptr %6, align 8, !tbaa !5
  %147 = load i64, ptr %8, align 8, !tbaa !11
  %148 = add nsw i64 %147, 1
  %149 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %146, i64 noundef %148)
          to label %150 unwind label %70

150:                                              ; preds = %145
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %17, ptr align 8 %149, i64 24, i1 false), !tbaa.struct !15
  br label %151

151:                                              ; preds = %150, %144
  %152 = call noundef zeroext i1 @_ZN13TPPLPartition6InConeER9TPPLPointS1_S1_S1_(ptr noundef nonnull align 1 dereferenceable(1) %32, ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(24) %17, ptr noundef nonnull align 8 dereferenceable(24) %15)
  br i1 %152, label %161, label %153

153:                                              ; preds = %151
  %154 = load ptr, ptr %13, align 8, !tbaa !5
  %155 = load i64, ptr %9, align 8, !tbaa !11
  %156 = getelementptr inbounds ptr, ptr %154, i64 %155
  %157 = load ptr, ptr %156, align 8, !tbaa !5
  %158 = load i64, ptr %8, align 8, !tbaa !11
  %159 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %157, i64 %158
  %160 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %159, i32 0, i32 0
  store i8 0, ptr %160, align 8, !tbaa !18
  br label %243

161:                                              ; preds = %151
  %162 = load i64, ptr %9, align 8, !tbaa !11
  %163 = icmp eq i64 %162, 0
  br i1 %163, label %164, label %170

164:                                              ; preds = %161
  %165 = load ptr, ptr %6, align 8, !tbaa !5
  %166 = load i64, ptr %12, align 8, !tbaa !11
  %167 = sub nsw i64 %166, 1
  %168 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %165, i64 noundef %167)
          to label %169 unwind label %70

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

170:                                              ; preds = %161
  %171 = load ptr, ptr %6, align 8, !tbaa !5
  %172 = load i64, ptr %9, align 8, !tbaa !11
  %173 = sub nsw i64 %172, 1
  %174 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %171, i64 noundef %173)
          to label %175 unwind label %70

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

176:                                              ; preds = %175, %169
  %177 = load i64, ptr %9, align 8, !tbaa !11
  %178 = load i64, ptr %12, align 8, !tbaa !11
  %179 = sub nsw i64 %178, 1
  %180 = icmp eq i64 %177, %179
  br i1 %180, label %181, label %185

181:                                              ; preds = %176
  %182 = load ptr, ptr %6, align 8, !tbaa !5
  %183 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %182, i64 noundef 0)
          to label %184 unwind label %70

184:                                              ; preds = %181
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %17, ptr align 8 %183, i64 24, i1 false), !tbaa.struct !15
  br label %191

185:                                              ; preds = %176
  %186 = load ptr, ptr %6, align 8, !tbaa !5
  %187 = load i64, ptr %9, align 8, !tbaa !11
  %188 = add nsw i64 %187, 1
  %189 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %186, i64 noundef %188)
          to label %190 unwind label %70

190:                                              ; preds = %185
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %17, ptr align 8 %189, i64 24, i1 false), !tbaa.struct !15
  br label %191

191:                                              ; preds = %190, %184
  %192 = call noundef zeroext i1 @_ZN13TPPLPartition6InConeER9TPPLPointS1_S1_S1_(ptr noundef nonnull align 1 dereferenceable(1) %32, ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %17, ptr noundef nonnull align 8 dereferenceable(24) %14)
  br i1 %192, label %201, label %193

193:                                              ; preds = %191
  %194 = load ptr, ptr %13, align 8, !tbaa !5
  %195 = load i64, ptr %9, align 8, !tbaa !11
  %196 = getelementptr inbounds ptr, ptr %194, i64 %195
  %197 = load ptr, ptr %196, align 8, !tbaa !5
  %198 = load i64, ptr %8, align 8, !tbaa !11
  %199 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %197, i64 %198
  %200 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %199, i32 0, i32 0
  store i8 0, ptr %200, align 8, !tbaa !18
  br label %243

201:                                              ; preds = %191
  store i64 0, ptr %10, align 8, !tbaa !11
  br label %202

202:                                              ; preds = %238, %201
  %203 = load i64, ptr %10, align 8, !tbaa !11
  %204 = load i64, ptr %12, align 8, !tbaa !11
  %205 = icmp slt i64 %203, %204
  br i1 %205, label %206, label %241

206:                                              ; preds = %202
  %207 = load ptr, ptr %6, align 8, !tbaa !5
  %208 = load i64, ptr %10, align 8, !tbaa !11
  %209 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %207, i64 noundef %208)
          to label %210 unwind label %70

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

215:                                              ; preds = %210
  %216 = load ptr, ptr %6, align 8, !tbaa !5
  %217 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %216, i64 noundef 0)
          to label %218 unwind label %70

218:                                              ; preds = %215
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %17, ptr align 8 %217, i64 24, i1 false), !tbaa.struct !15
  br label %225

219:                                              ; preds = %210
  %220 = load ptr, ptr %6, align 8, !tbaa !5
  %221 = load i64, ptr %10, align 8, !tbaa !11
  %222 = add nsw i64 %221, 1
  %223 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %220, i64 noundef %222)
          to label %224 unwind label %70

224:                                              ; preds = %219
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %17, ptr align 8 %223, i64 24, i1 false), !tbaa.struct !15
  br label %225

225:                                              ; preds = %224, %218
  %226 = invoke noundef i32 @_ZN13TPPLPartition10IntersectsER9TPPLPointS1_S1_S1_(ptr noundef nonnull align 1 dereferenceable(1) %32, ptr noundef nonnull align 8 dereferenceable(24) %14, ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 8 dereferenceable(24) %17)
          to label %227 unwind label %70

227:                                              ; preds = %225
  %228 = icmp ne i32 %226, 0
  br i1 %228, label %229, label %237

229:                                              ; preds = %227
  %230 = load ptr, ptr %13, align 8, !tbaa !5
  %231 = load i64, ptr %9, align 8, !tbaa !11
  %232 = getelementptr inbounds ptr, ptr %230, i64 %231
  %233 = load ptr, ptr %232, align 8, !tbaa !5
  %234 = load i64, ptr %8, align 8, !tbaa !11
  %235 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %233, i64 %234
  %236 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %235, i32 0, i32 0
  store i8 0, ptr %236, align 8, !tbaa !18
  br label %241

237:                                              ; preds = %227
  br label %238

238:                                              ; preds = %237
  %239 = load i64, ptr %10, align 8, !tbaa !11
  %240 = add nsw i64 %239, 1
  store i64 %240, ptr %10, align 8, !tbaa !11
  br label %202, !llvm.loop !23

241:                                              ; preds = %229, %202
  br label %242

242:                                              ; preds = %241, %91
  br label %243

243:                                              ; preds = %242, %193, %153
  %244 = load i64, ptr %9, align 8, !tbaa !11
  %245 = add nsw i64 %244, 1
  store i64 %245, ptr %9, align 8, !tbaa !11
  br label %87, !llvm.loop !24

246:                                              ; preds = %87
  br label %247

247:                                              ; preds = %246
  %248 = load i64, ptr %8, align 8, !tbaa !11
  %249 = add nsw i64 %248, 1
  store i64 %249, ptr %8, align 8, !tbaa !11
  br label %75, !llvm.loop !25

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

272:                                              ; preds = %438, %250
  %273 = load i64, ptr %11, align 8, !tbaa !11
  %274 = load i64, ptr %12, align 8, !tbaa !11
  %275 = icmp slt i64 %273, %274
  br i1 %275, label %276, label %441

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

277:                                              ; preds = %434, %276
  %278 = load i64, ptr %8, align 8, !tbaa !11
  %279 = load i64, ptr %12, align 8, !tbaa !11
  %280 = load i64, ptr %11, align 8, !tbaa !11
  %281 = sub nsw i64 %279, %280
  %282 = icmp slt i64 %278, %281
  br i1 %282, label %283, label %437

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

296:                                              ; preds = %283
  br label %434

297:                                              ; preds = %283
  store i64 -1, ptr %18, align 8, !tbaa !11
  %298 = load i64, ptr %8, align 8, !tbaa !11
  %299 = add nsw i64 %298, 1
  store i64 %299, ptr %10, align 8, !tbaa !11
  br label %300

300:                                              ; preds = %390, %297
  %301 = load i64, ptr %10, align 8, !tbaa !11
  %302 = load i64, ptr %9, align 8, !tbaa !11
  %303 = icmp slt i64 %301, %302
  br i1 %303, label %304, label %393

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

314:                                              ; preds = %304
  br label %390

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

325:                                              ; preds = %315
  br label %390

326:                                              ; preds = %315
  %327 = load i64, ptr %10, align 8, !tbaa !11
  %328 = load i64, ptr %8, align 8, !tbaa !11
  %329 = add nsw i64 %328, 1
  %330 = icmp sle i64 %327, %329
  br i1 %330, label %331, label %332

331:                                              ; preds = %326
  store double 0.000000e+00, ptr %21, align 8, !tbaa !16
  br label %342

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

336:                                              ; preds = %332
  %337 = load ptr, ptr %6, align 8, !tbaa !5
  %338 = load i64, ptr %10, align 8, !tbaa !11
  %339 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %337, i64 noundef %338)
          to label %340 unwind label %70

340:                                              ; preds = %336
  %341 = call noundef double @_ZN13TPPLPartition8DistanceERK9TPPLPointS2_(ptr noundef nonnull align 1 dereferenceable(1) %32, ptr noundef nonnull align 8 dereferenceable(24) %335, ptr noundef nonnull align 8 dereferenceable(24) %339)
  store double %341, ptr %21, align 8, !tbaa !16
  br label %342

342:                                              ; preds = %340, %331
  %343 = load i64, ptr %9, align 8, !tbaa !11
  %344 = load i64, ptr %10, align 8, !tbaa !11
  %345 = add nsw i64 %344, 1
  %346 = icmp sle i64 %343, %345
  br i1 %346, label %347, label %348

347:                                              ; preds = %342
  store double 0.000000e+00, ptr %22, align 8, !tbaa !16
  br label %358

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

352:                                              ; preds = %348
  %353 = load ptr, ptr %6, align 8, !tbaa !5
  %354 = load i64, ptr %9, align 8, !tbaa !11
  %355 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %353, i64 noundef %354)
          to label %356 unwind label %70

356:                                              ; preds = %352
  %357 = call noundef double @_ZN13TPPLPartition8DistanceERK9TPPLPointS2_(ptr noundef nonnull align 1 dereferenceable(1) %32, ptr noundef nonnull align 8 dereferenceable(24) %351, ptr noundef nonnull align 8 dereferenceable(24) %355)
  store double %357, ptr %22, align 8, !tbaa !16
  br label %358

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

382:                                              ; preds = %358
  %383 = load double, ptr %19, align 8, !tbaa !16
  %384 = load double, ptr %20, align 8, !tbaa !16
  %385 = fcmp olt double %383, %384
  br i1 %385, label %386, label %389

386:                                              ; preds = %382, %358
  %387 = load i64, ptr %10, align 8, !tbaa !11
  store i64 %387, ptr %18, align 8, !tbaa !11
  %388 = load double, ptr %19, align 8, !tbaa !16
  store double %388, ptr %20, align 8, !tbaa !16
  br label %389

389:                                              ; preds = %386, %382
  br label %390

390:                                              ; preds = %389, %325, %314
  %391 = load i64, ptr %10, align 8, !tbaa !11
  %392 = add nsw i64 %391, 1
  store i64 %392, ptr %10, align 8, !tbaa !11
  br label %300, !llvm.loop !28

393:                                              ; preds = %300
  %394 = load i64, ptr %18, align 8, !tbaa !11
  %395 = icmp eq i64 %394, -1
  br i1 %395, label %396, label %417

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

397:                                              ; preds = %409, %396
  %398 = load i64, ptr %8, align 8, !tbaa !11
  %399 = load i64, ptr %12, align 8, !tbaa !11
  %400 = icmp slt i64 %398, %399
  br i1 %400, label %401, label %412

401:                                              ; preds = %397
  %402 = load ptr, ptr %13, align 8, !tbaa !5
  %403 = load i64, ptr %8, align 8, !tbaa !11
  %404 = getelementptr inbounds ptr, ptr %402, i64 %403
  %405 = load ptr, ptr %404, align 8, !tbaa !5
  %406 = icmp eq ptr %405, null
  br i1 %406, label %408, label %407

407:                                              ; preds = %401
  call void @_ZdaPv(ptr noundef %405) #10
  br label %408

408:                                              ; preds = %407, %401
  br label %409

409:                                              ; preds = %408
  %410 = load i64, ptr %8, align 8, !tbaa !11
  %411 = add nsw i64 %410, 1
  store i64 %411, ptr %8, align 8, !tbaa !11
  br label %397, !llvm.loop !29

412:                                              ; preds = %397
  %413 = load ptr, ptr %13, align 8, !tbaa !5
  %414 = icmp eq ptr %413, null
  br i1 %414, label %416, label %415

415:                                              ; preds = %412
  call void @_ZdaPv(ptr noundef %413) #10
  br label %416

416:                                              ; preds = %415, %412
  store i32 0, ptr %4, align 4
  store i32 1, ptr %30, align 4
  br label %533

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

434:                                              ; preds = %417, %296
  %435 = load i64, ptr %8, align 8, !tbaa !11
  %436 = add nsw i64 %435, 1
  store i64 %436, ptr %8, align 8, !tbaa !11
  br label %277, !llvm.loop !30

437:                                              ; preds = %277
  br label %438

438:                                              ; preds = %437
  %439 = load i64, ptr %11, align 8, !tbaa !11
  %440 = add nsw i64 %439, 1
  store i64 %440, ptr %11, align 8, !tbaa !11
  br label %272, !llvm.loop !31

441:                                              ; preds = %272
  %442 = getelementptr inbounds %"struct.TPPLPartition::Diagonal", ptr %24, i32 0, i32 0
  store i64 0, ptr %442, align 8, !tbaa !32
  %443 = load i64, ptr %12, align 8, !tbaa !11
  %444 = sub nsw i64 %443, 1
  %445 = getelementptr inbounds %"struct.TPPLPartition::Diagonal", ptr %24, i32 0, i32 1
  store i64 %444, ptr %445, 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 %446 unwind label %70

446:                                              ; preds = %441
  br label %447

447:                                              ; preds = %510, %446
  %448 = call noundef zeroext i1 @_ZNKSt7__cxx114listIN13TPPLPartition8DiagonalESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #8
  %449 = xor i1 %448, true
  br i1 %449, label %450, label %511

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

466:                                              ; preds = %450
  store i32 0, ptr %29, align 4, !tbaa !9
  br label %511

467:                                              ; preds = %450
  %468 = load ptr, ptr %6, align 8, !tbaa !5
  %469 = getelementptr inbounds %"struct.TPPLPartition::Diagonal", ptr %23, i32 0, i32 0
  %470 = load i64, ptr %469, align 8, !tbaa !32
  %471 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %468, i64 noundef %470)
          to label %472 unwind label %70

472:                                              ; preds = %467
  %473 = load ptr, ptr %6, align 8, !tbaa !5
  %474 = load i64, ptr %18, align 8, !tbaa !11
  %475 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %473, i64 noundef %474)
          to label %476 unwind label %70

476:                                              ; preds = %472
  %477 = load ptr, ptr %6, align 8, !tbaa !5
  %478 = getelementptr inbounds %"struct.TPPLPartition::Diagonal", ptr %23, i32 0, i32 1
  %479 = load i64, ptr %478, align 8, !tbaa !34
  %480 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %477, i64 noundef %479)
          to label %481 unwind label %70

481:                                              ; preds = %476
  invoke void @_ZN8TPPLPoly8TriangleER9TPPLPointS1_S1_(ptr noundef nonnull align 8 dereferenceable(17) %26, ptr noundef nonnull align 8 dereferenceable(24) %471, ptr noundef nonnull align 8 dereferenceable(24) %475, ptr noundef nonnull align 8 dereferenceable(24) %480)
          to label %482 unwind label %70

482:                                              ; preds = %481
  %483 = load ptr, ptr %7, align 8, !tbaa !5
  invoke void @_ZNSt7__cxx114listI8TPPLPolySaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %483, ptr noundef nonnull align 8 dereferenceable(17) %26)
          to label %484 unwind label %70

484:                                              ; preds = %482
  %485 = load i64, ptr %18, align 8, !tbaa !11
  %486 = getelementptr inbounds %"struct.TPPLPartition::Diagonal", ptr %23, i32 0, i32 0
  %487 = load i64, ptr %486, align 8, !tbaa !32
  %488 = add nsw i64 %487, 1
  %489 = icmp sgt i64 %485, %488
  br i1 %489, label %490, label %497

490:                                              ; preds = %484
  %491 = getelementptr inbounds %"struct.TPPLPartition::Diagonal", ptr %23, i32 0, i32 0
  %492 = load i64, ptr %491, align 8, !tbaa !32
  %493 = getelementptr inbounds %"struct.TPPLPartition::Diagonal", ptr %24, i32 0, i32 0
  store i64 %492, ptr %493, align 8, !tbaa !32
  %494 = load i64, ptr %18, align 8, !tbaa !11
  %495 = getelementptr inbounds %"struct.TPPLPartition::Diagonal", ptr %24, i32 0, i32 1
  store i64 %494, ptr %495, 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 %496 unwind label %70

496:                                              ; preds = %490
  br label %497

497:                                              ; preds = %496, %484
  %498 = getelementptr inbounds %"struct.TPPLPartition::Diagonal", ptr %23, i32 0, i32 1
  %499 = load i64, ptr %498, align 8, !tbaa !34
  %500 = load i64, ptr %18, align 8, !tbaa !11
  %501 = add nsw i64 %500, 1
  %502 = icmp sgt i64 %499, %501
  br i1 %502, label %503, label %510

503:                                              ; preds = %497
  %504 = load i64, ptr %18, align 8, !tbaa !11
  %505 = getelementptr inbounds %"struct.TPPLPartition::Diagonal", ptr %24, i32 0, i32 0
  store i64 %504, ptr %505, align 8, !tbaa !32
  %506 = getelementptr inbounds %"struct.TPPLPartition::Diagonal", ptr %23, i32 0, i32 1
  %507 = load i64, ptr %506, align 8, !tbaa !34
  %508 = getelementptr inbounds %"struct.TPPLPartition::Diagonal", ptr %24, i32 0, i32 1
  store i64 %507, ptr %508, 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 %509 unwind label %70

509:                                              ; preds = %503
  br label %510

510:                                              ; preds = %509, %497
  br label %447, !llvm.loop !36

511:                                              ; preds = %466, %447
  store i64 1, ptr %8, align 8, !tbaa !11
  br label %512

512:                                              ; preds = %524, %511
  %513 = load i64, ptr %8, align 8, !tbaa !11
  %514 = load i64, ptr %12, align 8, !tbaa !11
  %515 = icmp slt i64 %513, %514
  br i1 %515, label %516, label %527

516:                                              ; preds = %512
  %517 = load ptr, ptr %13, align 8, !tbaa !5
  %518 = load i64, ptr %8, align 8, !tbaa !11
  %519 = getelementptr inbounds ptr, ptr %517, i64 %518
  %520 = load ptr, ptr %519, align 8, !tbaa !5
  %521 = icmp eq ptr %520, null
  br i1 %521, label %523, label %522

522:                                              ; preds = %516
  call void @_ZdaPv(ptr noundef %520) #10
  br label %523

523:                                              ; preds = %522, %516
  br label %524

524:                                              ; preds = %523
  %525 = load i64, ptr %8, align 8, !tbaa !11
  %526 = add nsw i64 %525, 1
  store i64 %526, ptr %8, align 8, !tbaa !11
  br label %512, !llvm.loop !37

527:                                              ; preds = %512
  %528 = load ptr, ptr %13, align 8, !tbaa !5
  %529 = icmp eq ptr %528, null
  br i1 %529, label %531, label %530

530:                                              ; preds = %527
  call void @_ZdaPv(ptr noundef %528) #10
  br label %531

531:                                              ; preds = %530, %527
  %532 = load i32, ptr %29, align 4, !tbaa !9
  store i32 %532, ptr %4, align 4
  store i32 1, ptr %30, align 4
  br label %533

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

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

535:                                              ; preds = %533, %35
  %536 = load i32, ptr %4, align 4
  ret i32 %536

537:                                              ; preds = %534
  %538 = load ptr, ptr %27, align 8
  %539 = load i32, ptr %28, align 4
  %540 = insertvalue { ptr, i32 } poison, ptr %538, 0
  %541 = insertvalue { ptr, i32 } %540, i32 %539, 1
  resume { ptr, i32 } %541
}

; 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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { 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 = !{!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, i64 16, i64 4, !9}
!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, i32 }
%"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(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) 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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 2) i32 @_ZN13TPPLPartition15Triangulate_OPTEP8TPPLPolyPNSt7__cxx114listIS0_SaIS0_EEE(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull %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
  %12 = tail call noundef zeroext i1 @_ZNK8TPPLPoly5ValidEv(ptr noundef nonnull align 8 dereferenceable(17) %1)
  br i1 %12, label %13, label %193

13:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #8
  call void @_ZNSt7__cxx114listIN13TPPLPartition8DiagonalESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #8
  invoke void @_ZN8TPPLPolyC1Ev(ptr noundef nonnull align 8 dereferenceable(17) %10)
          to label %14 unwind label %31

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

.preheader205:                                    ; preds = %14
  %20 = icmp sgt i64 %15, 1
  br i1 %20, label %.lr.ph, label %.preheader204.thread

.preheader204.thread:                             ; preds = %.preheader205
  %21 = add i64 %15, -1
  br label %._crit_edge.thread

.preheader204:                                    ; preds = %28
  %22 = add nsw i64 %15, -1
  br i1 %20, label %.lr.ph215, label %._crit_edge.thread

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

28:                                               ; preds = %.lr.ph
  %29 = getelementptr inbounds ptr, ptr %19, i64 %.0169210
  store ptr %27, ptr %29, align 8, !tbaa !5
  %30 = add nuw nsw i64 %.0169210, 1
  %exitcond.not = icmp eq i64 %30, %15
  br i1 %exitcond.not, label %.preheader204, label %.lr.ph, !llvm.loop !9

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

.loopexit:                                        ; preds = %171, %175, %179, %183
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

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

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

.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp: ; preds = %14, %._crit_edge228
  %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.loopexit200, %.loopexit.split-lp.loopexit ], [ %lpad.loopexit206, %.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) #8
  br label %192

.loopexit203:                                     ; preds = %.loopexit199
  %exitcond242.not = icmp eq i64 %34, %22
  br i1 %exitcond242.not, label %._crit_edge, label %.lr.ph215, !llvm.loop !11

.lr.ph215:                                        ; preds = %.preheader204, %.loopexit203
  %.1170216 = phi i64 [ %34, %.loopexit203 ], [ 0, %.preheader204 ]
  %33 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %1, i64 noundef %.1170216)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %33, i64 24, i1 false), !tbaa.struct !12
  %34 = add nuw nsw i64 %.1170216, 1
  %35 = icmp eq i64 %.1170216, 0
  %36 = add nsw i64 %.1170216, -1
  %. = select i1 %35, i64 %22, i64 %36
  br label %37

37:                                               ; preds = %.lr.ph215, %.loopexit199
  %.0178213 = phi i64 [ %34, %.lr.ph215 ], [ %65, %.loopexit199 ]
  %38 = getelementptr inbounds ptr, ptr %19, i64 %.0178213
  %39 = load ptr, ptr %38, align 8, !tbaa !5
  %40 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %39, i64 %.1170216
  store i8 1, ptr %40, align 8, !tbaa !17
  %41 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %39, i64 %.1170216, i32 1
  store double 0.000000e+00, ptr %41, align 8, !tbaa !21
  %42 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %39, i64 %.1170216, i32 2
  store i64 -1, ptr %42, align 8, !tbaa !22
  %.not193 = icmp eq i64 %.0178213, %34
  br i1 %.not193, label %.loopexit199, label %43

43:                                               ; preds = %37
  %44 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %1, i64 noundef %.0178213)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %44, i64 24, i1 false), !tbaa.struct !12
  %45 = call noundef nonnull align 8 dereferenceable(24) 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(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %45, i64 24, i1 false)
  %46 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %1, i64 noundef %34)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %46, i64 24, i1 false), !tbaa.struct !12
  %47 = call noundef zeroext i1 @_ZN13TPPLPartition6InConeER9TPPLPointS1_S1_S1_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %5)
  br i1 %47, label %48, label %.loopexit199.sink.split

48:                                               ; preds = %43
  %49 = add nsw i64 %.0178213, -1
  %50 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %1, i64 noundef %49)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %50, i64 24, i1 false), !tbaa.struct !12
  %51 = icmp eq i64 %.0178213, %22
  %52 = add nuw nsw i64 %.0178213, 1
  %.sink255 = select i1 %51, i64 0, i64 %52
  %53 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %1, i64 noundef %.sink255)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %53, i64 24, i1 false)
  %54 = call noundef zeroext i1 @_ZN13TPPLPartition6InConeER9TPPLPointS1_S1_S1_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %4)
  br i1 %54, label %.lr.ph212, label %.loopexit199.sink.split

55:                                               ; preds = %62
  %56 = add nuw nsw i64 %.0181211, 1
  %exitcond241.not = icmp eq i64 %56, %15
  br i1 %exitcond241.not, label %.loopexit199, label %.lr.ph212, !llvm.loop !23

.lr.ph212:                                        ; preds = %48, %55
  %.0181211 = phi i64 [ %56, %55 ], [ 0, %48 ]
  %57 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %1, i64 noundef %.0181211)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %57, i64 24, i1 false), !tbaa.struct !12
  %58 = icmp eq i64 %.0181211, %22
  %59 = add nuw nsw i64 %.0181211, 1
  %.sink256 = select i1 %58, i64 0, i64 %59
  %60 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %1, i64 noundef %.sink256)
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %60, i64 24, i1 false)
  %61 = invoke noundef i32 @_ZN13TPPLPartition10IntersectsER9TPPLPointS1_S1_S1_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %62 unwind label %.loopexit.split-lp.loopexit

62:                                               ; preds = %.lr.ph212
  %.not194 = icmp eq i32 %61, 0
  br i1 %.not194, label %55, label %.loopexit199.sink.split

.loopexit199.sink.split:                          ; preds = %62, %48, %43
  %63 = load ptr, ptr %38, align 8, !tbaa !5
  %64 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %63, i64 %.1170216
  store i8 0, ptr %64, align 8, !tbaa !17
  br label %.loopexit199

.loopexit199:                                     ; preds = %55, %.loopexit199.sink.split, %37
  %65 = add nuw nsw i64 %.0178213, 1
  %66 = icmp slt i64 %65, %15
  br i1 %66, label %37, label %.loopexit203, !llvm.loop !24

._crit_edge.thread:                               ; preds = %.preheader204.thread, %.preheader204
  %.ph = phi i64 [ %22, %.preheader204 ], [ %21, %.preheader204.thread ]
  %67 = getelementptr inbounds ptr, ptr %19, i64 %.ph
  %68 = load ptr, ptr %67, align 8, !tbaa !5
  store i8 1, ptr %68, align 8, !tbaa !17
  %69 = getelementptr inbounds i8, ptr %68, i64 8
  store double 0.000000e+00, ptr %69, align 8, !tbaa !21
  %70 = getelementptr inbounds i8, ptr %68, i64 16
  store i64 -1, ptr %70, align 8, !tbaa !22
  br label %._crit_edge228

._crit_edge:                                      ; preds = %.loopexit203
  %71 = getelementptr inbounds ptr, ptr %19, i64 %22
  %72 = load ptr, ptr %71, align 8, !tbaa !5
  store i8 1, ptr %72, align 8, !tbaa !17
  %73 = getelementptr inbounds i8, ptr %72, i64 8
  store double 0.000000e+00, ptr %73, align 8, !tbaa !21
  %74 = getelementptr inbounds i8, ptr %72, i64 16
  store i64 -1, ptr %74, align 8, !tbaa !22
  %.not258 = icmp eq i64 %15, 2
  br i1 %.not258, label %._crit_edge228, label %.preheader197

.preheader197:                                    ; preds = %._crit_edge, %._crit_edge224
  %.0173227 = phi double [ %.1174.lcssa, %._crit_edge224 ], [ undef, %._crit_edge ]
  %.0183226 = phi i64 [ %160, %._crit_edge224 ], [ 2, %._crit_edge ]
  %75 = sub nsw i64 %15, %.0183226
  %76 = icmp sgt i64 %75, 0
  br i1 %76, label %.lr.ph223.preheader, label %._crit_edge224

.lr.ph223.preheader:                              ; preds = %.preheader197
  %.not192.peel = icmp ugt i64 %.0183226, 2
  br label %.lr.ph223

.lr.ph223:                                        ; preds = %.lr.ph223.preheader, %.lr.ph223._crit_edge
  %indvars.iv = phi i64 [ %.0183226, %.lr.ph223.preheader ], [ %indvars.iv.next, %.lr.ph223._crit_edge ]
  %.2222 = phi i64 [ 0, %.lr.ph223.preheader ], [ %83, %.lr.ph223._crit_edge ]
  %.1174221 = phi double [ %.0173227, %.lr.ph223.preheader ], [ %.4177, %.lr.ph223._crit_edge ]
  %77 = add nuw nsw i64 %.2222, %.0183226
  %78 = getelementptr inbounds ptr, ptr %19, i64 %77
  %79 = load ptr, ptr %78, align 8, !tbaa !5
  %80 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %79, i64 %.2222
  %81 = load i8, ptr %80, align 8, !tbaa !17, !range !25, !noundef !26
  %82 = trunc nuw i8 %81 to i1
  %83 = add nuw nsw i64 %.2222, 1
  br i1 %82, label %.peel.begin, label %.lr.ph223._crit_edge

.peel.begin:                                      ; preds = %.lr.ph223
  %84 = getelementptr inbounds ptr, ptr %19, i64 %83
  %85 = load ptr, ptr %84, align 8, !tbaa !5
  %86 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %85, i64 %.2222
  %87 = load i8, ptr %86, align 8, !tbaa !17, !range !25, !noundef !26
  %88 = trunc nuw i8 %87 to i1
  br i1 %88, label %89, label %108

89:                                               ; preds = %.peel.begin
  %90 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %79, i64 %83
  %91 = load i8, ptr %90, align 8, !tbaa !17, !range !25, !noundef !26
  %92 = trunc nuw i8 %91 to i1
  br i1 %92, label %93, label %108

93:                                               ; preds = %89
  br i1 %.not192.peel, label %94, label %98

94:                                               ; preds = %93
  %95 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %1, i64 noundef %83)
  %96 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %1, i64 noundef %77)
  %97 = call noundef double @_ZN13TPPLPartition8DistanceERK9TPPLPointS2_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull align 8 dereferenceable(24) %95, ptr noundef nonnull align 8 dereferenceable(24) %96)
  %.pre = load ptr, ptr %84, align 8, !tbaa !5
  %.pre249 = load ptr, ptr %78, align 8, !tbaa !5
  br label %98

98:                                               ; preds = %93, %94
  %99 = phi ptr [ %.pre249, %94 ], [ %79, %93 ]
  %100 = phi ptr [ %.pre, %94 ], [ %85, %93 ]
  %.0171.peel = phi double [ %97, %94 ], [ 0.000000e+00, %93 ]
  %101 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %100, i64 %.2222, i32 1
  %102 = load double, ptr %101, align 8, !tbaa !21
  %103 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %99, i64 %83, i32 1
  %104 = load double, ptr %103, align 8, !tbaa !21
  %105 = fadd double %102, %104
  %106 = fadd double %105, 0.000000e+00
  %107 = fadd double %.0171.peel, %106
  br label %108

108:                                              ; preds = %98, %89, %.peel.begin
  %109 = phi ptr [ %99, %98 ], [ %79, %89 ], [ %79, %.peel.begin ]
  %.1180.peel = phi i64 [ %83, %98 ], [ -1, %89 ], [ -1, %.peel.begin ]
  %.3176.peel = phi double [ %107, %98 ], [ %.1174221, %89 ], [ %.1174221, %.peel.begin ]
  %110 = add nuw i64 %.2222, 2
  %exitcond243.peel.not = icmp eq i64 %110, %indvars.iv
  br i1 %exitcond243.peel.not, label %.loopexit245, label %.peel.next

.peel.next:                                       ; preds = %108, %145
  %111 = phi ptr [ %146, %145 ], [ %109, %108 ]
  %.2175220 = phi double [ %.3176, %145 ], [ %.3176.peel, %108 ]
  %.0179219 = phi i64 [ %.1180, %145 ], [ %.1180.peel, %108 ]
  %.1182218 = phi i64 [ %147, %145 ], [ %110, %108 ]
  %112 = getelementptr inbounds ptr, ptr %19, i64 %.1182218
  %113 = load ptr, ptr %112, align 8, !tbaa !5
  %114 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %113, i64 %.2222
  %115 = load i8, ptr %114, align 8, !tbaa !17, !range !25, !noundef !26
  %116 = trunc nuw i8 %115 to i1
  br i1 %116, label %117, label %145

117:                                              ; preds = %.peel.next
  %118 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %111, i64 %.1182218
  %119 = load i8, ptr %118, align 8, !tbaa !17, !range !25, !noundef !26
  %120 = trunc nuw i8 %119 to i1
  br i1 %120, label %121, label %145

121:                                              ; preds = %117
  %.not = icmp ugt i64 %.1182218, %83
  br i1 %.not, label %122, label %126

122:                                              ; preds = %121
  %123 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %1, i64 noundef %.2222)
  %124 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %1, i64 noundef %.1182218)
  %125 = call noundef double @_ZN13TPPLPartition8DistanceERK9TPPLPointS2_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull align 8 dereferenceable(24) %123, ptr noundef nonnull align 8 dereferenceable(24) %124)
  br label %126

126:                                              ; preds = %121, %122
  %.0172 = phi double [ %125, %122 ], [ 0.000000e+00, %121 ]
  %127 = add nuw nsw i64 %.1182218, 1
  %.not192 = icmp ugt i64 %77, %127
  br i1 %.not192, label %128, label %132

128:                                              ; preds = %126
  %129 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %1, i64 noundef %.1182218)
  %130 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %1, i64 noundef %77)
  %131 = call noundef double @_ZN13TPPLPartition8DistanceERK9TPPLPointS2_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull align 8 dereferenceable(24) %129, ptr noundef nonnull align 8 dereferenceable(24) %130)
  br label %132

132:                                              ; preds = %126, %128
  %.0171 = phi double [ %131, %128 ], [ 0.000000e+00, %126 ]
  %133 = load ptr, ptr %112, align 8, !tbaa !5
  %134 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %133, i64 %.2222, i32 1
  %135 = load double, ptr %134, align 8, !tbaa !21
  %136 = load ptr, ptr %78, align 8, !tbaa !5
  %137 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %136, i64 %.1182218, i32 1
  %138 = load double, ptr %137, align 8, !tbaa !21
  %139 = fadd double %135, %138
  %140 = fadd double %.0172, %139
  %141 = fadd double %.0171, %140
  %142 = icmp eq i64 %.0179219, -1
  %143 = fcmp olt double %141, %.2175220
  %or.cond = select i1 %142, i1 true, i1 %143
  br i1 %or.cond, label %144, label %145

144:                                              ; preds = %132
  br label %145

145:                                              ; preds = %132, %144, %117, %.peel.next
  %146 = phi ptr [ %136, %144 ], [ %111, %117 ], [ %111, %.peel.next ], [ %136, %132 ]
  %.1180 = phi i64 [ %.1182218, %144 ], [ %.0179219, %117 ], [ %.0179219, %.peel.next ], [ %.0179219, %132 ]
  %.3176 = phi double [ %141, %144 ], [ %.2175220, %117 ], [ %.2175220, %.peel.next ], [ %.2175220, %132 ]
  %147 = add nuw i64 %.1182218, 1
  %exitcond243.not = icmp eq i64 %147, %indvars.iv
  br i1 %exitcond243.not, label %.loopexit245, label %.peel.next, !llvm.loop !27

.loopexit245:                                     ; preds = %145, %108
  %148 = phi ptr [ %109, %108 ], [ %146, %145 ]
  %.1180.lcssa = phi i64 [ %.1180.peel, %108 ], [ %.1180, %145 ]
  %.3176.lcssa = phi double [ %.3176.peel, %108 ], [ %.3176, %145 ]
  %149 = icmp eq i64 %.1180.lcssa, -1
  br i1 %149, label %.lr.ph239, label %156

.lr.ph239:                                        ; preds = %.loopexit245, %154
  %.3238 = phi i64 [ %155, %154 ], [ 1, %.loopexit245 ]
  %150 = getelementptr inbounds ptr, ptr %19, i64 %.3238
  %151 = load ptr, ptr %150, align 8, !tbaa !5
  %152 = icmp eq ptr %151, null
  br i1 %152, label %154, label %153

153:                                              ; preds = %.lr.ph239
  call void @_ZdaPv(ptr noundef nonnull %151) #10
  br label %154

154:                                              ; preds = %.lr.ph239, %153
  %155 = add nuw nsw i64 %.3238, 1
  %exitcond248.not = icmp eq i64 %155, %15
  br i1 %exitcond248.not, label %._crit_edge240, label %.lr.ph239, !llvm.loop !29

156:                                              ; preds = %.loopexit245
  %157 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %148, i64 %.2222, i32 2
  store i64 %.1180.lcssa, ptr %157, align 8, !tbaa !22
  %158 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %148, i64 %.2222, i32 1
  store double %.3176.lcssa, ptr %158, align 8, !tbaa !21
  br label %.lr.ph223._crit_edge

.lr.ph223._crit_edge:                             ; preds = %.lr.ph223, %156
  %.4177 = phi double [ %.3176.lcssa, %156 ], [ %.1174221, %.lr.ph223 ]
  %159 = icmp slt i64 %83, %75
  %indvars.iv.next = add nuw i64 %indvars.iv, 1
  br i1 %159, label %.lr.ph223, label %._crit_edge224, !llvm.loop !30

._crit_edge224:                                   ; preds = %.lr.ph223._crit_edge, %.preheader197
  %.1174.lcssa = phi double [ %.0173227, %.preheader197 ], [ %.4177, %.lr.ph223._crit_edge ]
  %160 = add nuw nsw i64 %.0183226, 1
  %exitcond246.not = icmp eq i64 %160, %15
  br i1 %exitcond246.not, label %._crit_edge228, label %.preheader197, !llvm.loop !31

._crit_edge228:                                   ; preds = %._crit_edge224, %._crit_edge.thread, %._crit_edge
  %161 = phi i64 [ %.ph, %._crit_edge.thread ], [ %22, %._crit_edge ], [ %22, %._crit_edge224 ]
  store i64 0, ptr %8, align 8, !tbaa !32
  %162 = getelementptr inbounds i8, ptr %8, i64 8
  store i64 %161, ptr %162, align 8, !tbaa !34
  invoke void @_ZNSt7__cxx114listIN13TPPLPartition8DiagonalESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(16) %8)
          to label %.preheader196 unwind label %.loopexit.split-lp.loopexit.split-lp.loopexit.split-lp

.preheader196:                                    ; preds = %._crit_edge228
  %163 = call noundef zeroext i1 @_ZNKSt7__cxx114listIN13TPPLPartition8DiagonalESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  br i1 %163, label %._crit_edge230, label %.lr.ph229

.lr.ph229:                                        ; preds = %.preheader196, %184
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #8
  %164 = call ptr @_ZNSt7__cxx114listIN13TPPLPartition8DiagonalESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  store ptr %164, ptr %11, align 8
  %165 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt14_List_iteratorIN13TPPLPartition8DiagonalEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #8
  %.sroa.0.0.copyload = load i64, ptr %165, align 8, !tbaa !35
  %.sroa.8.0..sroa_idx = getelementptr inbounds i8, ptr %165, i64 8
  %.sroa.8.0.copyload = load i64, ptr %.sroa.8.0..sroa_idx, align 8, !tbaa !35
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  call void @_ZNSt7__cxx114listIN13TPPLPartition8DiagonalESaIS2_EE9pop_frontEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  %166 = getelementptr inbounds ptr, ptr %19, i64 %.sroa.8.0.copyload
  %167 = load ptr, ptr %166, align 8, !tbaa !5
  %168 = getelementptr inbounds %"struct.TPPLPartition::DPState", ptr %167, i64 %.sroa.0.0.copyload, i32 2
  %169 = load i64, ptr %168, align 8, !tbaa !22
  %170 = icmp eq i64 %169, -1
  br i1 %170, label %._crit_edge230, label %171

171:                                              ; preds = %.lr.ph229
  %172 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %1, i64 noundef %.sroa.0.0.copyload)
  %173 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %1, i64 noundef %169)
  %174 = call noundef nonnull align 8 dereferenceable(24) 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(24) %172, ptr noundef nonnull align 8 dereferenceable(24) %173, ptr noundef nonnull align 8 dereferenceable(24) %174)
          to label %175 unwind label %.loopexit

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

176:                                              ; preds = %175
  %177 = add nsw i64 %.sroa.0.0.copyload, 1
  %178 = icmp sgt i64 %169, %177
  br i1 %178, label %179, label %180

179:                                              ; preds = %176
  store i64 %.sroa.0.0.copyload, ptr %8, align 8, !tbaa !32
  store i64 %169, ptr %162, align 8, !tbaa !34
  invoke void @_ZNSt7__cxx114listIN13TPPLPartition8DiagonalESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(16) %8)
          to label %180 unwind label %.loopexit

180:                                              ; preds = %179, %176
  %181 = add nuw nsw i64 %169, 1
  %182 = icmp sgt i64 %.sroa.8.0.copyload, %181
  br i1 %182, label %183, label %184

183:                                              ; preds = %180
  store i64 %169, ptr %8, align 8, !tbaa !32
  store i64 %.sroa.8.0.copyload, ptr %162, align 8, !tbaa !34
  invoke void @_ZNSt7__cxx114listIN13TPPLPartition8DiagonalESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(16) %8)
          to label %184 unwind label %.loopexit

184:                                              ; preds = %183, %180
  %185 = call noundef zeroext i1 @_ZNKSt7__cxx114listIN13TPPLPartition8DiagonalESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  br i1 %185, label %._crit_edge230, label %.lr.ph229, !llvm.loop !36

._crit_edge230:                                   ; preds = %184, %.lr.ph229, %.preheader196
  %.0 = phi i32 [ 1, %.preheader196 ], [ 0, %.lr.ph229 ], [ 1, %184 ]
  br i1 %20, label %.lr.ph236, label %._crit_edge240

.lr.ph236:                                        ; preds = %._crit_edge230, %190
  %.4234 = phi i64 [ %191, %190 ], [ 1, %._crit_edge230 ]
  %186 = getelementptr inbounds ptr, ptr %19, i64 %.4234
  %187 = load ptr, ptr %186, align 8, !tbaa !5
  %188 = icmp eq ptr %187, null
  br i1 %188, label %190, label %189

189:                                              ; preds = %.lr.ph236
  call void @_ZdaPv(ptr noundef nonnull %187) #10
  br label %190

190:                                              ; preds = %.lr.ph236, %189
  %191 = add nuw nsw i64 %.4234, 1
  %exitcond247.not = icmp eq i64 %191, %15
  br i1 %exitcond247.not, label %._crit_edge240, label %.lr.ph236, !llvm.loop !37

._crit_edge240:                                   ; preds = %154, %190, %._crit_edge230
  %.0168 = phi i32 [ %.0, %._crit_edge230 ], [ %.0, %190 ], [ 0, %154 ]
  call void @_ZdaPv(ptr noundef nonnull %19) #10
  call void @_ZN8TPPLPolyD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %10) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #8
  call void @_ZNSt7__cxx1110_List_baseIN13TPPLPartition8DiagonalESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #8
  br label %193

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

193:                                              ; preds = %3, %._crit_edge240
  %.1 = phi i32 [ %.0168, %._crit_edge240 ], [ 0, %3 ]
  ret i32 %.1
}

; 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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { 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 = distinct !{!11, !10}
!12 = !{i64 0, i64 8, !13, i64 8, i64 8, !13, i64 16, i64 4, !15}
!13 = !{!14, !14, i64 0}
!14 = !{!"double", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = !{!18, !19, i64 0}
!18 = !{!"_ZTSN13TPPLPartition7DPStateE", !19, i64 0, !14, i64 8, !20, i64 16}
!19 = !{!"bool", !7, i64 0}
!20 = !{!"long", !7, i64 0}
!21 = !{!18, !14, i64 8}
!22 = !{!18, !20, i64 16}
!23 = distinct !{!23, !10}
!24 = distinct !{!24, !10}
!25 = !{i8 0, i8 2}
!26 = !{}
!27 = distinct !{!27, !10, !28}
!28 = !{!"llvm.loop.peeled.count", i32 1}
!29 = distinct !{!29, !10}
!30 = distinct !{!30, !10}
!31 = distinct !{!31, !10}
!32 = !{!33, !20, i64 0}
!33 = !{!"_ZTSN13TPPLPartition8DiagonalE", !20, i64 0, !20, i64 8}
!34 = !{!33, !20, i64 8}
!35 = !{!20, !20, i64 0}
!36 = distinct !{!36, !10}
!37 = distinct !{!37, !10}


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