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

; 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.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::vector.15" = type { %"struct.std::_Vector_base.16" }
%"struct.std::_Vector_base.16" = type { %"struct.std::_Vector_base<QVector, std::allocator<QVector>>::_Vector_impl" }
%"struct.std::_Vector_base<QVector, std::allocator<QVector>>::_Vector_impl" = type { %"struct.std::_Vector_base<QVector, std::allocator<QVector>>::_Vector_impl_data" }
%"struct.std::_Vector_base<QVector, std::allocator<QVector>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.QVector = type { float, float }
%"class.std::__cxx11::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<TPPLPoly, std::allocator<TPPLPoly>>::_List_impl" }
%"struct.std::__cxx11::_List_base<TPPLPoly, std::allocator<TPPLPoly>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { ptr, ptr }
%class.TPPLPoly = type <{ ptr, i64, i8, [7 x i8] }>
%struct.TPPLPoint = type { double, double, i32 }
%class.TPPLPartition = type { i8 }
%"struct.std::_List_iterator" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<QParticle *, std::allocator<QParticle *>>::_Vector_impl" }
%"struct.std::_Vector_base<QParticle *, std::allocator<QParticle *>>::_Vector_impl" = type { %"struct.std::_Vector_base<QParticle *, std::allocator<QParticle *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<QParticle *, std::allocator<QParticle *>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [47 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5QMesh18DecompositePolygonERSt6vectorIP9QParticleSaIS2_EERS0_IS4_SaIS4_EE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %1) #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.std::vector.15", align 8
  %6 = alloca i32, align 4
  %7 = alloca %struct.QVector, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.std::__cxx11::list", align 8
  %11 = alloca %"class.std::__cxx11::list", align 8
  %12 = alloca %class.TPPLPoly, align 8
  %13 = alloca i32, align 4
  %14 = alloca %struct.TPPLPoint, align 8
  %15 = alloca %class.TPPLPartition, align 1
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca %"struct.std::_List_iterator", align 8
  %19 = alloca %"struct.std::_List_iterator", align 8
  %20 = alloca %class.TPPLPoly, align 8
  %21 = alloca %"class.std::vector", align 8
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #9
  call void @_ZNSt6vectorI7QVectorSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #9
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %24

24:                                               ; preds = %40, %2
  %25 = load i32, ptr %6, align 4, !tbaa !9
  %26 = sext i32 %25 to i64
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = call noundef i64 @_ZNKSt6vectorIP9QParticleSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %27) #9
  %29 = icmp ult i64 %26, %28
  br i1 %29, label %31, label %30

30:                                               ; preds = %24
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #9
  br label %47

31:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #9
  %32 = load ptr, ptr %3, align 8, !tbaa !5
  %33 = load i32, ptr %6, align 4, !tbaa !9
  %34 = sext i32 %33 to i64
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %32, i64 noundef %34) #9
  %36 = load ptr, ptr %35, align 8, !tbaa !5
  %37 = invoke <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %36)
          to label %38 unwind label %43

38:                                               ; preds = %31
  store <2 x float> %37, ptr %7, align 4
  invoke void @_ZNSt6vectorI7QVectorSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 4 dereferenceable(8) %7)
          to label %39 unwind label %43

39:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #9
  br label %40

40:                                               ; preds = %39
  %41 = load i32, ptr %6, align 4, !tbaa !9
  %42 = add nsw i32 %41, 1
  store i32 %42, ptr %6, align 4, !tbaa !9
  br label %24, !llvm.loop !11

43:                                               ; preds = %38, %31
  %44 = landingpad { ptr, i32 }
          cleanup
  %45 = extractvalue { ptr, i32 } %44, 0
  store ptr %45, ptr %8, align 8
  %46 = extractvalue { ptr, i32 } %44, 1
  store i32 %46, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #9
  br label %178

47:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #9
  call void @_ZNSt7__cxx114listI8TPPLPolySaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #9
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #9
  call void @_ZNSt7__cxx114listI8TPPLPolySaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #9
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #9
  invoke void @_ZN8TPPLPolyC1Ev(ptr noundef nonnull align 8 dereferenceable(17) %12)
          to label %48 unwind label %57

48:                                               ; preds = %47
  %49 = call noundef i64 @_ZNKSt6vectorI7QVectorSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #9
  invoke void @_ZN8TPPLPoly4InitEl(ptr noundef nonnull align 8 dereferenceable(17) %12, i64 noundef %49)
          to label %50 unwind label %61

50:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #9
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %51

51:                                               ; preds = %90, %50
  %52 = load i32, ptr %13, align 4, !tbaa !9
  %53 = sext i32 %52 to i64
  %54 = call noundef i64 @_ZNKSt6vectorI7QVectorSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #9
  %55 = icmp ult i64 %53, %54
  br i1 %55, label %65, label %56

56:                                               ; preds = %51
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  br label %97

57:                                               ; preds = %47
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %8, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %9, align 4
  br label %177

61:                                               ; preds = %98, %97, %48
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %8, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %9, align 4
  br label %176

65:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 24, ptr %14) #9
  %66 = load i32, ptr %13, align 4, !tbaa !9
  %67 = sext i32 %66 to i64
  %68 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorI7QVectorSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %67) #9
  %69 = getelementptr inbounds %struct.QVector, ptr %68, i32 0, i32 0
  %70 = load float, ptr %69, align 4, !tbaa !13
  %71 = fpext float %70 to double
  %72 = getelementptr inbounds %struct.TPPLPoint, ptr %14, i32 0, i32 0
  store double %71, ptr %72, align 8, !tbaa !16
  %73 = load i32, ptr %13, align 4, !tbaa !9
  %74 = sext i32 %73 to i64
  %75 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorI7QVectorSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %74) #9
  %76 = getelementptr inbounds %struct.QVector, ptr %75, i32 0, i32 1
  %77 = load float, ptr %76, align 4, !tbaa !19
  %78 = fpext float %77 to double
  %79 = getelementptr inbounds %struct.TPPLPoint, ptr %14, i32 0, i32 1
  store double %78, ptr %79, align 8, !tbaa !20
  %80 = load i32, ptr %13, align 4, !tbaa !9
  %81 = sext i32 %80 to i64
  %82 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %12, i64 noundef %81)
          to label %83 unwind label %93

83:                                               ; preds = %65
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %82, ptr align 8 %14, i64 24, i1 false), !tbaa.struct !21
  %84 = load i32, ptr %13, align 4, !tbaa !9
  %85 = load i32, ptr %13, align 4, !tbaa !9
  %86 = sext i32 %85 to i64
  %87 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %12, i64 noundef %86)
          to label %88 unwind label %93

88:                                               ; preds = %83
  %89 = getelementptr inbounds %struct.TPPLPoint, ptr %87, i32 0, i32 2
  store i32 %84, ptr %89, align 8, !tbaa !23
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #9
  br label %90

90:                                               ; preds = %88
  %91 = load i32, ptr %13, align 4, !tbaa !9
  %92 = add nsw i32 %91, 1
  store i32 %92, ptr %13, align 4, !tbaa !9
  br label %51, !llvm.loop !24

93:                                               ; preds = %83, %65
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %8, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %14) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  br label %176

97:                                               ; preds = %56
  invoke void @_ZN8TPPLPoly14SetOrientationE15TPPLOrientation(ptr noundef nonnull align 8 dereferenceable(17) %12, i32 noundef 1)
          to label %98 unwind label %61

98:                                               ; preds = %97
  invoke void @_ZNSt7__cxx114listI8TPPLPolySaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(17) %12)
          to label %99 unwind label %61

99:                                               ; preds = %98
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #9
  %100 = invoke noundef i32 @_ZN13TPPLPartition18ConvexPartition_HMEPNSt7__cxx114listI8TPPLPolySaIS2_EEES5_(ptr noundef nonnull align 1 dereferenceable(1) %15, ptr noundef %10, ptr noundef %11)
          to label %101 unwind label %108

