; LLVM IR from jrouwe/JoltPhysics :: Jolt/Physics/SoftBody (SoftBodyMotionProperties)

; 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.JPH::Vec3" = type { %union.anon.0 }
%union.anon.0 = type { <4 x float> }
%"class.JPH::CollideSoftBodyVertexIterator" = type { %"class.JPH::StridedPtr", %"class.JPH::StridedPtr.73", %"class.JPH::StridedPtr.75", %"class.JPH::StridedPtr.77", %"class.JPH::StridedPtr.79" }
%"class.JPH::StridedPtr" = type <{ ptr, i32, [4 x i8] }>
%"class.JPH::StridedPtr.73" = type <{ ptr, i32, [4 x i8] }>
%"class.JPH::StridedPtr.75" = type <{ ptr, i32, [4 x i8] }>
%"class.JPH::StridedPtr.77" = type <{ ptr, i32, [4 x i8] }>
%"class.JPH::StridedPtr.79" = type <{ ptr, i32, [4 x i8] }>
%"class.JPH::SoftBodyMotionProperties" = type <{ %"class.JPH::MotionProperties.base", [2 x i8], %"class.JPH::RefConst", %"class.JPH::Array", %"class.JPH::Array.1", %"class.JPH::Array.4", %"class.JPH::Array.7", %"class.JPH::AABox", %"class.JPH::AABox", i32, i32, float, float, i8, %"struct.std::atomic", i8, i8, [12 x i8] }>
%"class.JPH::MotionProperties.base" = type <{ %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Quat", %"class.JPH::Float3", %"class.JPH::Float3", float, float, float, float, float, float, i32, i32, i8, i8, i8, i8, i8, [3 x i8], [3 x %"class.JPH::Sphere"], float, i8, i8 }>
%"class.JPH::Quat" = type { %"class.JPH::Vec4" }
%"class.JPH::Vec4" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::Float3" = type { float, float, float }
%"class.JPH::Sphere" = type { %"class.JPH::Float3", float }
%"class.JPH::RefConst" = type { ptr }
%"class.JPH::Array" = type { i64, i64, ptr }
%"class.JPH::Array.1" = type { i64, i64, ptr }
%"class.JPH::Array.4" = type { i64, i64, ptr }
%"class.JPH::Array.7" = type { i64, i64, ptr }
%"class.JPH::AABox" = type { %"class.JPH::Vec3", %"class.JPH::Vec3" }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i8 }
%"struct.JPH::SoftBodyMotionProperties::CollidingShape" = type { %"class.JPH::Mat44", %"class.JPH::Array.69", %"class.JPH::BodyID", i8, float, float, float, float, i8, %"class.JPH::Mat44", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3" }
%"class.JPH::Array.69" = type { i64, i64, ptr }
%"class.JPH::BodyID" = type { i32 }
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"struct.JPH::SoftBodyMotionProperties::LeafShape" = type <{ %"class.JPH::Mat44", %"class.JPH::Vec3", %"class.JPH::RefConst.66", [8 x i8] }>
%"class.JPH::RefConst.66" = type { ptr }
%"class.JPH::SoftBodyVertex" = type { %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Plane", i32, i8, float, float }
%"class.JPH::Plane" = type { %"class.JPH::Vec4" }

; 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: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH24SoftBodyMotionProperties24DetermineCollisionPlanesEjj(ptr noundef nonnull align 16 dereferenceable(372) %0, i32 noundef %1, i32 noundef %2) #2 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca %"class.JPH::Vec3", align 16
  %17 = alloca %"class.JPH::CollideSoftBodyVertexIterator", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  store i32 %2, ptr %6, align 4, !tbaa !9
  %18 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %19 = getelementptr inbounds %"class.JPH::SoftBodyMotionProperties", ptr %18, i32 0, i32 4
  store ptr %19, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %20 = load ptr, ptr %7, align 8, !tbaa !5
  %21 = call noundef ptr @_ZN3JPH5ArrayINS_24SoftBodyMotionProperties14CollidingShapeENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %20)
  store ptr %21, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %22 = load ptr, ptr %7, align 8, !tbaa !5
  %23 = call noundef ptr @_ZN3JPH5ArrayINS_24SoftBodyMotionProperties14CollidingShapeENS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %22)
  store ptr %23, ptr %9, align 8, !tbaa !5
  br label %24

24:                                               ; preds = %76, %3
  %25 = load ptr, ptr %8, align 8, !tbaa !5
  %26 = load ptr, ptr %9, align 8, !tbaa !5
  %27 = icmp ne ptr %25, %26
  br i1 %27, label %29, label %28

28:                                               ; preds = %24
  store i32 2, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  br label %79

29:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %30 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %30, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %31 = load ptr, ptr %11, align 8, !tbaa !5
  %32 = getelementptr inbounds %"struct.JPH::SoftBodyMotionProperties::CollidingShape", ptr %31, i32 0, i32 1
  store ptr %32, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %33 = load ptr, ptr %12, align 8, !tbaa !5
  %34 = call noundef ptr @_ZNK3JPH5ArrayINS_24SoftBodyMotionProperties9LeafShapeENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %33)
  store ptr %34, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %35 = load ptr, ptr %12, align 8, !tbaa !5
  %36 = call noundef ptr @_ZNK3JPH5ArrayINS_24SoftBodyMotionProperties9LeafShapeENS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %35)
  store ptr %36, ptr %14, align 8, !tbaa !5
  br label %37

37:                                               ; preds = %72, %29
  %38 = load ptr, ptr %13, align 8, !tbaa !5
  %39 = load ptr, ptr %14, align 8, !tbaa !5
  %40 = icmp ne ptr %38, %39
  br i1 %40, label %42, label %41

41:                                               ; preds = %37
  store i32 4, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br label %75

42:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %43 = load ptr, ptr %13, align 8, !tbaa !5
  store ptr %43, ptr %15, align 8, !tbaa !5
  %44 = load ptr, ptr %15, align 8, !tbaa !5
  %45 = getelementptr inbounds %"struct.JPH::SoftBodyMotionProperties::LeafShape", ptr %44, i32 0, i32 2
  %46 = call noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %45)
  %47 = load ptr, ptr %15, align 8, !tbaa !5
  %48 = getelementptr inbounds %"struct.JPH::SoftBodyMotionProperties::LeafShape", ptr %47, i32 0, i32 0
  %49 = load ptr, ptr %15, align 8, !tbaa !5
  %50 = getelementptr inbounds %"struct.JPH::SoftBodyMotionProperties::LeafShape", ptr %49, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %16, ptr align 16 %50, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.start.p0(i64 80, ptr %17) #4
  %51 = getelementptr inbounds %"class.JPH::SoftBodyMotionProperties", ptr %18, i32 0, i32 3
  %52 = call noundef ptr @_ZN3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %51)
  %53 = load i32, ptr %5, align 4, !tbaa !9
  %54 = zext i32 %53 to i64
  %55 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %52, i64 %54
  call void @_ZN3JPH29CollideSoftBodyVertexIteratorC2EPNS_14SoftBodyVertexE(ptr noundef nonnull align 8 dereferenceable(80) %17, ptr noundef %55)
  %56 = load i32, ptr %6, align 4, !tbaa !9
  %57 = load ptr, ptr %11, align 8, !tbaa !5
  %58 = getelementptr inbounds %"class.JPH::SoftBodyMotionProperties", ptr %18, i32 0, i32 4
  %59 = call noundef ptr @_ZN3JPH5ArrayINS_24SoftBodyMotionProperties14CollidingShapeENS_12STLAllocatorIS2_EEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %58)
  %60 = ptrtoint ptr %57 to i64
  %61 = ptrtoint ptr %59 to i64
  %62 = sub i64 %60, %61
  %63 = sdiv exact i64 %62, 256
  %64 = trunc i64 %63 to i32
  %65 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 0
  %66 = load double, ptr %65, align 16
  %67 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 1
  %68 = load double, ptr %67, align 8
  %69 = load ptr, ptr %46, align 8, !tbaa !13
  %70 = getelementptr inbounds ptr, ptr %69, i64 19
  %71 = load ptr, ptr %70, align 8
  call void %71(ptr noundef nonnull align 8 dereferenceable(26) %46, ptr noundef nonnull align 16 dereferenceable(64) %48, double %66, double %68, ptr noundef nonnull align 8 dereferenceable(80) %17, i32 noundef %56, i32 noundef %64)
  call void @llvm.lifetime.end.p0(i64 80, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  br label %72

72:                                               ; preds = %42
  %73 = load ptr, ptr %13, align 8, !tbaa !5
  %74 = getelementptr inbounds %"struct.JPH::SoftBodyMotionProperties::LeafShape", ptr %73, i32 1
  store ptr %74, ptr %13, align 8, !tbaa !5
  br label %37

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

76:                                               ; preds = %75
  %77 = load ptr, ptr %8, align 8, !tbaa !5
  %78 = getelementptr inbounds %"struct.JPH::SoftBodyMotionProperties::CollidingShape", ptr %77, i32 1
  store ptr %78, ptr %8, align 8, !tbaa !5
  br label %24

79:                                               ; preds = %28
  ret void
}

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

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

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

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

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree 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 = { inlinehint 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 #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 = !{i64 0, i64 16, !12}
!12 = !{!7, !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"vtable pointer", !8, i64 0}


; 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.JPH::CollideSoftBodyVertexIterator" = type { %"class.JPH::StridedPtr", %"class.JPH::StridedPtr.73", %"class.JPH::StridedPtr.75", %"class.JPH::StridedPtr.77", %"class.JPH::StridedPtr.79" }
%"class.JPH::StridedPtr" = type <{ ptr, i32, [4 x i8] }>
%"class.JPH::StridedPtr.73" = type <{ ptr, i32, [4 x i8] }>
%"class.JPH::StridedPtr.75" = type <{ ptr, i32, [4 x i8] }>
%"class.JPH::StridedPtr.77" = type <{ ptr, i32, [4 x i8] }>
%"class.JPH::StridedPtr.79" = type <{ ptr, i32, [4 x i8] }>
%"class.JPH::SoftBodyVertex" = type { %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Plane", i32, i8, float, float }
%"class.JPH::Vec3" = type { %union.anon.0 }
%union.anon.0 = type { <4 x float> }
%"class.JPH::Plane" = type { %"class.JPH::Vec4" }
%"class.JPH::Vec4" = type { %union.anon }
%union.anon = type { <4 x float> }

; 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
define dso_local void @_ZN3JPH24SoftBodyMotionProperties24DetermineCollisionPlanesEjj(ptr noundef nonnull align 16 dereferenceable(372) %0, i32 noundef %1, i32 noundef %2) local_unnamed_addr #1 align 2 {
  %4 = alloca %"class.JPH::CollideSoftBodyVertexIterator", align 8
  %5 = getelementptr inbounds i8, ptr %0, i64 216
  %6 = tail call noundef ptr @_ZN3JPH5ArrayINS_24SoftBodyMotionProperties14CollidingShapeENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %5)
  %7 = tail call noundef ptr @_ZN3JPH5ArrayINS_24SoftBodyMotionProperties14CollidingShapeENS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %5)
  %.not23 = icmp eq ptr %6, %7
  br i1 %.not23, label %._crit_edge27, label %.lr.ph26

