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

; 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::types::pointBaryCoord_t" = type { %class.Vector3, %class.Vector4 }
%class.Vector4 = type { [4 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 }

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN8geometry4mesh15pointInsideMeshERKNS_5types14triangleMesh_tERK7Vector3Rf(ptr noundef nonnull align 4 dereferenceable(30008) %0, ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(4) %2) #1 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i8, align 1
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"struct.geometry::types::pointBaryCoord_t", align 4
  %11 = alloca float, align 4
  %12 = alloca %class.Vector3, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = 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
  %16 = load ptr, ptr %6, align 8, !tbaa !5
  store float 0x47EFFFFFE0000000, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #4
  store i8 1, ptr %7, align 1, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 0, ptr %8, align 4, !tbaa !13
  br label %17

17:                                               ; preds = %108, %3
  %18 = load i32, ptr %8, align 4, !tbaa !13
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = getelementptr inbounds %"struct.geometry::types::triangleMesh_t", ptr %19, i32 0, i32 0
  %21 = load i32, ptr %20, align 4, !tbaa !15
  %22 = icmp ult i32 %18, %21
  br i1 %22, label %24, label %23

23:                                               ; preds = %17
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %111

24:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 28, ptr %10) #4
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = getelementptr inbounds %"struct.geometry::types::triangleMesh_t", ptr %25, i32 0, i32 3
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = getelementptr inbounds %"struct.geometry::types::triangleMesh_t", ptr %27, i32 0, i32 2
  %29 = load i32, ptr %8, align 4, !tbaa !13
  %30 = zext i32 %29 to i64
  %31 = getelementptr inbounds [1000 x %"struct.geometry::types::meshTriangle_t"], ptr %28, i64 0, i64 %30
  %32 = getelementptr inbounds %"struct.geometry::types::meshTriangle_t", ptr %31, i32 0, i32 0
  %33 = getelementptr inbounds [3 x i32], ptr %32, i64 0, i64 0
  %34 = load i32, ptr %33, align 4, !tbaa !13
  %35 = zext i32 %34 to i64
  %36 = getelementptr inbounds [500 x %class.Vector3], ptr %26, i64 0, i64 %35
  %37 = load ptr, ptr %4, align 8, !tbaa !5
  %38 = getelementptr inbounds %"struct.geometry::types::triangleMesh_t", ptr %37, i32 0, i32 3
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = getelementptr inbounds %"struct.geometry::types::triangleMesh_t", ptr %39, i32 0, i32 2
  %41 = load i32, ptr %8, align 4, !tbaa !13
  %42 = zext i32 %41 to i64
  %43 = getelementptr inbounds [1000 x %"struct.geometry::types::meshTriangle_t"], ptr %40, i64 0, i64 %42
  %44 = getelementptr inbounds %"struct.geometry::types::meshTriangle_t", ptr %43, i32 0, i32 0
  %45 = getelementptr inbounds [3 x i32], ptr %44, i64 0, i64 1
  %46 = load i32, ptr %45, align 4, !tbaa !13
  %47 = zext i32 %46 to i64
  %48 = getelementptr inbounds [500 x %class.Vector3], ptr %38, i64 0, i64 %47
  %49 = load ptr, ptr %4, align 8, !tbaa !5
  %50 = getelementptr inbounds %"struct.geometry::types::triangleMesh_t", ptr %49, i32 0, i32 3
  %51 = load ptr, ptr %4, align 8, !tbaa !5
  %52 = getelementptr inbounds %"struct.geometry::types::triangleMesh_t", ptr %51, i32 0, i32 2
  %53 = load i32, ptr %8, align 4, !tbaa !13
  %54 = zext i32 %53 to i64
  %55 = getelementptr inbounds [1000 x %"struct.geometry::types::meshTriangle_t"], ptr %52, i64 0, i64 %54
  %56 = getelementptr inbounds %"struct.geometry::types::meshTriangle_t", ptr %55, i32 0, i32 0
  %57 = getelementptr inbounds [3 x i32], ptr %56, i64 0, i64 2
  %58 = load i32, ptr %57, align 4, !tbaa !13
  %59 = zext i32 %58 to i64
  %60 = getelementptr inbounds [500 x %class.Vector3], ptr %50, i64 0, i64 %59
  %61 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN8geometry8triangle19closestPointToPointERK7Vector3S3_S3_S3_(ptr dead_on_unwind writable sret(%"struct.geometry::types::pointBaryCoord_t") align 4 %10, ptr noundef nonnull align 4 dereferenceable(12) %36, ptr noundef nonnull align 4 dereferenceable(12) %48, ptr noundef nonnull align 4 dereferenceable(12) %60, ptr noundef nonnull align 4 dereferenceable(12) %61)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 12, ptr %12) #4
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  %63 = getelementptr inbounds %"struct.geometry::types::pointBaryCoord_t", ptr %10, i32 0, i32 0
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %12, ptr noundef nonnull align 4 dereferenceable(12) %62, ptr noundef nonnull align 4 dereferenceable(12) %63)
  %64 = call noundef float @_ZNK7Vector39magnitudeEv(ptr noundef nonnull align 4 dereferenceable(12) %12)
  call void @llvm.lifetime.end.p0(i64 12, ptr %12) #4
  store float %64, ptr %11, align 4, !tbaa !9
  %65 = load float, ptr %11, align 4, !tbaa !9
  %66 = load ptr, ptr %6, align 8, !tbaa !5
  %67 = load float, ptr %66, align 4, !tbaa !9
  %68 = fcmp olt float %65, %67
  br i1 %68, label %69, label %72