101:                                              ; preds = %99
  %102 = icmp eq i32 %100, 0
  br i1 %102, label %103, label %112

103:                                              ; preds = %101
  %104 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
          to label %105 unwind label %108

105:                                              ; preds = %103
  %106 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %104, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %107 unwind label %108

107:                                              ; preds = %105
  store i32 1, ptr %16, align 4
  br label %172

108:                                              ; preds = %105, %103, %99
  %109 = landingpad { ptr, i32 }
          cleanup
  %110 = extractvalue { ptr, i32 } %109, 0
  store ptr %110, ptr %8, align 8
  %111 = extractvalue { ptr, i32 } %109, 1
  store i32 %111, ptr %9, align 4
  br label %175

112:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #9
  store ptr %11, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #9
  %113 = load ptr, ptr %17, align 8, !tbaa !5
  %114 = call ptr @_ZNSt7__cxx114listI8TPPLPolySaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %113) #9
  %115 = getelementptr inbounds %"struct.std::_List_iterator", ptr %18, i32 0, i32 0
  store ptr %114, ptr %115, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #9
  %116 = load ptr, ptr %17, align 8, !tbaa !5
  %117 = call ptr @_ZNSt7__cxx114listI8TPPLPolySaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %116) #9
  %118 = getelementptr inbounds %"struct.std::_List_iterator", ptr %19, i32 0, i32 0
  store ptr %117, ptr %118, align 8
  br label %119

119:                                              ; preds = %163, %112
  %120 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorI8TPPLPolyES3_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %19) #9
  br i1 %120, label %122, label %121

121:                                              ; preds = %119
  store i32 8, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #9
  br label %171

122:                                              ; preds = %119
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #9
  %123 = call noundef nonnull align 8 dereferenceable(17) ptr @_ZNKSt14_List_iteratorI8TPPLPolyEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #9
  invoke void @_ZN8TPPLPolyC1ERKS_(ptr noundef nonnull align 8 dereferenceable(17) %20, ptr noundef nonnull align 8 dereferenceable(17) %123)
          to label %124 unwind label %132

124:                                              ; preds = %122
  call void @llvm.lifetime.start.p0(i64 24, ptr %21) #9
  call void @_ZNSt6vectorIP9QParticleSaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #9
  store i32 0, ptr %22, align 4, !tbaa !9
  br label %125

125:                                              ; preds = %152, %124
  %126 = load i32, ptr %22, align 4, !tbaa !9
  %127 = sext i32 %126 to i64
  %128 = invoke noundef i64 @_ZNK8TPPLPoly12GetNumPointsEv(ptr noundef nonnull align 8 dereferenceable(17) %20)
          to label %129 unwind label %136

129:                                              ; preds = %125
  %130 = icmp slt i64 %127, %128
  br i1 %130, label %140, label %131

131:                                              ; preds = %129
  store i32 10, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #9
  br label %160

132:                                              ; preds = %122
  %133 = landingpad { ptr, i32 }
          cleanup
  %134 = extractvalue { ptr, i32 } %133, 0
  store ptr %134, ptr %8, align 8
  %135 = extractvalue { ptr, i32 } %133, 1
  store i32 %135, ptr %9, align 4
  br label %170

136:                                              ; preds = %125
  %137 = landingpad { ptr, i32 }
          cleanup
  %138 = extractvalue { ptr, i32 } %137, 0
  store ptr %138, ptr %8, align 8
  %139 = extractvalue { ptr, i32 } %137, 1
  store i32 %139, ptr %9, align 4
  br label %159

140:                                              ; preds = %129
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #9
  %141 = load i32, ptr %22, align 4, !tbaa !9
  %142 = sext i32 %141 to i64
  %143 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %20, i64 noundef %142)
          to label %144 unwind label %155

