; 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::Plane" = type { %"class.JPH::Vec4" }
%"class.JPH::Vec4" = type { %union.anon }
%union.anon = 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::Vec3" = type { %union.anon.0 }
%union.anon.0 = type { <4 x float> }
%"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::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 }
%"class.JPH::SoftBodyVertex" = type { %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Plane", i32, i8, float, float }
%"struct.JPH::SoftBodyMotionProperties::CollidingSensor" = type <{ %"class.JPH::Mat44", %"class.JPH::Array.69", %"class.JPH::BodyID", i8, [3 x i8] }>
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::Array.69" = type { i64, i64, ptr }
%"class.JPH::BodyID" = type { i32 }
%"struct.JPH::SoftBodyMotionProperties::LeafShape" = type <{ %"class.JPH::Mat44", %"class.JPH::Vec3", %"class.JPH::RefConst.66", [8 x i8] }>
%"class.JPH::RefConst.66" = type { ptr }

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(80) ptr @_ZN3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6atomicIbE5storeEbSt12memory_order(ptr noundef nonnull align 1 dereferenceable(1), i1 noundef zeroext, i32 noundef) #4 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH24SoftBodyMotionProperties25DetermineSensorCollisionsERNS0_15CollidingSensorE(ptr noundef nonnull align 16 dereferenceable(372) %0, ptr noundef nonnull align 16 dereferenceable(93) %1) #5 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.JPH::Plane", align 16
  %6 = alloca float, align 4
  %7 = alloca i32, align 4
  %8 = alloca %"class.JPH::CollideSoftBodyVertexIterator", align 8
  %9 = alloca %"class.JPH::StridedPtr", align 8
  %10 = alloca %"class.JPH::StridedPtr.73", align 8
  %11 = alloca %"class.JPH::StridedPtr.75", align 8
  %12 = alloca %"class.JPH::StridedPtr.77", align 8
  %13 = alloca %"class.JPH::StridedPtr.79", align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca %"class.JPH::Vec3", align 16
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %19 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store float 0xC7EFFFFFE0000000, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  store i32 -1, ptr %7, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 80, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #6
  %20 = getelementptr inbounds %"class.JPH::SoftBodyMotionProperties", ptr %19, i32 0, i32 3
  %21 = call noundef nonnull align 16 dereferenceable(80) ptr @_ZN3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %20, i64 noundef 0)
  %22 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %21, i32 0, i32 1
  call void @_ZN3JPH10StridedPtrIKNS_4Vec3EEC2EPS2_i(ptr noundef nonnull align 8 dereferenceable(12) %9, ptr noundef %22, i32 noundef 80)
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #6
  %23 = getelementptr inbounds %"class.JPH::SoftBodyMotionProperties", ptr %19, i32 0, i32 3
  %24 = call noundef nonnull align 16 dereferenceable(80) ptr @_ZN3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef 0)
  %25 = getelementptr inbounds %"class.JPH::SoftBodyVertex", ptr %24, i32 0, i32 7
  call void @_ZN3JPH10StridedPtrIKfEC2EPS1_i(ptr noundef nonnull align 8 dereferenceable(12) %10, ptr noundef %25, i32 noundef 80)
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #6
  call void @_ZN3JPH10StridedPtrINS_5PlaneEEC2EPS1_i(ptr noundef nonnull align 8 dereferenceable(12) %11, ptr noundef %5, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #6
  call void @_ZN3JPH10StridedPtrIfEC2EPfi(ptr noundef nonnull align 8 dereferenceable(12) %12, ptr noundef %6, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #6
  call void @_ZN3JPH10StridedPtrIiEC2EPii(ptr noundef nonnull align 8 dereferenceable(12) %13, ptr noundef %7, i32 noundef 0)
  call void @_ZN3JPH29CollideSoftBodyVertexIteratorC2ERKNS_10StridedPtrIKNS_4Vec3EEERKNS1_IKfEERKNS1_INS_5PlaneEEERKNS1_IfEERKNS1_IiEE(ptr noundef nonnull align 8 dereferenceable(80) %8, ptr noundef nonnull align 8 dereferenceable(12) %9, ptr noundef nonnull align 8 dereferenceable(12) %10, ptr noundef nonnull align 8 dereferenceable(12) %11, ptr noundef nonnull align 8 dereferenceable(12) %12, ptr noundef nonnull align 8 dereferenceable(12) %13)
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = getelementptr inbounds %"struct.JPH::SoftBodyMotionProperties::CollidingSensor", ptr %26, i32 0, i32 1
  store ptr %27, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %28 = load ptr, ptr %14, align 8, !tbaa !5
  %29 = call noundef ptr @_ZN3JPH5ArrayINS_24SoftBodyMotionProperties9LeafShapeENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %28)
  store ptr %29, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %30 = load ptr, ptr %14, align 8, !tbaa !5
  %31 = call noundef ptr @_ZN3JPH5ArrayINS_24SoftBodyMotionProperties9LeafShapeENS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %30)
  store ptr %31, ptr %16, align 8, !tbaa !5
  br label %32

