; 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::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"] }
%"class.JPH::SoftBodyUpdateContext" = type <{ ptr, ptr, ptr, ptr, %"class.JPH::Mat44", %"class.JPH::Vec3", %"class.JPH::Vec3", float, float, %"struct.std::atomic.49", %"struct.std::atomic.11", %"struct.std::atomic.11", %"struct.std::atomic.11", %"struct.std::atomic.11", %"struct.std::atomic.11", %"struct.std::atomic.11", %"struct.std::atomic.11", [8 x i8], %"class.JPH::Vec3", i32, [12 x i8] }>
%"struct.std::atomic.49" = type { i32 }
%"struct.std::atomic.11" = type { %"struct.std::__atomic_base.12" }
%"struct.std::__atomic_base.12" = type { i32 }

; 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: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH5Mat4411Multiply3x3ENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64), double, double) #2 align 2

; 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: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) #2 align 2

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

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

27:                                               ; preds = %23
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  br label %106

28:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %29 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %29, ptr %10, align 8, !tbaa !5
  %30 = load ptr, ptr %10, align 8, !tbaa !5
  %31 = getelementptr inbounds %"struct.JPH::SoftBodyMotionProperties::CollidingShape", ptr %30, i32 0, i32 8
  %32 = load i8, ptr %31, align 16, !tbaa !9, !range !20, !noundef !21
  %33 = trunc i8 %32 to i1
  br i1 %33, label %34, label %102

34:                                               ; preds = %28
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  %36 = load ptr, ptr %10, align 8, !tbaa !5
  %37 = getelementptr inbounds %"struct.JPH::SoftBodyMotionProperties::CollidingShape", ptr %36, i32 0, i32 2
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  %39 = getelementptr inbounds %"class.JPH::SoftBodyUpdateContext", ptr %38, i32 0, i32 4
  %40 = load ptr, ptr %10, align 8, !tbaa !5
  %41 = getelementptr inbounds %"struct.JPH::SoftBodyMotionProperties::CollidingShape", ptr %40, i32 0, i32 10
  %42 = load ptr, ptr %10, align 8, !tbaa !5
  %43 = getelementptr inbounds %"struct.JPH::SoftBodyMotionProperties::CollidingShape", ptr %42, i32 0, i32 12
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %13, ptr align 16 %43, i64 16, i1 false), !tbaa.struct !22
  %44 = getelementptr inbounds { double, double }, ptr %13, i32 0, i32 0
  %45 = load double, ptr %44, align 16
  %46 = getelementptr inbounds { double, double }, ptr %13, i32 0, i32 1
  %47 = load double, ptr %46, align 8
  %48 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %41, double %45, double %47)
  %49 = getelementptr inbounds %"class.JPH::Vec3", ptr %12, i32 0, i32 0
  %50 = getelementptr inbounds %union.anon.0, ptr %49, i32 0, i32 0
  %51 = getelementptr inbounds { double, double }, ptr %50, i32 0, i32 0
  %52 = extractvalue { double, double } %48, 0
  store double %52, ptr %51, align 16
  %53 = getelementptr inbounds { double, double }, ptr %50, i32 0, i32 1
  %54 = extractvalue { double, double } %48, 1
  store double %54, ptr %53, align 8
  %55 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 0
  %56 = load double, ptr %55, align 16
  %57 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 1
  %58 = load double, ptr %57, align 8
  %59 = call { double, double } @_ZNK3JPH5Mat4411Multiply3x3ENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %39, double %56, double %58)
  %60 = getelementptr inbounds %"class.JPH::Vec3", ptr %11, i32 0, i32 0
  %61 = getelementptr inbounds %union.anon.0, ptr %60, i32 0, i32 0
  %62 = getelementptr inbounds { double, double }, ptr %61, i32 0, i32 0
  %63 = extractvalue { double, double } %59, 0
  store double %63, ptr %62, align 16
  %64 = getelementptr inbounds { double, double }, ptr %61, i32 0, i32 1
  %65 = extractvalue { double, double } %59, 1
  store double %65, ptr %64, align 8
  %66 = load ptr, ptr %5, align 8, !tbaa !5
  %67 = getelementptr inbounds %"class.JPH::SoftBodyUpdateContext", ptr %66, i32 0, i32 4
  %68 = load ptr, ptr %10, align 8, !tbaa !5
  %69 = getelementptr inbounds %"struct.JPH::SoftBodyMotionProperties::CollidingShape", ptr %68, i32 0, i32 11
  %70 = load ptr, ptr %10, align 8, !tbaa !5
  %71 = getelementptr inbounds %"struct.JPH::SoftBodyMotionProperties::CollidingShape", ptr %70, i32 0, i32 13
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %16, ptr align 16 %71, i64 16, i1 false), !tbaa.struct !22
  %72 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 0
  %73 = load double, ptr %72, align 16
  %74 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 1
  %75 = load double, ptr %74, align 8
  %76 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %69, double %73, double %75)
  %77 = getelementptr inbounds %"class.JPH::Vec3", ptr %15, i32 0, i32 0
  %78 = getelementptr inbounds %union.anon.0, ptr %77, i32 0, i32 0
  %79 = getelementptr inbounds { double, double }, ptr %78, i32 0, i32 0
  %80 = extractvalue { double, double } %76, 0
  store double %80, ptr %79, align 16
  %81 = getelementptr inbounds { double, double }, ptr %78, i32 0, i32 1
  %82 = extractvalue { double, double } %76, 1
  store double %82, ptr %81, align 8
  %83 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 0
  %84 = load double, ptr %83, align 16
  %85 = getelementptr inbounds { double, double }, ptr %15, i32 0, i32 1
  %86 = load double, ptr %85, align 8
  %87 = call { double, double } @_ZNK3JPH5Mat4411Multiply3x3ENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %67, double %84, double %86)
  %88 = getelementptr inbounds %"class.JPH::Vec3", ptr %14, i32 0, i32 0
  %89 = getelementptr inbounds %union.anon.0, ptr %88, i32 0, i32 0
  %90 = getelementptr inbounds { double, double }, ptr %89, i32 0, i32 0
  %91 = extractvalue { double, double } %87, 0
  store double %91, ptr %90, align 16
  %92 = getelementptr inbounds { double, double }, ptr %89, i32 0, i32 1
  %93 = extractvalue { double, double } %87, 1
  store double %93, ptr %92, align 8
  %94 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 0
  %95 = load double, ptr %94, align 16
  %96 = getelementptr inbounds { double, double }, ptr %11, i32 0, i32 1
  %97 = load double, ptr %96, align 8
  %98 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 0
  %99 = load double, ptr %98, align 16
  %100 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 1
  %101 = load double, ptr %100, align 8
  call void @_ZN3JPH13BodyInterface27AddLinearAndAngularVelocityERKNS_6BodyIDENS_4Vec3ES4_(ptr noundef nonnull align 8 dereferenceable(24) %35, ptr noundef nonnull align 4 dereferenceable(4) %37, double %95, double %97, double %99, double %101)
  br label %102

