; LLVM IR from mackorone/mms :: old/v2/src/lib/polypartition (polypartition)

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

%class.TPPLPoly = type <{ ptr, i64, i8, [7 x i8] }>
%struct.TPPLPoint = type { double, double }

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

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN13TPPLPartition19TriangulateMonotoneEP8TPPLPolyPNSt7__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 i64, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i64, align 8
  %18 = alloca %class.TPPLPoly, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca i64, 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
  %26 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #6
  call void @_ZN8TPPLPolyC1Ev(ptr noundef nonnull align 8 dereferenceable(17) %18)
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = invoke noundef i64 @_ZN8TPPLPoly12GetNumPointsEv(ptr noundef nonnull align 8 dereferenceable(17) %27)
          to label %29 unwind label %36

29:                                               ; preds = %3
  store i64 %28, ptr %17, align 8, !tbaa !9
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = invoke noundef ptr @_ZN8TPPLPoly9GetPointsEv(ptr noundef nonnull align 8 dereferenceable(17) %30)
          to label %32 unwind label %36

32:                                               ; preds = %29
  store ptr %31, ptr %16, align 8, !tbaa !5
  %33 = load i64, ptr %17, align 8, !tbaa !9
  %34 = icmp slt i64 %33, 3
  br i1 %34, label %35, label %40

35:                                               ; preds = %32
  store i32 0, ptr %4, align 4
  store i32 1, ptr %21, align 4
  br label %582

36:                                               ; preds = %43, %29, %3
  %37 = landingpad { ptr, i32 }
          cleanup
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %19, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %20, align 4
  br label %584

40:                                               ; preds = %32
  %41 = load i64, ptr %17, align 8, !tbaa !9
  %42 = icmp eq i64 %41, 3
  br i1 %42, label %43, label %47

43:                                               ; preds = %40
  %44 = load ptr, ptr %7, align 8, !tbaa !5
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZNSt7__cxx114listI8TPPLPolySaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %44, ptr noundef nonnull align 8 dereferenceable(17) %45)
          to label %46 unwind label %36

46:                                               ; preds = %43
  br label %47

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

48:                                               ; preds = %73, %47
  %49 = load i64, ptr %8, align 8, !tbaa !9
  %50 = load i64, ptr %17, align 8, !tbaa !9
  %51 = icmp slt i64 %49, %50
  br i1 %51, label %52, label %76

52:                                               ; preds = %48
  %53 = load ptr, ptr %16, align 8, !tbaa !5
  %54 = load i64, ptr %8, align 8, !tbaa !9
  %55 = getelementptr inbounds %struct.TPPLPoint, ptr %53, i64 %54
  %56 = load ptr, ptr %16, align 8, !tbaa !5
  %57 = load i64, ptr %12, align 8, !tbaa !9
  %58 = getelementptr inbounds %struct.TPPLPoint, ptr %56, i64 %57
  %59 = call noundef zeroext i1 @_ZN13TPPLPartition5BelowER9TPPLPointS1_(ptr noundef nonnull align 1 dereferenceable(1) %26, ptr noundef nonnull align 8 dereferenceable(16) %55, ptr noundef nonnull align 8 dereferenceable(16) %58)
  br i1 %59, label %60, label %62

60:                                               ; preds = %52
  %61 = load i64, ptr %8, align 8, !tbaa !9
  store i64 %61, ptr %12, align 8, !tbaa !9
  br label %62

62:                                               ; preds = %60, %52
  %63 = load ptr, ptr %16, align 8, !tbaa !5
  %64 = load i64, ptr %11, align 8, !tbaa !9
  %65 = getelementptr inbounds %struct.TPPLPoint, ptr %63, i64 %64
  %66 = load ptr, ptr %16, align 8, !tbaa !5
  %67 = load i64, ptr %8, align 8, !tbaa !9
  %68 = getelementptr inbounds %struct.TPPLPoint, ptr %66, i64 %67
  %69 = call noundef zeroext i1 @_ZN13TPPLPartition5BelowER9TPPLPointS1_(ptr noundef nonnull align 1 dereferenceable(1) %26, ptr noundef nonnull align 8 dereferenceable(16) %65, ptr noundef nonnull align 8 dereferenceable(16) %68)
  br i1 %69, label %70, label %72

70:                                               ; preds = %62
  %71 = load i64, ptr %8, align 8, !tbaa !9
  store i64 %71, ptr %11, align 8, !tbaa !9
  br label %72

72:                                               ; preds = %70, %62
  br label %73

73:                                               ; preds = %72
  %74 = load i64, ptr %8, align 8, !tbaa !9
  %75 = add nsw i64 %74, 1
  store i64 %75, ptr %8, align 8, !tbaa !9
  br label %48, !llvm.loop !11

76:                                               ; preds = %48
  %77 = load i64, ptr %11, align 8, !tbaa !9
  store i64 %77, ptr %8, align 8, !tbaa !9
  br label %78

78:                                               ; preds = %98, %76
  %79 = load i64, ptr %8, align 8, !tbaa !9
  %80 = load i64, ptr %12, align 8, !tbaa !9
  %81 = icmp ne i64 %79, %80
  br i1 %81, label %82, label %100

82:                                               ; preds = %78
  %83 = load i64, ptr %8, align 8, !tbaa !9
  %84 = add nsw i64 %83, 1
  store i64 %84, ptr %9, align 8, !tbaa !9
  %85 = load i64, ptr %9, align 8, !tbaa !9
  %86 = load i64, ptr %17, align 8, !tbaa !9
  %87 = icmp sge i64 %85, %86
  br i1 %87, label %88, label %89

88:                                               ; preds = %82
  store i64 0, ptr %9, align 8, !tbaa !9
  br label %89

89:                                               ; preds = %88, %82
  %90 = load ptr, ptr %16, align 8, !tbaa !5
  %91 = load i64, ptr %9, align 8, !tbaa !9
  %92 = getelementptr inbounds %struct.TPPLPoint, ptr %90, i64 %91
  %93 = load ptr, ptr %16, align 8, !tbaa !5
  %94 = load i64, ptr %8, align 8, !tbaa !9
  %95 = getelementptr inbounds %struct.TPPLPoint, ptr %93, i64 %94
  %96 = call noundef zeroext i1 @_ZN13TPPLPartition5BelowER9TPPLPointS1_(ptr noundef nonnull align 1 dereferenceable(1) %26, ptr noundef nonnull align 8 dereferenceable(16) %92, ptr noundef nonnull align 8 dereferenceable(16) %95)
  br i1 %96, label %98, label %97

97:                                               ; preds = %89
  store i32 0, ptr %4, align 4
  store i32 1, ptr %21, align 4
  br label %582

98:                                               ; preds = %89
  %99 = load i64, ptr %9, align 8, !tbaa !9
  store i64 %99, ptr %8, align 8, !tbaa !9
  br label %78, !llvm.loop !13

100:                                              ; preds = %78
  %101 = load i64, ptr %12, align 8, !tbaa !9
  store i64 %101, ptr %8, align 8, !tbaa !9
  br label %102

102:                                              ; preds = %122, %100
  %103 = load i64, ptr %8, align 8, !tbaa !9
  %104 = load i64, ptr %11, align 8, !tbaa !9
  %105 = icmp ne i64 %103, %104
  br i1 %105, label %106, label %124

106:                                              ; preds = %102
  %107 = load i64, ptr %8, align 8, !tbaa !9
  %108 = add nsw i64 %107, 1
  store i64 %108, ptr %9, align 8, !tbaa !9
  %109 = load i64, ptr %9, align 8, !tbaa !9
  %110 = load i64, ptr %17, align 8, !tbaa !9
  %111 = icmp sge i64 %109, %110
  br i1 %111, label %112, label %113

112:                                              ; preds = %106
  store i64 0, ptr %9, align 8, !tbaa !9
  br label %113

113:                                              ; preds = %112, %106
  %114 = load ptr, ptr %16, align 8, !tbaa !5
  %115 = load i64, ptr %8, align 8, !tbaa !9
  %116 = getelementptr inbounds %struct.TPPLPoint, ptr %114, i64 %115
  %117 = load ptr, ptr %16, align 8, !tbaa !5
  %118 = load i64, ptr %9, align 8, !tbaa !9
  %119 = getelementptr inbounds %struct.TPPLPoint, ptr %117, i64 %118
  %120 = call noundef zeroext i1 @_ZN13TPPLPartition5BelowER9TPPLPointS1_(ptr noundef nonnull align 1 dereferenceable(1) %26, ptr noundef nonnull align 8 dereferenceable(16) %116, ptr noundef nonnull align 8 dereferenceable(16) %119)
  br i1 %120, label %122, label %121

