; 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.TPPLPartition::PartitionVertex" = type { i8, i8, i8, %struct.TPPLPoint, double, ptr, ptr }
%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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

21:                                               ; preds = %3
  %22 = icmp slt i64 %20, 3
  br i1 %22, label %23, label %28

23:                                               ; preds = %21
  store i32 0, ptr %4, align 4
  store i32 1, ptr %17, align 4
  br label %278

24:                                               ; preds = %266, %249, %227, %221, %197, %186, %115, %52, %40, %37, %33, %28, %3
  %25 = landingpad { ptr, i32 }
          cleanup
  %26 = extractvalue { ptr, i32 } %25, 0
  store ptr %26, ptr %15, align 8
  %27 = extractvalue { ptr, i32 } %25, 1
  store i32 %27, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @_ZN8TPPLPolyD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %11) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  br label %280

28:                                               ; preds = %21
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = invoke noundef i64 @_ZN8TPPLPoly12GetNumPointsEv(ptr noundef nonnull align 8 dereferenceable(17) %29)
          to label %31 unwind label %24

31:                                               ; preds = %28
  %32 = icmp eq i64 %30, 3
  br i1 %32, label %33, label %37

33:                                               ; preds = %31
  %34 = load ptr, ptr %7, align 8, !tbaa !5
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZNSt7__cxx114listI8TPPLPolySaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %34, ptr noundef nonnull align 8 dereferenceable(17) %35)
          to label %36 unwind label %24

36:                                               ; preds = %33
  store i32 1, ptr %4, align 4
  store i32 1, ptr %17, align 4
  br label %278

37:                                               ; preds = %31
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = invoke noundef i64 @_ZN8TPPLPoly12GetNumPointsEv(ptr noundef nonnull align 8 dereferenceable(17) %38)
          to label %40 unwind label %24

40:                                               ; preds = %37
  store i64 %39, ptr %8, align 8, !tbaa !9
  %41 = load i64, ptr %8, align 8, !tbaa !9
  %42 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %41, i64 48)
  %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) #8
          to label %47 unwind label %24

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

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

52:                                               ; preds = %48
  %53 = load ptr, ptr %9, align 8, !tbaa !5
  %54 = load i64, ptr %12, align 8, !tbaa !9
  %55 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %53, i64 %54
  %56 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %55, i32 0, i32 0
  store i8 1, ptr %56, align 8, !tbaa !11
  %57 = load ptr, ptr %6, align 8, !tbaa !5
  %58 = load i64, ptr %12, align 8, !tbaa !9
  %59 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %57, i64 noundef %58)
          to label %60 unwind label %24

60:                                               ; preds = %52
  %61 = load ptr, ptr %9, align 8, !tbaa !5
  %62 = load i64, ptr %12, align 8, !tbaa !9
  %63 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %61, i64 %62
  %64 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %63, i32 0, i32 3
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %64, ptr align 8 %59, i64 16, i1 false), !tbaa.struct !16
  %65 = load i64, ptr %12, align 8, !tbaa !9
  %66 = load i64, ptr %8, align 8, !tbaa !9
  %67 = sub nsw i64 %66, 1
  %68 = icmp eq i64 %65, %67
  br i1 %68, label %69, label %76

69:                                               ; preds = %60
  %70 = load ptr, ptr %9, align 8, !tbaa !5
  %71 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %70, i64 0
  %72 = load ptr, ptr %9, align 8, !tbaa !5
  %73 = load i64, ptr %12, align 8, !tbaa !9
  %74 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %72, i64 %73
  %75 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %74, i32 0, i32 6
  store ptr %71, ptr %75, align 8, !tbaa !18
  br label %85

76:                                               ; preds = %60
  %77 = load ptr, ptr %9, align 8, !tbaa !5
  %78 = load i64, ptr %12, align 8, !tbaa !9
  %79 = add nsw i64 %78, 1
  %80 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %77, i64 %79
  %81 = load ptr, ptr %9, align 8, !tbaa !5
  %82 = load i64, ptr %12, align 8, !tbaa !9
  %83 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %81, i64 %82
  %84 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %83, i32 0, i32 6
  store ptr %80, ptr %84, align 8, !tbaa !18
  br label %85

85:                                               ; preds = %76, %69
  %86 = load i64, ptr %12, align 8, !tbaa !9
  %87 = icmp eq i64 %86, 0
  br i1 %87, label %88, label %97

88:                                               ; preds = %85
  %89 = load ptr, ptr %9, align 8, !tbaa !5
  %90 = load i64, ptr %8, align 8, !tbaa !9
  %91 = sub nsw i64 %90, 1
  %92 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %89, i64 %91
  %93 = load ptr, ptr %9, align 8, !tbaa !5
  %94 = load i64, ptr %12, align 8, !tbaa !9
  %95 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %93, i64 %94
  %96 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %95, i32 0, i32 5
  store ptr %92, ptr %96, align 8, !tbaa !19
  br label %106