102:                                              ; preds = %34, %28
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %103

103:                                              ; preds = %102
  %104 = load ptr, ptr %8, align 8, !tbaa !5
  %105 = getelementptr inbounds %"struct.JPH::SoftBodyMotionProperties::CollidingShape", ptr %104, i32 1
  store ptr %105, ptr %8, align 8, !tbaa !5
  br label %23

106:                                              ; preds = %27
  %107 = getelementptr inbounds %"class.JPH::SoftBodyMotionProperties", ptr %17, i32 0, i32 4
  call void @_ZN3JPH5ArrayINS_24SoftBodyMotionProperties14CollidingShapeENS_12STLAllocatorIS2_EEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %107)
  %108 = getelementptr inbounds %"class.JPH::SoftBodyMotionProperties", ptr %17, i32 0, i32 5
  call void @_ZN3JPH5ArrayINS_24SoftBodyMotionProperties15CollidingSensorENS_12STLAllocatorIS2_EEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %108)
  ret void
}

declare void @_ZN3JPH13BodyInterface27AddLinearAndAngularVelocityERKNS_6BodyIDENS_4Vec3ES4_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4), double, double, double, double) #5

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="128" "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 = { 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 = { "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 = { 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 #7 = { 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, !18, i64 112}
!10 = !{!"_ZTSN3JPH24SoftBodyMotionProperties14CollidingShapeE", !11, i64 0, !12, i64 64, !14, i64 88, !16, i64 92, !17, i64 96, !17, i64 100, !17, i64 104, !17, i64 108, !18, i64 112, !11, i64 128, !19, i64 192, !19, i64 208, !19, i64 224, !19, i64 240}
!11 = !{!"_ZTSN3JPH5Mat44E", !7, i64 0}
!12 = !{!"_ZTSN3JPH5ArrayINS_24SoftBodyMotionProperties9LeafShapeENS_12STLAllocatorIS2_EEEE", !13, i64 0, !13, i64 8, !6, i64 16}
!13 = !{!"long", !7, i64 0}
!14 = !{!"_ZTSN3JPH6BodyIDE", !15, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!"_ZTSN3JPH11EMotionTypeE", !7, i64 0}
!17 = !{!"float", !7, i64 0}
!18 = !{!"bool", !7, i64 0}
!19 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!20 = !{i8 0, i8 2}
!21 = !{}
!22 = !{i64 0, i64 16, !23}
!23 = !{!7, !7, 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"

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH5Mat4411Multiply3x3ENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64), double, double) local_unnamed_addr #0 align 2

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH24SoftBodyMotionProperties25UpdateRigidBodyVelocitiesERKNS_21SoftBodyUpdateContextERNS_13BodyInterfaceE(ptr noundef nonnull align 16 dereferenceable(372) %0, ptr noundef nonnull align 16 dereferenceable(196) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) local_unnamed_addr #2 align 2 {
  %4 = getelementptr inbounds i8, ptr %0, i64 216
  %5 = tail call noundef ptr @_ZN3JPH5ArrayINS_24SoftBodyMotionProperties14CollidingShapeENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %6 = tail call noundef ptr @_ZN3JPH5ArrayINS_24SoftBodyMotionProperties14CollidingShapeENS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %.not26 = icmp eq ptr %5, %6
  br i1 %.not26, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %3
  %7 = getelementptr inbounds i8, ptr %1, i64 32
  br label %9

