; LLVM IR from Slingshot-Physics/slingshot-community :: common/geometry/src (quickhull)

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

%"struct.geometry::mesh::quickhullMesh_t" = type { %"class.geometry::mesh::TriangleGraphMesh", i32, [500 x %"struct.geometry::types::minkowskiDiffVertex_t"] }
%"class.geometry::mesh::TriangleGraphMesh" = type { i32, [500 x %"struct.geometry::types::leanNeighborTriangle_t"] }
%"struct.geometry::types::leanNeighborTriangle_t" = type { [3 x i32], [3 x i32] }
%"struct.geometry::types::minkowskiDiffVertex_t" = type { i32, i32, %class.Vector3, %class.Vector3, %class.Vector3 }
%class.Vector3 = type { [3 x float] }
%"struct.geometry::types::triangleMesh_t" = type { i32, i32, [1000 x %"struct.geometry::types::meshTriangle_t"], [500 x %class.Vector3] }
%"struct.geometry::types::meshTriangle_t" = type { [3 x i32], %class.Vector3 }

@.str = external hidden unnamed_addr constant [16 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [105 x i8], align 1
@__PRETTY_FUNCTION__._ZN8geometry4mesh12generateHullEjPKNS_5types21minkowskiDiffVertex_tERNS1_14triangleMesh_tE = external hidden unnamed_addr constant [101 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [41 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN8geometry4mesh15quickhullMesh_t7addVertERKNS_5types21minkowskiDiffVertex_tE(ptr noundef nonnull align 4 dereferenceable(34008), ptr noundef nonnull align 4 dereferenceable(44)) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8geometry4mesh28convertQuickHullToMeshConfigERKNS0_15quickhullMesh_tERK7Vector3RNS_5types14triangleMesh_tE(ptr noundef nonnull align 4 dereferenceable(34008), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(30008)) #0

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

; 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 noundef i32 @_ZNK8geometry4mesh17TriangleGraphMeshILj500EE4sizeEv(ptr noundef nonnull align 4 dereferenceable(12004)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8geometry4mesh15findTetrahedronEjPKNS_5types21minkowskiDiffVertex_tERNS0_15quickhullMesh_tEPb(i32 noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(34008), ptr noundef) #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN8geometry5types21minkowskiDiffVertex_tC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(44), ptr noundef nonnull align 4 dereferenceable(44)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN8geometry4mesh17findFarthestPointERKNS0_15quickhullMesh_tERK7Vector3PKbjPKNS_5types21minkowskiDiffVertex_tE(ptr noundef nonnull align 4 dereferenceable(34008), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef, i32 noundef, ptr noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8geometry4mesh26deleteTrianglesFacingPointERKNS_5types21minkowskiDiffVertex_tERK7Vector3RNS0_15quickhullMesh_tE(ptr noundef nonnull align 4 dereferenceable(44), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(34008)) #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(24) ptr @_ZN8geometry4mesh17TriangleGraphMeshILj500EEixEj(ptr noundef nonnull align 4 dereferenceable(12004), i32 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN8geometry4mesh20addTrianglesToVertIdEiRNS0_15quickhullMesh_tE(i32 noundef, ptr noundef nonnull align 4 dereferenceable(34008)) #0

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN8geometry4mesh12generateHullEjPKNS_5types21minkowskiDiffVertex_tERNS1_14triangleMesh_tE(i32 noundef %0, ptr noundef %1, ptr noundef nonnull align 4 dereferenceable(30008) %2) #0 {
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca %"struct.geometry::mesh::quickhullMesh_t", align 4
  %11 = alloca %class.Vector3, align 4
  %12 = alloca i32, align 4
  %13 = alloca %class.Vector3, align 4
  %14 = alloca float, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca %"struct.geometry::types::minkowskiDiffVertex_t", align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  store i32 %0, ptr %5, align 4, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !9
  %22 = load ptr, ptr %7, align 8, !tbaa !9
  %23 = getelementptr inbounds %"struct.geometry::types::triangleMesh_t", ptr %22, i32 0, i32 0
  store i32 0, ptr %23, align 4, !tbaa !11
  %24 = load ptr, ptr %7, align 8, !tbaa !9
  %25 = getelementptr inbounds %"struct.geometry::types::triangleMesh_t", ptr %24, i32 0, i32 1
  store i32 0, ptr %25, align 4, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #8
  store i32 1, ptr %8, align 4, !tbaa !5
  %26 = load i32, ptr %5, align 4, !tbaa !5
  %27 = icmp uge i32 %26, 4
  br i1 %27, label %28, label %29

28:                                               ; preds = %3
  br label %31

29:                                               ; preds = %3
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 254, ptr noundef @__PRETTY_FUNCTION__._ZN8geometry4mesh12generateHullEjPKNS_5types21minkowskiDiffVertex_tERNS1_14triangleMesh_tE) #9
  unreachable

30:                                               ; No predecessors!
  br label %31

31:                                               ; preds = %30, %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  %32 = load i32, ptr %5, align 4, !tbaa !5
  %33 = zext i32 %32 to i64
  %34 = call noalias noundef nonnull ptr @_Znam(i64 noundef %33) #10
  store ptr %34, ptr %9, align 8, !tbaa !9
  %35 = load ptr, ptr %9, align 8, !tbaa !9
  %36 = load i32, ptr %5, align 4, !tbaa !5
  %37 = zext i32 %36 to i64
  %38 = mul i64 %37, 1
  call void @llvm.memset.p0.i64(ptr align 1 %35, i8 0, i64 %38, i1 false)
  call void @llvm.lifetime.start.p0(i64 34008, ptr %10) #8
  %39 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %10, i32 0, i32 0
  call void @_ZN8geometry4mesh17TriangleGraphMeshILj500EEC2Ev(ptr noundef nonnull align 4 dereferenceable(12004) %39)
  %40 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %10, i32 0, i32 1
  store i32 0, ptr %40, align 4, !tbaa !14
  %41 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %10, i32 0, i32 2
  call void @llvm.memset.p0.i64(ptr align 4 %41, i8 0, i64 22000, i1 false)
  %42 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %41, i64 500
  br label %43

43:                                               ; preds = %43, %31
  %44 = phi ptr [ %41, %31 ], [ %50, %43 ]
  %45 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %44, i32 0, i32 0
  %46 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %44, i32 0, i32 1
  %47 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %44, i32 0, i32 2
  call void @_ZN7Vector3C2Ev(ptr noundef nonnull align 4 dereferenceable(12) %47)
  %48 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %44, i32 0, i32 3
  call void @_ZN7Vector3C2Ev(ptr noundef nonnull align 4 dereferenceable(12) %48)
  %49 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %44, i32 0, i32 4
  call void @_ZN7Vector3C2Ev(ptr noundef nonnull align 4 dereferenceable(12) %49)
  %50 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %44, i64 1
  %51 = icmp eq ptr %50, %42
  br i1 %51, label %52, label %43

52:                                               ; preds = %43
  %53 = load i32, ptr %5, align 4, !tbaa !5
  %54 = load ptr, ptr %6, align 8, !tbaa !9
  %55 = load ptr, ptr %9, align 8, !tbaa !9
  call void @_ZN8geometry4mesh15findTetrahedronEjPKNS_5types21minkowskiDiffVertex_tERNS0_15quickhullMesh_tEPb(i32 noundef %53, ptr noundef %54, ptr noundef nonnull align 4 dereferenceable(34008) %10, ptr noundef %55)
  call void @llvm.lifetime.start.p0(i64 12, ptr %11) #8
  call void @_ZN7Vector3C2Ev(ptr noundef nonnull align 4 dereferenceable(12) %11)
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  store i32 0, ptr %12, align 4, !tbaa !5
  br label %56

56:                                               ; preds = %72, %52
  %57 = load i32, ptr %12, align 4, !tbaa !5
  %58 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %10, i32 0, i32 1
  %59 = load i32, ptr %58, align 4, !tbaa !14
  %60 = icmp ult i32 %57, %59
  br i1 %60, label %62, label %61

61:                                               ; preds = %56
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  br label %75

62:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 12, ptr %13) #8
  %63 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %10, i32 0, i32 2
  %64 = load i32, ptr %12, align 4, !tbaa !5
  %65 = zext i32 %64 to i64
  %66 = getelementptr inbounds [500 x %"struct.geometry::types::minkowskiDiffVertex_t"], ptr %63, i64 0, i64 %65
  %67 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %66, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  %68 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %10, i32 0, i32 1
  %69 = load i32, ptr %68, align 4, !tbaa !14
  %70 = uitofp i32 %69 to float
  store float %70, ptr %14, align 4, !tbaa !17
  call void @_ZNK7Vector3dvERKf(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %13, ptr noundef nonnull align 4 dereferenceable(12) %67, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %71 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3pLERKS_(ptr noundef nonnull align 4 dereferenceable(12) %11, ptr noundef nonnull align 4 dereferenceable(12) %13)
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 12, ptr %13) #8
  br label %72

72:                                               ; preds = %62
  %73 = load i32, ptr %12, align 4, !tbaa !5
  %74 = add i32 %73, 1
  store i32 %74, ptr %12, align 4, !tbaa !5
  br label %56, !llvm.loop !19

75:                                               ; preds = %61
  %76 = load i32, ptr %5, align 4, !tbaa !5
  %77 = icmp eq i32 %76, 4
  br i1 %77, label %78, label %84

78:                                               ; preds = %75
  %79 = load ptr, ptr %7, align 8, !tbaa !9
  call void @_ZN8geometry4mesh28convertQuickHullToMeshConfigERKNS0_15quickhullMesh_tERK7Vector3RNS_5types14triangleMesh_tE(ptr noundef nonnull align 4 dereferenceable(34008) %10, ptr noundef nonnull align 4 dereferenceable(12) %11, ptr noundef nonnull align 4 dereferenceable(30008) %79)
  %80 = load ptr, ptr %9, align 8, !tbaa !9
  %81 = icmp eq ptr %80, null
  br i1 %81, label %83, label %82

82:                                               ; preds = %78
  call void @_ZdaPv(ptr noundef %80) #11
  br label %83

83:                                               ; preds = %82, %78
  store i32 1, ptr %4, align 4
  store i32 1, ptr %15, align 4
  br label %217

84:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #8
  store i32 0, ptr %16, align 4, !tbaa !5
  br label %85

85:                                               ; preds = %131, %84
  %86 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %10, i32 0, i32 1
  %87 = load i32, ptr %86, align 4, !tbaa !14
  %88 = icmp ult i32 %87, 500
  br i1 %88, label %89, label %132

89:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #8
  %90 = load ptr, ptr %9, align 8, !tbaa !9
  %91 = load i32, ptr %5, align 4, !tbaa !5
  %92 = load ptr, ptr %6, align 8, !tbaa !9
  %93 = call noundef i32 @_ZN8geometry4mesh17findFarthestPointERKNS0_15quickhullMesh_tERK7Vector3PKbjPKNS_5types21minkowskiDiffVertex_tE(ptr noundef nonnull align 4 dereferenceable(34008) %10, ptr noundef nonnull align 4 dereferenceable(12) %11, ptr noundef %90, i32 noundef %91, ptr noundef %92)
  store i32 %93, ptr %17, align 4, !tbaa !5
  %94 = load i32, ptr %17, align 4, !tbaa !5
  %95 = icmp slt i32 %94, 0
  br i1 %95, label %96, label %97

96:                                               ; preds = %89
  store i32 6, ptr %15, align 4
  br label %129

97:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 44, ptr %18) #8
  %98 = load ptr, ptr %6, align 8, !tbaa !9
  %99 = load i32, ptr %17, align 4, !tbaa !5
  %100 = sext i32 %99 to i64
  %101 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %98, i64 %100
  call void @_ZN8geometry5types21minkowskiDiffVertex_tC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(44) %18, ptr noundef nonnull align 4 dereferenceable(44) %101)
  call void @_ZN8geometry4mesh26deleteTrianglesFacingPointERKNS_5types21minkowskiDiffVertex_tERK7Vector3RNS0_15quickhullMesh_tE(ptr noundef nonnull align 4 dereferenceable(44) %18, ptr noundef nonnull align 4 dereferenceable(12) %11, ptr noundef nonnull align 4 dereferenceable(34008) %10)
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #8
  %102 = call noundef i32 @_ZN8geometry4mesh15quickhullMesh_t7addVertERKNS_5types21minkowskiDiffVertex_tE(ptr noundef nonnull align 4 dereferenceable(34008) %10, ptr noundef nonnull align 4 dereferenceable(44) %18)
  store i32 %102, ptr %19, align 4, !tbaa !5
  %103 = load i32, ptr %19, align 4, !tbaa !5
  %104 = icmp slt i32 %103, 0
  br i1 %104, label %105, label %110

