; 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::types::minkowskiDiffVertex_t" = type { i32, i32, %class.Vector3, %class.Vector3, %class.Vector3 }
%class.Vector3 = type { [3 x float] }
%"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] }

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(44) ptr @_ZN8geometry5types21minkowskiDiffVertex_taSERKS1_(ptr noundef nonnull align 4 dereferenceable(44), ptr noundef nonnull align 4 dereferenceable(44)) #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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8geometry4mesh15findTetrahedronEjPKNS_5types21minkowskiDiffVertex_tERNS0_15quickhullMesh_tEPb(i32 noundef %0, ptr noundef %1, ptr noundef nonnull align 4 dereferenceable(34008) %2, ptr noundef %3) #2 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"struct.geometry::types::minkowskiDiffVertex_t", align 4
  %11 = alloca float, align 4
  %12 = alloca %class.Vector3, align 4
  %13 = alloca i32, align 4
  %14 = alloca float, align 4
  %15 = alloca %class.Vector3, align 4
  %16 = alloca i32, align 4
  %17 = alloca %"struct.geometry::types::minkowskiDiffVertex_t", align 4
  %18 = alloca float, align 4
  %19 = alloca i32, align 4
  %20 = alloca %class.Vector3, align 4
  %21 = alloca float, align 4
  %22 = alloca %class.Vector3, align 4
  %23 = alloca i32, align 4
  %24 = alloca %class.Vector3, align 4
  %25 = alloca %class.Vector3, align 4
  %26 = alloca %class.Vector3, align 4
  %27 = alloca %"struct.geometry::types::minkowskiDiffVertex_t", align 4
  %28 = alloca float, align 4
  %29 = alloca i32, align 4
  %30 = alloca float, align 4
  %31 = alloca %class.Vector3, 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
  store ptr %3, ptr %8, align 8, !tbaa !9
  %32 = load ptr, ptr %6, align 8, !tbaa !9
  %33 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %32, i64 0
  %34 = load ptr, ptr %7, align 8, !tbaa !9
  %35 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %34, i32 0, i32 2
  %36 = load ptr, ptr %7, align 8, !tbaa !9
  %37 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %36, i32 0, i32 1
  %38 = load i32, ptr %37, align 4, !tbaa !11
  %39 = zext i32 %38 to i64
  %40 = getelementptr inbounds [500 x %"struct.geometry::types::minkowskiDiffVertex_t"], ptr %35, i64 0, i64 %39
  %41 = call noundef nonnull align 4 dereferenceable(44) ptr @_ZN8geometry5types21minkowskiDiffVertex_taSERKS1_(ptr noundef nonnull align 4 dereferenceable(44) %40, ptr noundef nonnull align 4 dereferenceable(44) %33)
  %42 = load ptr, ptr %7, align 8, !tbaa !9
  %43 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %42, i32 0, i32 1
  %44 = load i32, ptr %43, align 4, !tbaa !11
  %45 = add i32 %44, 1
  store i32 %45, ptr %43, align 4, !tbaa !11
  %46 = load ptr, ptr %8, align 8, !tbaa !9
  %47 = getelementptr inbounds i8, ptr %46, i64 0
  store i8 1, ptr %47, align 1, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  store i32 1, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 44, ptr %10) #6
  %48 = load ptr, ptr %6, align 8, !tbaa !9
  %49 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %48, i64 1
  call void @_ZN8geometry5types21minkowskiDiffVertex_tC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(44) %10, ptr noundef nonnull align 4 dereferenceable(44) %49)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %12) #6
  %50 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %10, i32 0, i32 2
  %51 = load ptr, ptr %7, align 8, !tbaa !9
  %52 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %51, i32 0, i32 2
  %53 = getelementptr inbounds [500 x %"struct.geometry::types::minkowskiDiffVertex_t"], ptr %52, i64 0, i64 0
  %54 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %53, i32 0, i32 2
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %12, ptr noundef nonnull align 4 dereferenceable(12) %50, ptr noundef nonnull align 4 dereferenceable(12) %54)
  %55 = call noundef float @_ZNK7Vector39magnitudeEv(ptr noundef nonnull align 4 dereferenceable(12) %12)
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #6
  store float %55, ptr %11, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 2, ptr %13, align 4, !tbaa !5
  br label %56

56:                                               ; preds = %84, %4
  %57 = load i32, ptr %13, align 4, !tbaa !5
  %58 = load i32, ptr %5, align 4, !tbaa !5
  %59 = icmp ult i32 %57, %58
  br i1 %59, label %61, label %60

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

61:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %15) #6
  %62 = load ptr, ptr %6, align 8, !tbaa !9
  %63 = load i32, ptr %13, align 4, !tbaa !5
  %64 = zext i32 %63 to i64
  %65 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %62, i64 %64
  %66 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %65, i32 0, i32 2
  %67 = load ptr, ptr %7, align 8, !tbaa !9
  %68 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %67, i32 0, i32 2
  %69 = getelementptr inbounds [500 x %"struct.geometry::types::minkowskiDiffVertex_t"], ptr %68, i64 0, i64 0
  %70 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %69, i32 0, i32 2
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %15, ptr noundef nonnull align 4 dereferenceable(12) %66, ptr noundef nonnull align 4 dereferenceable(12) %70)
  %71 = call noundef float @_ZNK7Vector39magnitudeEv(ptr noundef nonnull align 4 dereferenceable(12) %15)
  call void @llvm.lifetime.end.p0(i64 12, ptr %15) #6
  store float %71, ptr %14, align 4, !tbaa !16
  %72 = load float, ptr %14, align 4, !tbaa !16
  %73 = load float, ptr %11, align 4, !tbaa !16
  %74 = fcmp ogt float %72, %73
  br i1 %74, label %75, label %83

75:                                               ; preds = %61
  %76 = load float, ptr %14, align 4, !tbaa !16
  store float %76, ptr %11, align 4, !tbaa !16
  %77 = load ptr, ptr %6, align 8, !tbaa !9
  %78 = load i32, ptr %13, align 4, !tbaa !5
  %79 = zext i32 %78 to i64
  %80 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %77, i64 %79
  %81 = call noundef nonnull align 4 dereferenceable(44) ptr @_ZN8geometry5types21minkowskiDiffVertex_taSERKS1_(ptr noundef nonnull align 4 dereferenceable(44) %10, ptr noundef nonnull align 4 dereferenceable(44) %80)
  %82 = load i32, ptr %13, align 4, !tbaa !5
  store i32 %82, ptr %9, align 4, !tbaa !5
  br label %83

83:                                               ; preds = %75, %61
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %84

84:                                               ; preds = %83
  %85 = load i32, ptr %13, align 4, !tbaa !5
  %86 = add i32 %85, 1
  store i32 %86, ptr %13, align 4, !tbaa !5
  br label %56, !llvm.loop !18

87:                                               ; preds = %60
  %88 = load ptr, ptr %7, align 8, !tbaa !9
  %89 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %88, i32 0, i32 2
  %90 = load ptr, ptr %7, align 8, !tbaa !9
  %91 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %90, i32 0, i32 1
  %92 = load i32, ptr %91, align 4, !tbaa !11
  %93 = zext i32 %92 to i64
  %94 = getelementptr inbounds [500 x %"struct.geometry::types::minkowskiDiffVertex_t"], ptr %89, i64 0, i64 %93
  %95 = call noundef nonnull align 4 dereferenceable(44) ptr @_ZN8geometry5types21minkowskiDiffVertex_taSERKS1_(ptr noundef nonnull align 4 dereferenceable(44) %94, ptr noundef nonnull align 4 dereferenceable(44) %10)
  %96 = load ptr, ptr %7, align 8, !tbaa !9
  %97 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %96, i32 0, i32 1
  %98 = load i32, ptr %97, align 4, !tbaa !11
  %99 = add i32 %98, 1
  store i32 %99, ptr %97, align 4, !tbaa !11
  %100 = load ptr, ptr %8, align 8, !tbaa !9
  %101 = load i32, ptr %9, align 4, !tbaa !5
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds i8, ptr %100, i64 %102
  store i8 1, ptr %103, align 1, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 44, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 0, ptr %16, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 44, ptr %17) #6
  %104 = load ptr, ptr %7, align 8, !tbaa !9
  %105 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %104, i32 0, i32 2
  %106 = getelementptr inbounds [500 x %"struct.geometry::types::minkowskiDiffVertex_t"], ptr %105, i64 0, i64 0
  call void @_ZN8geometry5types21minkowskiDiffVertex_tC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(44) %17, ptr noundef nonnull align 4 dereferenceable(44) %106)
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  store float 0.000000e+00, ptr %18, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  store i32 1, ptr %19, align 4, !tbaa !5
  br label %107

107:                                              ; preds = %144, %87
  %108 = load i32, ptr %19, align 4, !tbaa !5
  %109 = load i32, ptr %5, align 4, !tbaa !5
  %110 = icmp ult i32 %108, %109
  br i1 %110, label %112, label %111

111:                                              ; preds = %107
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %147

112:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 12, ptr %20) #6
  %113 = load ptr, ptr %7, align 8, !tbaa !9
  %114 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %113, i32 0, i32 2
  %115 = getelementptr inbounds [500 x %"struct.geometry::types::minkowskiDiffVertex_t"], ptr %114, i64 0, i64 0
  %116 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %115, i32 0, i32 2
  %117 = load ptr, ptr %7, align 8, !tbaa !9
  %118 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %117, i32 0, i32 2
  %119 = getelementptr inbounds [500 x %"struct.geometry::types::minkowskiDiffVertex_t"], ptr %118, i64 0, i64 1
  %120 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %119, i32 0, i32 2
  %121 = load ptr, ptr %6, align 8, !tbaa !9
  %122 = load i32, ptr %19, align 4, !tbaa !5
  %123 = zext i32 %122 to i64
  %124 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %121, i64 %123
  %125 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %124, i32 0, i32 2
  call void @_ZN8geometry4line19closestPointToPointERK7Vector3S3_S3_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %20, ptr noundef nonnull align 4 dereferenceable(12) %116, ptr noundef nonnull align 4 dereferenceable(12) %120, ptr noundef nonnull align 4 dereferenceable(12) %125)
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %22) #6
  %126 = load ptr, ptr %6, align 8, !tbaa !9
  %127 = load i32, ptr %19, align 4, !tbaa !5
  %128 = zext i32 %127 to i64
  %129 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %126, i64 %128
  %130 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %129, i32 0, i32 2
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %22, ptr noundef nonnull align 4 dereferenceable(12) %20, ptr noundef nonnull align 4 dereferenceable(12) %130)
  %131 = call noundef float @_ZNK7Vector39magnitudeEv(ptr noundef nonnull align 4 dereferenceable(12) %22)
  call void @llvm.lifetime.end.p0(i64 12, ptr %22) #6
  store float %131, ptr %21, align 4, !tbaa !16
  %132 = load float, ptr %21, align 4, !tbaa !16
  %133 = load float, ptr %18, align 4, !tbaa !16
  %134 = fcmp ogt float %132, %133
  br i1 %134, label %135, label %143

135:                                              ; preds = %112
  %136 = load float, ptr %21, align 4, !tbaa !16
  store float %136, ptr %18, align 4, !tbaa !16
  %137 = load ptr, ptr %6, align 8, !tbaa !9
  %138 = load i32, ptr %19, align 4, !tbaa !5
  %139 = zext i32 %138 to i64
  %140 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %137, i64 %139
  %141 = call noundef nonnull align 4 dereferenceable(44) ptr @_ZN8geometry5types21minkowskiDiffVertex_taSERKS1_(ptr noundef nonnull align 4 dereferenceable(44) %17, ptr noundef nonnull align 4 dereferenceable(44) %140)
  %142 = load i32, ptr %19, align 4, !tbaa !5
  store i32 %142, ptr %16, align 4, !tbaa !5
  br label %143

143:                                              ; preds = %135, %112
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %20) #6
  br label %144

144:                                              ; preds = %143
  %145 = load i32, ptr %19, align 4, !tbaa !5
  %146 = add i32 %145, 1
  store i32 %146, ptr %19, align 4, !tbaa !5
  br label %107, !llvm.loop !20

147:                                              ; preds = %111
  %148 = load ptr, ptr %7, align 8, !tbaa !9
  %149 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %148, i32 0, i32 2
  %150 = load ptr, ptr %7, align 8, !tbaa !9
  %151 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %150, i32 0, i32 1
  %152 = load i32, ptr %151, align 4, !tbaa !11
  %153 = zext i32 %152 to i64
  %154 = getelementptr inbounds [500 x %"struct.geometry::types::minkowskiDiffVertex_t"], ptr %149, i64 0, i64 %153
  %155 = call noundef nonnull align 4 dereferenceable(44) ptr @_ZN8geometry5types21minkowskiDiffVertex_taSERKS1_(ptr noundef nonnull align 4 dereferenceable(44) %154, ptr noundef nonnull align 4 dereferenceable(44) %17)
  %156 = load ptr, ptr %7, align 8, !tbaa !9
  %157 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %156, i32 0, i32 1
  %158 = load i32, ptr %157, align 4, !tbaa !11
  %159 = add i32 %158, 1
  store i32 %159, ptr %157, align 4, !tbaa !11
  %160 = load ptr, ptr %8, align 8, !tbaa !9
  %161 = load i32, ptr %16, align 4, !tbaa !5
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds i8, ptr %160, i64 %162
  store i8 1, ptr %163, align 1, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 44, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #6
  store i32 0, ptr %23, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 12, ptr %24) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %25) #6
  %164 = load ptr, ptr %7, align 8, !tbaa !9
  %165 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %164, i32 0, i32 2
  %166 = getelementptr inbounds [500 x %"struct.geometry::types::minkowskiDiffVertex_t"], ptr %165, i64 0, i64 0
  %167 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %166, i32 0, i32 2
  %168 = load ptr, ptr %7, align 8, !tbaa !9
  %169 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %168, i32 0, i32 2
  %170 = getelementptr inbounds [500 x %"struct.geometry::types::minkowskiDiffVertex_t"], ptr %169, i64 0, i64 1
  %171 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %170, i32 0, i32 2
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %25, ptr noundef nonnull align 4 dereferenceable(12) %167, ptr noundef nonnull align 4 dereferenceable(12) %171)
  call void @llvm.lifetime.start.p0(i64 12, ptr %26) #6
  %172 = load ptr, ptr %7, align 8, !tbaa !9
  %173 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %172, i32 0, i32 2
  %174 = getelementptr inbounds [500 x %"struct.geometry::types::minkowskiDiffVertex_t"], ptr %173, i64 0, i64 2
  %175 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %174, i32 0, i32 2
  %176 = load ptr, ptr %7, align 8, !tbaa !9
  %177 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %176, i32 0, i32 2
  %178 = getelementptr inbounds [500 x %"struct.geometry::types::minkowskiDiffVertex_t"], ptr %177, i64 0, i64 1
  %179 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %178, i32 0, i32 2
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %26, ptr noundef nonnull align 4 dereferenceable(12) %175, ptr noundef nonnull align 4 dereferenceable(12) %179)
  call void @_ZNK7Vector312crossProductERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %24, ptr noundef nonnull align 4 dereferenceable(12) %25, ptr noundef nonnull align 4 dereferenceable(12) %26)
  call void @llvm.lifetime.end.p0(i64 12, ptr %26) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %25) #6
  call void @llvm.lifetime.start.p0(i64 44, ptr %27) #6
  %180 = load ptr, ptr %7, align 8, !tbaa !9
  %181 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %180, i32 0, i32 2
  %182 = getelementptr inbounds [500 x %"struct.geometry::types::minkowskiDiffVertex_t"], ptr %181, i64 0, i64 0
  call void @_ZN8geometry5types21minkowskiDiffVertex_tC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(44) %27, ptr noundef nonnull align 4 dereferenceable(44) %182)
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #6
  store float 0.000000e+00, ptr %28, align 4, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #6
  store i32 1, ptr %29, align 4, !tbaa !5
  br label %183