97:                                               ; preds = %85
  %98 = load ptr, ptr %9, align 8, !tbaa !5
  %99 = load i64, ptr %12, align 8, !tbaa !9
  %100 = sub nsw i64 %99, 1
  %101 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %98, i64 %100
  %102 = load ptr, ptr %9, align 8, !tbaa !5
  %103 = load i64, ptr %12, align 8, !tbaa !9
  %104 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %102, i64 %103
  %105 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %104, i32 0, i32 5
  store ptr %101, ptr %105, align 8, !tbaa !19
  br label %106

106:                                              ; preds = %97, %88
  br label %107

107:                                              ; preds = %106
  %108 = load i64, ptr %12, align 8, !tbaa !9
  %109 = add nsw i64 %108, 1
  store i64 %109, ptr %12, align 8, !tbaa !9
  br label %48, !llvm.loop !20

110:                                              ; preds = %48
  store i64 0, ptr %12, align 8, !tbaa !9
  br label %111

111:                                              ; preds = %122, %110
  %112 = load i64, ptr %12, align 8, !tbaa !9
  %113 = load i64, ptr %8, align 8, !tbaa !9
  %114 = icmp slt i64 %112, %113
  br i1 %114, label %115, label %125

115:                                              ; preds = %111
  %116 = load ptr, ptr %9, align 8, !tbaa !5
  %117 = load i64, ptr %12, align 8, !tbaa !9
  %118 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %116, i64 %117
  %119 = load ptr, ptr %9, align 8, !tbaa !5
  %120 = load i64, ptr %8, align 8, !tbaa !9
  invoke void @_ZN13TPPLPartition12UpdateVertexEPNS_15PartitionVertexES1_l(ptr noundef nonnull align 1 dereferenceable(1) %18, ptr noundef %118, ptr noundef %119, i64 noundef %120)
          to label %121 unwind label %24

121:                                              ; preds = %115
  br label %122

122:                                              ; preds = %121
  %123 = load i64, ptr %12, align 8, !tbaa !9
  %124 = add nsw i64 %123, 1
  store i64 %124, ptr %12, align 8, !tbaa !9
  br label %111, !llvm.loop !22

125:                                              ; preds = %111
  store i64 0, ptr %12, align 8, !tbaa !9
  br label %126

126:                                              ; preds = %234, %125
  %127 = load i64, ptr %12, align 8, !tbaa !9
  %128 = load i64, ptr %8, align 8, !tbaa !9
  %129 = sub nsw i64 %128, 3
  %130 = icmp slt i64 %127, %129
  br i1 %130, label %131, label %237

131:                                              ; preds = %126
  store i8 0, ptr %14, align 1, !tbaa !23
  store i64 0, ptr %13, align 8, !tbaa !9
  br label %132

132:                                              ; preds = %175, %131
  %133 = load i64, ptr %13, align 8, !tbaa !9
  %134 = load i64, ptr %8, align 8, !tbaa !9
  %135 = icmp slt i64 %133, %134
  br i1 %135, label %136, label %178

136:                                              ; preds = %132
  %137 = load ptr, ptr %9, align 8, !tbaa !5
  %138 = load i64, ptr %13, align 8, !tbaa !9
  %139 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %137, i64 %138
  %140 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %139, i32 0, i32 0
  %141 = load i8, ptr %140, align 8, !tbaa !11, !range !24, !noundef !25
  %142 = trunc i8 %141 to i1
  br i1 %142, label %144, label %143

143:                                              ; preds = %136
  br label %175

144:                                              ; preds = %136
  %145 = load ptr, ptr %9, align 8, !tbaa !5
  %146 = load i64, ptr %13, align 8, !tbaa !9
  %147 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %145, i64 %146
  %148 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %147, i32 0, i32 2
  %149 = load i8, ptr %148, align 2, !tbaa !26, !range !24, !noundef !25
  %150 = trunc i8 %149 to i1
  br i1 %150, label %152, label %151

151:                                              ; preds = %144
  br label %175

152:                                              ; preds = %144
  %153 = load i8, ptr %14, align 1, !tbaa !23, !range !24, !noundef !25
  %154 = trunc i8 %153 to i1
  br i1 %154, label %159, label %155

155:                                              ; preds = %152
  store i8 1, ptr %14, align 1, !tbaa !23
  %156 = load ptr, ptr %9, align 8, !tbaa !5
  %157 = load i64, ptr %13, align 8, !tbaa !9
  %158 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %156, i64 %157
  store ptr %158, ptr %10, align 8, !tbaa !5
  br label %174

159:                                              ; preds = %152
  %160 = load ptr, ptr %9, align 8, !tbaa !5
  %161 = load i64, ptr %13, align 8, !tbaa !9
  %162 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %160, i64 %161
  %163 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %162, i32 0, i32 4
  %164 = load double, ptr %163, align 8, !tbaa !27
  %165 = load ptr, ptr %10, align 8, !tbaa !5
  %166 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %165, i32 0, i32 4
  %167 = load double, ptr %166, align 8, !tbaa !27
  %168 = fcmp ogt double %164, %167
  br i1 %168, label %169, label %173

