; LLVM IR from zig-gamedev/zphysics :: libs/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", %"class.JPH::RefConst", %"class.JPH::Array", %"class.JPH::Array.1", %"class.JPH::Array.4", %"class.JPH::AABox", %"class.JPH::AABox", i32, float, float, i8, i8, i8, 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::AABox" = type { %"class.JPH::Vec3", %"class.JPH::Vec3" }
%"struct.JPH::SoftBodyMotionProperties::CollidingShape" = type { %"class.JPH::Mat44", %"class.JPH::RefConst.61", %"class.JPH::BodyID", i8, i8, float, float, float, float, i8, %"class.JPH::Mat44", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3" }
%"class.JPH::RefConst.61" = type { ptr }
%"class.JPH::BodyID" = type { i32 }
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::SoftBodyUpdateContext" = type <{ ptr, ptr, ptr, [8 x i8], %"class.JPH::Mat44", %"class.JPH::Vec3", %"class.JPH::Vec3", float, float, %"struct.std::atomic.44", %"struct.std::atomic", %"struct.std::atomic", %"struct.std::atomic", %"struct.std::atomic", %"struct.std::atomic", %"class.JPH::Vec3", i32, [12 x i8] }>
%"struct.std::atomic.44" = type { i32 }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = 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(352) %0, ptr noundef nonnull align 16 dereferenceable(180) %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 3
  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 9
  %32 = load i8, ptr %31, align 16, !tbaa !9, !range !19, !noundef !20
  %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 11
  %42 = load ptr, ptr %10, align 8, !tbaa !5
  %43 = getelementptr inbounds %"struct.JPH::SoftBodyMotionProperties::CollidingShape", ptr %42, i32 0, i32 13
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %13, ptr align 16 %43, i64 16, i1 false), !tbaa.struct !21
  %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 12
  %70 = load ptr, ptr %10, align 8, !tbaa !5
  %71 = getelementptr inbounds %"struct.JPH::SoftBodyMotionProperties::CollidingShape", ptr %70, i32 0, i32 14
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %16, ptr align 16 %71, i64 16, i1 false), !tbaa.struct !21
  %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 3
  call void @_ZN3JPH5ArrayINS_24SoftBodyMotionProperties14CollidingShapeENS_12STLAllocatorIS2_EEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %107)
  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

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, !16, i64 96}
!10 = !{!"_ZTSN3JPH24SoftBodyMotionProperties14CollidingShapeE", !11, i64 0, !12, i64 64, !13, i64 72, !15, i64 76, !16, i64 77, !17, i64 80, !17, i64 84, !17, i64 88, !17, i64 92, !16, i64 96, !11, i64 112, !18, i64 176, !18, i64 192, !18, i64 208, !18, i64 224}
!11 = !{!"_ZTSN3JPH5Mat44E", !7, i64 0}
!12 = !{!"_ZTSN3JPH8RefConstINS_5ShapeEEE", !6, i64 0}
!13 = !{!"_ZTSN3JPH6BodyIDE", !14, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!"_ZTSN3JPH11EMotionTypeE", !7, i64 0}
!16 = !{!"bool", !7, i64 0}
!17 = !{!"float", !7, i64 0}
!18 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{i64 0, i64 16, !22}
!22 = !{!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(352) %0, ptr noundef nonnull align 16 dereferenceable(180) %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 %8

._crit_edge:                                      ; preds = %30, %3
  tail call void @_ZN3JPH5ArrayINS_24SoftBodyMotionProperties14CollidingShapeENS_12STLAllocatorIS2_EEE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  ret void

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

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

30:                                               ; preds = %12, %8
  %31 = getelementptr inbounds i8, ptr %.027, i64 240
  %.not = icmp eq ptr %31, %6
  br i1 %.not, label %._crit_edge, label %8
}

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

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, !15, i64 96}
!6 = !{!"_ZTSN3JPH24SoftBodyMotionProperties14CollidingShapeE", !7, i64 0, !10, i64 64, !12, i64 72, !14, i64 76, !15, i64 77, !16, i64 80, !16, i64 84, !16, i64 88, !16, i64 92, !15, i64 96, !7, i64 112, !17, i64 176, !17, i64 192, !17, i64 208, !17, i64 224}
!7 = !{!"_ZTSN3JPH5Mat44E", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN3JPH8RefConstINS_5ShapeEEE", !11, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"_ZTSN3JPH6BodyIDE", !13, i64 0}
!13 = !{!"int", !8, i64 0}
!14 = !{!"_ZTSN3JPH11EMotionTypeE", !8, i64 0}
!15 = !{!"bool", !8, i64 0}
!16 = !{!"float", !8, i64 0}
!17 = !{!"_ZTSN3JPH4Vec3E", !8, i64 0}
!18 = !{i8 0, i8 2}
!19 = !{}
!20 = !{!8, !8, i64 0}


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