._crit_edge:                                      ; preds = %31, %3
  tail call void @_ZN3JPH5ArrayINS_24SoftBodyMotionProperties14CollidingShapeENS_12STLAllocatorIS2_EEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %8 = getelementptr inbounds i8, ptr %0, i64 240
  tail call void @_ZN3JPH5ArrayINS_24SoftBodyMotionProperties15CollidingSensorENS_12STLAllocatorIS2_EEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %8)
  ret void

9:                                                ; preds = %.lr.ph, %31
  %.027 = phi ptr [ %5, %.lr.ph ], [ %32, %31 ]
  %10 = getelementptr inbounds i8, ptr %.027, i64 112
  %11 = load i8, ptr %10, align 16, !tbaa !5, !range !19, !noundef !20
  %12 = trunc nuw i8 %11 to i1
  br i1 %12, label %13, label %31

13:                                               ; preds = %9
  %14 = getelementptr inbounds i8, ptr %.027, i64 88
  %15 = getelementptr inbounds i8, ptr %.027, i64 192
  %16 = getelementptr inbounds i8, ptr %.027, i64 224
  %.sroa.05.0.copyload = load double, ptr %16, align 16
  %.sroa.26.0..sroa_idx = getelementptr inbounds i8, ptr %.027, i64 232
  %.sroa.26.0.copyload = load double, ptr %.sroa.26.0..sroa_idx, align 8, !tbaa !21
  %17 = tail call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %15, double %.sroa.05.0.copyload, double %.sroa.26.0.copyload)
  %18 = extractvalue { double, double } %17, 0
  %19 = extractvalue { double, double } %17, 1
  %20 = tail call { double, double } @_ZNK3JPH5Mat4411Multiply3x3ENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %7, double %18, double %19)
  %21 = extractvalue { double, double } %20, 0
  %22 = extractvalue { double, double } %20, 1
  %23 = getelementptr inbounds i8, ptr %.027, i64 208
  %24 = getelementptr inbounds i8, ptr %.027, i64 240
  %.sroa.0.0.copyload = load double, ptr %24, align 16
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %.027, i64 248
  %.sroa.2.0.copyload = load double, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !21
  %25 = tail call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %23, double %.sroa.0.0.copyload, double %.sroa.2.0.copyload)
  %26 = extractvalue { double, double } %25, 0
  %27 = extractvalue { double, double } %25, 1
  %28 = tail call { double, double } @_ZNK3JPH5Mat4411Multiply3x3ENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %7, double %26, double %27)
  %29 = extractvalue { double, double } %28, 0
  %30 = extractvalue { double, double } %28, 1
  tail call void @_ZN3JPH13BodyInterface27AddLinearAndAngularVelocityERKNS_6BodyIDENS_4Vec3ES4_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 4 dereferenceable(4) %14, double %21, double %22, double %29, double %30)
  br label %31

31:                                               ; preds = %13, %9
  %32 = getelementptr inbounds i8, ptr %.027, i64 256
  %.not = icmp eq ptr %32, %6
  br i1 %.not, label %._crit_edge, label %9
}

declare void @_ZN3JPH13BodyInterface27AddLinearAndAngularVelocityERKNS_6BodyIDENS_4Vec3ES4_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4), double, double, double, double) local_unnamed_addr #3

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

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

attributes #0 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="128" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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" }

!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, !17, i64 112}
!6 = !{!"_ZTSN3JPH24SoftBodyMotionProperties14CollidingShapeE", !7, i64 0, !10, i64 64, !13, i64 88, !15, i64 92, !16, i64 96, !16, i64 100, !16, i64 104, !16, i64 108, !17, i64 112, !7, i64 128, !18, i64 192, !18, i64 208, !18, i64 224, !18, i64 240}
!7 = !{!"_ZTSN3JPH5Mat44E", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN3JPH5ArrayINS_24SoftBodyMotionProperties9LeafShapeENS_12STLAllocatorIS2_EEEE", !11, i64 0, !11, i64 8, !12, i64 16}
!11 = !{!"long", !8, i64 0}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!"_ZTSN3JPH6BodyIDE", !14, i64 0}
!14 = !{!"int", !8, i64 0}
!15 = !{!"_ZTSN3JPH11EMotionTypeE", !8, i64 0}
!16 = !{!"float", !8, i64 0}
!17 = !{!"bool", !8, i64 0}
!18 = !{!"_ZTSN3JPH4Vec3E", !8, i64 0}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{!8, !8, i64 0}


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