169:                                              ; preds = %159
  %170 = load ptr, ptr %9, align 8, !tbaa !5
  %171 = load i64, ptr %13, align 8, !tbaa !9
  %172 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %170, i64 %171
  store ptr %172, ptr %10, align 8, !tbaa !5
  br label %173

173:                                              ; preds = %169, %159
  br label %174

174:                                              ; preds = %173, %155
  br label %175

175:                                              ; preds = %174, %151, %143
  %176 = load i64, ptr %13, align 8, !tbaa !9
  %177 = add nsw i64 %176, 1
  store i64 %177, ptr %13, align 8, !tbaa !9
  br label %132, !llvm.loop !28

178:                                              ; preds = %132
  %179 = load i8, ptr %14, align 1, !tbaa !23, !range !24, !noundef !25
  %180 = trunc i8 %179 to i1
  br i1 %180, label %186, label %181

181:                                              ; preds = %178
  %182 = load ptr, ptr %9, align 8, !tbaa !5
  %183 = icmp eq ptr %182, null
  br i1 %183, label %185, label %184

184:                                              ; preds = %181
  call void @_ZdaPv(ptr noundef %182) #9
  br label %185

185:                                              ; preds = %184, %181
  store i32 0, ptr %4, align 4
  store i32 1, ptr %17, align 4
  br label %278

186:                                              ; preds = %178
  %187 = load ptr, ptr %10, align 8, !tbaa !5
  %188 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %187, i32 0, i32 5
  %189 = load ptr, ptr %188, align 8, !tbaa !19
  %190 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %189, i32 0, i32 3
  %191 = load ptr, ptr %10, align 8, !tbaa !5
  %192 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %191, i32 0, i32 3
  %193 = load ptr, ptr %10, align 8, !tbaa !5
  %194 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %193, i32 0, i32 6
  %195 = load ptr, ptr %194, align 8, !tbaa !18
  %196 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %195, i32 0, i32 3
  invoke void @_ZN8TPPLPoly8TriangleER9TPPLPointS1_S1_(ptr noundef nonnull align 8 dereferenceable(17) %11, ptr noundef nonnull align 8 dereferenceable(16) %190, ptr noundef nonnull align 8 dereferenceable(16) %192, ptr noundef nonnull align 8 dereferenceable(16) %196)
          to label %197 unwind label %24

197:                                              ; preds = %186
  %198 = load ptr, ptr %7, align 8, !tbaa !5
  invoke void @_ZNSt7__cxx114listI8TPPLPolySaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %198, ptr noundef nonnull align 8 dereferenceable(17) %11)
          to label %199 unwind label %24

199:                                              ; preds = %197
  %200 = load ptr, ptr %10, align 8, !tbaa !5
  %201 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %200, i32 0, i32 0
  store i8 0, ptr %201, align 8, !tbaa !11
  %202 = load ptr, ptr %10, align 8, !tbaa !5
  %203 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %202, i32 0, i32 6
  %204 = load ptr, ptr %203, align 8, !tbaa !18
  %205 = load ptr, ptr %10, align 8, !tbaa !5
  %206 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %205, i32 0, i32 5
  %207 = load ptr, ptr %206, align 8, !tbaa !19
  %208 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %207, i32 0, i32 6
  store ptr %204, ptr %208, align 8, !tbaa !18
  %209 = load ptr, ptr %10, align 8, !tbaa !5
  %210 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %209, i32 0, i32 5
  %211 = load ptr, ptr %210, align 8, !tbaa !19
  %212 = load ptr, ptr %10, align 8, !tbaa !5
  %213 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %212, i32 0, i32 6
  %214 = load ptr, ptr %213, align 8, !tbaa !18
  %215 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %214, i32 0, i32 5
  store ptr %211, ptr %215, align 8, !tbaa !19
  %216 = load i64, ptr %12, align 8, !tbaa !9
  %217 = load i64, ptr %8, align 8, !tbaa !9
  %218 = sub nsw i64 %217, 4
  %219 = icmp eq i64 %216, %218
  br i1 %219, label %220, label %221

220:                                              ; preds = %199
  br label %237

221:                                              ; preds = %199
  %222 = load ptr, ptr %10, align 8, !tbaa !5
  %223 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %222, i32 0, i32 5
  %224 = load ptr, ptr %223, align 8, !tbaa !19
  %225 = load ptr, ptr %9, align 8, !tbaa !5
  %226 = load i64, ptr %8, align 8, !tbaa !9
  invoke void @_ZN13TPPLPartition12UpdateVertexEPNS_15PartitionVertexES1_l(ptr noundef nonnull align 1 dereferenceable(1) %18, ptr noundef %224, ptr noundef %225, i64 noundef %226)
          to label %227 unwind label %24