121:                                              ; preds = %113
  store i32 0, ptr %4, align 4
  store i32 1, ptr %21, align 4
  br label %582

122:                                              ; preds = %113
  %123 = load i64, ptr %9, align 8, !tbaa !9
  store i64 %123, ptr %8, align 8, !tbaa !9
  br label %102, !llvm.loop !14

124:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %125 = load i64, ptr %17, align 8, !tbaa !9
  %126 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %125) #7
          to label %127 unwind label %147

127:                                              ; preds = %124
  store ptr %126, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %128 = load i64, ptr %17, align 8, !tbaa !9
  %129 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %128, i64 8)
  %130 = extractvalue { i64, i1 } %129, 1
  %131 = extractvalue { i64, i1 } %129, 0
  %132 = select i1 %130, i64 -1, i64 %131
  %133 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %132) #7
          to label %134 unwind label %151

134:                                              ; preds = %127
  store ptr %133, ptr %23, align 8, !tbaa !5
  %135 = load i64, ptr %11, align 8, !tbaa !9
  %136 = load ptr, ptr %23, align 8, !tbaa !5
  %137 = getelementptr inbounds i64, ptr %136, i64 0
  store i64 %135, ptr %137, align 8, !tbaa !9
  %138 = load ptr, ptr %22, align 8, !tbaa !5
  %139 = load i64, ptr %11, align 8, !tbaa !9
  %140 = getelementptr inbounds i8, ptr %138, i64 %139
  store i8 0, ptr %140, align 1, !tbaa !15
  %141 = load i64, ptr %11, align 8, !tbaa !9
  %142 = add nsw i64 %141, 1
  store i64 %142, ptr %13, align 8, !tbaa !9
  %143 = load i64, ptr %13, align 8, !tbaa !9
  %144 = load i64, ptr %17, align 8, !tbaa !9
  %145 = icmp sge i64 %143, %144
  br i1 %145, label %146, label %155

146:                                              ; preds = %134
  store i64 0, ptr %13, align 8, !tbaa !9
  br label %155

147:                                              ; preds = %124
  %148 = landingpad { ptr, i32 }
          cleanup
  %149 = extractvalue { ptr, i32 } %148, 0
  store ptr %149, ptr %19, align 8
  %150 = extractvalue { ptr, i32 } %148, 1
  store i32 %150, ptr %20, align 4
  br label %581

151:                                              ; preds = %127
  %152 = landingpad { ptr, i32 }
          cleanup
  %153 = extractvalue { ptr, i32 } %152, 0
  store ptr %153, ptr %19, align 8
  %154 = extractvalue { ptr, i32 } %152, 1
  store i32 %154, ptr %20, align 4
  br label %580

155:                                              ; preds = %146, %134
  %156 = load i64, ptr %11, align 8, !tbaa !9
  %157 = sub nsw i64 %156, 1
  store i64 %157, ptr %14, align 8, !tbaa !9
  %158 = load i64, ptr %14, align 8, !tbaa !9
  %159 = icmp slt i64 %158, 0
  br i1 %159, label %160, label %163

160:                                              ; preds = %155
  %161 = load i64, ptr %17, align 8, !tbaa !9
  %162 = sub nsw i64 %161, 1
  store i64 %162, ptr %14, align 8, !tbaa !9
  br label %163

163:                                              ; preds = %160, %155
  store i64 1, ptr %8, align 8, !tbaa !9
  br label %164

164:                                              ; preds = %262, %163
  %165 = load i64, ptr %8, align 8, !tbaa !9
  %166 = load i64, ptr %17, align 8, !tbaa !9
  %167 = sub nsw i64 %166, 1
  %168 = icmp slt i64 %165, %167
  br i1 %168, label %169, label %265

169:                                              ; preds = %164
  %170 = load i64, ptr %13, align 8, !tbaa !9
  %171 = load i64, ptr %12, align 8, !tbaa !9
  %172 = icmp eq i64 %170, %171
  br i1 %172, label %173, label %192

173:                                              ; preds = %169
  %174 = load i64, ptr %14, align 8, !tbaa !9
  %175 = load ptr, ptr %23, align 8, !tbaa !5
  %176 = load i64, ptr %8, align 8, !tbaa !9
  %177 = getelementptr inbounds i64, ptr %175, i64 %176
  store i64 %174, ptr %177, align 8, !tbaa !9
  %178 = load i64, ptr %14, align 8, !tbaa !9
  %179 = add nsw i64 %178, -1
  store i64 %179, ptr %14, align 8, !tbaa !9
  %180 = load i64, ptr %14, align 8, !tbaa !9
  %181 = icmp slt i64 %180, 0
  br i1 %181, label %182, label %185

182:                                              ; preds = %173
  %183 = load i64, ptr %17, align 8, !tbaa !9
  %184 = sub nsw i64 %183, 1
  store i64 %184, ptr %14, align 8, !tbaa !9
  br label %185

185:                                              ; preds = %182, %173
  %186 = load ptr, ptr %22, align 8, !tbaa !5
  %187 = load ptr, ptr %23, align 8, !tbaa !5
  %188 = load i64, ptr %8, align 8, !tbaa !9
  %189 = getelementptr inbounds i64, ptr %187, i64 %188
  %190 = load i64, ptr %189, align 8, !tbaa !9
  %191 = getelementptr inbounds i8, ptr %186, i64 %190
  store i8 -1, ptr %191, align 1, !tbaa !15
  br label %261

192:                                              ; preds = %169
  %193 = load i64, ptr %14, align 8, !tbaa !9
  %194 = load i64, ptr %12, align 8, !tbaa !9
  %195 = icmp eq i64 %193, %194
  br i1 %195, label %196, label %214

196:                                              ; preds = %192
  %197 = load i64, ptr %13, align 8, !tbaa !9
  %198 = load ptr, ptr %23, align 8, !tbaa !5
  %199 = load i64, ptr %8, align 8, !tbaa !9
  %200 = getelementptr inbounds i64, ptr %198, i64 %199
  store i64 %197, ptr %200, align 8, !tbaa !9
  %201 = load i64, ptr %13, align 8, !tbaa !9
  %202 = add nsw i64 %201, 1
  store i64 %202, ptr %13, align 8, !tbaa !9
  %203 = load i64, ptr %13, align 8, !tbaa !9
  %204 = load i64, ptr %17, align 8, !tbaa !9
  %205 = icmp sge i64 %203, %204
  br i1 %205, label %206, label %207

206:                                              ; preds = %196
  store i64 0, ptr %13, align 8, !tbaa !9
  br label %207

207:                                              ; preds = %206, %196
  %208 = load ptr, ptr %22, align 8, !tbaa !5
  %209 = load ptr, ptr %23, align 8, !tbaa !5
  %210 = load i64, ptr %8, align 8, !tbaa !9
  %211 = getelementptr inbounds i64, ptr %209, i64 %210
  %212 = load i64, ptr %211, align 8, !tbaa !9
  %213 = getelementptr inbounds i8, ptr %208, i64 %212
  store i8 1, ptr %213, align 1, !tbaa !15
  br label %260

214:                                              ; preds = %192
  %215 = load ptr, ptr %16, align 8, !tbaa !5
  %216 = load i64, ptr %13, align 8, !tbaa !9
  %217 = getelementptr inbounds %struct.TPPLPoint, ptr %215, i64 %216
  %218 = load ptr, ptr %16, align 8, !tbaa !5
  %219 = load i64, ptr %14, align 8, !tbaa !9
  %220 = getelementptr inbounds %struct.TPPLPoint, ptr %218, i64 %219
  %221 = call noundef zeroext i1 @_ZN13TPPLPartition5BelowER9TPPLPointS1_(ptr noundef nonnull align 1 dereferenceable(1) %26, ptr noundef nonnull align 8 dereferenceable(16) %217, ptr noundef nonnull align 8 dereferenceable(16) %220)
  br i1 %221, label %222, label %241

222:                                              ; preds = %214
  %223 = load i64, ptr %14, align 8, !tbaa !9
  %224 = load ptr, ptr %23, align 8, !tbaa !5
  %225 = load i64, ptr %8, align 8, !tbaa !9
  %226 = getelementptr inbounds i64, ptr %224, i64 %225
  store i64 %223, ptr %226, align 8, !tbaa !9
  %227 = load i64, ptr %14, align 8, !tbaa !9
  %228 = add nsw i64 %227, -1
  store i64 %228, ptr %14, align 8, !tbaa !9
  %229 = load i64, ptr %14, align 8, !tbaa !9
  %230 = icmp slt i64 %229, 0
  br i1 %230, label %231, label %234