183:                                              ; preds = %214, %147
  %184 = load i32, ptr %29, align 4, !tbaa !5
  %185 = load i32, ptr %5, align 4, !tbaa !5
  %186 = icmp ult i32 %184, %185
  br i1 %186, label %188, label %187

187:                                              ; preds = %183
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #6
  br label %217

188:                                              ; preds = %183
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr %31) #6
  %189 = load ptr, ptr %6, align 8, !tbaa !9
  %190 = load i32, ptr %29, align 4, !tbaa !5
  %191 = zext i32 %190 to i64
  %192 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %189, i64 %191
  %193 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %192, i32 0, i32 2
  %194 = load ptr, ptr %7, align 8, !tbaa !9
  %195 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %194, i32 0, i32 2
  %196 = getelementptr inbounds [500 x %"struct.geometry::types::minkowskiDiffVertex_t"], ptr %195, i64 0, i64 0
  %197 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %196, i32 0, i32 2
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %31, ptr noundef nonnull align 4 dereferenceable(12) %193, ptr noundef nonnull align 4 dereferenceable(12) %197)
  %198 = call noundef float @_ZNK7Vector33dotERKS_(ptr noundef nonnull align 4 dereferenceable(12) %24, ptr noundef nonnull align 4 dereferenceable(12) %31)
  %199 = fpext float %198 to double
  %200 = call double @llvm.fabs.f64(double %199)
  %201 = fptrunc double %200 to float
  call void @llvm.lifetime.end.p0(i64 12, ptr %31) #6
  store float %201, ptr %30, align 4, !tbaa !16
  %202 = load float, ptr %30, align 4, !tbaa !16
  %203 = load float, ptr %28, align 4, !tbaa !16
  %204 = fcmp ogt float %202, %203
  br i1 %204, label %205, label %213

205:                                              ; preds = %188
  %206 = load float, ptr %30, align 4, !tbaa !16
  store float %206, ptr %28, align 4, !tbaa !16
  %207 = load ptr, ptr %6, align 8, !tbaa !9
  %208 = load i32, ptr %29, align 4, !tbaa !5
  %209 = zext i32 %208 to i64
  %210 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %207, i64 %209
  %211 = call noundef nonnull align 4 dereferenceable(44) ptr @_ZN8geometry5types21minkowskiDiffVertex_taSERKS1_(ptr noundef nonnull align 4 dereferenceable(44) %27, ptr noundef nonnull align 4 dereferenceable(44) %210)
  %212 = load i32, ptr %29, align 4, !tbaa !5
  store i32 %212, ptr %23, align 4, !tbaa !5
  br label %213

213:                                              ; preds = %205, %188
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  br label %214

214:                                              ; preds = %213
  %215 = load i32, ptr %29, align 4, !tbaa !5
  %216 = add i32 %215, 1
  store i32 %216, ptr %29, align 4, !tbaa !5
  br label %183, !llvm.loop !21