69:                                               ; preds = %24
  %70 = load float, ptr %11, align 4, !tbaa !9
  %71 = load ptr, ptr %6, align 8, !tbaa !5
  store float %70, ptr %71, align 4, !tbaa !9
  br label %72

72:                                               ; preds = %69, %24
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !13
  br label %73

73:                                               ; preds = %104, %72
  %74 = load i32, ptr %13, align 4, !tbaa !13
  %75 = icmp ult i32 %74, 3
  br i1 %75, label %77, label %76

76:                                               ; preds = %73
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %107

77:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %78 = load ptr, ptr %4, align 8, !tbaa !5
  %79 = getelementptr inbounds %"struct.geometry::types::triangleMesh_t", ptr %78, i32 0, i32 3
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  %81 = getelementptr inbounds %"struct.geometry::types::triangleMesh_t", ptr %80, i32 0, i32 2
  %82 = load i32, ptr %8, align 4, !tbaa !13
  %83 = zext i32 %82 to i64
  %84 = getelementptr inbounds [1000 x %"struct.geometry::types::meshTriangle_t"], ptr %81, i64 0, i64 %83
  %85 = getelementptr inbounds %"struct.geometry::types::meshTriangle_t", ptr %84, i32 0, i32 0
  %86 = load i32, ptr %13, align 4, !tbaa !13
  %87 = zext i32 %86 to i64
  %88 = getelementptr inbounds [3 x i32], ptr %85, i64 0, i64 %87
  %89 = load i32, ptr %88, align 4, !tbaa !13
  %90 = zext i32 %89 to i64
  %91 = getelementptr inbounds [500 x %class.Vector3], ptr %79, i64 0, i64 %90
  store ptr %91, ptr %14, align 8, !tbaa !5
  %92 = load ptr, ptr %4, align 8, !tbaa !5
  %93 = getelementptr inbounds %"struct.geometry::types::triangleMesh_t", ptr %92, i32 0, i32 2
  %94 = load i32, ptr %8, align 4, !tbaa !13
  %95 = zext i32 %94 to i64
  %96 = getelementptr inbounds [1000 x %"struct.geometry::types::meshTriangle_t"], ptr %93, i64 0, i64 %95
  %97 = getelementptr inbounds %"struct.geometry::types::meshTriangle_t", ptr %96, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 12, ptr %15) #4
  %98 = load ptr, ptr %14, align 8, !tbaa !5
  %99 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind writable sret(%class.Vector3) align 4 %15, ptr noundef nonnull align 4 dereferenceable(12) %98, ptr noundef nonnull align 4 dereferenceable(12) %99)
  %100 = call noundef float @_ZNK7Vector33dotERKS_(ptr noundef nonnull align 4 dereferenceable(12) %97, ptr noundef nonnull align 4 dereferenceable(12) %15)
  %101 = fcmp olt float %100, 0.000000e+00
  call void @llvm.lifetime.end.p0(i64 12, ptr %15) #4
  br i1 %101, label %102, label %103