231:                                              ; preds = %222
  %232 = load i64, ptr %17, align 8, !tbaa !9
  %233 = sub nsw i64 %232, 1
  store i64 %233, ptr %14, align 8, !tbaa !9
  br label %234

234:                                              ; preds = %231, %222
  %235 = load ptr, ptr %22, align 8, !tbaa !5
  %236 = load ptr, ptr %23, align 8, !tbaa !5
  %237 = load i64, ptr %8, align 8, !tbaa !9
  %238 = getelementptr inbounds i64, ptr %236, i64 %237
  %239 = load i64, ptr %238, align 8, !tbaa !9
  %240 = getelementptr inbounds i8, ptr %235, i64 %239
  store i8 -1, ptr %240, align 1, !tbaa !15
  br label %259

241:                                              ; preds = %214
  %242 = load i64, ptr %13, align 8, !tbaa !9
  %243 = load ptr, ptr %23, align 8, !tbaa !5
  %244 = load i64, ptr %8, align 8, !tbaa !9
  %245 = getelementptr inbounds i64, ptr %243, i64 %244
  store i64 %242, ptr %245, align 8, !tbaa !9
  %246 = load i64, ptr %13, align 8, !tbaa !9
  %247 = add nsw i64 %246, 1
  store i64 %247, ptr %13, align 8, !tbaa !9
  %248 = load i64, ptr %13, align 8, !tbaa !9
  %249 = load i64, ptr %17, align 8, !tbaa !9
  %250 = icmp sge i64 %248, %249
  br i1 %250, label %251, label %252

251:                                              ; preds = %241
  store i64 0, ptr %13, align 8, !tbaa !9
  br label %252

252:                                              ; preds = %251, %241
  %253 = load ptr, ptr %22, align 8, !tbaa !5
  %254 = load ptr, ptr %23, align 8, !tbaa !5
  %255 = load i64, ptr %8, align 8, !tbaa !9
  %256 = getelementptr inbounds i64, ptr %254, i64 %255
  %257 = load i64, ptr %256, align 8, !tbaa !9
  %258 = getelementptr inbounds i8, ptr %253, i64 %257
  store i8 1, ptr %258, align 1, !tbaa !15
  br label %259

259:                                              ; preds = %252, %234
  br label %260

260:                                              ; preds = %259, %207
  br label %261

261:                                              ; preds = %260, %185
  br label %262

262:                                              ; preds = %261
  %263 = load i64, ptr %8, align 8, !tbaa !9
  %264 = add nsw i64 %263, 1
  store i64 %264, ptr %8, align 8, !tbaa !9
  br label %164, !llvm.loop !16

265:                                              ; preds = %164
  %266 = load i64, ptr %12, align 8, !tbaa !9
  %267 = load ptr, ptr %23, align 8, !tbaa !5
  %268 = load i64, ptr %8, align 8, !tbaa !9
  %269 = getelementptr inbounds i64, ptr %267, i64 %268
  store i64 %266, ptr %269, align 8, !tbaa !9
  %270 = load ptr, ptr %22, align 8, !tbaa !5
  %271 = load i64, ptr %12, align 8, !tbaa !9
  %272 = getelementptr inbounds i8, ptr %270, i64 %271
  store i8 0, ptr %272, align 1, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  %273 = load i64, ptr %17, align 8, !tbaa !9
  %274 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %273, i64 8)
  %275 = extractvalue { i64, i1 } %274, 1
  %276 = extractvalue { i64, i1 } %274, 0
  %277 = select i1 %275, i64 -1, i64 %276
  %278 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %277) #7
          to label %279 unwind label %346

279:                                              ; preds = %265
  store ptr %278, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #6
  store i64 0, ptr %25, align 8, !tbaa !9
  %280 = load ptr, ptr %23, align 8, !tbaa !5
  %281 = getelementptr inbounds i64, ptr %280, i64 0
  %282 = load i64, ptr %281, align 8, !tbaa !9
  %283 = load ptr, ptr %24, align 8, !tbaa !5
  %284 = getelementptr inbounds i64, ptr %283, i64 0
  store i64 %282, ptr %284, align 8, !tbaa !9
  %285 = load ptr, ptr %23, align 8, !tbaa !5
  %286 = getelementptr inbounds i64, ptr %285, i64 1
  %287 = load i64, ptr %286, align 8, !tbaa !9
  %288 = load ptr, ptr %24, align 8, !tbaa !5
  %289 = getelementptr inbounds i64, ptr %288, i64 1
  store i64 %287, ptr %289, align 8, !tbaa !9
  store i64 2, ptr %25, align 8, !tbaa !9
  store i64 2, ptr %8, align 8, !tbaa !9
  br label %290

290:                                              ; preds = %500, %279
  %291 = load i64, ptr %8, align 8, !tbaa !9
  %292 = load i64, ptr %17, align 8, !tbaa !9
  %293 = sub nsw i64 %292, 1
  %294 = icmp slt i64 %291, %293
  br i1 %294, label %295, label %503

295:                                              ; preds = %290
  %296 = load ptr, ptr %23, align 8, !tbaa !5
  %297 = load i64, ptr %8, align 8, !tbaa !9
  %298 = getelementptr inbounds i64, ptr %296, i64 %297
  %299 = load i64, ptr %298, align 8, !tbaa !9
  store i64 %299, ptr %15, align 8, !tbaa !9
  %300 = load ptr, ptr %22, align 8, !tbaa !5
  %301 = load i64, ptr %15, align 8, !tbaa !9
  %302 = getelementptr inbounds i8, ptr %300, i64 %301
  %303 = load i8, ptr %302, align 1, !tbaa !15
  %304 = sext i8 %303 to i32
  %305 = load ptr, ptr %22, align 8, !tbaa !5
  %306 = load ptr, ptr %24, align 8, !tbaa !5
  %307 = load i64, ptr %25, align 8, !tbaa !9
  %308 = sub nsw i64 %307, 1
  %309 = getelementptr inbounds i64, ptr %306, i64 %308
  %310 = load i64, ptr %309, align 8, !tbaa !9
  %311 = getelementptr inbounds i8, ptr %305, i64 %310
  %312 = load i8, ptr %311, align 1, !tbaa !15
  %313 = sext i8 %312 to i32
  %314 = icmp ne i32 %304, %313
  br i1 %314, label %315, label %392

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

316:                                              ; preds = %375, %315
  %317 = load i64, ptr %10, align 8, !tbaa !9
  %318 = load i64, ptr %25, align 8, !tbaa !9
  %319 = sub nsw i64 %318, 1
  %320 = icmp slt i64 %317, %319
  br i1 %320, label %321, label %378

321:                                              ; preds = %316
  %322 = load ptr, ptr %22, align 8, !tbaa !5
  %323 = load i64, ptr %15, align 8, !tbaa !9
  %324 = getelementptr inbounds i8, ptr %322, i64 %323
  %325 = load i8, ptr %324, align 1, !tbaa !15
  %326 = sext i8 %325 to i32
  %327 = icmp eq i32 %326, 1
  br i1 %327, label %328, label %354

328:                                              ; preds = %321
  %329 = load ptr, ptr %16, align 8, !tbaa !5
  %330 = load ptr, ptr %24, align 8, !tbaa !5
  %331 = load i64, ptr %10, align 8, !tbaa !9
  %332 = add nsw i64 %331, 1
  %333 = getelementptr inbounds i64, ptr %330, i64 %332
  %334 = load i64, ptr %333, align 8, !tbaa !9
  %335 = getelementptr inbounds %struct.TPPLPoint, ptr %329, i64 %334
  %336 = load ptr, ptr %16, align 8, !tbaa !5
  %337 = load ptr, ptr %24, align 8, !tbaa !5
  %338 = load i64, ptr %10, align 8, !tbaa !9
  %339 = getelementptr inbounds i64, ptr %337, i64 %338
  %340 = load i64, ptr %339, align 8, !tbaa !9
  %341 = getelementptr inbounds %struct.TPPLPoint, ptr %336, i64 %340
  %342 = load ptr, ptr %16, align 8, !tbaa !5
  %343 = load i64, ptr %15, align 8, !tbaa !9
  %344 = getelementptr inbounds %struct.TPPLPoint, ptr %342, i64 %343
  invoke void @_ZN8TPPLPoly8TriangleER9TPPLPointS1_S1_(ptr noundef nonnull align 8 dereferenceable(17) %18, ptr noundef nonnull align 8 dereferenceable(16) %335, ptr noundef nonnull align 8 dereferenceable(16) %341, ptr noundef nonnull align 8 dereferenceable(16) %344)
          to label %345 unwind label %350

345:                                              ; preds = %328
  br label %372