217:                                              ; preds = %187
  %218 = load ptr, ptr %7, align 8, !tbaa !9
  %219 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %218, i32 0, i32 2
  %220 = load ptr, ptr %7, align 8, !tbaa !9
  %221 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %220, i32 0, i32 1
  %222 = load i32, ptr %221, align 4, !tbaa !11
  %223 = zext i32 %222 to i64
  %224 = getelementptr inbounds [500 x %"struct.geometry::types::minkowskiDiffVertex_t"], ptr %219, i64 0, i64 %223
  %225 = call noundef nonnull align 4 dereferenceable(44) ptr @_ZN8geometry5types21minkowskiDiffVertex_taSERKS1_(ptr noundef nonnull align 4 dereferenceable(44) %224, ptr noundef nonnull align 4 dereferenceable(44) %27)
  %226 = load ptr, ptr %7, align 8, !tbaa !9
  %227 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %226, i32 0, i32 1
  %228 = load i32, ptr %227, align 4, !tbaa !11
  %229 = add i32 %228, 1
  store i32 %229, ptr %227, align 4, !tbaa !11
  %230 = load ptr, ptr %8, align 8, !tbaa !9
  %231 = load i32, ptr %23, align 4, !tbaa !5
  %232 = sext i32 %231 to i64
  %233 = getelementptr inbounds i8, ptr %230, i64 %232
  store i8 1, ptr %233, align 1, !tbaa !14
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #6
  call void @llvm.lifetime.end.p0(i64 44, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #6
  %234 = load ptr, ptr %7, align 8, !tbaa !9
  %235 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %234, i32 0, i32 0
  %236 = call noundef i32 @_ZN8geometry4mesh17TriangleGraphMeshILj500EE12add_triangleEiii(ptr noundef nonnull align 4 dereferenceable(12004) %235, i32 noundef 0, i32 noundef 1, i32 noundef 2)
  %237 = load ptr, ptr %7, align 8, !tbaa !9
  %238 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %237, i32 0, i32 0
  %239 = call noundef i32 @_ZN8geometry4mesh17TriangleGraphMeshILj500EE12add_triangleEiii(ptr noundef nonnull align 4 dereferenceable(12004) %238, i32 noundef 0, i32 noundef 1, i32 noundef 3)
  %240 = load ptr, ptr %7, align 8, !tbaa !9
  %241 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %240, i32 0, i32 0
  %242 = call noundef i32 @_ZN8geometry4mesh17TriangleGraphMeshILj500EE12add_triangleEiii(ptr noundef nonnull align 4 dereferenceable(12004) %241, i32 noundef 0, i32 noundef 2, i32 noundef 3)
  %243 = load ptr, ptr %7, align 8, !tbaa !9
  %244 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %243, i32 0, i32 0
  %245 = call noundef i32 @_ZN8geometry4mesh17TriangleGraphMeshILj500EE12add_triangleEiii(ptr noundef nonnull align 4 dereferenceable(12004) %244, i32 noundef 1, i32 noundef 2, i32 noundef 3)
  ret void
}

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

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

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

declare void @_ZN8geometry4line19closestPointToPointERK7Vector3S3_S3_(ptr dead_on_unwind writable sret(%class.Vector3) align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) #3

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fabs.f64(double) #5

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

attributes #0 = { 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 #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 = { "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"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }

!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 12004}
!12 = !{!"_ZTSN8geometry4mesh15quickhullMesh_tE", !13, i64 0, !6, i64 12004, !7, i64 12008}
!13 = !{!"_ZTSN8geometry4mesh17TriangleGraphMeshILj500EEE", !6, i64 0, !7, i64 4}
!14 = !{!15, !15, i64 0}
!15 = !{!"bool", !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"float", !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}
!20 = distinct !{!20, !19}
!21 = distinct !{!21, !19}