32:                                               ; preds = %56, %2
  %33 = load ptr, ptr %15, align 8, !tbaa !5
  %34 = load ptr, ptr %16, align 8, !tbaa !5
  %35 = icmp ne ptr %33, %34
  br i1 %35, label %37, label %36

36:                                               ; preds = %32
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %59

37:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %38 = load ptr, ptr %15, align 8, !tbaa !5
  store ptr %38, ptr %17, align 8, !tbaa !5
  %39 = load ptr, ptr %17, align 8, !tbaa !5
  %40 = getelementptr inbounds %"struct.JPH::SoftBodyMotionProperties::LeafShape", ptr %39, i32 0, i32 2
  %41 = call noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %40)
  %42 = load ptr, ptr %17, align 8, !tbaa !5
  %43 = getelementptr inbounds %"struct.JPH::SoftBodyMotionProperties::LeafShape", ptr %42, i32 0, i32 0
  %44 = load ptr, ptr %17, align 8, !tbaa !5
  %45 = getelementptr inbounds %"struct.JPH::SoftBodyMotionProperties::LeafShape", ptr %44, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %18, ptr align 16 %45, i64 16, i1 false), !tbaa.struct !13
  %46 = getelementptr inbounds %"class.JPH::SoftBodyMotionProperties", ptr %19, i32 0, i32 3
  %47 = call noundef i64 @_ZNK3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %46)
  %48 = trunc i64 %47 to i32
  %49 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 0
  %50 = load double, ptr %49, align 16
  %51 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 1
  %52 = load double, ptr %51, align 8
  %53 = load ptr, ptr %41, align 8, !tbaa !15
  %54 = getelementptr inbounds ptr, ptr %53, i64 19
  %55 = load ptr, ptr %54, align 8
  call void %55(ptr noundef nonnull align 8 dereferenceable(26) %41, ptr noundef nonnull align 16 dereferenceable(64) %43, double %50, double %52, ptr noundef nonnull align 8 dereferenceable(80) %8, i32 noundef %48, i32 noundef 0)
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br label %56

56:                                               ; preds = %37
  %57 = load ptr, ptr %15, align 8, !tbaa !5
  %58 = getelementptr inbounds %"struct.JPH::SoftBodyMotionProperties::LeafShape", ptr %57, i32 1
  store ptr %58, ptr %15, align 8, !tbaa !5
  br label %32

59:                                               ; preds = %36
  %60 = load float, ptr %6, align 4, !tbaa !9
  %61 = fcmp ogt float %60, 0.000000e+00
  %62 = load ptr, ptr %4, align 8, !tbaa !5
  %63 = getelementptr inbounds %"struct.JPH::SoftBodyMotionProperties::CollidingSensor", ptr %62, i32 0, i32 3
  %64 = zext i1 %61 to i8
  store i8 %64, ptr %63, align 4, !tbaa !17
  %65 = load ptr, ptr %4, align 8, !tbaa !5
  %66 = getelementptr inbounds %"struct.JPH::SoftBodyMotionProperties::CollidingSensor", ptr %65, i32 0, i32 3
  %67 = load i8, ptr %66, align 4, !tbaa !17, !range !24, !noundef !25
  %68 = trunc i8 %67 to i1
  br i1 %68, label %69, label %71

69:                                               ; preds = %59
  %70 = getelementptr inbounds %"class.JPH::SoftBodyMotionProperties", ptr %19, i32 0, i32 14
  call void @_ZNSt6atomicIbE5storeEbSt12memory_order(ptr noundef nonnull align 1 dereferenceable(1) %70, i1 noundef zeroext true, i32 noundef 0) #6
  br label %71