105:                                              ; preds = %97
  %106 = load ptr, ptr %9, align 8, !tbaa !9
  %107 = icmp eq ptr %106, null
  br i1 %107, label %109, label %108

108:                                              ; preds = %105
  call void @_ZdaPv(ptr noundef %106) #11
  br label %109

109:                                              ; preds = %108, %105
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %15, align 4
  br label %128

110:                                              ; preds = %97
  %111 = load ptr, ptr %9, align 8, !tbaa !9
  %112 = load i32, ptr %17, align 4, !tbaa !5
  %113 = sext i32 %112 to i64
  %114 = getelementptr inbounds i8, ptr %111, i64 %113
  store i8 1, ptr %114, align 1, !tbaa !21
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #8
  %115 = load i32, ptr %19, align 4, !tbaa !5
  %116 = call noundef i32 @_ZN8geometry4mesh20addTrianglesToVertIdEiRNS0_15quickhullMesh_tE(i32 noundef %115, ptr noundef nonnull align 4 dereferenceable(34008) %10)
  store i32 %116, ptr %20, align 4, !tbaa !5
  %117 = load i32, ptr %20, align 4, !tbaa !5
  %118 = icmp slt i32 %117, 0
  br i1 %118, label %119, label %124

119:                                              ; preds = %110
  %120 = load ptr, ptr %9, align 8, !tbaa !9
  %121 = icmp eq ptr %120, null
  br i1 %121, label %123, label %122