; 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::types::minkowskiDiffVertex_t" = type { i32, i32, %class.Vector3, %class.Vector3, %class.Vector3 }
%class.Vector3 = type { [3 x float] }

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(44) ptr @_ZN8geometry5types21minkowskiDiffVertex_taSERKS1_(ptr noundef nonnull align 4 dereferenceable(44), ptr noundef nonnull align 4 dereferenceable(44)) local_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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8geometry4mesh15findTetrahedronEjPKNS_5types21minkowskiDiffVertex_tERNS0_15quickhullMesh_tEPb(i32 noundef %0, ptr noundef nonnull %1, ptr noundef nonnull align 4 dereferenceable(34008) %2, ptr nocapture noundef writeonly %3) local_unnamed_addr #2 {
  %5 = alloca %"struct.geometry::types::minkowskiDiffVertex_t", align 4
  %6 = alloca %class.Vector3, align 4
  %7 = alloca %class.Vector3, align 4
  %8 = alloca %"struct.geometry::types::minkowskiDiffVertex_t", align 4
  %9 = alloca %class.Vector3, align 4
  %10 = alloca %class.Vector3, align 4
  %11 = alloca %class.Vector3, align 4
  %12 = alloca %class.Vector3, align 4
  %13 = alloca %class.Vector3, align 4
  %14 = alloca %"struct.geometry::types::minkowskiDiffVertex_t", align 4
  %15 = alloca %class.Vector3, align 4
  %16 = getelementptr inbounds i8, ptr %2, i64 12008
  %17 = getelementptr inbounds i8, ptr %2, i64 12004
  %18 = load i32, ptr %17, align 4, !tbaa !5
  %19 = zext i32 %18 to i64
  %20 = getelementptr inbounds [500 x %"struct.geometry::types::minkowskiDiffVertex_t"], ptr %16, i64 0, i64 %19
  %21 = tail call noundef nonnull align 4 dereferenceable(44) ptr @_ZN8geometry5types21minkowskiDiffVertex_taSERKS1_(ptr noundef nonnull align 4 dereferenceable(44) %20, ptr noundef nonnull align 4 dereferenceable(44) %1)
  %22 = load i32, ptr %17, align 4, !tbaa !5
  %23 = add i32 %22, 1
  store i32 %23, ptr %17, align 4, !tbaa !5
  store i8 1, ptr %3, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 44, ptr nonnull %5) #6
  %24 = getelementptr inbounds i8, ptr %1, i64 44
  call void @_ZN8geometry5types21minkowskiDiffVertex_tC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(44) %5, ptr noundef nonnull align 4 dereferenceable(44) %24)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #6
  %25 = getelementptr inbounds i8, ptr %5, i64 8
  %26 = getelementptr inbounds i8, ptr %2, i64 12016
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %6, ptr noundef nonnull align 4 dereferenceable(12) %25, ptr noundef nonnull align 4 dereferenceable(12) %26)
  %27 = call noundef float @_ZNK7Vector39magnitudeEv(ptr noundef nonnull align 4 dereferenceable(12) %6)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #6
  %28 = icmp ugt i32 %0, 2
  br i1 %28, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %4
  %wide.trip.count = zext i32 %0 to i64
  br label %.lr.ph

._crit_edge.loopexit:                             ; preds = %46
  %29 = sext i32 %.1 to i64
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %4
  %.0.lcssa = phi i64 [ 1, %4 ], [ %29, %._crit_edge.loopexit ]
  %30 = load i32, ptr %17, align 4, !tbaa !5
  %31 = zext i32 %30 to i64
  %32 = getelementptr inbounds [500 x %"struct.geometry::types::minkowskiDiffVertex_t"], ptr %16, i64 0, i64 %31
  %33 = call noundef nonnull align 4 dereferenceable(44) ptr @_ZN8geometry5types21minkowskiDiffVertex_taSERKS1_(ptr noundef nonnull align 4 dereferenceable(44) %32, ptr noundef nonnull align 4 dereferenceable(44) %5)
  %34 = load i32, ptr %17, align 4, !tbaa !5
  %35 = add i32 %34, 1
  store i32 %35, ptr %17, align 4, !tbaa !5
  %36 = getelementptr inbounds i8, ptr %3, i64 %.0.lcssa
  store i8 1, ptr %36, align 1, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 44, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 44, ptr nonnull %8) #6
  call void @_ZN8geometry5types21minkowskiDiffVertex_tC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(44) %8, ptr noundef nonnull align 4 dereferenceable(44) %16)
  %37 = icmp ugt i32 %0, 1
  br i1 %37, label %.lr.ph94, label %._crit_edge95

.lr.ph94:                                         ; preds = %._crit_edge
  %38 = getelementptr inbounds i8, ptr %2, i64 12060
  %wide.trip.count108 = zext i32 %0 to i64
  br label %57

.lr.ph:                                           ; preds = %.lr.ph.preheader, %46
  %indvars.iv = phi i64 [ 2, %.lr.ph.preheader ], [ %indvars.iv.next, %46 ]
  %.089 = phi i32 [ 1, %.lr.ph.preheader ], [ %.1, %46 ]
  %.07588 = phi float [ %27, %.lr.ph.preheader ], [ %.176, %46 ]
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %7) #6
  %39 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %1, i64 %indvars.iv
  %40 = getelementptr inbounds i8, ptr %39, i64 8
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %7, ptr noundef nonnull align 4 dereferenceable(12) %40, ptr noundef nonnull align 4 dereferenceable(12) %26)
  %41 = call noundef float @_ZNK7Vector39magnitudeEv(ptr noundef nonnull align 4 dereferenceable(12) %7)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #6
  %42 = fcmp ogt float %41, %.07588
  br i1 %42, label %43, label %46

43:                                               ; preds = %.lr.ph
  %44 = call noundef nonnull align 4 dereferenceable(44) ptr @_ZN8geometry5types21minkowskiDiffVertex_taSERKS1_(ptr noundef nonnull align 4 dereferenceable(44) %5, ptr noundef nonnull align 4 dereferenceable(44) %39)
  %45 = trunc nuw i64 %indvars.iv to i32
  br label %46