144:                                              ; preds = %140
  %145 = getelementptr inbounds %struct.TPPLPoint, ptr %143, i32 0, i32 2
  %146 = load i32, ptr %145, align 8, !tbaa !23
  store i32 %146, ptr %23, align 4, !tbaa !9
  %147 = load ptr, ptr %3, align 8, !tbaa !5
  %148 = load i32, ptr %23, align 4, !tbaa !9
  %149 = sext i32 %148 to i64
  %150 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %147, i64 noundef %149) #9
  invoke void @_ZNSt6vectorIP9QParticleSaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %21, ptr noundef nonnull align 8 dereferenceable(8) %150)
          to label %151 unwind label %155

151:                                              ; preds = %144
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #9
  br label %152

152:                                              ; preds = %151
  %153 = load i32, ptr %22, align 4, !tbaa !9
  %154 = add nsw i32 %153, 1
  store i32 %154, ptr %22, align 4, !tbaa !9
  br label %125, !llvm.loop !25

155:                                              ; preds = %144, %140
  %156 = landingpad { ptr, i32 }
          cleanup
  %157 = extractvalue { ptr, i32 } %156, 0
  store ptr %157, ptr %8, align 8
  %158 = extractvalue { ptr, i32 } %156, 1
  store i32 %158, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #9
  br label %159

159:                                              ; preds = %155, %136
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #9
  br label %169

160:                                              ; preds = %131
  %161 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIS_IP9QParticleSaIS1_EESaIS3_EE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %161, ptr noundef nonnull align 8 dereferenceable(24) %21)
          to label %162 unwind label %165

162:                                              ; preds = %160
  call void @_ZNSt6vectorIP9QParticleSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #9
  call void @_ZN8TPPLPolyD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %20) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #9
  br label %163

163:                                              ; preds = %162
  %164 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt14_List_iteratorI8TPPLPolyEppEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #9
  br label %119

165:                                              ; preds = %160
  %166 = landingpad { ptr, i32 }
          cleanup
  %167 = extractvalue { ptr, i32 } %166, 0
  store ptr %167, ptr %8, align 8
  %168 = extractvalue { ptr, i32 } %166, 1
  store i32 %168, ptr %9, align 4
  br label %169

169:                                              ; preds = %165, %159
  call void @_ZNSt6vectorIP9QParticleSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #9
  call void @_ZN8TPPLPolyD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %20) #9
  br label %170

170:                                              ; preds = %169, %132
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #9
  br label %175

171:                                              ; preds = %121
  store i32 0, ptr %16, align 4
  br label %172

172:                                              ; preds = %171, %107
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #9
  call void @_ZN8TPPLPolyD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %12) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #9
  call void @_ZNSt7__cxx1110_List_baseI8TPPLPolySaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #9
  call void @_ZNSt7__cxx1110_List_baseI8TPPLPolySaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #9
  call void @_ZNSt6vectorI7QVectorSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #9
  %173 = load i32, ptr %16, align 4
  switch i32 %173, label %184 [
    i32 0, label %174
    i32 1, label %174
  ]

174:                                              ; preds = %172, %172
  ret void

175:                                              ; preds = %170, %108
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #9
  br label %176

176:                                              ; preds = %175, %93, %61
  call void @_ZN8TPPLPolyD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %12) #9
  br label %177

177:                                              ; preds = %176, %57
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #9
  call void @_ZNSt7__cxx1110_List_baseI8TPPLPolySaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #9
  call void @_ZNSt7__cxx1110_List_baseI8TPPLPolySaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #9
  br label %178

178:                                              ; preds = %177, %43
  call void @_ZNSt6vectorI7QVectorSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #9
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #9
  br label %179

179:                                              ; preds = %178
  %180 = load ptr, ptr %8, align 8
  %181 = load i32, ptr %9, align 4
  %182 = insertvalue { ptr, i32 } poison, ptr %180, 0
  %183 = insertvalue { ptr, i32 } %182, i32 %181, 1
  resume { ptr, i32 } %183

184:                                              ; preds = %172
  unreachable
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290)) #4 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) #5

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorI7QVectorSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0 align 2

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