227:                                              ; preds = %221
  %228 = load ptr, ptr %10, align 8, !tbaa !5
  %229 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %228, i32 0, i32 6
  %230 = load ptr, ptr %229, align 8, !tbaa !18
  %231 = load ptr, ptr %9, align 8, !tbaa !5
  %232 = load i64, ptr %8, align 8, !tbaa !9
  invoke void @_ZN13TPPLPartition12UpdateVertexEPNS_15PartitionVertexES1_l(ptr noundef nonnull align 1 dereferenceable(1) %18, ptr noundef %230, ptr noundef %231, i64 noundef %232)
          to label %233 unwind label %24

233:                                              ; preds = %227
  br label %234

234:                                              ; preds = %233
  %235 = load i64, ptr %12, align 8, !tbaa !9
  %236 = add nsw i64 %235, 1
  store i64 %236, ptr %12, align 8, !tbaa !9
  br label %126, !llvm.loop !29

237:                                              ; preds = %220, %126
  store i64 0, ptr %12, align 8, !tbaa !9
  br label %238

238:                                              ; preds = %270, %237
  %239 = load i64, ptr %12, align 8, !tbaa !9
  %240 = load i64, ptr %8, align 8, !tbaa !9
  %241 = icmp slt i64 %239, %240
  br i1 %241, label %242, label %273

242:                                              ; preds = %238
  %243 = load ptr, ptr %9, align 8, !tbaa !5
  %244 = load i64, ptr %12, align 8, !tbaa !9
  %245 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %243, i64 %244
  %246 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %245, i32 0, i32 0
  %247 = load i8, ptr %246, align 8, !tbaa !11, !range !24, !noundef !25
  %248 = trunc i8 %247 to i1
  br i1 %248, label %249, label %269

249:                                              ; preds = %242
  %250 = load ptr, ptr %9, align 8, !tbaa !5
  %251 = load i64, ptr %12, align 8, !tbaa !9
  %252 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %250, i64 %251
  %253 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %252, i32 0, i32 5
  %254 = load ptr, ptr %253, align 8, !tbaa !19
  %255 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %254, i32 0, i32 3
  %256 = load ptr, ptr %9, align 8, !tbaa !5
  %257 = load i64, ptr %12, align 8, !tbaa !9
  %258 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %256, i64 %257
  %259 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %258, i32 0, i32 3
  %260 = load ptr, ptr %9, align 8, !tbaa !5
  %261 = load i64, ptr %12, align 8, !tbaa !9
  %262 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %260, i64 %261
  %263 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %262, i32 0, i32 6
  %264 = load ptr, ptr %263, align 8, !tbaa !18
  %265 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %264, i32 0, i32 3
  invoke void @_ZN8TPPLPoly8TriangleER9TPPLPointS1_S1_(ptr noundef nonnull align 8 dereferenceable(17) %11, ptr noundef nonnull align 8 dereferenceable(16) %255, ptr noundef nonnull align 8 dereferenceable(16) %259, ptr noundef nonnull align 8 dereferenceable(16) %265)
          to label %266 unwind label %24

266:                                              ; preds = %249
  %267 = load ptr, ptr %7, align 8, !tbaa !5
  invoke void @_ZNSt7__cxx114listI8TPPLPolySaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %267, ptr noundef nonnull align 8 dereferenceable(17) %11)
          to label %268 unwind label %24

268:                                              ; preds = %266
  br label %273

269:                                              ; preds = %242
  br label %270

270:                                              ; preds = %269
  %271 = load i64, ptr %12, align 8, !tbaa !9
  %272 = add nsw i64 %271, 1
  store i64 %272, ptr %12, align 8, !tbaa !9
  br label %238, !llvm.loop !30

273:                                              ; preds = %268, %238
  %274 = load ptr, ptr %9, align 8, !tbaa !5
  %275 = icmp eq ptr %274, null
  br i1 %275, label %277, label %276

276:                                              ; preds = %273
  call void @_ZdaPv(ptr noundef %274) #9
  br label %277

277:                                              ; preds = %276, %273
  store i32 1, ptr %4, align 4
  store i32 1, ptr %17, align 4
  br label %278

278:                                              ; preds = %277, %185, %36, %23
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @_ZN8TPPLPolyD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %11) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  %279 = load i32, ptr %4, align 4
  ret i32 %279

280:                                              ; preds = %24
  %281 = load ptr, ptr %15, align 8
  %282 = load i32, ptr %16, align 4
  %283 = insertvalue { ptr, i32 } poison, ptr %281, 0
  %284 = insertvalue { ptr, i32 } %283, i32 %282, 1
  resume { ptr, i32 } %284
}

declare void @_ZN8TPPLPolyC1Ev(ptr)

declare void @_ZN8TPPLPolyD1Ev(ptr)

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

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

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