46:                                               ; preds = %43, %.lr.ph
  %.176 = phi float [ %41, %43 ], [ %.07588, %.lr.ph ]
  %.1 = phi i32 [ %45, %43 ], [ %.089, %.lr.ph ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge.loopexit, label %.lr.ph, !llvm.loop !13

._crit_edge95.loopexit:                           ; preds = %65
  %47 = sext i32 %.181 to i64
  br label %._crit_edge95

._crit_edge95:                                    ; preds = %._crit_edge95.loopexit, %._crit_edge
  %.080.lcssa = phi i64 [ 0, %._crit_edge ], [ %47, %._crit_edge95.loopexit ]
  %48 = load i32, ptr %17, align 4, !tbaa !5
  %49 = zext i32 %48 to i64
  %50 = getelementptr inbounds [500 x %"struct.geometry::types::minkowskiDiffVertex_t"], ptr %16, i64 0, i64 %49
  %51 = call noundef nonnull align 4 dereferenceable(44) ptr @_ZN8geometry5types21minkowskiDiffVertex_taSERKS1_(ptr noundef nonnull align 4 dereferenceable(44) %50, ptr noundef nonnull align 4 dereferenceable(44) %8)
  %52 = load i32, ptr %17, align 4, !tbaa !5
  %53 = add i32 %52, 1
  store i32 %53, ptr %17, align 4, !tbaa !5
  %54 = getelementptr inbounds i8, ptr %3, i64 %.080.lcssa
  store i8 1, ptr %54, align 1, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 44, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %12) #6
  %55 = getelementptr inbounds i8, ptr %2, i64 12060
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %12, ptr noundef nonnull align 4 dereferenceable(12) %26, ptr noundef nonnull align 4 dereferenceable(12) %55)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %13) #6
  %56 = getelementptr inbounds i8, ptr %2, i64 12104
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %13, ptr noundef nonnull align 4 dereferenceable(12) %56, ptr noundef nonnull align 4 dereferenceable(12) %55)
  call void @_ZNK7Vector312crossProductERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %11, ptr noundef nonnull align 4 dereferenceable(12) %12, ptr noundef nonnull align 4 dereferenceable(12) %13)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %12) #6
  call void @llvm.lifetime.start.p0(i64 44, ptr nonnull %14) #6
  call void @_ZN8geometry5types21minkowskiDiffVertex_tC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(44) %14, ptr noundef nonnull align 4 dereferenceable(44) %16)
  br i1 %37, label %.lr.ph101.preheader, label %._crit_edge102

.lr.ph101.preheader:                              ; preds = %._crit_edge95
  %wide.trip.count113 = zext i32 %0 to i64
  br label %.lr.ph101

57:                                               ; preds = %.lr.ph94, %65
  %indvars.iv105 = phi i64 [ 1, %.lr.ph94 ], [ %indvars.iv.next106, %65 ]
  %.07891 = phi float [ 0.000000e+00, %.lr.ph94 ], [ %.179, %65 ]
  %.08090 = phi i32 [ 0, %.lr.ph94 ], [ %.181, %65 ]
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %9) #6
  %58 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %1, i64 %indvars.iv105
  %59 = getelementptr inbounds i8, ptr %58, i64 8
  call void @_ZN8geometry4line19closestPointToPointERK7Vector3S3_S3_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %9, ptr noundef nonnull align 4 dereferenceable(12) %26, ptr noundef nonnull align 4 dereferenceable(12) %38, ptr noundef nonnull align 4 dereferenceable(12) %59)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %10) #6
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %10, ptr noundef nonnull align 4 dereferenceable(12) %9, ptr noundef nonnull align 4 dereferenceable(12) %59)
  %60 = call noundef float @_ZNK7Vector39magnitudeEv(ptr noundef nonnull align 4 dereferenceable(12) %10)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %10) #6
  %61 = fcmp ogt float %60, %.07891
  br i1 %61, label %62, label %65

62:                                               ; preds = %57
  %63 = call noundef nonnull align 4 dereferenceable(44) ptr @_ZN8geometry5types21minkowskiDiffVertex_taSERKS1_(ptr noundef nonnull align 4 dereferenceable(44) %8, ptr noundef nonnull align 4 dereferenceable(44) %58)
  %64 = trunc nuw i64 %indvars.iv105 to i32
  br label %65

65:                                               ; preds = %62, %57
  %.181 = phi i32 [ %64, %62 ], [ %.08090, %57 ]
  %.179 = phi float [ %60, %62 ], [ %.07891, %57 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %9) #6
  %indvars.iv.next106 = add nuw nsw i64 %indvars.iv105, 1
  %exitcond109.not = icmp eq i64 %indvars.iv.next106, %wide.trip.count108
  br i1 %exitcond109.not, label %._crit_edge95.loopexit, label %57, !llvm.loop !15

._crit_edge102.loopexit:                          ; preds = %86
  %66 = sext i32 %.174 to i64
  br label %._crit_edge102

._crit_edge102:                                   ; preds = %._crit_edge102.loopexit, %._crit_edge95
  %.073.lcssa = phi i64 [ 0, %._crit_edge95 ], [ %66, %._crit_edge102.loopexit ]
  %67 = load i32, ptr %17, align 4, !tbaa !5
  %68 = zext i32 %67 to i64
  %69 = getelementptr inbounds [500 x %"struct.geometry::types::minkowskiDiffVertex_t"], ptr %16, i64 0, i64 %68
  %70 = call noundef nonnull align 4 dereferenceable(44) ptr @_ZN8geometry5types21minkowskiDiffVertex_taSERKS1_(ptr noundef nonnull align 4 dereferenceable(44) %69, ptr noundef nonnull align 4 dereferenceable(44) %14)
  %71 = load i32, ptr %17, align 4, !tbaa !5
  %72 = add i32 %71, 1
  store i32 %72, ptr %17, align 4, !tbaa !5
  %73 = getelementptr inbounds i8, ptr %3, i64 %.073.lcssa
  store i8 1, ptr %73, align 1, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 44, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %11) #6
  %74 = call noundef i32 @_ZN8geometry4mesh17TriangleGraphMeshILj500EE12add_triangleEiii(ptr noundef nonnull align 4 dereferenceable(12004) %2, i32 noundef 0, i32 noundef 1, i32 noundef 2)
  %75 = call noundef i32 @_ZN8geometry4mesh17TriangleGraphMeshILj500EE12add_triangleEiii(ptr noundef nonnull align 4 dereferenceable(12004) %2, i32 noundef 0, i32 noundef 1, i32 noundef 3)
  %76 = call noundef i32 @_ZN8geometry4mesh17TriangleGraphMeshILj500EE12add_triangleEiii(ptr noundef nonnull align 4 dereferenceable(12004) %2, i32 noundef 0, i32 noundef 2, i32 noundef 3)
  %77 = call noundef i32 @_ZN8geometry4mesh17TriangleGraphMeshILj500EE12add_triangleEiii(ptr noundef nonnull align 4 dereferenceable(12004) %2, i32 noundef 1, i32 noundef 2, i32 noundef 3)
  ret void

.lr.ph101:                                        ; preds = %.lr.ph101.preheader, %86
  %indvars.iv110 = phi i64 [ 1, %.lr.ph101.preheader ], [ %indvars.iv.next111, %86 ]
  %.07198 = phi float [ 0.000000e+00, %.lr.ph101.preheader ], [ %.172, %86 ]
  %.07397 = phi i32 [ 0, %.lr.ph101.preheader ], [ %.174, %86 ]
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %15) #6
  %78 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %1, i64 %indvars.iv110
  %79 = getelementptr inbounds i8, ptr %78, i64 8
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %15, ptr noundef nonnull align 4 dereferenceable(12) %79, ptr noundef nonnull align 4 dereferenceable(12) %26)
  %80 = call noundef float @_ZNK7Vector33dotERKS_(ptr noundef nonnull align 4 dereferenceable(12) %11, ptr noundef nonnull align 4 dereferenceable(12) %15)
  %81 = call float @llvm.fabs.f32(float %80)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %15) #6
  %82 = fcmp ogt float %81, %.07198
  br i1 %82, label %83, label %86

83:                                               ; preds = %.lr.ph101
  %84 = call noundef nonnull align 4 dereferenceable(44) ptr @_ZN8geometry5types21minkowskiDiffVertex_taSERKS1_(ptr noundef nonnull align 4 dereferenceable(44) %14, ptr noundef nonnull align 4 dereferenceable(44) %78)
  %85 = trunc nuw i64 %indvars.iv110 to i32
  br label %86

86:                                               ; preds = %83, %.lr.ph101
  %.174 = phi i32 [ %85, %83 ], [ %.07397, %.lr.ph101 ]
  %.172 = phi float [ %81, %83 ], [ %.07198, %.lr.ph101 ]
  %indvars.iv.next111 = add nuw nsw i64 %indvars.iv110, 1
  %exitcond114.not = icmp eq i64 %indvars.iv.next111, %wide.trip.count113
  br i1 %exitcond114.not, label %._crit_edge102.loopexit, label %.lr.ph101, !llvm.loop !16
}

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

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

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

declare void @_ZN8geometry4line19closestPointToPointERK7Vector3S3_S3_(ptr dead_on_unwind writable sret(%class.Vector3) align 4, ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #3

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fabs.f32(float) #5

attributes #0 = { 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 #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 = { "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"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }

!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, !8, i64 12004}
!6 = !{!"_ZTSN8geometry4mesh15quickhullMesh_tE", !7, i64 0, !8, i64 12004, !9, i64 12008}
!7 = !{!"_ZTSN8geometry4mesh17TriangleGraphMeshILj500EEE", !8, i64 0, !9, i64 4}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !9, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}


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