122:                                              ; preds = %119
  call void @_ZdaPv(ptr noundef %120) #11
  br label %123

123:                                              ; preds = %122, %119
  store i32 -1, ptr %4, align 4
  store i32 1, ptr %15, align 4
  br label %127

124:                                              ; preds = %110
  %125 = load i32, ptr %16, align 4, !tbaa !5
  %126 = add nsw i32 %125, 1
  store i32 %126, ptr %16, align 4, !tbaa !5
  store i32 0, ptr %15, align 4
  br label %127

127:                                              ; preds = %124, %123
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #8
  br label %128

128:                                              ; preds = %127, %109
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 44, ptr %18) #8
  br label %129

129:                                              ; preds = %128, %96
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #8
  %130 = load i32, ptr %15, align 4
  switch i32 %130, label %216 [
    i32 0, label %131
    i32 6, label %132
  ]

131:                                              ; preds = %129
  br label %85, !llvm.loop !23

132:                                              ; preds = %129, %85
  %133 = load ptr, ptr %9, align 8, !tbaa !9
  %134 = icmp eq ptr %133, null
  br i1 %134, label %136, label %135

135:                                              ; preds = %132
  call void @_ZdaPv(ptr noundef %133) #11
  br label %136

136:                                              ; preds = %135, %132
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #8
  store i32 0, ptr %21, align 4, !tbaa !5
  br label %137

137:                                              ; preds = %210, %136
  %138 = load i32, ptr %21, align 4, !tbaa !5
  %139 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %10, i32 0, i32 0
  %140 = call noundef i32 @_ZNK8geometry4mesh17TriangleGraphMeshILj500EE4sizeEv(ptr noundef nonnull align 4 dereferenceable(12004) %139)
  %141 = icmp ult i32 %138, %140
  br i1 %141, label %143, label %142

142:                                              ; preds = %137
  store i32 7, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #8
  br label %213