; 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.TPPLPartition::PartitionVertex" = type { i8, i8, i8, %struct.TPPLPoint, double, ptr, ptr }
%struct.TPPLPoint = type { double, double }

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

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

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

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef range(i32 0, 2) i32 @_ZN13TPPLPartition14Triangulate_ECEP8TPPLPolyPNSt7__cxx114listIS0_SaIS0_EEE(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %class.TPPLPoly, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #7
  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 = icmp slt i64 %5, 3
  br i1 %6, label %131, label %7

.loopexit103:                                     ; preds = %97, %105, %112, %113
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

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

.loopexit.split-lp.loopexit.split-lp:             ; preds = %130, %122, %11, %10
  %lpad.loopexit.split-lp106 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit.split-lp

.loopexit.split-lp:                               ; preds = %.loopexit.split-lp.loopexit, %.loopexit.split-lp.loopexit.split-lp, %.loopexit103
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit103 ], [ %lpad.loopexit105, %.loopexit.split-lp.loopexit ], [ %lpad.loopexit.split-lp106, %.loopexit.split-lp.loopexit.split-lp ]
  call void @_ZN8TPPLPolyD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  resume { ptr, i32 } %lpad.phi

7:                                                ; preds = %3
  %8 = call noundef i64 @_ZN8TPPLPoly12GetNumPointsEv(ptr noundef nonnull align 8 dereferenceable(17) %1)
  %9 = icmp eq i64 %8, 3
  br i1 %9, label %10, label %11

10:                                               ; preds = %7
  invoke void @_ZNSt7__cxx114listI8TPPLPolySaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(17) %1)
          to label %131 unwind label %.loopexit.split-lp.loopexit.split-lp

11:                                               ; preds = %7
  %12 = call noundef i64 @_ZN8TPPLPoly12GetNumPointsEv(ptr noundef nonnull align 8 dereferenceable(17) %1)
  %13 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %12, i64 48)
  %14 = extractvalue { i64, i1 } %13, 1
  %15 = extractvalue { i64, i1 } %13, 0
  %16 = select i1 %14, i64 -1, i64 %15
  %17 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %16) #8
          to label %.preheader108 unwind label %.loopexit.split-lp.loopexit.split-lp

.preheader108:                                    ; preds = %11
  %18 = icmp sgt i64 %12, 0
  br i1 %18, label %.lr.ph, label %.sink.split

.lr.ph:                                           ; preds = %.preheader108
  %19 = add nsw i64 %12, -1
  %20 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %17, i64 %19
  store i8 1, ptr %17, align 8, !tbaa !5
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %1, i64 noundef 0)
  %22 = getelementptr inbounds i8, ptr %17, i64 8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 8 dereferenceable(16) %21, i64 16, i1 false), !tbaa.struct !13
  %23 = icmp eq i64 %19, 0
  br i1 %23, label %.preheader104.thread, label %.peel.next

.preheader104.thread:                             ; preds = %.lr.ph
  %24 = getelementptr inbounds i8, ptr %17, i64 40
  store ptr %17, ptr %24, align 8
  %25 = getelementptr inbounds i8, ptr %17, i64 32
  store ptr %20, ptr %25, align 8
  br label %.lr.ph111.preheader

.peel.next:                                       ; preds = %.lr.ph
  %26 = getelementptr inbounds i8, ptr %17, i64 48
  %27 = getelementptr inbounds i8, ptr %17, i64 40
  store ptr %26, ptr %27, align 8
  %28 = getelementptr inbounds i8, ptr %17, i64 32
  store ptr %20, ptr %28, align 8
  br label %29

.preheader104:                                    ; preds = %29
  br i1 %18, label %.lr.ph111.preheader, label %.sink.split

.lr.ph111.preheader:                              ; preds = %.preheader104.thread, %.preheader104
  br label %.lr.ph111

29:                                               ; preds = %.peel.next, %29
  %.097109 = phi i64 [ 1, %.peel.next ], [ %38, %29 ]
  %30 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %17, i64 %.097109
  store i8 1, ptr %30, align 8, !tbaa !5
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %1, i64 noundef %.097109)
  %32 = getelementptr inbounds i8, ptr %30, i64 8
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %32, ptr noundef nonnull align 8 dereferenceable(16) %31, i64 16, i1 false), !tbaa.struct !13
  %33 = icmp eq i64 %.097109, %19
  %34 = getelementptr inbounds i8, ptr %30, i64 48
  %spec.select = select i1 %33, ptr %17, ptr %34
  %35 = getelementptr inbounds i8, ptr %30, i64 40
  store ptr %spec.select, ptr %35, align 8
  %36 = getelementptr i8, ptr %30, i64 -48
  %37 = getelementptr inbounds i8, ptr %30, i64 32
  store ptr %36, ptr %37, align 8
  %38 = add nuw nsw i64 %.097109, 1
  %exitcond.not = icmp eq i64 %38, %12
  br i1 %exitcond.not, label %.preheader104, label %29, !llvm.loop !15