102:                                              ; preds = %77
  store i8 0, ptr %7, align 1, !tbaa !11
  br label %103

103:                                              ; preds = %102, %77
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  br label %104

104:                                              ; preds = %103
  %105 = load i32, ptr %13, align 4, !tbaa !13
  %106 = add i32 %105, 1
  store i32 %106, ptr %13, align 4, !tbaa !13
  br label %73, !llvm.loop !17

107:                                              ; preds = %76
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 28, ptr %10) #4
  br label %108

108:                                              ; preds = %107
  %109 = load i32, ptr %8, align 4, !tbaa !13
  %110 = add i32 %109, 1
  store i32 %110, ptr %8, align 4, !tbaa !13
  br label %17, !llvm.loop !19

111:                                              ; preds = %23
  %112 = load i8, ptr %7, align 1, !tbaa !11, !range !20, !noundef !21
  %113 = trunc i8 %112 to i1
  store i32 1, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #4
  ret i1 %113
}

declare void @_ZN8geometry8triangle19closestPointToPointERK7Vector3S3_S3_S3_(ptr dead_on_unwind writable sret(%"struct.geometry::types::pointBaryCoord_t") align 4, ptr noundef nonnull align 4 dereferenceable(12), 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 noundef float @_ZNK7Vector39magnitudeEv(ptr noundef nonnull align 4 dereferenceable(12)) #1 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { "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 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!16, !14, i64 0}
!16 = !{!"_ZTSN8geometry5types14triangleMesh_tE", !14, i64 0, !14, i64 4, !7, i64 8, !7, i64 24008}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}
!19 = distinct !{!19, !18}
!20 = !{i8 0, i8 2}
!21 = !{}


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

%class.Vector3 = type { [3 x float] }
%"struct.geometry::types::pointBaryCoord_t" = type { %class.Vector3, %class.Vector4 }
%class.Vector4 = type { [4 x float] }
%"struct.geometry::types::meshTriangle_t" = type { [3 x i32], %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 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 #1 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 #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN8geometry4mesh15pointInsideMeshERKNS_5types14triangleMesh_tERK7Vector3Rf(ptr noundef nonnull align 4 dereferenceable(30008) %0, ptr noundef nonnull align 4 dereferenceable(12) %1, ptr nocapture noundef nonnull align 4 dereferenceable(4) %2) local_unnamed_addr #1 {
  %4 = alloca %"struct.geometry::types::pointBaryCoord_t", align 4
  %5 = alloca %class.Vector3, align 4
  %6 = alloca %class.Vector3, align 4
  store float 0x47EFFFFFE0000000, ptr %2, align 4, !tbaa !5
  %7 = load i32, ptr %0, align 4, !tbaa !9
  %.not = icmp eq i32 %7, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %3
  %8 = getelementptr inbounds i8, ptr %0, i64 24008
  %9 = getelementptr inbounds i8, ptr %0, i64 8
  br label %10

._crit_edge:                                      ; preds = %27, %3
  %.0.lcssa = phi i1 [ true, %3 ], [ %.2.2, %27 ]
  ret i1 %.0.lcssa

10:                                               ; preds = %.lr.ph, %27
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %27 ]
  %.035 = phi i1 [ true, %.lr.ph ], [ %.2.2, %27 ]
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %4) #4
  %11 = getelementptr inbounds [1000 x %"struct.geometry::types::meshTriangle_t"], ptr %9, i64 0, i64 %indvars.iv
  %12 = load i32, ptr %11, align 4, !tbaa !12
  %13 = zext i32 %12 to i64
  %14 = getelementptr inbounds [500 x %class.Vector3], ptr %8, i64 0, i64 %13
  %15 = getelementptr inbounds i8, ptr %11, i64 4
  %16 = load i32, ptr %15, align 4, !tbaa !12
  %17 = zext i32 %16 to i64
  %18 = getelementptr inbounds [500 x %class.Vector3], ptr %8, i64 0, i64 %17
  %19 = getelementptr inbounds i8, ptr %11, i64 8
  %20 = load i32, ptr %19, align 4, !tbaa !12
  %21 = zext i32 %20 to i64
  %22 = getelementptr inbounds [500 x %class.Vector3], ptr %8, i64 0, i64 %21
  call void @_ZN8geometry8triangle19closestPointToPointERK7Vector3S3_S3_S3_(ptr dead_on_unwind nonnull writable sret(%"struct.geometry::types::pointBaryCoord_t") align 4 %4, ptr noundef nonnull align 4 dereferenceable(12) %14, ptr noundef nonnull align 4 dereferenceable(12) %18, ptr noundef nonnull align 4 dereferenceable(12) %22, ptr noundef nonnull align 4 dereferenceable(12) %1)
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %5) #4
  call void @_ZNK7Vector3miERKS_(ptr dead_on_unwind nonnull writable sret(%class.Vector3) align 4 %5, ptr noundef nonnull align 4 dereferenceable(12) %1, ptr noundef nonnull align 4 dereferenceable(12) %4)
  %23 = call noundef float @_ZNK7Vector39magnitudeEv(ptr noundef nonnull align 4 dereferenceable(12) %5)
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %5) #4
  %24 = load float, ptr %2, align 4, !tbaa !5
  %25 = fcmp olt float %23, %24
  br i1 %25, label %26, label %27