143:                                              ; preds = %137
  %144 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %10, i32 0, i32 0
  %145 = load i32, ptr %21, align 4, !tbaa !5
  %146 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZN8geometry4mesh17TriangleGraphMeshILj500EEixEj(ptr noundef nonnull align 4 dereferenceable(12004) %144, i32 noundef %145)
  %147 = getelementptr inbounds %"struct.geometry::types::leanNeighborTriangle_t", ptr %146, i32 0, i32 1
  %148 = getelementptr inbounds [3 x i32], ptr %147, i64 0, i64 0
  %149 = load i32, ptr %148, align 4, !tbaa !5
  %150 = icmp ne i32 %149, -1
  br i1 %150, label %151, label %152

151:                                              ; preds = %143
  br label %154

152:                                              ; preds = %143
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 322, ptr noundef @__PRETTY_FUNCTION__._ZN8geometry4mesh12generateHullEjPKNS_5types21minkowskiDiffVertex_tERNS1_14triangleMesh_tE) #9
  unreachable

153:                                              ; No predecessors!
  br label %154

154:                                              ; preds = %153, %151
  %155 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %10, i32 0, i32 0
  %156 = load i32, ptr %21, align 4, !tbaa !5
  %157 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZN8geometry4mesh17TriangleGraphMeshILj500EEixEj(ptr noundef nonnull align 4 dereferenceable(12004) %155, i32 noundef %156)
  %158 = getelementptr inbounds %"struct.geometry::types::leanNeighborTriangle_t", ptr %157, i32 0, i32 1
  %159 = getelementptr inbounds [3 x i32], ptr %158, i64 0, i64 1
  %160 = load i32, ptr %159, align 4, !tbaa !5
  %161 = icmp ne i32 %160, -1
  br i1 %161, label %162, label %163

162:                                              ; preds = %154
  br label %165

163:                                              ; preds = %154
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 323, ptr noundef @__PRETTY_FUNCTION__._ZN8geometry4mesh12generateHullEjPKNS_5types21minkowskiDiffVertex_tERNS1_14triangleMesh_tE) #9
  unreachable

164:                                              ; No predecessors!
  br label %165

165:                                              ; preds = %164, %162
  %166 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %10, i32 0, i32 0
  %167 = load i32, ptr %21, align 4, !tbaa !5
  %168 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZN8geometry4mesh17TriangleGraphMeshILj500EEixEj(ptr noundef nonnull align 4 dereferenceable(12004) %166, i32 noundef %167)
  %169 = getelementptr inbounds %"struct.geometry::types::leanNeighborTriangle_t", ptr %168, i32 0, i32 1
  %170 = getelementptr inbounds [3 x i32], ptr %169, i64 0, i64 2
  %171 = load i32, ptr %170, align 4, !tbaa !5
  %172 = icmp ne i32 %171, -1
  br i1 %172, label %173, label %174

173:                                              ; preds = %165
  br label %176

174:                                              ; preds = %165
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 324, ptr noundef @__PRETTY_FUNCTION__._ZN8geometry4mesh12generateHullEjPKNS_5types21minkowskiDiffVertex_tERNS1_14triangleMesh_tE) #9
  unreachable

175:                                              ; No predecessors!
  br label %176

176:                                              ; preds = %175, %173
  %177 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %10, i32 0, i32 0
  %178 = load i32, ptr %21, align 4, !tbaa !5
  %179 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZN8geometry4mesh17TriangleGraphMeshILj500EEixEj(ptr noundef nonnull align 4 dereferenceable(12004) %177, i32 noundef %178)
  %180 = getelementptr inbounds %"struct.geometry::types::leanNeighborTriangle_t", ptr %179, i32 0, i32 0
  %181 = getelementptr inbounds [3 x i32], ptr %180, i64 0, i64 0
  %182 = load i32, ptr %181, align 4, !tbaa !5
  %183 = icmp ne i32 %182, -1
  br i1 %183, label %184, label %185

184:                                              ; preds = %176
  br label %187

185:                                              ; preds = %176
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 326, ptr noundef @__PRETTY_FUNCTION__._ZN8geometry4mesh12generateHullEjPKNS_5types21minkowskiDiffVertex_tERNS1_14triangleMesh_tE) #9
  unreachable

186:                                              ; No predecessors!
  br label %187

187:                                              ; preds = %186, %184
  %188 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %10, i32 0, i32 0
  %189 = load i32, ptr %21, align 4, !tbaa !5
  %190 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZN8geometry4mesh17TriangleGraphMeshILj500EEixEj(ptr noundef nonnull align 4 dereferenceable(12004) %188, i32 noundef %189)
  %191 = getelementptr inbounds %"struct.geometry::types::leanNeighborTriangle_t", ptr %190, i32 0, i32 0
  %192 = getelementptr inbounds [3 x i32], ptr %191, i64 0, i64 1
  %193 = load i32, ptr %192, align 4, !tbaa !5
  %194 = icmp ne i32 %193, -1
  br i1 %194, label %195, label %196

195:                                              ; preds = %187
  br label %198

196:                                              ; preds = %187
  call void @__assert_fail(ptr noundef @.str.6, ptr noundef @.str.1, i32 noundef 327, ptr noundef @__PRETTY_FUNCTION__._ZN8geometry4mesh12generateHullEjPKNS_5types21minkowskiDiffVertex_tERNS1_14triangleMesh_tE) #9
  unreachable

197:                                              ; No predecessors!
  br label %198