346:                                              ; preds = %265
  %347 = landingpad { ptr, i32 }
          cleanup
  %348 = extractvalue { ptr, i32 } %347, 0
  store ptr %348, ptr %19, align 8
  %349 = extractvalue { ptr, i32 } %347, 1
  store i32 %349, ptr %20, align 4
  br label %579

350:                                              ; preds = %560, %542, %524, %482, %465, %440, %423, %372, %354, %328
  %351 = landingpad { ptr, i32 }
          cleanup
  %352 = extractvalue { ptr, i32 } %351, 0
  store ptr %352, ptr %19, align 8
  %353 = extractvalue { ptr, i32 } %351, 1
  store i32 %353, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  br label %579

354:                                              ; preds = %321
  %355 = load ptr, ptr %16, align 8, !tbaa !5
  %356 = load ptr, ptr %24, align 8, !tbaa !5
  %357 = load i64, ptr %10, align 8, !tbaa !9
  %358 = getelementptr inbounds i64, ptr %356, i64 %357
  %359 = load i64, ptr %358, align 8, !tbaa !9
  %360 = getelementptr inbounds %struct.TPPLPoint, ptr %355, i64 %359
  %361 = load ptr, ptr %16, align 8, !tbaa !5
  %362 = load ptr, ptr %24, align 8, !tbaa !5
  %363 = load i64, ptr %10, align 8, !tbaa !9
  %364 = add nsw i64 %363, 1
  %365 = getelementptr inbounds i64, ptr %362, i64 %364
  %366 = load i64, ptr %365, align 8, !tbaa !9
  %367 = getelementptr inbounds %struct.TPPLPoint, ptr %361, i64 %366
  %368 = load ptr, ptr %16, align 8, !tbaa !5
  %369 = load i64, ptr %15, align 8, !tbaa !9
  %370 = getelementptr inbounds %struct.TPPLPoint, ptr %368, i64 %369
  invoke void @_ZN8TPPLPoly8TriangleER9TPPLPointS1_S1_(ptr noundef nonnull align 8 dereferenceable(17) %18, ptr noundef nonnull align 8 dereferenceable(16) %360, ptr noundef nonnull align 8 dereferenceable(16) %367, ptr noundef nonnull align 8 dereferenceable(16) %370)
          to label %371 unwind label %350

371:                                              ; preds = %354
  br label %372

372:                                              ; preds = %371, %345
  %373 = load ptr, ptr %7, align 8, !tbaa !5
  invoke void @_ZNSt7__cxx114listI8TPPLPolySaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %373, ptr noundef nonnull align 8 dereferenceable(17) %18)
          to label %374 unwind label %350

374:                                              ; preds = %372
  br label %375

375:                                              ; preds = %374
  %376 = load i64, ptr %10, align 8, !tbaa !9
  %377 = add nsw i64 %376, 1
  store i64 %377, ptr %10, align 8, !tbaa !9
  br label %316, !llvm.loop !17

378:                                              ; preds = %316
  %379 = load ptr, ptr %23, align 8, !tbaa !5
  %380 = load i64, ptr %8, align 8, !tbaa !9
  %381 = sub nsw i64 %380, 1
  %382 = getelementptr inbounds i64, ptr %379, i64 %381
  %383 = load i64, ptr %382, align 8, !tbaa !9
  %384 = load ptr, ptr %24, align 8, !tbaa !5
  %385 = getelementptr inbounds i64, ptr %384, i64 0
  store i64 %383, ptr %385, align 8, !tbaa !9
  %386 = load ptr, ptr %23, align 8, !tbaa !5
  %387 = load i64, ptr %8, align 8, !tbaa !9
  %388 = getelementptr inbounds i64, ptr %386, i64 %387
  %389 = load i64, ptr %388, align 8, !tbaa !9
  %390 = load ptr, ptr %24, align 8, !tbaa !5
  %391 = getelementptr inbounds i64, ptr %390, i64 1
  store i64 %389, ptr %391, align 8, !tbaa !9
  store i64 2, ptr %25, align 8, !tbaa !9
  br label %499

392:                                              ; preds = %295
  %393 = load i64, ptr %25, align 8, !tbaa !9
  %394 = add nsw i64 %393, -1
  store i64 %394, ptr %25, align 8, !tbaa !9
  br label %395

395:                                              ; preds = %489, %392
  %396 = load i64, ptr %25, align 8, !tbaa !9
  %397 = icmp sgt i64 %396, 0
  br i1 %397, label %398, label %490

398:                                              ; preds = %395
  %399 = load ptr, ptr %22, align 8, !tbaa !5
  %400 = load i64, ptr %15, align 8, !tbaa !9
  %401 = getelementptr inbounds i8, ptr %399, i64 %400
  %402 = load i8, ptr %401, align 1, !tbaa !15
  %403 = sext i8 %402 to i32
  %404 = icmp eq i32 %403, 1
  br i1 %404, label %405, label %447

405:                                              ; preds = %398
  %406 = load ptr, ptr %16, align 8, !tbaa !5
  %407 = load i64, ptr %15, align 8, !tbaa !9
  %408 = getelementptr inbounds %struct.TPPLPoint, ptr %406, i64 %407
  %409 = load ptr, ptr %16, align 8, !tbaa !5
  %410 = load ptr, ptr %24, align 8, !tbaa !5
  %411 = load i64, ptr %25, align 8, !tbaa !9
  %412 = sub nsw i64 %411, 1
  %413 = getelementptr inbounds i64, ptr %410, i64 %412
  %414 = load i64, ptr %413, align 8, !tbaa !9
  %415 = getelementptr inbounds %struct.TPPLPoint, ptr %409, i64 %414
  %416 = load ptr, ptr %16, align 8, !tbaa !5
  %417 = load ptr, ptr %24, align 8, !tbaa !5
  %418 = load i64, ptr %25, align 8, !tbaa !9
  %419 = getelementptr inbounds i64, ptr %417, i64 %418
  %420 = load i64, ptr %419, align 8, !tbaa !9
  %421 = getelementptr inbounds %struct.TPPLPoint, ptr %416, i64 %420
  %422 = call noundef zeroext i1 @_ZN13TPPLPartition8IsConvexER9TPPLPointS1_S1_(ptr noundef nonnull align 1 dereferenceable(1) %26, ptr noundef nonnull align 8 dereferenceable(16) %408, ptr noundef nonnull align 8 dereferenceable(16) %415, ptr noundef nonnull align 8 dereferenceable(16) %421)
  br i1 %422, label %423, label %445

423:                                              ; preds = %405
  %424 = load ptr, ptr %16, align 8, !tbaa !5
  %425 = load i64, ptr %15, align 8, !tbaa !9
  %426 = getelementptr inbounds %struct.TPPLPoint, ptr %424, i64 %425
  %427 = load ptr, ptr %16, align 8, !tbaa !5
  %428 = load ptr, ptr %24, align 8, !tbaa !5
  %429 = load i64, ptr %25, align 8, !tbaa !9
  %430 = sub nsw i64 %429, 1
  %431 = getelementptr inbounds i64, ptr %428, i64 %430
  %432 = load i64, ptr %431, align 8, !tbaa !9
  %433 = getelementptr inbounds %struct.TPPLPoint, ptr %427, i64 %432
  %434 = load ptr, ptr %16, align 8, !tbaa !5
  %435 = load ptr, ptr %24, align 8, !tbaa !5
  %436 = load i64, ptr %25, align 8, !tbaa !9
  %437 = getelementptr inbounds i64, ptr %435, i64 %436
  %438 = load i64, ptr %437, align 8, !tbaa !9
  %439 = getelementptr inbounds %struct.TPPLPoint, ptr %434, i64 %438
  invoke void @_ZN8TPPLPoly8TriangleER9TPPLPointS1_S1_(ptr noundef nonnull align 8 dereferenceable(17) %18, ptr noundef nonnull align 8 dereferenceable(16) %426, ptr noundef nonnull align 8 dereferenceable(16) %433, ptr noundef nonnull align 8 dereferenceable(16) %439)
          to label %440 unwind label %350

440:                                              ; preds = %423
  %441 = load ptr, ptr %7, align 8, !tbaa !5
  invoke void @_ZNSt7__cxx114listI8TPPLPolySaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %441, ptr noundef nonnull align 8 dereferenceable(17) %18)
          to label %442 unwind label %350

442:                                              ; preds = %440
  %443 = load i64, ptr %25, align 8, !tbaa !9
  %444 = add nsw i64 %443, -1
  store i64 %444, ptr %25, align 8, !tbaa !9
  br label %446

445:                                              ; preds = %405
  br label %490

446:                                              ; preds = %442
  br label %489