declare void @_ZN8TPPLPolyC1Ev(ptr noundef nonnull align 8 dereferenceable(17)) unnamed_addr #6

declare void @_ZN8TPPLPoly4InitEl(ptr noundef nonnull align 8 dereferenceable(17), i64 noundef) #6

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

declare void @_ZN8TPPLPoly14SetOrientationE15TPPLOrientation(ptr noundef nonnull align 8 dereferenceable(17), i32 noundef) #6

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

declare noundef i32 @_ZN13TPPLPartition18ConvexPartition_HMEPNSt7__cxx114listI8TPPLPolySaIS2_EEES5_(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef, ptr noundef) #6

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #7

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #7

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt14_List_iteratorI8TPPLPolyES3_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #0

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

declare void @_ZN8TPPLPolyC1ERKS_(ptr noundef nonnull align 8 dereferenceable(17), ptr noundef nonnull align 8 dereferenceable(17)) unnamed_addr #6

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

; Function Attrs: nounwind
declare void @_ZN8TPPLPolyD1Ev(ptr noundef nonnull align 8 dereferenceable(17)) unnamed_addr #8

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 uwtable "min-legal-vector-width"="64" "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 nounwind uwtable "min-legal-vector-width"="64" "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 nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { 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 #9 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!14, !15, i64 0}
!14 = !{!"_ZTS7QVector", !15, i64 0, !15, i64 4}
!15 = !{!"float", !7, i64 0}
!16 = !{!17, !18, i64 0}
!17 = !{!"_ZTS9TPPLPoint", !18, i64 0, !18, i64 8, !10, i64 16}
!18 = !{!"double", !7, i64 0}
!19 = !{!14, !15, i64 4}
!20 = !{!17, !18, i64 8}
!21 = !{i64 0, i64 8, !22, i64 8, i64 8, !22, i64 16, i64 4, !9}
!22 = !{!18, !18, i64 0}
!23 = !{!17, !10, i64 16}
!24 = distinct !{!24, !12}
!25 = distinct !{!25, !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.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::vector.15" = type { %"struct.std::_Vector_base.16" }
%"struct.std::_Vector_base.16" = type { %"struct.std::_Vector_base<QVector, std::allocator<QVector>>::_Vector_impl" }
%"struct.std::_Vector_base<QVector, std::allocator<QVector>>::_Vector_impl" = type { %"struct.std::_Vector_base<QVector, std::allocator<QVector>>::_Vector_impl_data" }
%"struct.std::_Vector_base<QVector, std::allocator<QVector>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.QVector = type { float, float }
%"class.std::__cxx11::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<TPPLPoly, std::allocator<TPPLPoly>>::_List_impl" }
%"struct.std::__cxx11::_List_base<TPPLPoly, std::allocator<TPPLPoly>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { ptr, ptr }
%class.TPPLPoly = type <{ ptr, i64, i8, [7 x i8] }>
%class.TPPLPartition = type { i8 }
%"struct.std::_List_iterator" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<QParticle *, std::allocator<QParticle *>>::_Vector_impl" }
%"struct.std::_Vector_base<QParticle *, std::allocator<QParticle *>>::_Vector_impl" = type { %"struct.std::_Vector_base<QParticle *, std::allocator<QParticle *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<QParticle *, std::allocator<QParticle *>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [47 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN5QMesh18DecompositePolygonERSt6vectorIP9QParticleSaIS2_EERS0_IS4_SaIS4_EE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %1) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::vector.15", align 8
  %4 = alloca %struct.QVector, align 8
  %5 = alloca %"class.std::__cxx11::list", align 8
  %6 = alloca %"class.std::__cxx11::list", align 8
  %7 = alloca %class.TPPLPoly, align 8
  %8 = alloca %class.TPPLPartition, align 1
  %9 = alloca %"struct.std::_List_iterator", align 8
  %10 = alloca %"struct.std::_List_iterator", align 8
  %11 = alloca %class.TPPLPoly, align 8
  %12 = alloca %"class.std::vector", align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #8
  call void @_ZNSt6vectorI7QVectorSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  %13 = call noundef i64 @_ZNKSt6vectorIP9QParticleSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #8
  %.not = icmp eq i64 %13, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %17, %2
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #8
  call void @_ZNSt7__cxx114listI8TPPLPolySaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #8
  call void @_ZNSt7__cxx114listI8TPPLPolySaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #8
  invoke void @_ZN8TPPLPolyC1Ev(ptr noundef nonnull align 8 dereferenceable(17) %7)
          to label %22 unwind label %25

.lr.ph:                                           ; preds = %2, %17
  %indvars.iv = phi i64 [ %indvars.iv.next, %17 ], [ 0, %2 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  %14 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv) #8
  %15 = load ptr, ptr %14, align 8, !tbaa !5
  %16 = call <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290) %15)
  store <2 x float> %16, ptr %4, align 8
  invoke void @_ZNSt6vectorI7QVectorSaIS0_EE9push_backEOS0_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 4 dereferenceable(8) %4)
          to label %17 unwind label %20

17:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %18 = call noundef i64 @_ZNKSt6vectorIP9QParticleSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #8
  %19 = icmp ugt i64 %18, %indvars.iv.next
  br i1 %19, label %.lr.ph, label %._crit_edge, !llvm.loop !9

20:                                               ; preds = %.lr.ph
  %21 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  br label %85

22:                                               ; preds = %._crit_edge
  %23 = call noundef i64 @_ZNKSt6vectorI7QVectorSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  invoke void @_ZN8TPPLPoly4InitEl(ptr noundef nonnull align 8 dereferenceable(17) %7, i64 noundef %23)
          to label %.preheader unwind label %27

.preheader:                                       ; preds = %22
  %24 = call noundef i64 @_ZNKSt6vectorI7QVectorSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  %.not52 = icmp eq i64 %24, 0
  br i1 %.not52, label %._crit_edge44, label %.lr.ph43

._crit_edge44:                                    ; preds = %.lr.ph43, %.preheader
  invoke void @_ZN8TPPLPoly14SetOrientationE15TPPLOrientation(ptr noundef nonnull align 8 dereferenceable(17) %7, i32 noundef 1)
          to label %43 unwind label %27

25:                                               ; preds = %._crit_edge
  %26 = landingpad { ptr, i32 }
          cleanup
  br label %84

27:                                               ; preds = %43, %._crit_edge44, %22
  %28 = landingpad { ptr, i32 }
          cleanup
  br label %83

.lr.ph43:                                         ; preds = %.preheader, %.lr.ph43
  %indvars.iv54 = phi i64 [ %indvars.iv.next55, %.lr.ph43 ], [ 0, %.preheader ]
  %29 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorI7QVectorSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv54) #8
  %30 = load float, ptr %29, align 4, !tbaa !11
  %31 = call noundef nonnull align 4 dereferenceable(8) ptr @_ZNSt6vectorI7QVectorSaIS0_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %indvars.iv54) #8
  %32 = getelementptr inbounds i8, ptr %31, i64 4
  %33 = load float, ptr %32, align 4, !tbaa !14
  %34 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %7, i64 noundef %indvars.iv54)
  %35 = insertelement <2 x float> poison, float %30, i64 0
  %36 = insertelement <2 x float> %35, float %33, i64 1
  %37 = fpext <2 x float> %36 to <2 x double>
  store <2 x double> %37, ptr %34, align 8, !tbaa !15
  %38 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %7, i64 noundef %indvars.iv54)
  %39 = getelementptr inbounds i8, ptr %38, i64 16
  %40 = trunc nuw nsw i64 %indvars.iv54 to i32
  store i32 %40, ptr %39, align 8, !tbaa !17
  %indvars.iv.next55 = add nuw nsw i64 %indvars.iv54, 1
  %41 = call noundef i64 @_ZNKSt6vectorI7QVectorSaIS0_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  %42 = icmp ugt i64 %41, %indvars.iv.next55
  br i1 %42, label %.lr.ph43, label %._crit_edge44, !llvm.loop !20