198:                                              ; preds = %197, %195
  %199 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %10, i32 0, i32 0
  %200 = load i32, ptr %21, align 4, !tbaa !5
  %201 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZN8geometry4mesh17TriangleGraphMeshILj500EEixEj(ptr noundef nonnull align 4 dereferenceable(12004) %199, i32 noundef %200)
  %202 = getelementptr inbounds %"struct.geometry::types::leanNeighborTriangle_t", ptr %201, i32 0, i32 0
  %203 = getelementptr inbounds [3 x i32], ptr %202, i64 0, i64 2
  %204 = load i32, ptr %203, align 4, !tbaa !5
  %205 = icmp ne i32 %204, -1
  br i1 %205, label %206, label %207

206:                                              ; preds = %198
  br label %209

207:                                              ; preds = %198
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.1, i32 noundef 328, ptr noundef @__PRETTY_FUNCTION__._ZN8geometry4mesh12generateHullEjPKNS_5types21minkowskiDiffVertex_tERNS1_14triangleMesh_tE) #9
  unreachable

208:                                              ; No predecessors!
  br label %209

209:                                              ; preds = %208, %206
  br label %210

210:                                              ; preds = %209
  %211 = load i32, ptr %21, align 4, !tbaa !5
  %212 = add i32 %211, 1
  store i32 %212, ptr %21, align 4, !tbaa !5
  br label %137, !llvm.loop !24

213:                                              ; preds = %142
  %214 = load ptr, ptr %7, align 8, !tbaa !9
  call void @_ZN8geometry4mesh28convertQuickHullToMeshConfigERKNS0_15quickhullMesh_tERK7Vector3RNS_5types14triangleMesh_tE(ptr noundef nonnull align 4 dereferenceable(34008) %10, ptr noundef nonnull align 4 dereferenceable(12) %11, ptr noundef nonnull align 4 dereferenceable(30008) %214)
  %215 = load i32, ptr %8, align 4, !tbaa !5
  store i32 %215, ptr %4, align 4
  store i32 1, ptr %15, align 4
  br label %216

216:                                              ; preds = %213, %129
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #8
  br label %217