447:                                              ; preds = %398
  %448 = load ptr, ptr %16, align 8, !tbaa !5
  %449 = load i64, ptr %15, align 8, !tbaa !9
  %450 = getelementptr inbounds %struct.TPPLPoint, ptr %448, i64 %449
  %451 = load ptr, ptr %16, align 8, !tbaa !5
  %452 = load ptr, ptr %24, align 8, !tbaa !5
  %453 = load i64, ptr %25, align 8, !tbaa !9
  %454 = getelementptr inbounds i64, ptr %452, i64 %453
  %455 = load i64, ptr %454, align 8, !tbaa !9
  %456 = getelementptr inbounds %struct.TPPLPoint, ptr %451, i64 %455
  %457 = load ptr, ptr %16, align 8, !tbaa !5
  %458 = load ptr, ptr %24, align 8, !tbaa !5
  %459 = load i64, ptr %25, align 8, !tbaa !9
  %460 = sub nsw i64 %459, 1
  %461 = getelementptr inbounds i64, ptr %458, i64 %460
  %462 = load i64, ptr %461, align 8, !tbaa !9
  %463 = getelementptr inbounds %struct.TPPLPoint, ptr %457, i64 %462
  %464 = call noundef zeroext i1 @_ZN13TPPLPartition8IsConvexER9TPPLPointS1_S1_(ptr noundef nonnull align 1 dereferenceable(1) %26, ptr noundef nonnull align 8 dereferenceable(16) %450, ptr noundef nonnull align 8 dereferenceable(16) %456, ptr noundef nonnull align 8 dereferenceable(16) %463)
  br i1 %464, label %465, label %487

465:                                              ; preds = %447
  %466 = load ptr, ptr %16, align 8, !tbaa !5
  %467 = load i64, ptr %15, align 8, !tbaa !9
  %468 = getelementptr inbounds %struct.TPPLPoint, ptr %466, i64 %467
  %469 = load ptr, ptr %16, align 8, !tbaa !5
  %470 = load ptr, ptr %24, align 8, !tbaa !5
  %471 = load i64, ptr %25, align 8, !tbaa !9
  %472 = getelementptr inbounds i64, ptr %470, i64 %471
  %473 = load i64, ptr %472, align 8, !tbaa !9
  %474 = getelementptr inbounds %struct.TPPLPoint, ptr %469, i64 %473
  %475 = load ptr, ptr %16, align 8, !tbaa !5
  %476 = load ptr, ptr %24, align 8, !tbaa !5
  %477 = load i64, ptr %25, align 8, !tbaa !9
  %478 = sub nsw i64 %477, 1
  %479 = getelementptr inbounds i64, ptr %476, i64 %478
  %480 = load i64, ptr %479, align 8, !tbaa !9
  %481 = getelementptr inbounds %struct.TPPLPoint, ptr %475, i64 %480
  invoke void @_ZN8TPPLPoly8TriangleER9TPPLPointS1_S1_(ptr noundef nonnull align 8 dereferenceable(17) %18, ptr noundef nonnull align 8 dereferenceable(16) %468, ptr noundef nonnull align 8 dereferenceable(16) %474, ptr noundef nonnull align 8 dereferenceable(16) %481)
          to label %482 unwind label %350

482:                                              ; preds = %465
  %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) %18)
          to label %484 unwind label %350

484:                                              ; preds = %482
  %485 = load i64, ptr %25, align 8, !tbaa !9
  %486 = add nsw i64 %485, -1
  store i64 %486, ptr %25, align 8, !tbaa !9
  br label %488

487:                                              ; preds = %447
  br label %490

488:                                              ; preds = %484
  br label %489

489:                                              ; preds = %488, %446
  br label %395, !llvm.loop !18

490:                                              ; preds = %487, %445, %395
  %491 = load i64, ptr %25, align 8, !tbaa !9
  %492 = add nsw i64 %491, 1
  store i64 %492, ptr %25, align 8, !tbaa !9
  %493 = load i64, ptr %15, align 8, !tbaa !9
  %494 = load ptr, ptr %24, align 8, !tbaa !5
  %495 = load i64, ptr %25, align 8, !tbaa !9
  %496 = getelementptr inbounds i64, ptr %494, i64 %495
  store i64 %493, ptr %496, align 8, !tbaa !9
  %497 = load i64, ptr %25, align 8, !tbaa !9
  %498 = add nsw i64 %497, 1
  store i64 %498, ptr %25, align 8, !tbaa !9
  br label %499

499:                                              ; preds = %490, %378
  br label %500

500:                                              ; preds = %499
  %501 = load i64, ptr %8, align 8, !tbaa !9
  %502 = add nsw i64 %501, 1
  store i64 %502, ptr %8, align 8, !tbaa !9
  br label %290, !llvm.loop !19

503:                                              ; preds = %290
  %504 = load ptr, ptr %23, align 8, !tbaa !5
  %505 = load i64, ptr %8, align 8, !tbaa !9
  %506 = getelementptr inbounds i64, ptr %504, i64 %505
  %507 = load i64, ptr %506, align 8, !tbaa !9
  store i64 %507, ptr %15, align 8, !tbaa !9
  store i64 0, ptr %10, align 8, !tbaa !9
  br label %508

508:                                              ; preds = %563, %503
  %509 = load i64, ptr %10, align 8, !tbaa !9
  %510 = load i64, ptr %25, align 8, !tbaa !9
  %511 = sub nsw i64 %510, 1
  %512 = icmp slt i64 %509, %511
  br i1 %512, label %513, label %566

513:                                              ; preds = %508
  %514 = load ptr, ptr %22, align 8, !tbaa !5
  %515 = load ptr, ptr %24, align 8, !tbaa !5
  %516 = load i64, ptr %10, align 8, !tbaa !9
  %517 = add nsw i64 %516, 1
  %518 = getelementptr inbounds i64, ptr %515, i64 %517
  %519 = load i64, ptr %518, align 8, !tbaa !9
  %520 = getelementptr inbounds i8, ptr %514, i64 %519
  %521 = load i8, ptr %520, align 1, !tbaa !15
  %522 = sext i8 %521 to i32
  %523 = icmp eq i32 %522, 1
  br i1 %523, label %524, label %542

524:                                              ; preds = %513
  %525 = load ptr, ptr %16, align 8, !tbaa !5
  %526 = load ptr, ptr %24, align 8, !tbaa !5
  %527 = load i64, ptr %10, align 8, !tbaa !9
  %528 = getelementptr inbounds i64, ptr %526, i64 %527
  %529 = load i64, ptr %528, align 8, !tbaa !9
  %530 = getelementptr inbounds %struct.TPPLPoint, ptr %525, i64 %529
  %531 = load ptr, ptr %16, align 8, !tbaa !5
  %532 = load ptr, ptr %24, align 8, !tbaa !5
  %533 = load i64, ptr %10, align 8, !tbaa !9
  %534 = add nsw i64 %533, 1
  %535 = getelementptr inbounds i64, ptr %532, i64 %534
  %536 = load i64, ptr %535, align 8, !tbaa !9
  %537 = getelementptr inbounds %struct.TPPLPoint, ptr %531, i64 %536
  %538 = load ptr, ptr %16, align 8, !tbaa !5
  %539 = load i64, ptr %15, align 8, !tbaa !9
  %540 = getelementptr inbounds %struct.TPPLPoint, ptr %538, i64 %539
  invoke void @_ZN8TPPLPoly8TriangleER9TPPLPointS1_S1_(ptr noundef nonnull align 8 dereferenceable(17) %18, ptr noundef nonnull align 8 dereferenceable(16) %530, ptr noundef nonnull align 8 dereferenceable(16) %537, ptr noundef nonnull align 8 dereferenceable(16) %540)
          to label %541 unwind label %350

541:                                              ; preds = %524
  br label %560

542:                                              ; preds = %513
  %543 = load ptr, ptr %16, align 8, !tbaa !5
  %544 = load ptr, ptr %24, align 8, !tbaa !5
  %545 = load i64, ptr %10, align 8, !tbaa !9
  %546 = add nsw i64 %545, 1
  %547 = getelementptr inbounds i64, ptr %544, i64 %546
  %548 = load i64, ptr %547, align 8, !tbaa !9
  %549 = getelementptr inbounds %struct.TPPLPoint, ptr %543, i64 %548
  %550 = load ptr, ptr %16, align 8, !tbaa !5
  %551 = load ptr, ptr %24, align 8, !tbaa !5
  %552 = load i64, ptr %10, align 8, !tbaa !9
  %553 = getelementptr inbounds i64, ptr %551, i64 %552
  %554 = load i64, ptr %553, align 8, !tbaa !9
  %555 = getelementptr inbounds %struct.TPPLPoint, ptr %550, i64 %554
  %556 = load ptr, ptr %16, align 8, !tbaa !5
  %557 = load i64, ptr %15, align 8, !tbaa !9
  %558 = getelementptr inbounds %struct.TPPLPoint, ptr %556, i64 %557
  invoke void @_ZN8TPPLPoly8TriangleER9TPPLPointS1_S1_(ptr noundef nonnull align 8 dereferenceable(17) %18, ptr noundef nonnull align 8 dereferenceable(16) %549, ptr noundef nonnull align 8 dereferenceable(16) %555, ptr noundef nonnull align 8 dereferenceable(16) %558)
          to label %559 unwind label %350