71:                                               ; preds = %69, %59
  call void @llvm.lifetime.end.p0(i64 80, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #6
  ret void
}

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

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

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

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

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { 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 #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 = !{!"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 = !{!"int", !7, i64 0}
!13 = !{i64 0, i64 16, !14}
!14 = !{!7, !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"vtable pointer", !8, i64 0}
!17 = !{!18, !23, i64 92}
!18 = !{!"_ZTSN3JPH24SoftBodyMotionProperties15CollidingSensorE", !19, i64 0, !20, i64 64, !22, i64 88, !23, i64 92}
!19 = !{!"_ZTSN3JPH5Mat44E", !7, i64 0}
!20 = !{!"_ZTSN3JPH5ArrayINS_24SoftBodyMotionProperties9LeafShapeENS_12STLAllocatorIS2_EEEE", !21, i64 0, !21, i64 8, !6, i64 16}
!21 = !{!"long", !7, i64 0}
!22 = !{!"_ZTSN3JPH6BodyIDE", !12, i64 0}
!23 = !{!"bool", !7, i64 0}
!24 = !{i8 0, i8 2}
!25 = !{}


; 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::Plane" = type { %"class.JPH::Vec4" }
%"class.JPH::Vec4" = type { %union.anon }
%union.anon = 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] }>

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(80) ptr @_ZN3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6atomicIbE5storeEbSt12memory_order(ptr noundef nonnull align 1 dereferenceable(1), i1 noundef zeroext, i32 noundef) local_unnamed_addr #3 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 #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH24SoftBodyMotionProperties25DetermineSensorCollisionsERNS0_15CollidingSensorE(ptr noundef nonnull align 16 dereferenceable(372) %0, ptr noundef nonnull align 16 dereferenceable(93) %1) local_unnamed_addr #4 align 2 {
  %3 = alloca %"class.JPH::Plane", align 16
  %4 = alloca float, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"class.JPH::CollideSoftBodyVertexIterator", align 8
  %7 = alloca %"class.JPH::StridedPtr", align 8
  %8 = alloca %"class.JPH::StridedPtr.73", align 8
  %9 = alloca %"class.JPH::StridedPtr.75", align 8
  %10 = alloca %"class.JPH::StridedPtr.77", align 8
  %11 = alloca %"class.JPH::StridedPtr.79", align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #5
  store float 0xC7EFFFFFE0000000, ptr %4, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #5
  store i32 -1, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #5
  %12 = getelementptr inbounds i8, ptr %0, i64 192
  %13 = tail call noundef nonnull align 16 dereferenceable(80) ptr @_ZN3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef 0)
  %14 = getelementptr inbounds i8, ptr %13, i64 16
  call void @_ZN3JPH10StridedPtrIKNS_4Vec3EEC2EPS2_i(ptr noundef nonnull align 8 dereferenceable(12) %7, ptr noundef nonnull %14, i32 noundef 80)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #5
  %15 = call noundef nonnull align 16 dereferenceable(80) ptr @_ZN3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef 0)
  %16 = getelementptr inbounds i8, ptr %15, i64 76
  call void @_ZN3JPH10StridedPtrIKfEC2EPS1_i(ptr noundef nonnull align 8 dereferenceable(12) %8, ptr noundef nonnull %16, i32 noundef 80)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #5
  call void @_ZN3JPH10StridedPtrINS_5PlaneEEC2EPS1_i(ptr noundef nonnull align 8 dereferenceable(12) %9, ptr noundef nonnull %3, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #5
  call void @_ZN3JPH10StridedPtrIfEC2EPfi(ptr noundef nonnull align 8 dereferenceable(12) %10, ptr noundef nonnull %4, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #5
  call void @_ZN3JPH10StridedPtrIiEC2EPii(ptr noundef nonnull align 8 dereferenceable(12) %11, ptr noundef nonnull %5, i32 noundef 0)
  call void @_ZN3JPH29CollideSoftBodyVertexIteratorC2ERKNS_10StridedPtrIKNS_4Vec3EEERKNS1_IKfEERKNS1_INS_5PlaneEEERKNS1_IfEERKNS1_IiEE(ptr noundef nonnull align 8 dereferenceable(80) %6, ptr noundef nonnull align 8 dereferenceable(12) %7, ptr noundef nonnull align 8 dereferenceable(12) %8, ptr noundef nonnull align 8 dereferenceable(12) %9, ptr noundef nonnull align 8 dereferenceable(12) %10, ptr noundef nonnull align 8 dereferenceable(12) %11)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #5
  %17 = getelementptr inbounds i8, ptr %1, i64 64
  %18 = call noundef ptr @_ZN3JPH5ArrayINS_24SoftBodyMotionProperties9LeafShapeENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %17)
  %19 = call noundef ptr @_ZN3JPH5ArrayINS_24SoftBodyMotionProperties9LeafShapeENS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %17)
  %.not13 = icmp eq ptr %18, %19
  br i1 %.not13, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %2
  %20 = load float, ptr %4, align 4, !tbaa !5
  %21 = fcmp ogt float %20, 0.000000e+00
  %22 = getelementptr inbounds i8, ptr %1, i64 92
  %23 = zext i1 %21 to i8
  store i8 %23, ptr %22, align 4, !tbaa !11
  br i1 %21, label %33, label %35