217:                                              ; preds = %216, %83
  call void @llvm.lifetime.end.p0(i64 12, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 34008, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #8
  %218 = load i32, ptr %4, align 4
  ret i32 %218
}

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #4

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN8geometry4mesh17TriangleGraphMeshILj500EEC2Ev(ptr noundef nonnull align 4 dereferenceable(12004)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7Vector3C2Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7Vector3dvERKf(ptr dead_on_unwind noalias writable sret(%class.Vector3) align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(4)) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3pLERKS_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #2 align 2

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { noreturn 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 #5 = { 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { 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 #8 = { nounwind }
attributes #9 = { noreturn nounwind }
attributes #10 = { builtin allocsize(0) }
attributes #11 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTSN8geometry5types14triangleMesh_tE", !6, i64 0, !6, i64 4, !7, i64 8, !7, i64 24008}
!13 = !{!12, !6, i64 4}
!14 = !{!15, !6, i64 12004}
!15 = !{!"_ZTSN8geometry4mesh15quickhullMesh_tE", !16, i64 0, !6, i64 12004, !7, i64 12008}
!16 = !{!"_ZTSN8geometry4mesh17TriangleGraphMeshILj500EEE", !6, i64 0, !7, i64 4}
!17 = !{!18, !18, i64 0}
!18 = !{!"float", !7, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = !{!22, !22, i64 0}
!22 = !{!"bool", !7, i64 0}
!23 = distinct !{!23, !20}
!24 = distinct !{!24, !20}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.geometry::mesh::quickhullMesh_t" = type { %"class.geometry::mesh::TriangleGraphMesh", i32, [500 x %"struct.geometry::types::minkowskiDiffVertex_t"] }
%"class.geometry::mesh::TriangleGraphMesh" = type { i32, [500 x %"struct.geometry::types::leanNeighborTriangle_t"] }
%"struct.geometry::types::leanNeighborTriangle_t" = type { [3 x i32], [3 x i32] }
%"struct.geometry::types::minkowskiDiffVertex_t" = type { i32, i32, %class.Vector3, %class.Vector3, %class.Vector3 }
%class.Vector3 = type { [3 x float] }

@.str = external hidden unnamed_addr constant [16 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [105 x i8], align 1
@__PRETTY_FUNCTION__._ZN8geometry4mesh12generateHullEjPKNS_5types21minkowskiDiffVertex_tERNS1_14triangleMesh_tE = external hidden unnamed_addr constant [101 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [41 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN8geometry4mesh15quickhullMesh_t7addVertERKNS_5types21minkowskiDiffVertex_tE(ptr noundef nonnull align 4 dereferenceable(34008), ptr noundef nonnull align 4 dereferenceable(44)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8geometry4mesh28convertQuickHullToMeshConfigERKNS0_15quickhullMesh_tERK7Vector3RNS_5types14triangleMesh_tE(ptr noundef nonnull align 4 dereferenceable(34008), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(30008)) local_unnamed_addr #0

; 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 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 noundef i32 @_ZNK8geometry4mesh17TriangleGraphMeshILj500EE4sizeEv(ptr noundef nonnull align 4 dereferenceable(12004)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8geometry4mesh15findTetrahedronEjPKNS_5types21minkowskiDiffVertex_tERNS0_15quickhullMesh_tEPb(i32 noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(34008), ptr noundef) local_unnamed_addr #0

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN8geometry5types21minkowskiDiffVertex_tC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(44), ptr noundef nonnull align 4 dereferenceable(44)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN8geometry4mesh17findFarthestPointERKNS0_15quickhullMesh_tERK7Vector3PKbjPKNS_5types21minkowskiDiffVertex_tE(ptr noundef nonnull align 4 dereferenceable(34008), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN8geometry4mesh26deleteTrianglesFacingPointERKNS_5types21minkowskiDiffVertex_tERK7Vector3RNS0_15quickhullMesh_tE(ptr noundef nonnull align 4 dereferenceable(44), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(34008)) local_unnamed_addr #0

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(24) ptr @_ZN8geometry4mesh17TriangleGraphMeshILj500EEixEj(ptr noundef nonnull align 4 dereferenceable(12004), i32 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZN8geometry4mesh20addTrianglesToVertIdEiRNS0_15quickhullMesh_tE(i32 noundef, ptr noundef nonnull align 4 dereferenceable(34008)) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN8geometry4mesh12generateHullEjPKNS_5types21minkowskiDiffVertex_tERNS1_14triangleMesh_tE(i32 noundef %0, ptr noundef %1, ptr noundef nonnull align 4 dereferenceable(30008) %2) local_unnamed_addr #0 {
  %4 = alloca %"struct.geometry::mesh::quickhullMesh_t", align 4
  %5 = alloca %class.Vector3, align 4
  %6 = alloca %class.Vector3, align 4
  %7 = alloca float, align 4
  %8 = alloca %"struct.geometry::types::minkowskiDiffVertex_t", align 4
  store i32 0, ptr %2, align 4, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %2, i64 4
  store i32 0, ptr %9, align 4, !tbaa !10
  %10 = icmp ugt i32 %0, 3
  br i1 %10, label %12, label %11

11:                                               ; preds = %3
  tail call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 254, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN8geometry4mesh12generateHullEjPKNS_5types21minkowskiDiffVertex_tERNS1_14triangleMesh_tE) #8
  unreachable

12:                                               ; preds = %3
  %13 = zext i32 %0 to i64
  %14 = tail call noalias noundef nonnull ptr @_Znam(i64 noundef %13) #9
  tail call void @llvm.memset.p0.i64(ptr nonnull align 1 %14, i8 0, i64 %13, i1 false)
  call void @llvm.lifetime.start.p0(i64 34008, ptr nonnull %4) #10
  call void @_ZN8geometry4mesh17TriangleGraphMeshILj500EEC2Ev(ptr noundef nonnull align 4 dereferenceable(12004) %4)
  %15 = getelementptr inbounds i8, ptr %4, i64 12004
  %.ptr54 = getelementptr inbounds i8, ptr %4, i64 12008
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(22004) %15, i8 0, i64 22004, i1 false)
  br label %16

16:                                               ; preds = %16, %12
  %.idx = phi i64 [ 12008, %12 ], [ %.add, %16 ]
  %.ptr = getelementptr inbounds i8, ptr %4, i64 %.idx
  %17 = getelementptr inbounds i8, ptr %.ptr, i64 8
  call void @_ZN7Vector3C2Ev(ptr noundef nonnull align 4 dereferenceable(12) %17)
  %18 = getelementptr inbounds i8, ptr %.ptr, i64 20
  call void @_ZN7Vector3C2Ev(ptr noundef nonnull align 4 dereferenceable(12) %18)
  %19 = getelementptr inbounds i8, ptr %.ptr, i64 32
  call void @_ZN7Vector3C2Ev(ptr noundef nonnull align 4 dereferenceable(12) %19)
  %.add = add nuw nsw i64 %.idx, 44
  %20 = icmp eq i64 %.add, 34008
  br i1 %20, label %21, label %16

21:                                               ; preds = %16
  call void @_ZN8geometry4mesh15findTetrahedronEjPKNS_5types21minkowskiDiffVertex_tERNS0_15quickhullMesh_tEPb(i32 noundef %0, ptr noundef %1, ptr noundef nonnull align 4 dereferenceable(34008) %4, ptr noundef nonnull %14)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #10
  call void @_ZN7Vector3C2Ev(ptr noundef nonnull align 4 dereferenceable(12) %5)
  %22 = load i32, ptr %15, align 4, !tbaa !11
  %.not71 = icmp eq i32 %22, 0
  br i1 %.not71, label %._crit_edge.thread, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph
  %23 = icmp eq i32 %0, 4
  br i1 %23, label %33, label %.preheader

._crit_edge.thread:                               ; preds = %21
  %24 = icmp eq i32 %0, 4
  br i1 %24, label %33, label %.lr.ph66.preheader

.preheader:                                       ; preds = %._crit_edge
  %25 = icmp ult i32 %30, 500
  br i1 %25, label %.lr.ph66.preheader, label %.thread

.lr.ph66.preheader:                               ; preds = %._crit_edge.thread, %.preheader
  br label %.lr.ph66

.lr.ph:                                           ; preds = %21, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %21 ]
  %26 = phi i32 [ %30, %.lr.ph ], [ %22, %21 ]
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #10
  %27 = getelementptr inbounds [500 x %"struct.geometry::types::minkowskiDiffVertex_t"], ptr %.ptr54, i64 0, i64 %indvars.iv, i32 2
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #10
  %28 = uitofp i32 %26 to float
  store float %28, ptr %7, align 4, !tbaa !14
  call void @_ZNK7Vector3dvERKf(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %6, ptr noundef nonnull align 4 dereferenceable(12) %27, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %29 = call noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3pLERKS_(ptr noundef nonnull align 4 dereferenceable(12) %5, ptr noundef nonnull align 4 dereferenceable(12) %6)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #10
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #10
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %30 = load i32, ptr %15, align 4, !tbaa !11
  %31 = zext i32 %30 to i64
  %32 = icmp ult i64 %indvars.iv.next, %31
  br i1 %32, label %.lr.ph, label %._crit_edge, !llvm.loop !16

33:                                               ; preds = %._crit_edge.thread, %._crit_edge
  call void @_ZN8geometry4mesh28convertQuickHullToMeshConfigERKNS0_15quickhullMesh_tERK7Vector3RNS_5types14triangleMesh_tE(ptr noundef nonnull align 4 dereferenceable(34008) %4, ptr noundef nonnull align 4 dereferenceable(12) %5, ptr noundef nonnull align 4 dereferenceable(30008) %2)
  call void @_ZdaPv(ptr noundef nonnull %14) #11
  br label %79

thread-pre-split:                                 ; preds = %42
  call void @llvm.lifetime.end.p0(i64 44, ptr nonnull %8) #10
  %.pr = load i32, ptr %15, align 4, !tbaa !11
  %34 = icmp ult i32 %.pr, 500
  br i1 %34, label %.lr.ph66, label %.thread

.lr.ph66:                                         ; preds = %.lr.ph66.preheader, %thread-pre-split
  %35 = call noundef i32 @_ZN8geometry4mesh17findFarthestPointERKNS0_15quickhullMesh_tERK7Vector3PKbjPKNS_5types21minkowskiDiffVertex_tE(ptr noundef nonnull align 4 dereferenceable(34008) %4, ptr noundef nonnull align 4 dereferenceable(12) %5, ptr noundef nonnull %14, i32 noundef %0, ptr noundef %1)
  %36 = icmp slt i32 %35, 0
  br i1 %36, label %.thread, label %37

37:                                               ; preds = %.lr.ph66
  call void @llvm.lifetime.start.p0(i64 44, ptr nonnull %8) #10
  %38 = zext nneg i32 %35 to i64
  %39 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %1, i64 %38
  call void @_ZN8geometry5types21minkowskiDiffVertex_tC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(44) %8, ptr noundef nonnull align 4 dereferenceable(44) %39)
  call void @_ZN8geometry4mesh26deleteTrianglesFacingPointERKNS_5types21minkowskiDiffVertex_tERK7Vector3RNS0_15quickhullMesh_tE(ptr noundef nonnull align 4 dereferenceable(44) %8, ptr noundef nonnull align 4 dereferenceable(12) %5, ptr noundef nonnull align 4 dereferenceable(34008) %4)
  %40 = call noundef i32 @_ZN8geometry4mesh15quickhullMesh_t7addVertERKNS_5types21minkowskiDiffVertex_tE(ptr noundef nonnull align 4 dereferenceable(34008) %4, ptr noundef nonnull align 4 dereferenceable(44) %8)
  %41 = icmp slt i32 %40, 0
  br i1 %41, label %.thread62, label %42

42:                                               ; preds = %37
  %43 = getelementptr inbounds i8, ptr %14, i64 %38
  store i8 1, ptr %43, align 1, !tbaa !18
  %44 = call noundef i32 @_ZN8geometry4mesh20addTrianglesToVertIdEiRNS0_15quickhullMesh_tE(i32 noundef %40, ptr noundef nonnull align 4 dereferenceable(34008) %4)
  %45 = icmp slt i32 %44, 0
  br i1 %45, label %.thread62, label %thread-pre-split

.thread62:                                        ; preds = %42, %37
  call void @_ZdaPv(ptr noundef nonnull %14) #11
  call void @llvm.lifetime.end.p0(i64 44, ptr nonnull %8) #10
  br label %79

.thread:                                          ; preds = %thread-pre-split, %.lr.ph66, %.preheader
  call void @_ZdaPv(ptr noundef nonnull %14) #11
  %46 = call noundef i32 @_ZNK8geometry4mesh17TriangleGraphMeshILj500EE4sizeEv(ptr noundef nonnull align 4 dereferenceable(12004) %4)
  %.not72 = icmp eq i32 %46, 0
  br i1 %.not72, label %._crit_edge70, label %.lr.ph69

47:                                               ; preds = %74
  %48 = add nuw i32 %.068, 1
  %49 = call noundef i32 @_ZNK8geometry4mesh17TriangleGraphMeshILj500EE4sizeEv(ptr noundef nonnull align 4 dereferenceable(12004) %4)
  %50 = icmp ult i32 %48, %49
  br i1 %50, label %.lr.ph69, label %._crit_edge70, !llvm.loop !20

._crit_edge70:                                    ; preds = %47, %.thread
  call void @_ZN8geometry4mesh28convertQuickHullToMeshConfigERKNS0_15quickhullMesh_tERK7Vector3RNS_5types14triangleMesh_tE(ptr noundef nonnull align 4 dereferenceable(34008) %4, ptr noundef nonnull align 4 dereferenceable(12) %5, ptr noundef nonnull align 4 dereferenceable(30008) %2)
  br label %79

.lr.ph69:                                         ; preds = %.thread, %47
  %.068 = phi i32 [ %48, %47 ], [ 0, %.thread ]
  %51 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZN8geometry4mesh17TriangleGraphMeshILj500EEixEj(ptr noundef nonnull align 4 dereferenceable(12004) %4, i32 noundef %.068)
  %52 = getelementptr inbounds i8, ptr %51, i64 12
  %53 = load i32, ptr %52, align 4, !tbaa !21
  %.not = icmp eq i32 %53, -1
  br i1 %.not, label %54, label %55

54:                                               ; preds = %.lr.ph69
  call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 322, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN8geometry4mesh12generateHullEjPKNS_5types21minkowskiDiffVertex_tERNS1_14triangleMesh_tE) #8
  unreachable

55:                                               ; preds = %.lr.ph69
  %56 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZN8geometry4mesh17TriangleGraphMeshILj500EEixEj(ptr noundef nonnull align 4 dereferenceable(12004) %4, i32 noundef %.068)
  %57 = getelementptr inbounds i8, ptr %56, i64 16
  %58 = load i32, ptr %57, align 4, !tbaa !21
  %.not55 = icmp eq i32 %58, -1
  br i1 %.not55, label %59, label %60

59:                                               ; preds = %55
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 323, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN8geometry4mesh12generateHullEjPKNS_5types21minkowskiDiffVertex_tERNS1_14triangleMesh_tE) #8
  unreachable

60:                                               ; preds = %55
  %61 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZN8geometry4mesh17TriangleGraphMeshILj500EEixEj(ptr noundef nonnull align 4 dereferenceable(12004) %4, i32 noundef %.068)
  %62 = getelementptr inbounds i8, ptr %61, i64 20
  %63 = load i32, ptr %62, align 4, !tbaa !21
  %.not56 = icmp eq i32 %63, -1
  br i1 %.not56, label %64, label %65

64:                                               ; preds = %60
  call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 324, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN8geometry4mesh12generateHullEjPKNS_5types21minkowskiDiffVertex_tERNS1_14triangleMesh_tE) #8
  unreachable

65:                                               ; preds = %60
  %66 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZN8geometry4mesh17TriangleGraphMeshILj500EEixEj(ptr noundef nonnull align 4 dereferenceable(12004) %4, i32 noundef %.068)
  %67 = load i32, ptr %66, align 4, !tbaa !21
  %.not57 = icmp eq i32 %67, -1
  br i1 %.not57, label %68, label %69

68:                                               ; preds = %65
  call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 326, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN8geometry4mesh12generateHullEjPKNS_5types21minkowskiDiffVertex_tERNS1_14triangleMesh_tE) #8
  unreachable

69:                                               ; preds = %65
  %70 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZN8geometry4mesh17TriangleGraphMeshILj500EEixEj(ptr noundef nonnull align 4 dereferenceable(12004) %4, i32 noundef %.068)
  %71 = getelementptr inbounds i8, ptr %70, i64 4
  %72 = load i32, ptr %71, align 4, !tbaa !21
  %.not58 = icmp eq i32 %72, -1
  br i1 %.not58, label %73, label %74

73:                                               ; preds = %69
  call void @__assert_fail(ptr noundef nonnull @.str.6, ptr noundef nonnull @.str.1, i32 noundef 327, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN8geometry4mesh12generateHullEjPKNS_5types21minkowskiDiffVertex_tERNS1_14triangleMesh_tE) #8
  unreachable

74:                                               ; preds = %69
  %75 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZN8geometry4mesh17TriangleGraphMeshILj500EEixEj(ptr noundef nonnull align 4 dereferenceable(12004) %4, i32 noundef %.068)
  %76 = getelementptr inbounds i8, ptr %75, i64 8
  %77 = load i32, ptr %76, align 4, !tbaa !21
  %.not59 = icmp eq i32 %77, -1
  br i1 %.not59, label %78, label %47

78:                                               ; preds = %74
  call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.1, i32 noundef 328, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN8geometry4mesh12generateHullEjPKNS_5types21minkowskiDiffVertex_tERNS1_14triangleMesh_tE) #8
  unreachable

79:                                               ; preds = %.thread62, %._crit_edge70, %33
  %.5 = phi i32 [ 1, %33 ], [ 1, %._crit_edge70 ], [ -1, %.thread62 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #10
  call void @llvm.lifetime.end.p0(i64 34008, ptr nonnull %4) #10
  ret i32 %.5
}

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN8geometry4mesh17TriangleGraphMeshILj500EEC2Ev(ptr noundef nonnull align 4 dereferenceable(12004)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7Vector3C2Ev(ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK7Vector3dvERKf(ptr dead_on_unwind noalias writable sret(%class.Vector3) align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(12) ptr @_ZN7Vector3pLERKS_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #2 align 2

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 #4 = { noreturn 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 #5 = { 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 #6 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { 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 #8 = { noreturn nounwind }
attributes #9 = { builtin allocsize(0) }
attributes #10 = { nounwind }
attributes #11 = { 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 = !{!"_ZTSN8geometry5types14triangleMesh_tE", !7, i64 0, !7, i64 4, !8, i64 8, !8, i64 24008}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!6, !7, i64 4}
!11 = !{!12, !7, i64 12004}
!12 = !{!"_ZTSN8geometry4mesh15quickhullMesh_tE", !13, i64 0, !7, i64 12004, !8, i64 12008}
!13 = !{!"_ZTSN8geometry4mesh17TriangleGraphMeshILj500EEE", !7, i64 0, !8, i64 4}
!14 = !{!15, !15, i64 0}
!15 = !{!"float", !8, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = !{!19, !19, i64 0}
!19 = !{!"bool", !8, i64 0}
!20 = distinct !{!20, !17}
!21 = !{!7, !7, i64 0}


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