.preheader102:                                    ; preds = %43
  %39 = icmp sgt i64 %12, 3
  br i1 %39, label %.preheader.lr.ph, label %._crit_edge119

.preheader.lr.ph:                                 ; preds = %.preheader102
  %40 = add nsw i64 %12, -4
  %xtraiter = and i64 %12, 1
  %41 = icmp eq i64 %19, 0
  %unroll_iter = and i64 %12, 9223372036854775806
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.lr.ph115.preheader

.lr.ph111:                                        ; preds = %.lr.ph111.preheader, %43
  %.198110 = phi i64 [ %44, %43 ], [ 0, %.lr.ph111.preheader ]
  %42 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %17, i64 %.198110
  invoke void @_ZN13TPPLPartition12UpdateVertexEPNS_15PartitionVertexES1_l(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull %42, ptr noundef nonnull %17, i64 noundef %12)
          to label %43 unwind label %.loopexit.split-lp.loopexit

43:                                               ; preds = %.lr.ph111
  %44 = add nuw nsw i64 %.198110, 1
  %exitcond126.not = icmp eq i64 %44, %12
  br i1 %exitcond126.not, label %.preheader102, label %.lr.ph111, !llvm.loop !18

.lr.ph115.preheader:                              ; preds = %.preheader.lr.ph, %115
  %.093118 = phi ptr [ undef, %.preheader.lr.ph ], [ %.2.lcssa, %115 ]
  %.299117 = phi i64 [ 0, %.preheader.lr.ph ], [ %116, %115 ]
  br i1 %41, label %._crit_edge.unr-lcssa, label %.lr.ph115

.lr.ph115:                                        ; preds = %.lr.ph115.preheader, %78
  %.1114 = phi ptr [ %.2.1, %78 ], [ %.093118, %.lr.ph115.preheader ]
  %.094113 = phi i8 [ %.195.1, %78 ], [ 0, %.lr.ph115.preheader ]
  %.096112 = phi i64 [ %79, %78 ], [ 0, %.lr.ph115.preheader ]
  %niter = phi i64 [ %niter.next.1, %78 ], [ 0, %.lr.ph115.preheader ]
  %45 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %17, i64 %.096112
  %46 = load i8, ptr %45, align 8, !tbaa !5, !range !19, !noundef !20
  %47 = trunc nuw i8 %46 to i1
  br i1 %47, label %48, label %.lr.ph115.1

48:                                               ; preds = %.lr.ph115
  %49 = getelementptr inbounds i8, ptr %45, i64 2
  %50 = load i8, ptr %49, align 2, !tbaa !21, !range !19, !noundef !20
  %51 = trunc nuw i8 %50 to i1
  br i1 %51, label %52, label %.lr.ph115.1

52:                                               ; preds = %48
  %53 = trunc nuw i8 %.094113 to i1
  br i1 %53, label %54, label %.lr.ph115.1

54:                                               ; preds = %52
  %55 = getelementptr inbounds i8, ptr %45, i64 24
  %56 = load double, ptr %55, align 8, !tbaa !22
  %57 = getelementptr inbounds i8, ptr %.1114, i64 24
  %58 = load double, ptr %57, align 8, !tbaa !22
  %59 = fcmp ogt double %56, %58
  br i1 %59, label %60, label %.lr.ph115.1

60:                                               ; preds = %54
  br label %.lr.ph115.1

.lr.ph115.1:                                      ; preds = %52, %60, %54, %48, %.lr.ph115
  %.195 = phi i8 [ %.094113, %60 ], [ %.094113, %54 ], [ %.094113, %48 ], [ %.094113, %.lr.ph115 ], [ 1, %52 ]
  %.2 = phi ptr [ %45, %60 ], [ %.1114, %54 ], [ %.1114, %48 ], [ %.1114, %.lr.ph115 ], [ %45, %52 ]
  %61 = or disjoint i64 %.096112, 1
  %62 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %17, i64 %61
  %63 = load i8, ptr %62, align 8, !tbaa !5, !range !19, !noundef !20
  %64 = trunc nuw i8 %63 to i1
  br i1 %64, label %65, label %78

65:                                               ; preds = %.lr.ph115.1
  %66 = getelementptr inbounds i8, ptr %62, i64 2
  %67 = load i8, ptr %66, align 2, !tbaa !21, !range !19, !noundef !20
  %68 = trunc nuw i8 %67 to i1
  br i1 %68, label %69, label %78

69:                                               ; preds = %65
  %70 = trunc nuw i8 %.195 to i1
  br i1 %70, label %71, label %78

71:                                               ; preds = %69
  %72 = getelementptr inbounds i8, ptr %62, i64 24
  %73 = load double, ptr %72, align 8, !tbaa !22
  %74 = getelementptr inbounds i8, ptr %.2, i64 24
  %75 = load double, ptr %74, align 8, !tbaa !22
  %76 = fcmp ogt double %73, %75
  br i1 %76, label %77, label %78