.lr.ph26:                                         ; preds = %3
  %8 = getelementptr inbounds i8, ptr %0, i64 192
  %9 = zext i32 %1 to i64
  br label %10

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

10:                                               ; preds = %.lr.ph26, %._crit_edge
  %.024 = phi ptr [ %6, %.lr.ph26 ], [ %15, %._crit_edge ]
  %11 = getelementptr inbounds i8, ptr %.024, i64 64
  %12 = call noundef ptr @_ZNK3JPH5ArrayINS_24SoftBodyMotionProperties9LeafShapeENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %11)
  %13 = call noundef ptr @_ZNK3JPH5ArrayINS_24SoftBodyMotionProperties9LeafShapeENS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %11)
  %.not2021 = icmp eq ptr %12, %13
  br i1 %.not2021, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %10
  %14 = ptrtoint ptr %.024 to i64
  br label %16

._crit_edge:                                      ; preds = %16, %10
  %15 = getelementptr inbounds i8, ptr %.024, i64 256
  %.not = icmp eq ptr %15, %7
  br i1 %.not, label %._crit_edge27, label %10

16:                                               ; preds = %.lr.ph, %16
  %.01922 = phi ptr [ %12, %.lr.ph ], [ %30, %16 ]
  %17 = getelementptr inbounds i8, ptr %.01922, i64 80
  %18 = call noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %17)
  %19 = getelementptr inbounds i8, ptr %.01922, i64 64
  %.sroa.0.0.copyload = load double, ptr %19, align 16
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %.01922, i64 72
  %.sroa.2.0.copyload = load double, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %4) #3
  %20 = call noundef ptr @_ZN3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %8)
  %21 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %20, i64 %9
  call void @_ZN3JPH29CollideSoftBodyVertexIteratorC2EPNS_14SoftBodyVertexE(ptr noundef nonnull align 8 dereferenceable(80) %4, ptr noundef %21)
  %22 = call noundef ptr @_ZN3JPH5ArrayINS_24SoftBodyMotionProperties14CollidingShapeENS_12STLAllocatorIS2_EEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %5)
  %23 = ptrtoint ptr %22 to i64
  %24 = sub i64 %14, %23
  %25 = lshr exact i64 %24, 8
  %26 = trunc i64 %25 to i32
  %27 = load ptr, ptr %18, align 8, !tbaa !8
  %28 = getelementptr inbounds i8, ptr %27, i64 152
  %29 = load ptr, ptr %28, align 8
  call void %29(ptr noundef nonnull align 8 dereferenceable(26) %18, ptr noundef nonnull align 16 dereferenceable(64) %.01922, double %.sroa.0.0.copyload, double %.sroa.2.0.copyload, ptr noundef nonnull align 8 dereferenceable(80) %4, i32 noundef %2, i32 noundef %26)
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %4) #3
  %30 = getelementptr inbounds i8, ptr %.01922, i64 96
  %.not20 = icmp eq ptr %30, %13
  br i1 %.not20, label %._crit_edge, label %16
}

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH29CollideSoftBodyVertexIteratorC2EPNS_14SoftBodyVertexE(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef) unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN3JPH5ArrayINS_24SoftBodyMotionProperties14CollidingShapeENS_12STLAllocatorIS2_EEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 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 = { inlinehint 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 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"vtable pointer", !7, i64 0}


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