.lr.ph:                                           ; preds = %2, %.lr.ph
  %.014 = phi ptr [ %32, %.lr.ph ], [ %18, %2 ]
  %24 = getelementptr inbounds i8, ptr %.014, i64 80
  %25 = call noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %24)
  %26 = getelementptr inbounds i8, ptr %.014, i64 64
  %.sroa.0.0.copyload = load double, ptr %26, align 16
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %.014, i64 72
  %.sroa.2.0.copyload = load double, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !19
  %27 = call noundef i64 @_ZNK3JPH5ArrayINS_14SoftBodyVertexENS_12STLAllocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12)
  %28 = trunc i64 %27 to i32
  %29 = load ptr, ptr %25, align 8, !tbaa !20
  %30 = getelementptr inbounds i8, ptr %29, i64 152
  %31 = load ptr, ptr %30, align 8
  call void %31(ptr noundef nonnull align 8 dereferenceable(26) %25, ptr noundef nonnull align 16 dereferenceable(64) %.014, double %.sroa.0.0.copyload, double %.sroa.2.0.copyload, ptr noundef nonnull align 8 dereferenceable(80) %6, i32 noundef %28, i32 noundef 0)
  %32 = getelementptr inbounds i8, ptr %.014, i64 96
  %.not = icmp eq ptr %32, %19
  br i1 %.not, label %._crit_edge, label %.lr.ph

33:                                               ; preds = %._crit_edge
  %34 = getelementptr inbounds i8, ptr %0, i64 369
  call void @_ZNSt6atomicIbE5storeEbSt12memory_order(ptr noundef nonnull align 1 dereferenceable(1) %34, i1 noundef zeroext true, i32 noundef 0) #5
  br label %35

35:                                               ; preds = %33, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #5
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH10StridedPtrIKNS_4Vec3EEC2EPS2_i(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef, i32 noundef) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH10StridedPtrIKfEC2EPS1_i(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef, i32 noundef) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH10StridedPtrINS_5PlaneEEC2EPS1_i(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef, i32 noundef) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH10StridedPtrIfEC2EPfi(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef, i32 noundef) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH10StridedPtrIiEC2EPii(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef, i32 noundef) unnamed_addr #3 align 2

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #3 = { 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 = { 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 #5 = { 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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !18, i64 92}
!12 = !{!"_ZTSN3JPH24SoftBodyMotionProperties15CollidingSensorE", !13, i64 0, !14, i64 64, !17, i64 88, !18, i64 92}
!13 = !{!"_ZTSN3JPH5Mat44E", !7, i64 0}
!14 = !{!"_ZTSN3JPH5ArrayINS_24SoftBodyMotionProperties9LeafShapeENS_12STLAllocatorIS2_EEEE", !15, i64 0, !15, i64 8, !16, i64 16}
!15 = !{!"long", !7, i64 0}
!16 = !{!"any pointer", !7, i64 0}
!17 = !{!"_ZTSN3JPH6BodyIDE", !10, i64 0}
!18 = !{!"bool", !7, i64 0}
!19 = !{!7, !7, i64 0}
!20 = !{!21, !21, i64 0}
!21 = !{!"vtable pointer", !8, i64 0}


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