77:                                               ; preds = %71
  br label %78

78:                                               ; preds = %77, %71, %69, %65, %.lr.ph115.1
  %.195.1 = phi i8 [ %.195, %77 ], [ %.195, %71 ], [ %.195, %65 ], [ %.195, %.lr.ph115.1 ], [ 1, %69 ]
  %.2.1 = phi ptr [ %62, %77 ], [ %.2, %71 ], [ %.2, %65 ], [ %.2, %.lr.ph115.1 ], [ %62, %69 ]
  %79 = add nuw nsw i64 %.096112, 2
  %niter.next.1 = add nuw nsw i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.unr-lcssa, label %.lr.ph115, !llvm.loop !23

._crit_edge.unr-lcssa:                            ; preds = %78, %.lr.ph115.preheader
  %.195.lcssa.ph = phi i8 [ poison, %.lr.ph115.preheader ], [ %.195.1, %78 ]
  %.2.lcssa.ph = phi ptr [ poison, %.lr.ph115.preheader ], [ %.2.1, %78 ]
  %.1114.unr = phi ptr [ %.093118, %.lr.ph115.preheader ], [ %.2.1, %78 ]
  %.094113.unr = phi i8 [ 0, %.lr.ph115.preheader ], [ %.195.1, %78 ]
  %.096112.unr = phi i64 [ 0, %.lr.ph115.preheader ], [ %79, %78 ]
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph115.epil

.lr.ph115.epil:                                   ; preds = %._crit_edge.unr-lcssa
  %80 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %17, i64 %.096112.unr
  %81 = load i8, ptr %80, align 8, !tbaa !5, !range !19, !noundef !20
  %82 = trunc nuw i8 %81 to i1
  br i1 %82, label %83, label %._crit_edge

83:                                               ; preds = %.lr.ph115.epil
  %84 = getelementptr inbounds i8, ptr %80, i64 2
  %85 = load i8, ptr %84, align 2, !tbaa !21, !range !19, !noundef !20
  %86 = trunc nuw i8 %85 to i1
  br i1 %86, label %87, label %._crit_edge

87:                                               ; preds = %83
  %88 = trunc nuw i8 %.094113.unr to i1
  br i1 %88, label %89, label %._crit_edge

89:                                               ; preds = %87
  %90 = getelementptr inbounds i8, ptr %80, i64 24
  %91 = load double, ptr %90, align 8, !tbaa !22
  %92 = getelementptr inbounds i8, ptr %.1114.unr, i64 24
  %93 = load double, ptr %92, align 8, !tbaa !22
  %94 = fcmp ogt double %91, %93
  br i1 %94, label %95, label %._crit_edge

95:                                               ; preds = %89
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph115.epil, %83, %87, %89, %95, %._crit_edge.unr-lcssa
  %.195.lcssa = phi i8 [ %.195.lcssa.ph, %._crit_edge.unr-lcssa ], [ %.094113.unr, %95 ], [ %.094113.unr, %89 ], [ %.094113.unr, %83 ], [ %.094113.unr, %.lr.ph115.epil ], [ 1, %87 ]
  %.2.lcssa = phi ptr [ %.2.lcssa.ph, %._crit_edge.unr-lcssa ], [ %80, %95 ], [ %.1114.unr, %89 ], [ %.1114.unr, %83 ], [ %.1114.unr, %.lr.ph115.epil ], [ %80, %87 ]
  %96 = trunc nuw i8 %.195.lcssa to i1
  br i1 %96, label %97, label %.sink.split

97:                                               ; preds = %._crit_edge
  %98 = getelementptr inbounds i8, ptr %.2.lcssa, i64 32
  %99 = load ptr, ptr %98, align 8, !tbaa !24
  %100 = getelementptr inbounds i8, ptr %99, i64 8
  %101 = getelementptr inbounds i8, ptr %.2.lcssa, i64 8
  %102 = getelementptr inbounds i8, ptr %.2.lcssa, i64 40
  %103 = load ptr, ptr %102, align 8, !tbaa !25
  %104 = getelementptr inbounds i8, ptr %103, i64 8
  invoke void @_ZN8TPPLPoly8TriangleER9TPPLPointS1_S1_(ptr noundef nonnull align 8 dereferenceable(17) %4, ptr noundef nonnull align 8 dereferenceable(16) %100, ptr noundef nonnull align 8 dereferenceable(16) %101, ptr noundef nonnull align 8 dereferenceable(16) %104)
          to label %105 unwind label %.loopexit103

105:                                              ; preds = %97
  invoke void @_ZNSt7__cxx114listI8TPPLPolySaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(17) %4)
          to label %106 unwind label %.loopexit103