43:                                               ; preds = %._crit_edge44
  invoke void @_ZNSt7__cxx114listI8TPPLPolySaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(17) %7)
          to label %44 unwind label %27

44:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #8
  %45 = invoke noundef i32 @_ZN13TPPLPartition18ConvexPartition_HMEPNSt7__cxx114listI8TPPLPolySaIS2_EEES5_(ptr noundef nonnull align 1 dereferenceable(1) %8, ptr noundef nonnull %5, ptr noundef nonnull %6)
          to label %46 unwind label %52

46:                                               ; preds = %44
  %47 = icmp eq i32 %45, 0
  br i1 %47, label %48, label %54

48:                                               ; preds = %46
  %49 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
          to label %50 unwind label %52

50:                                               ; preds = %48
  %51 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %49, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %81 unwind label %52

52:                                               ; preds = %50, %48, %44
  %53 = landingpad { ptr, i32 }
          cleanup
  br label %82

54:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #8
  %55 = call ptr @_ZNSt7__cxx114listI8TPPLPolySaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  store ptr %55, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #8
  %56 = call ptr @_ZNSt7__cxx114listI8TPPLPolySaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  store ptr %56, ptr %10, align 8
  %57 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorI8TPPLPolyES3_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #8
  br i1 %57, label %.lr.ph50, label %._crit_edge51

._crit_edge51:                                    ; preds = %74, %54
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  br label %81

.lr.ph50:                                         ; preds = %54, %74
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #8
  %58 = call noundef nonnull align 8 dereferenceable(17) ptr @_ZNKSt14_List_iteratorI8TPPLPolyEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #8
  invoke void @_ZN8TPPLPolyC1ERKS_(ptr noundef nonnull align 8 dereferenceable(17) %11, ptr noundef nonnull align 8 dereferenceable(17) %58)
          to label %59 unwind label %62

59:                                               ; preds = %.lr.ph50
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #8
  call void @_ZNSt6vectorIP9QParticleSaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #8
  %60 = call noundef i64 @_ZNK8TPPLPoly12GetNumPointsEv(ptr noundef nonnull align 8 dereferenceable(17) %11)
  %61 = icmp sgt i64 %60, 0
  br i1 %61, label %.lr.ph47, label %._crit_edge48

._crit_edge48:                                    ; preds = %69, %59
  invoke void @_ZNSt6vectorIS_IP9QParticleSaIS1_EESaIS3_EE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %12)
          to label %74 unwind label %77

62:                                               ; preds = %.lr.ph50
  %63 = landingpad { ptr, i32 }
          cleanup
  br label %80

.lr.ph47:                                         ; preds = %59, %69
  %indvars.iv57 = phi i64 [ %indvars.iv.next58, %69 ], [ 0, %59 ]
  %64 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN8TPPLPoly8GetPointEl(ptr noundef nonnull align 8 dereferenceable(17) %11, i64 noundef %indvars.iv57)
  %65 = getelementptr inbounds i8, ptr %64, i64 16
  %66 = load i32, ptr %65, align 8, !tbaa !17
  %67 = sext i32 %66 to i64
  %68 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP9QParticleSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %67) #8
  invoke void @_ZNSt6vectorIP9QParticleSaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(8) %68)
          to label %69 unwind label %72

69:                                               ; preds = %.lr.ph47
  %indvars.iv.next58 = add nuw nsw i64 %indvars.iv57, 1
  %70 = call noundef i64 @_ZNK8TPPLPoly12GetNumPointsEv(ptr noundef nonnull align 8 dereferenceable(17) %11)
  %71 = icmp sgt i64 %70, %indvars.iv.next58
  br i1 %71, label %.lr.ph47, label %._crit_edge48, !llvm.loop !21

72:                                               ; preds = %.lr.ph47
  %73 = landingpad { ptr, i32 }
          cleanup
  br label %79