559:                                              ; preds = %542
  br label %560

560:                                              ; preds = %559, %541
  %561 = load ptr, ptr %7, align 8, !tbaa !5
  invoke void @_ZNSt7__cxx114listI8TPPLPolySaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %561, ptr noundef nonnull align 8 dereferenceable(17) %18)
          to label %562 unwind label %350

562:                                              ; preds = %560
  br label %563

563:                                              ; preds = %562
  %564 = load i64, ptr %10, align 8, !tbaa !9
  %565 = add nsw i64 %564, 1
  store i64 %565, ptr %10, align 8, !tbaa !9
  br label %508, !llvm.loop !20

566:                                              ; preds = %508
  %567 = load ptr, ptr %23, align 8, !tbaa !5
  %568 = icmp eq ptr %567, null
  br i1 %568, label %570, label %569

569:                                              ; preds = %566
  call void @_ZdaPv(ptr noundef %567) #8
  br label %570

570:                                              ; preds = %569, %566
  %571 = load ptr, ptr %22, align 8, !tbaa !5
  %572 = icmp eq ptr %571, null
  br i1 %572, label %574, label %573

573:                                              ; preds = %570
  call void @_ZdaPv(ptr noundef %571) #8
  br label %574

574:                                              ; preds = %573, %570
  %575 = load ptr, ptr %24, align 8, !tbaa !5
  %576 = icmp eq ptr %575, null
  br i1 %576, label %578, label %577

577:                                              ; preds = %574
  call void @_ZdaPv(ptr noundef %575) #8
  br label %578

578:                                              ; preds = %577, %574
  store i32 1, ptr %4, align 4
  store i32 1, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br label %582

579:                                              ; preds = %350, %346
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  br label %580

580:                                              ; preds = %579, %151
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  br label %581

581:                                              ; preds = %580, %147
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br label %584

582:                                              ; preds = %578, %121, %97, %35
  call void @_ZN8TPPLPolyD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %18) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  %583 = load i32, ptr %4, align 4
  ret i32 %583

584:                                              ; preds = %581, %36
  call void @_ZN8TPPLPolyD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %18) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %585

585:                                              ; preds = %584
  %586 = load ptr, ptr %19, align 8
  %587 = load i32, ptr %20, align 4
  %588 = insertvalue { ptr, i32 } poison, ptr %586, 0
  %589 = insertvalue { ptr, i32 } %588, i32 %587, 1
  resume { ptr, i32 } %589
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN8TPPLPoly9GetPointsEv(ptr noundef nonnull align 8 dereferenceable(17)) #5 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 nosync nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }
attributes #7 = { builtin allocsize(0) }
attributes #8 = { 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 = !{!"long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = !{!7, !7, i64 0}
!16 = distinct !{!16, !12}
!17 = distinct !{!17, !12}
!18 = distinct !{!18, !12}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}


; 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"

%class.TPPLPoly = type <{ ptr, i64, i8, [7 x i8] }>
%struct.TPPLPoint = type { double, double }

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 2) i32 @_ZN13TPPLPartition19TriangulateMonotoneEP8TPPLPolyPNSt7__cxx114listIS0_SaIS0_EEE(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %class.TPPLPoly, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #6
  call void @_ZN8TPPLPolyC1Ev(ptr noundef nonnull align 8 dereferenceable(17) %4)
  %5 = call noundef i64 @_ZN8TPPLPoly12GetNumPointsEv(ptr noundef nonnull align 8 dereferenceable(17) %1)
  %6 = call noundef ptr @_ZN8TPPLPoly9GetPointsEv(ptr noundef nonnull align 8 dereferenceable(17) %1)
  %7 = icmp slt i64 %5, 3
  br i1 %7, label %.loopexit279, label %10

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

10:                                               ; preds = %3
  %11 = icmp eq i64 %5, 3
  br i1 %11, label %12, label %.lr.ph.preheader

12:                                               ; preds = %10
  invoke void @_ZNSt7__cxx114listI8TPPLPolySaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(17) %1)
          to label %.lr.ph.preheader unwind label %8

.lr.ph.preheader:                                 ; preds = %10, %12
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %.0229290 = phi i64 [ %18, %.lr.ph ], [ 1, %.lr.ph.preheader ]
  %.0243289 = phi i64 [ %.1244, %.lr.ph ], [ 0, %.lr.ph.preheader ]
  %.0252288 = phi i64 [ %spec.select, %.lr.ph ], [ 0, %.lr.ph.preheader ]
  %13 = getelementptr inbounds %struct.TPPLPoint, ptr %6, i64 %.0229290
  %14 = getelementptr inbounds %struct.TPPLPoint, ptr %6, i64 %.0252288
  %15 = call noundef zeroext i1 @_ZN13TPPLPartition5BelowER9TPPLPointS1_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(16) %14)
  %spec.select = select i1 %15, i64 %.0229290, i64 %.0252288
  %16 = getelementptr inbounds %struct.TPPLPoint, ptr %6, i64 %.0243289
  %17 = call noundef zeroext i1 @_ZN13TPPLPartition5BelowER9TPPLPointS1_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(16) %13)
  %.1244 = select i1 %17, i64 %.0229290, i64 %.0243289
  %18 = add nuw nsw i64 %.0229290, 1
  %exitcond.not = icmp eq i64 %18, %5
  br i1 %exitcond.not, label %.preheader280, label %.lr.ph, !llvm.loop !5

.preheader280:                                    ; preds = %.lr.ph, %19
  %.1230 = phi i64 [ %spec.store.select, %19 ], [ %.1244, %.lr.ph ]
  %.not = icmp eq i64 %.1230, %spec.select
  br i1 %.not, label %.preheader278, label %19

19:                                               ; preds = %.preheader280
  %20 = add nsw i64 %.1230, 1
  %.not270 = icmp slt i64 %20, %5
  %spec.store.select = select i1 %.not270, i64 %20, i64 0
  %21 = getelementptr inbounds %struct.TPPLPoint, ptr %6, i64 %spec.store.select
  %22 = getelementptr inbounds %struct.TPPLPoint, ptr %6, i64 %.1230
  %23 = call noundef zeroext i1 @_ZN13TPPLPartition5BelowER9TPPLPointS1_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(16) %22)
  br i1 %23, label %.preheader280, label %.loopexit279, !llvm.loop !7

.preheader278:                                    ; preds = %.preheader280, %24
  %.2231 = phi i64 [ %spec.store.select1, %24 ], [ %spec.select, %.preheader280 ]
  %.not260 = icmp eq i64 %.2231, %.1244
  br i1 %.not260, label %29, label %24

24:                                               ; preds = %.preheader278
  %25 = add nsw i64 %.2231, 1
  %.not269 = icmp slt i64 %25, %5
  %spec.store.select1 = select i1 %.not269, i64 %25, i64 0
  %26 = getelementptr inbounds %struct.TPPLPoint, ptr %6, i64 %.2231
  %27 = getelementptr inbounds %struct.TPPLPoint, ptr %6, i64 %spec.store.select1
  %28 = call noundef zeroext i1 @_ZN13TPPLPartition5BelowER9TPPLPointS1_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 8 dereferenceable(16) %27)
  br i1 %28, label %.preheader278, label %.loopexit279, !llvm.loop !8

29:                                               ; preds = %.preheader278
  %30 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %5) #7
          to label %31 unwind label %40

31:                                               ; preds = %29
  %32 = icmp ugt i64 %5, 2305843009213693951
  %33 = shl nuw i64 %5, 3
  %34 = select i1 %32, i64 -1, i64 %33
  %35 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %34) #7
          to label %.lr.ph295.preheader unwind label %42

.lr.ph295.preheader:                              ; preds = %31
  store i64 %.1244, ptr %35, align 8, !tbaa !9
  %36 = getelementptr inbounds i8, ptr %30, i64 %.1244
  store i8 0, ptr %36, align 1, !tbaa !13
  %37 = add nsw i64 %5, -1
  %38 = icmp slt i64 %.1244, 1
  %spec.select271 = select i1 %38, i64 %5, i64 %.1244
  %.0245 = add nsw i64 %spec.select271, -1
  %39 = add nsw i64 %.1244, 1
  %.not261 = icmp slt i64 %39, %5
  %spec.store.select2 = select i1 %.not261, i64 %39, i64 0
  %smax324 = call i64 @llvm.smax.i64(i64 %37, i64 2)
  br label %.lr.ph295

40:                                               ; preds = %29
  %41 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

42:                                               ; preds = %31
  %43 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.lr.ph295:                                        ; preds = %.lr.ph295.preheader, %64
  %.3232294 = phi i64 [ %66, %64 ], [ 1, %.lr.ph295.preheader ]
  %.1246293 = phi i64 [ %.4249, %64 ], [ %.0245, %.lr.ph295.preheader ]
  %.0250292 = phi i64 [ %.1251, %64 ], [ %spec.store.select2, %.lr.ph295.preheader ]
  %44 = icmp eq i64 %.0250292, %spec.select
  br i1 %44, label %45, label %49

45:                                               ; preds = %.lr.ph295
  %46 = getelementptr inbounds i64, ptr %35, i64 %.3232294
  store i64 %.1246293, ptr %46, align 8, !tbaa !9
  %47 = add nsw i64 %.1246293, -1
  %48 = icmp slt i64 %.1246293, 1
  %spec.select272 = select i1 %48, i64 %37, i64 %47
  br label %64

49:                                               ; preds = %.lr.ph295
  %50 = icmp eq i64 %.1246293, %spec.select
  br i1 %50, label %51, label %54

51:                                               ; preds = %49
  %52 = getelementptr inbounds i64, ptr %35, i64 %.3232294
  store i64 %.0250292, ptr %52, align 8, !tbaa !9
  %53 = add nsw i64 %.0250292, 1
  %.not268 = icmp slt i64 %53, %5
  %spec.store.select3 = select i1 %.not268, i64 %53, i64 0
  br label %64

54:                                               ; preds = %49
  %55 = getelementptr inbounds %struct.TPPLPoint, ptr %6, i64 %.0250292
  %56 = getelementptr inbounds %struct.TPPLPoint, ptr %6, i64 %.1246293
  %57 = call noundef zeroext i1 @_ZN13TPPLPartition5BelowER9TPPLPointS1_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull align 8 dereferenceable(16) %55, ptr noundef nonnull align 8 dereferenceable(16) %56)
  %58 = getelementptr inbounds i64, ptr %35, i64 %.3232294
  br i1 %57, label %59, label %62

59:                                               ; preds = %54
  store i64 %.1246293, ptr %58, align 8, !tbaa !9
  %60 = add nsw i64 %.1246293, -1
  %61 = icmp slt i64 %.1246293, 1
  %spec.select273 = select i1 %61, i64 %37, i64 %60
  br label %64

62:                                               ; preds = %54
  store i64 %.0250292, ptr %58, align 8, !tbaa !9
  %63 = add nsw i64 %.0250292, 1
  %.not267 = icmp slt i64 %63, %5
  %spec.store.select4 = select i1 %.not267, i64 %63, i64 0
  br label %64

64:                                               ; preds = %45, %59, %62, %51
  %.1246293.sink = phi i64 [ %.1246293, %45 ], [ %.1246293, %59 ], [ %.0250292, %62 ], [ %.0250292, %51 ]
  %.sink = phi i8 [ -1, %45 ], [ -1, %59 ], [ 1, %62 ], [ 1, %51 ]
  %.1251 = phi i64 [ %spec.select, %45 ], [ %.0250292, %59 ], [ %spec.store.select4, %62 ], [ %spec.store.select3, %51 ]
  %.4249 = phi i64 [ %spec.select272, %45 ], [ %spec.select273, %59 ], [ %.1246293, %62 ], [ %spec.select, %51 ]
  %65 = getelementptr inbounds i8, ptr %30, i64 %.1246293.sink
  store i8 %.sink, ptr %65, align 1, !tbaa !13
  %66 = add nuw nsw i64 %.3232294, 1
  %exitcond325.not = icmp eq i64 %66, %smax324
  br i1 %exitcond325.not, label %._crit_edge, label %.lr.ph295, !llvm.loop !14

._crit_edge:                                      ; preds = %64
  %67 = getelementptr inbounds i64, ptr %35, i64 %smax324
  store i64 %spec.select, ptr %67, align 8, !tbaa !9
  %68 = getelementptr inbounds i8, ptr %30, i64 %spec.select
  store i8 0, ptr %68, align 1, !tbaa !13
  %69 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %34) #7
          to label %70 unwind label %92

70:                                               ; preds = %._crit_edge
  %71 = getelementptr i8, ptr %69, i64 8
  %72 = load <2 x i64>, ptr %35, align 8, !tbaa !9
  store <2 x i64> %72, ptr %69, align 8, !tbaa !9
  br i1 %11, label %._crit_edge318, label %.lr.ph317.preheader

.lr.ph317.preheader:                              ; preds = %70
  %smax327 = call i64 @llvm.smax.i64(i64 %37, i64 3)
  br label %.lr.ph317

.lr.ph317:                                        ; preds = %.lr.ph317.preheader, %120
  %.0315 = phi i64 [ %.3, %120 ], [ 2, %.lr.ph317.preheader ]
  %.4314 = phi i64 [ %121, %120 ], [ 2, %.lr.ph317.preheader ]
  %73 = getelementptr inbounds i64, ptr %35, i64 %.4314
  %74 = load i64, ptr %73, align 8, !tbaa !9
  %75 = getelementptr inbounds i8, ptr %30, i64 %74
  %76 = load i8, ptr %75, align 1, !tbaa !13
  %77 = add nsw i64 %.0315, -1
  %78 = getelementptr inbounds i64, ptr %69, i64 %77
  %79 = load i64, ptr %78, align 8, !tbaa !9
  %80 = getelementptr inbounds i8, ptr %30, i64 %79
  %81 = load i8, ptr %80, align 1, !tbaa !13
  %.not262 = icmp eq i8 %76, %81
  %82 = icmp sgt i64 %.0315, 1
  br i1 %.not262, label %.preheader, label %.preheader277

.preheader277:                                    ; preds = %.lr.ph317
  br i1 %82, label %.lr.ph299, label %._crit_edge300

.lr.ph299:                                        ; preds = %.preheader277
  %83 = getelementptr inbounds %struct.TPPLPoint, ptr %6, i64 %74
  %84 = icmp eq i8 %76, 1
  br label %.invoke334

.preheader:                                       ; preds = %.lr.ph317
  br i1 %82, label %.lr.ph304, label %._crit_edge305

.lr.ph304:                                        ; preds = %.preheader
  %85 = getelementptr inbounds %struct.TPPLPoint, ptr %6, i64 %74
  %86 = icmp eq i8 %76, 1
  br label %99

.invoke334:                                       ; preds = %.lr.ph299, %95
  %.0241298 = phi i64 [ 0, %.lr.ph299 ], [ %96, %95 ]
  %87 = getelementptr inbounds i64, ptr %69, i64 %.0241298
  %88 = getelementptr inbounds i8, ptr %87, i64 8
  %. = select i1 %84, ptr %87, ptr %88
  %.341 = select i1 %84, ptr %88, ptr %87
  %.pn = load i64, ptr %.341, align 8, !tbaa !9
  %89 = getelementptr inbounds %struct.TPPLPoint, ptr %6, i64 %.pn
  %90 = load i64, ptr %., align 8, !tbaa !9
  %91 = getelementptr inbounds %struct.TPPLPoint, ptr %6, i64 %90
  invoke void @_ZN8TPPLPoly8TriangleER9TPPLPointS1_S1_(ptr noundef nonnull align 8 dereferenceable(17) %4, ptr noundef nonnull align 8 dereferenceable(16) %89, ptr noundef nonnull align 8 dereferenceable(16) %91, ptr noundef nonnull align 8 dereferenceable(16) %83)
          to label %94 unwind label %.loopexit.split-lp.loopexit.split-lp

92:                                               ; preds = %._crit_edge
  %93 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

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

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

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

94:                                               ; preds = %.invoke334
  invoke void @_ZNSt7__cxx114listI8TPPLPolySaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(17) %4)
          to label %95 unwind label %.loopexit.split-lp.loopexit.split-lp

95:                                               ; preds = %94
  %96 = add nuw nsw i64 %.0241298, 1
  %exitcond326.not = icmp eq i64 %96, %77
  br i1 %exitcond326.not, label %._crit_edge300, label %.invoke334, !llvm.loop !15

._crit_edge300:                                   ; preds = %95, %.preheader277
  %97 = getelementptr i8, ptr %73, i64 -8
  %98 = load i64, ptr %97, align 8, !tbaa !9
  store i64 %98, ptr %69, align 8, !tbaa !9
  store i64 %74, ptr %71, align 8, !tbaa !9
  br label %120