26:                                               ; preds = %10
  store float %23, ptr %2, align 4, !tbaa !5
  br label %27

27:                                               ; preds = %26, %10
  %28 = getelementptr inbounds i8, ptr %11, i64 12
  %29 = load i32, ptr %11, align 4, !tbaa !12
  %30 = zext i32 %29 to i64
  %31 = getelementptr inbounds [500 x %class.Vector3], ptr %8, i64 0, i64 %30
  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) %31, ptr noundef nonnull align 4 dereferenceable(12) %1)
  %32 = call noundef float @_ZNK7Vector33dotERKS_(ptr noundef nonnull align 4 dereferenceable(12) %28, ptr noundef nonnull align 4 dereferenceable(12) %6)
  %33 = fcmp uge float %32, 0.000000e+00
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #4
  %34 = load i32, ptr %15, align 4, !tbaa !12
  %35 = zext i32 %34 to i64
  %36 = getelementptr inbounds [500 x %class.Vector3], ptr %8, i64 0, i64 %35
  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) %36, ptr noundef nonnull align 4 dereferenceable(12) %1)
  %37 = call noundef float @_ZNK7Vector33dotERKS_(ptr noundef nonnull align 4 dereferenceable(12) %28, ptr noundef nonnull align 4 dereferenceable(12) %6)
  %38 = fcmp uge float %37, 0.000000e+00
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #4
  %39 = and i1 %38, %33
  %40 = load i32, ptr %19, align 4, !tbaa !12
  %41 = zext i32 %40 to i64
  %42 = getelementptr inbounds [500 x %class.Vector3], ptr %8, i64 0, i64 %41
  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) %42, ptr noundef nonnull align 4 dereferenceable(12) %1)
  %43 = call noundef float @_ZNK7Vector33dotERKS_(ptr noundef nonnull align 4 dereferenceable(12) %28, ptr noundef nonnull align 4 dereferenceable(12) %6)
  %44 = fcmp uge float %43, 0.000000e+00
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #4
  %45 = and i1 %44, %39
  %.2.2 = select i1 %45, i1 %.035, i1 false
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %4) #4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %46 = load i32, ptr %0, align 4, !tbaa !9
  %47 = zext i32 %46 to i64
  %48 = icmp ult i64 %indvars.iv.next, %47
  br i1 %48, label %10, label %._crit_edge, !llvm.loop !13
}

declare void @_ZN8geometry8triangle19closestPointToPointERK7Vector3S3_S3_S3_(ptr dead_on_unwind writable sret(%"struct.geometry::types::pointBaryCoord_t") align 4, ptr noundef nonnull align 4 dereferenceable(12), 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 noundef float @_ZNK7Vector39magnitudeEv(ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { "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 = !{!"float", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTSN8geometry5types14triangleMesh_tE", !11, i64 0, !11, i64 4, !7, i64 8, !7, i64 24008}
!11 = !{!"int", !7, i64 0}
!12 = !{!11, !11, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


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