106:                                              ; preds = %105
  store i8 0, ptr %.2.lcssa, align 8, !tbaa !5
  %107 = load ptr, ptr %102, align 8, !tbaa !25
  %108 = load ptr, ptr %98, align 8, !tbaa !24
  %109 = getelementptr inbounds i8, ptr %108, i64 40
  store ptr %107, ptr %109, align 8, !tbaa !25
  %110 = getelementptr inbounds i8, ptr %107, i64 32
  store ptr %108, ptr %110, align 8, !tbaa !24
  %111 = icmp eq i64 %.299117, %40
  br i1 %111, label %._crit_edge119, label %112

112:                                              ; preds = %106
  invoke void @_ZN13TPPLPartition12UpdateVertexEPNS_15PartitionVertexES1_l(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef nonnull %108, ptr noundef nonnull %17, i64 noundef %12)
          to label %113 unwind label %.loopexit103

113:                                              ; preds = %112
  %114 = load ptr, ptr %102, align 8, !tbaa !25
  invoke void @_ZN13TPPLPartition12UpdateVertexEPNS_15PartitionVertexES1_l(ptr noundef nonnull align 1 dereferenceable(1) %0, ptr noundef %114, ptr noundef nonnull %17, i64 noundef %12)
          to label %115 unwind label %.loopexit103

115:                                              ; preds = %113
  %116 = add nuw nsw i64 %.299117, 1
  br label %.lr.ph115.preheader

._crit_edge119:                                   ; preds = %106, %.preheader102
  br i1 %18, label %.lr.ph123, label %.sink.split

117:                                              ; preds = %.lr.ph123
  %118 = add nuw nsw i64 %.3121, 1
  %exitcond128.not = icmp eq i64 %118, %12
  br i1 %exitcond128.not, label %.sink.split, label %.lr.ph123, !llvm.loop !26

.lr.ph123:                                        ; preds = %._crit_edge119, %117
  %.3121 = phi i64 [ %118, %117 ], [ 0, %._crit_edge119 ]
  %119 = getelementptr inbounds %"struct.TPPLPartition::PartitionVertex", ptr %17, i64 %.3121
  %120 = load i8, ptr %119, align 8, !tbaa !5, !range !19, !noundef !20
  %121 = trunc nuw i8 %120 to i1
  br i1 %121, label %122, label %117

122:                                              ; preds = %.lr.ph123
  %123 = getelementptr inbounds i8, ptr %119, i64 32
  %124 = load ptr, ptr %123, align 8, !tbaa !24
  %125 = getelementptr inbounds i8, ptr %124, i64 8
  %126 = getelementptr inbounds i8, ptr %119, i64 8
  %127 = getelementptr inbounds i8, ptr %119, i64 40
  %128 = load ptr, ptr %127, align 8, !tbaa !25
  %129 = getelementptr inbounds i8, ptr %128, i64 8
  invoke void @_ZN8TPPLPoly8TriangleER9TPPLPointS1_S1_(ptr noundef nonnull align 8 dereferenceable(17) %4, ptr noundef nonnull align 8 dereferenceable(16) %125, ptr noundef nonnull align 8 dereferenceable(16) %126, ptr noundef nonnull align 8 dereferenceable(16) %129)
          to label %130 unwind label %.loopexit.split-lp.loopexit.split-lp

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

.sink.split:                                      ; preds = %._crit_edge, %117, %130, %._crit_edge119, %.preheader108, %.preheader104
  %.0.ph = phi i32 [ 1, %.preheader104 ], [ 1, %.preheader108 ], [ 1, %._crit_edge119 ], [ 1, %130 ], [ 1, %117 ], [ 0, %._crit_edge ]
  call void @_ZdaPv(ptr noundef nonnull %17) #9
  br label %131

131:                                              ; preds = %.sink.split, %10, %3
  %.0 = phi i32 [ 0, %3 ], [ 1, %10 ], [ %.0.ph, %.sink.split ]
  call void @_ZN8TPPLPolyD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  ret i32 %.0
}

declare void @_ZN8TPPLPolyC1Ev(ptr) local_unnamed_addr

declare void @_ZN8TPPLPolyD1Ev(ptr) local_unnamed_addr

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_ZTSN13TPPLPartition15PartitionVertexE", !7, i64 0, !7, i64 1, !7, i64 2, !10, i64 8, !11, i64 24, !12, i64 32, !12, i64 40}
!7 = !{!"bool", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTS9TPPLPoint", !11, i64 0, !11, i64 8}
!11 = !{!"double", !8, i64 0}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{i64 0, i64 8, !14, i64 8, i64 8, !14}
!14 = !{!11, !11, i64 0}
!15 = distinct !{!15, !16, !17}
!16 = !{!"llvm.loop.mustprogress"}
!17 = !{!"llvm.loop.peeled.count", i32 1}
!18 = distinct !{!18, !16}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{!6, !7, i64 2}
!22 = !{!6, !11, i64 24}
!23 = distinct !{!23, !16}
!24 = !{!6, !12, i64 32}
!25 = !{!6, !12, i64 40}
!26 = distinct !{!26, !16}


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