99:                                               ; preds = %.lr.ph304, %117
  %.1303 = phi i64 [ %77, %.lr.ph304 ], [ %.1, %117 ]
  %.1.in302 = phi i64 [ %.0315, %.lr.ph304 ], [ %.1303, %117 ]
  %100 = getelementptr i64, ptr %69, i64 %.1303
  br i1 %86, label %101, label %108

101:                                              ; preds = %99
  %102 = getelementptr i8, ptr %100, i64 -8
  %103 = load i64, ptr %102, align 8, !tbaa !9
  %104 = getelementptr inbounds %struct.TPPLPoint, ptr %6, i64 %103
  %105 = load i64, ptr %100, align 8, !tbaa !9
  %106 = getelementptr inbounds %struct.TPPLPoint, ptr %6, i64 %105
  %107 = call noundef zeroext i1 @_ZN13TPPLPartition8IsConvexER9TPPLPointS1_S1_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull align 8 dereferenceable(16) %85, ptr noundef nonnull align 8 dereferenceable(16) %104, ptr noundef nonnull align 8 dereferenceable(16) %106)
  br i1 %107, label %.invoke338, label %._crit_edge305

108:                                              ; preds = %99
  %109 = load i64, ptr %100, align 8, !tbaa !9
  %110 = getelementptr inbounds %struct.TPPLPoint, ptr %6, i64 %109
  %111 = getelementptr i8, ptr %100, i64 -8
  %112 = load i64, ptr %111, align 8, !tbaa !9
  %113 = getelementptr inbounds %struct.TPPLPoint, ptr %6, i64 %112
  %114 = call noundef zeroext i1 @_ZN13TPPLPartition8IsConvexER9TPPLPointS1_S1_(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull align 8 dereferenceable(16) %85, ptr noundef nonnull align 8 dereferenceable(16) %110, ptr noundef nonnull align 8 dereferenceable(16) %113)
  br i1 %114, label %.invoke338, label %._crit_edge305

.invoke338:                                       ; preds = %108, %101
  %115 = phi ptr [ %104, %101 ], [ %110, %108 ]
  %116 = phi ptr [ %106, %101 ], [ %113, %108 ]
  invoke void @_ZN8TPPLPoly8TriangleER9TPPLPointS1_S1_(ptr noundef nonnull align 8 dereferenceable(17) %4, ptr noundef nonnull align 8 dereferenceable(16) %85, ptr noundef nonnull align 8 dereferenceable(16) %115, ptr noundef nonnull align 8 dereferenceable(16) %116)
          to label %.invoke333 unwind label %.loopexit.split-lp.loopexit

.invoke333:                                       ; preds = %.invoke338
  invoke void @_ZNSt7__cxx114listI8TPPLPolySaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(17) %4)
          to label %117 unwind label %.loopexit.split-lp.loopexit

117:                                              ; preds = %.invoke333
  %.1 = add nsw i64 %.1303, -1
  %118 = icmp ugt i64 %.1303, 1
  br i1 %118, label %99, label %._crit_edge305, !llvm.loop !16

._crit_edge305:                                   ; preds = %117, %101, %108, %.preheader
  %.1.in.lcssa = phi i64 [ %.0315, %.preheader ], [ %.1.in302, %108 ], [ %.1.in302, %101 ], [ 1, %117 ]
  %.1.lcssa = phi i64 [ %77, %.preheader ], [ %.1303, %108 ], [ %.1303, %101 ], [ 0, %117 ]
  %gep = getelementptr i64, ptr %71, i64 %.1.lcssa
  store i64 %74, ptr %gep, align 8, !tbaa !9
  %119 = add nsw i64 %.1.in.lcssa, 1
  br label %120

120:                                              ; preds = %._crit_edge300, %._crit_edge305
  %.3 = phi i64 [ 2, %._crit_edge300 ], [ %119, %._crit_edge305 ]
  %121 = add nuw nsw i64 %.4314, 1
  %exitcond328.not = icmp eq i64 %121, %smax327
  br i1 %exitcond328.not, label %._crit_edge318.loopexit, label %.lr.ph317, !llvm.loop !17

._crit_edge318.loopexit:                          ; preds = %120
  %122 = add nsw i64 %.3, -1
  br label %._crit_edge318

._crit_edge318:                                   ; preds = %._crit_edge318.loopexit, %70
  %.4.lcssa = phi i64 [ 2, %70 ], [ %smax327, %._crit_edge318.loopexit ]
  %.0.lcssa = phi i64 [ 1, %70 ], [ %122, %._crit_edge318.loopexit ]
  %123 = getelementptr inbounds i64, ptr %35, i64 %.4.lcssa
  %124 = load i64, ptr %123, align 8, !tbaa !9
  %125 = getelementptr inbounds %struct.TPPLPoint, ptr %6, i64 %124
  %smax329 = call i64 @llvm.smax.i64(i64 %.0.lcssa, i64 0)
  br label %126

126:                                              ; preds = %137, %._crit_edge318
  %.1242 = phi i64 [ 0, %._crit_edge318 ], [ %127, %137 ]
  %exitcond330.not = icmp eq i64 %.1242, %smax329
  br i1 %exitcond330.not, label %138, label %.invoke

.invoke:                                          ; preds = %126
  %127 = add nuw nsw i64 %.1242, 1
  %128 = getelementptr inbounds i64, ptr %69, i64 %127
  %129 = load i64, ptr %128, align 8, !tbaa !9
  %130 = getelementptr inbounds i8, ptr %30, i64 %129
  %131 = load i8, ptr %130, align 1, !tbaa !13
  %132 = icmp eq i8 %131, 1
  %133 = getelementptr inbounds i64, ptr %69, i64 %.1242
  %134 = load i64, ptr %133, align 8, !tbaa !9
  %.342 = select i1 %132, i64 %129, i64 %134
  %.343 = select i1 %132, i64 %134, i64 %129
  %135 = getelementptr inbounds %struct.TPPLPoint, ptr %6, i64 %.343
  %136 = getelementptr inbounds %struct.TPPLPoint, ptr %6, i64 %.342
  invoke void @_ZN8TPPLPoly8TriangleER9TPPLPointS1_S1_(ptr noundef nonnull align 8 dereferenceable(17) %4, ptr noundef nonnull align 8 dereferenceable(16) %135, ptr noundef nonnull align 8 dereferenceable(16) %136, ptr noundef nonnull align 8 dereferenceable(16) %125)
          to label %137 unwind label %.loopexit

137:                                              ; preds = %.invoke
  invoke void @_ZNSt7__cxx114listI8TPPLPolySaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(17) %4)
          to label %126 unwind label %.loopexit, !llvm.loop !18

138:                                              ; preds = %126
  call void @_ZdaPv(ptr noundef nonnull %35) #8
  call void @_ZdaPv(ptr noundef nonnull %30) #8
  call void @_ZdaPv(ptr noundef nonnull %69) #8
  br label %.loopexit279

.loopexit279:                                     ; preds = %19, %24, %3, %138
  %.0228 = phi i32 [ 1, %138 ], [ 0, %3 ], [ 0, %24 ], [ 0, %19 ]
  call void @_ZN8TPPLPolyD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  ret i32 %.0228

.loopexit.split-lp:                               ; preds = %.loopexit, %.loopexit.split-lp.loopexit.split-lp, %.loopexit.split-lp.loopexit, %40, %92, %42, %8
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %9, %8 ], [ %41, %40 ], [ %43, %42 ], [ %93, %92 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit274, %.loopexit.split-lp.loopexit ], [ %lpad.loopexit.split-lp275, %.loopexit.split-lp.loopexit.split-lp ]
  call void @_ZN8TPPLPolyD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  resume { ptr, i32 } %.pn.pn.pn.pn
}

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

declare void @_ZN8TPPLPolyC1Ev(ptr) local_unnamed_addr

declare void @_ZN8TPPLPolyD1Ev(ptr) local_unnamed_addr

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smax.i64(i64, i64) #5

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 = { 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 #2 = { 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 #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }
attributes #7 = { builtin allocsize(0) }
attributes #8 = { 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}
!7 = distinct !{!7, !6}
!8 = distinct !{!8, !6}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !11, i64 0}
!11 = !{!"omnipotent char", !12, i64 0}
!12 = !{!"Simple C++ TBAA"}
!13 = !{!11, !11, i64 0}
!14 = distinct !{!14, !6}
!15 = distinct !{!15, !6}
!16 = distinct !{!16, !6}
!17 = distinct !{!17, !6}
!18 = distinct !{!18, !6}


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