74:                                               ; preds = %._crit_edge48
  call void @_ZNSt6vectorIP9QParticleSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #8
  call void @_ZN8TPPLPolyD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %11) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #8
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt14_List_iteratorI8TPPLPolyEppEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #8
  %76 = call noundef zeroext i1 @_ZStneRKSt14_List_iteratorI8TPPLPolyES3_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #8
  br i1 %76, label %.lr.ph50, label %._crit_edge51

77:                                               ; preds = %._crit_edge48
  %78 = landingpad { ptr, i32 }
          cleanup
  br label %79

79:                                               ; preds = %77, %72
  %.pn = phi { ptr, i32 } [ %73, %72 ], [ %78, %77 ]
  call void @_ZNSt6vectorIP9QParticleSaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #8
  call void @_ZN8TPPLPolyD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %11) #8
  br label %80

80:                                               ; preds = %79, %62
  %.pn.pn = phi { ptr, i32 } [ %.pn, %79 ], [ %63, %62 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  br label %82

81:                                               ; preds = %50, %._crit_edge51
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #8
  call void @_ZN8TPPLPolyD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %7) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #8
  call void @_ZNSt7__cxx1110_List_baseI8TPPLPolySaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #8
  call void @_ZNSt7__cxx1110_List_baseI8TPPLPolySaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #8
  call void @_ZNSt6vectorI7QVectorSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #8
  ret void

82:                                               ; preds = %80, %52
  %.pn35 = phi { ptr, i32 } [ %53, %52 ], [ %.pn.pn, %80 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #8
  br label %83

83:                                               ; preds = %82, %27
  %.pn35.pn = phi { ptr, i32 } [ %.pn35, %82 ], [ %28, %27 ]
  call void @_ZN8TPPLPolyD1Ev(ptr noundef nonnull align 8 dereferenceable(17) %7) #8
  br label %84

84:                                               ; preds = %83, %25
  %.pn35.pn.pn = phi { ptr, i32 } [ %.pn35.pn, %83 ], [ %26, %25 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #8
  call void @_ZNSt7__cxx1110_List_baseI8TPPLPolySaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #8
  call void @_ZNSt7__cxx1110_List_baseI8TPPLPolySaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #8
  br label %85

85:                                               ; preds = %84, %20
  %.pn39 = phi { ptr, i32 } [ %21, %20 ], [ %.pn35.pn.pn, %84 ]
  call void @_ZNSt6vectorI7QVectorSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #8
  resume { ptr, i32 } %.pn39
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local <2 x float> @_ZN9QParticle17GetGlobalPositionEv(ptr noundef nonnull align 8 dereferenceable(290)) local_unnamed_addr #4 align 2

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

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

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

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

declare void @_ZN8TPPLPolyC1Ev(ptr noundef nonnull align 8 dereferenceable(17)) unnamed_addr #5

declare void @_ZN8TPPLPoly4InitEl(ptr noundef nonnull align 8 dereferenceable(17), i64 noundef) local_unnamed_addr #5

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

declare void @_ZN8TPPLPoly14SetOrientationE15TPPLOrientation(ptr noundef nonnull align 8 dereferenceable(17), i32 noundef) local_unnamed_addr #5

; 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

declare noundef i32 @_ZN13TPPLPartition18ConvexPartition_HMEPNSt7__cxx114listI8TPPLPolySaIS2_EEES5_(ptr noundef nonnull align 1 dereferenceable(1), ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #6

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt14_List_iteratorI8TPPLPolyES3_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0

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

declare void @_ZN8TPPLPolyC1ERKS_(ptr noundef nonnull align 8 dereferenceable(17), ptr noundef nonnull align 8 dereferenceable(17)) unnamed_addr #5

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

; Function Attrs: nounwind
declare void @_ZN8TPPLPolyD1Ev(ptr noundef nonnull align 8 dereferenceable(17)) unnamed_addr #7

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 uwtable "min-legal-vector-width"="64" "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 nounwind uwtable "min-legal-vector-width"="64" "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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 #8 = { nounwind }

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

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


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass