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

%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] }
%"struct.geometry::types::minkowskiDiffVertex_t" = type { i32, i32, %class.Vector3, %class.Vector3, %class.Vector3 }

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

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

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

declare void @_ZN8geometry10calcNormalEPK7Vector3RS1_(ptr dead_on_unwind writable sret(%class.Vector3) align 4, ptr noundef, ptr noundef nonnull align 4 dereferenceable(12)) #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)) #3 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)) #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8geometry4mesh26deleteTrianglesFacingPointERKNS_5types21minkowskiDiffVertex_tERK7Vector3RNS0_15quickhullMesh_tE(ptr noundef nonnull align 4 dereferenceable(44) %0, ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(34008) %2) #3 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca [3 x %class.Vector3], align 16
  %9 = alloca %class.Vector3, align 4
  %10 = alloca %class.Vector3, align 4
  %11 = alloca %class.Vector3, align 4
  %12 = alloca %class.Vector3, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  %13 = load ptr, ptr %6, align 8, !tbaa !5
  %14 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %13, i32 0, i32 0
  %15 = call noundef i32 @_ZNK8geometry4mesh17TriangleGraphMeshILj500EE4sizeEv(ptr noundef nonnull align 4 dereferenceable(12004) %14)
  %16 = sub i32 %15, 1
  store i32 %16, ptr %7, align 4, !tbaa !9
  br label %17

17:                                               ; preds = %86, %3
  %18 = load i32, ptr %7, align 4, !tbaa !9
  %19 = icmp sgt i32 %18, -1
  br i1 %19, label %21, label %20

20:                                               ; preds = %17
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  br label %89

21:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 36, ptr %8) #4
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %22, i32 0, i32 2
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %24, i32 0, i32 0
  %26 = load i32, ptr %7, align 4, !tbaa !9
  %27 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZN8geometry4mesh17TriangleGraphMeshILj500EEixEj(ptr noundef nonnull align 4 dereferenceable(12004) %25, i32 noundef %26)
  %28 = getelementptr inbounds %"struct.geometry::types::leanNeighborTriangle_t", ptr %27, i32 0, i32 0
  %29 = getelementptr inbounds [3 x i32], ptr %28, i64 0, i64 0
  %30 = load i32, ptr %29, align 4, !tbaa !9
  %31 = sext i32 %30 to i64
  %32 = getelementptr inbounds [500 x %"struct.geometry::types::minkowskiDiffVertex_t"], ptr %23, i64 0, i64 %31
  %33 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %32, i32 0, i32 2
  call void @_ZN7Vector3C2ERKS_(ptr noundef nonnull align 4 dereferenceable(12) %8, ptr noundef nonnull align 4 dereferenceable(12) %33)
  %34 = getelementptr inbounds %class.Vector3, ptr %8, i64 1
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  %36 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %35, i32 0, i32 2
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  %38 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %37, i32 0, i32 0
  %39 = load i32, ptr %7, align 4, !tbaa !9
  %40 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZN8geometry4mesh17TriangleGraphMeshILj500EEixEj(ptr noundef nonnull align 4 dereferenceable(12004) %38, i32 noundef %39)
  %41 = getelementptr inbounds %"struct.geometry::types::leanNeighborTriangle_t", ptr %40, i32 0, i32 0
  %42 = getelementptr inbounds [3 x i32], ptr %41, i64 0, i64 1
  %43 = load i32, ptr %42, align 4, !tbaa !9
  %44 = sext i32 %43 to i64
  %45 = getelementptr inbounds [500 x %"struct.geometry::types::minkowskiDiffVertex_t"], ptr %36, i64 0, i64 %44
  %46 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %45, i32 0, i32 2
  call void @_ZN7Vector3C2ERKS_(ptr noundef nonnull align 4 dereferenceable(12) %34, ptr noundef nonnull align 4 dereferenceable(12) %46)
  %47 = getelementptr inbounds %class.Vector3, ptr %8, i64 2
  %48 = load ptr, ptr %6, align 8, !tbaa !5
  %49 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %48, i32 0, i32 2
  %50 = load ptr, ptr %6, align 8, !tbaa !5
  %51 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %50, i32 0, i32 0
  %52 = load i32, ptr %7, align 4, !tbaa !9
  %53 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZN8geometry4mesh17TriangleGraphMeshILj500EEixEj(ptr noundef nonnull align 4 dereferenceable(12004) %51, i32 noundef %52)
  %54 = getelementptr inbounds %"struct.geometry::types::leanNeighborTriangle_t", ptr %53, i32 0, i32 0
  %55 = getelementptr inbounds [3 x i32], ptr %54, i64 0, i64 2
  %56 = load i32, ptr %55, align 4, !tbaa !9
  %57 = sext i32 %56 to i64
  %58 = getelementptr inbounds [500 x %"struct.geometry::types::minkowskiDiffVertex_t"], ptr %49, i64 0, i64 %57
  %59 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %58, i32 0, i32 2
  call void @_ZN7Vector3C2ERKS_(ptr noundef nonnull align 4 dereferenceable(12) %47, ptr noundef nonnull align 4 dereferenceable(12) %59)
  call void @llvm.lifetime.start.p0(i64 12, ptr %9) #4
  %60 = getelementptr inbounds [3 x %class.Vector3], ptr %8, i64 0, i64 0
  %61 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN8geometry10calcNormalEPK7Vector3RS1_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %9, ptr noundef %60, ptr noundef nonnull align 4 dereferenceable(12) %61)
  call void @llvm.lifetime.start.p0(i64 12, ptr %10) #4
  %62 = load ptr, ptr %4, align 8, !tbaa !5
  %63 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %62, i32 0, i32 2
  %64 = getelementptr inbounds [3 x %class.Vector3], ptr %8, i64 0, i64 0
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %10, ptr noundef nonnull align 4 dereferenceable(12) %63, ptr noundef nonnull align 4 dereferenceable(12) %64)
  %65 = call noundef float @_ZNK7Vector33dotERKS_(ptr noundef nonnull align 4 dereferenceable(12) %9, ptr noundef nonnull align 4 dereferenceable(12) %10)
  %66 = fcmp oge float %65, 0.000000e+00
  call void @llvm.lifetime.start.p0(i64 12, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 12, ptr %12) #4
  br i1 %66, label %79, label %67

67:                                               ; preds = %21
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %68, i32 0, i32 2
  %70 = getelementptr inbounds [3 x %class.Vector3], ptr %8, i64 0, i64 1
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %11, ptr noundef nonnull align 4 dereferenceable(12) %69, ptr noundef nonnull align 4 dereferenceable(12) %70)
  %71 = call noundef float @_ZNK7Vector33dotERKS_(ptr noundef nonnull align 4 dereferenceable(12) %9, ptr noundef nonnull align 4 dereferenceable(12) %11)
  %72 = fcmp oge float %71, 0.000000e+00
  br i1 %72, label %79, label %73

73:                                               ; preds = %67
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  %75 = getelementptr inbounds %"struct.geometry::types::minkowskiDiffVertex_t", ptr %74, i32 0, i32 2
  %76 = getelementptr inbounds [3 x %class.Vector3], ptr %8, i64 0, i64 2
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %12, ptr noundef nonnull align 4 dereferenceable(12) %75, ptr noundef nonnull align 4 dereferenceable(12) %76)
  %77 = call noundef float @_ZNK7Vector33dotERKS_(ptr noundef nonnull align 4 dereferenceable(12) %9, ptr noundef nonnull align 4 dereferenceable(12) %12)
  %78 = fcmp oge float %77, 0.000000e+00
  br label %79

79:                                               ; preds = %73, %67, %21
  %80 = phi i1 [ true, %67 ], [ true, %21 ], [ %78, %73 ]
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr %10) #4
  br i1 %80, label %81, label %85

81:                                               ; preds = %79
  %82 = load ptr, ptr %6, align 8, !tbaa !5
  %83 = getelementptr inbounds %"struct.geometry::mesh::quickhullMesh_t", ptr %82, i32 0, i32 0
  %84 = load i32, ptr %7, align 4, !tbaa !9
  call void @_ZN8geometry4mesh17TriangleGraphMeshILj500EE6removeEi(ptr noundef nonnull align 4 dereferenceable(12004) %83, i32 noundef %84)
  br label %85

85:                                               ; preds = %81, %79
  call void @llvm.lifetime.end.p0(i64 12, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 36, ptr %8) #4
  br label %86

86:                                               ; preds = %85
  %87 = load i32, ptr %7, align 4, !tbaa !9
  %88 = add nsw i32 %87, -1
  store i32 %88, ptr %7, align 4, !tbaa !9
  br label %17, !llvm.loop !11

89:                                               ; preds = %20
  ret void
}

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

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

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

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

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


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

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

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

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

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

declare void @_ZN8geometry10calcNormalEPK7Vector3RS1_(ptr dead_on_unwind writable sret(%class.Vector3) align 4, ptr noundef, ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #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 #3 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 #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8geometry4mesh26deleteTrianglesFacingPointERKNS_5types21minkowskiDiffVertex_tERK7Vector3RNS0_15quickhullMesh_tE(ptr noundef nonnull align 4 dereferenceable(44) %0, ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(34008) %2) local_unnamed_addr #3 {
  %4 = alloca [3 x %class.Vector3], align 16
  %5 = alloca %class.Vector3, align 4
  %6 = alloca %class.Vector3, align 4
  %7 = alloca %class.Vector3, align 4
  %8 = alloca %class.Vector3, align 4
  %9 = tail call noundef i32 @_ZNK8geometry4mesh17TriangleGraphMeshILj500EE4sizeEv(ptr noundef nonnull align 4 dereferenceable(12004) %2)
  %.017 = add i32 %9, -1
  %10 = icmp sgt i32 %.017, -1
  br i1 %10, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %3
  %11 = getelementptr inbounds i8, ptr %2, i64 12008
  %12 = getelementptr inbounds i8, ptr %4, i64 12
  %13 = getelementptr inbounds i8, ptr %4, i64 24
  %14 = getelementptr inbounds i8, ptr %0, i64 8
  br label %15

._crit_edge:                                      ; preds = %39, %3
  ret void

15:                                               ; preds = %.lr.ph, %39
  %.018 = phi i32 [ %.017, %.lr.ph ], [ %.0, %39 ]
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %4) #4
  %16 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZN8geometry4mesh17TriangleGraphMeshILj500EEixEj(ptr noundef nonnull align 4 dereferenceable(12004) %2, i32 noundef %.018)
  %17 = load i32, ptr %16, align 4, !tbaa !5
  %18 = sext i32 %17 to i64
  %19 = getelementptr inbounds [500 x %"struct.geometry::types::minkowskiDiffVertex_t"], ptr %11, i64 0, i64 %18, i32 2
  call void @_ZN7Vector3C2ERKS_(ptr noundef nonnull align 4 dereferenceable(12) %4, ptr noundef nonnull align 4 dereferenceable(12) %19)
  %20 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZN8geometry4mesh17TriangleGraphMeshILj500EEixEj(ptr noundef nonnull align 4 dereferenceable(12004) %2, i32 noundef %.018)
  %21 = getelementptr inbounds i8, ptr %20, i64 4
  %22 = load i32, ptr %21, align 4, !tbaa !5
  %23 = sext i32 %22 to i64
  %24 = getelementptr inbounds [500 x %"struct.geometry::types::minkowskiDiffVertex_t"], ptr %11, i64 0, i64 %23, i32 2
  call void @_ZN7Vector3C2ERKS_(ptr noundef nonnull align 4 dereferenceable(12) %12, ptr noundef nonnull align 4 dereferenceable(12) %24)
  %25 = call noundef nonnull align 4 dereferenceable(24) ptr @_ZN8geometry4mesh17TriangleGraphMeshILj500EEixEj(ptr noundef nonnull align 4 dereferenceable(12004) %2, i32 noundef %.018)
  %26 = getelementptr inbounds i8, ptr %25, i64 8
  %27 = load i32, ptr %26, align 4, !tbaa !5
  %28 = sext i32 %27 to i64
  %29 = getelementptr inbounds [500 x %"struct.geometry::types::minkowskiDiffVertex_t"], ptr %11, i64 0, i64 %28, i32 2
  call void @_ZN7Vector3C2ERKS_(ptr noundef nonnull align 4 dereferenceable(12) %13, ptr noundef nonnull align 4 dereferenceable(12) %29)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #4
  call void @_ZN8geometry10calcNormalEPK7Vector3RS1_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %5, ptr noundef nonnull %4, ptr noundef nonnull align 4 dereferenceable(12) %1)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #4
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %6, ptr noundef nonnull align 4 dereferenceable(12) %14, ptr noundef nonnull align 4 dereferenceable(12) %4)
  %30 = call noundef float @_ZNK7Vector33dotERKS_(ptr noundef nonnull align 4 dereferenceable(12) %5, ptr noundef nonnull align 4 dereferenceable(12) %6)
  %31 = fcmp ult float %30, 0.000000e+00
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %8) #4
  br i1 %31, label %32, label %.critedge

32:                                               ; preds = %15
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %7, ptr noundef nonnull align 4 dereferenceable(12) %14, ptr noundef nonnull align 4 dereferenceable(12) %12)
  %33 = call noundef float @_ZNK7Vector33dotERKS_(ptr noundef nonnull align 4 dereferenceable(12) %5, ptr noundef nonnull align 4 dereferenceable(12) %7)
  %34 = fcmp ult float %33, 0.000000e+00
  br i1 %34, label %35, label %.critedge

35:                                               ; preds = %32
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %8, ptr noundef nonnull align 4 dereferenceable(12) %14, ptr noundef nonnull align 4 dereferenceable(12) %13)
  %36 = call noundef float @_ZNK7Vector33dotERKS_(ptr noundef nonnull align 4 dereferenceable(12) %5, ptr noundef nonnull align 4 dereferenceable(12) %8)
  %37 = fcmp ult float %36, 0.000000e+00
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #4
  br i1 %37, label %39, label %38

.critedge:                                        ; preds = %15, %32
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #4
  br label %38

38:                                               ; preds = %.critedge, %35
  call void @_ZN8geometry4mesh17TriangleGraphMeshILj500EE6removeEi(ptr noundef nonnull align 4 dereferenceable(12004) %2, i32 noundef %.018)
  br label %39

39:                                               ; preds = %38, %35
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %4) #4
  %.0 = add nsw i32 %.018, -1
  %40 = icmp sgt i32 %.018, 0
  br i1 %40, label %15, label %._crit_edge, !llvm.loop !9
}

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

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

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


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