; LLVM IR from jrouwe/JoltPhysics :: Jolt/Physics/Body (BodyInterface)

; 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::BodyLockRead" = type { %"class.JPH::BodyLockBase.11" }
%"class.JPH::BodyLockBase.11" = type { ptr, ptr, ptr }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::Quat" = type { %"class.JPH::Vec4" }
%"class.JPH::Vec4" = type { %union.anon.6 }
%union.anon.6 = type { <4 x float> }
%"class.JPH::BodyInterface" = type { ptr, ptr, ptr }

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

declare i32 @__gxx_personality_v0(...)

; 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 uwtable
declare dso_local void @_ZN3JPH12BodyLockReadCI2NS_12BodyLockBaseILb0EKNS_4BodyEEEERKNS_17BodyLockInterfaceERKNS_6BodyIDE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #2 align 2

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Body11GetPositionEv(ptr noundef nonnull align 16 dereferenceable(122)) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122)) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3JPH13BodyInterface22GetPositionAndRotationERKNS_6BodyIDERNS_4Vec3ERNS_4QuatE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(4) %1, ptr noundef nonnull align 16 dereferenceable(16) %2, ptr noundef nonnull align 16 dereferenceable(16) %3) #5 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"class.JPH::BodyLockRead", align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca %"class.JPH::Vec3", align 16
  %14 = alloca %"class.JPH::Quat", align 16
  %15 = alloca %"class.JPH::Vec3", align 16
  %16 = alloca %"class.JPH::Quat", align 16
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  %17 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #8
  %18 = getelementptr inbounds %"class.JPH::BodyInterface", ptr %17, i32 0, i32 0
  %19 = load ptr, ptr %18, align 8, !tbaa !9
  %20 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN3JPH12BodyLockReadCI2NS_12BodyLockBaseILb0EKNS_4BodyEEEERKNS_17BodyLockInterfaceERKNS_6BodyIDE(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 4 dereferenceable(4) %20)
  %21 = invoke noundef zeroext i1 @_ZNK3JPH12BodyLockBaseILb0EKNS_4BodyEE9SucceededEv(ptr noundef nonnull align 8 dereferenceable(24) %9)
          to label %22 unwind label %47

22:                                               ; preds = %4
  br i1 %21, label %23, label %64

23:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %24 = invoke noundef nonnull align 16 dereferenceable(122) ptr @_ZNK3JPH12BodyLockBaseILb0EKNS_4BodyEE7GetBodyEv(ptr noundef nonnull align 8 dereferenceable(24) %9)
          to label %25 unwind label %51

25:                                               ; preds = %23
  store ptr %24, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #8
  %26 = load ptr, ptr %12, align 8, !tbaa !5
  %27 = invoke { double, double } @_ZNK3JPH4Body11GetPositionEv(ptr noundef nonnull align 16 dereferenceable(122) %26)
          to label %28 unwind label %55

28:                                               ; preds = %25
  %29 = getelementptr inbounds %"class.JPH::Vec3", ptr %13, i32 0, i32 0
  %30 = getelementptr inbounds %union.anon, ptr %29, i32 0, i32 0
  %31 = getelementptr inbounds { double, double }, ptr %30, i32 0, i32 0
  %32 = extractvalue { double, double } %27, 0
  store double %32, ptr %31, align 16
  %33 = getelementptr inbounds { double, double }, ptr %30, i32 0, i32 1
  %34 = extractvalue { double, double } %27, 1
  store double %34, ptr %33, align 8
  %35 = load ptr, ptr %7, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %35, ptr align 16 %13, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #8
  %36 = load ptr, ptr %12, align 8, !tbaa !5
  %37 = invoke { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122) %36)
          to label %38 unwind label %59

38:                                               ; preds = %28
  %39 = getelementptr inbounds %"class.JPH::Quat", ptr %14, i32 0, i32 0
  %40 = getelementptr inbounds %"class.JPH::Vec4", ptr %39, i32 0, i32 0
  %41 = getelementptr inbounds %union.anon.6, ptr %40, i32 0, i32 0
  %42 = getelementptr inbounds { double, double }, ptr %41, i32 0, i32 0
  %43 = extractvalue { double, double } %37, 0
  store double %43, ptr %42, align 16
  %44 = getelementptr inbounds { double, double }, ptr %41, i32 0, i32 1
  %45 = extractvalue { double, double } %37, 1
  store double %45, ptr %44, align 8
  %46 = load ptr, ptr %8, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %46, ptr align 16 %14, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  br label %92

47:                                               ; preds = %4
  %48 = landingpad { ptr, i32 }
          cleanup
  %49 = extractvalue { ptr, i32 } %48, 0
  store ptr %49, ptr %10, align 8
  %50 = extractvalue { ptr, i32 } %48, 1
  store i32 %50, ptr %11, align 4
  br label %93

51:                                               ; preds = %23
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %10, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %11, align 4
  br label %63

55:                                               ; preds = %25
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %10, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #8
  br label %63

59:                                               ; preds = %28
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %10, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #8
  br label %63

63:                                               ; preds = %59, %55, %51
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  br label %93

64:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #8
  %65 = invoke { double, double } @_ZN3JPH4Vec35sZeroEv()
          to label %66 unwind label %84

66:                                               ; preds = %64
  %67 = getelementptr inbounds %"class.JPH::Vec3", ptr %15, i32 0, i32 0
  %68 = getelementptr inbounds %union.anon, ptr %67, i32 0, i32 0
  %69 = getelementptr inbounds { double, double }, ptr %68, i32 0, i32 0
  %70 = extractvalue { double, double } %65, 0
  store double %70, ptr %69, align 16
  %71 = getelementptr inbounds { double, double }, ptr %68, i32 0, i32 1
  %72 = extractvalue { double, double } %65, 1
  store double %72, ptr %71, align 8
  %73 = load ptr, ptr %7, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %73, ptr align 16 %15, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #8
  %74 = invoke { double, double } @_ZN3JPH4Quat9sIdentityEv()
          to label %75 unwind label %88

75:                                               ; preds = %66
  %76 = getelementptr inbounds %"class.JPH::Quat", ptr %16, i32 0, i32 0
  %77 = getelementptr inbounds %"class.JPH::Vec4", ptr %76, i32 0, i32 0
  %78 = getelementptr inbounds %union.anon.6, ptr %77, i32 0, i32 0
  %79 = getelementptr inbounds { double, double }, ptr %78, i32 0, i32 0
  %80 = extractvalue { double, double } %74, 0
  store double %80, ptr %79, align 16
  %81 = getelementptr inbounds { double, double }, ptr %78, i32 0, i32 1
  %82 = extractvalue { double, double } %74, 1
  store double %82, ptr %81, align 8
  %83 = load ptr, ptr %8, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %83, ptr align 16 %16, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #8
  br label %92

84:                                               ; preds = %64
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %10, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #8
  br label %93

88:                                               ; preds = %66
  %89 = landingpad { ptr, i32 }
          cleanup
  %90 = extractvalue { ptr, i32 } %89, 0
  store ptr %90, ptr %10, align 8
  %91 = extractvalue { ptr, i32 } %89, 1
  store i32 %91, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #8
  br label %93

92:                                               ; preds = %75, %38
  call void @_ZN3JPH12BodyLockBaseILb0EKNS_4BodyEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #8
  ret void

93:                                               ; preds = %88, %84, %63, %47
  call void @_ZN3JPH12BodyLockBaseILb0EKNS_4BodyEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #8
  br label %94

94:                                               ; preds = %93
  %95 = load ptr, ptr %10, align 8
  %96 = load i32, ptr %11, align 4
  %97 = insertvalue { ptr, i32 } poison, ptr %95, 0
  %98 = insertvalue { ptr, i32 } %97, i32 %96, 1
  resume { ptr, i32 } %98
}

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Vec35sZeroEv() #6 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Quat9sIdentityEv() #7 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 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 = { 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 #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 = { 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 #7 = { alwaysinline 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 #8 = { 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, !6, i64 0}
!10 = !{!"_ZTSN3JPH13BodyInterfaceE", !6, i64 0, !6, i64 8, !6, i64 16}
!11 = !{i64 0, i64 16, !12}
!12 = !{!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"

%"class.JPH::BodyLockRead" = type { %"class.JPH::BodyLockBase.11" }
%"class.JPH::BodyLockBase.11" = type { ptr, ptr, ptr }

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

declare i32 @__gxx_personality_v0(...)

; 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 uwtable
declare dso_local void @_ZN3JPH12BodyLockReadCI2NS_12BodyLockBaseILb0EKNS_4BodyEEEERKNS_17BodyLockInterfaceERKNS_6BodyIDE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #1 align 2

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Body11GetPositionEv(ptr noundef nonnull align 16 dereferenceable(122)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3JPH13BodyInterface22GetPositionAndRotationERKNS_6BodyIDERNS_4Vec3ERNS_4QuatE(ptr nocapture noundef nonnull readonly align 8 dereferenceable(24) %0, ptr noundef nonnull align 4 dereferenceable(4) %1, ptr nocapture noundef nonnull writeonly align 16 dereferenceable(16) %2, ptr nocapture noundef nonnull writeonly align 16 dereferenceable(16) %3) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.JPH::BodyLockRead", align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #7
  %6 = load ptr, ptr %0, align 8, !tbaa !5
  call void @_ZN3JPH12BodyLockReadCI2NS_12BodyLockBaseILb0EKNS_4BodyEEEERKNS_17BodyLockInterfaceERKNS_6BodyIDE(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %7 = call noundef zeroext i1 @_ZNK3JPH12BodyLockBaseILb0EKNS_4BodyEE9SucceededEv(ptr noundef nonnull align 8 dereferenceable(24) %5)
  br i1 %7, label %8, label %22

8:                                                ; preds = %4
  %9 = invoke noundef nonnull align 16 dereferenceable(122) ptr @_ZNK3JPH12BodyLockBaseILb0EKNS_4BodyEE7GetBodyEv(ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %10 unwind label %16

10:                                               ; preds = %8
  %11 = invoke { double, double } @_ZNK3JPH4Body11GetPositionEv(ptr noundef nonnull align 16 dereferenceable(122) %9)
          to label %12 unwind label %18

12:                                               ; preds = %10
  %13 = extractvalue { double, double } %11, 0
  %14 = extractvalue { double, double } %11, 1
  store double %13, ptr %2, align 16
  %.sroa.56.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 8
  store double %14, ptr %.sroa.56.0..sroa_idx, align 8, !tbaa !10
  %15 = invoke { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122) %9)
          to label %32 unwind label %20

16:                                               ; preds = %8
  %17 = landingpad { ptr, i32 }
          cleanup
  br label %35

18:                                               ; preds = %10
  %19 = landingpad { ptr, i32 }
          cleanup
  br label %35

20:                                               ; preds = %12
  %21 = landingpad { ptr, i32 }
          cleanup
  br label %35

22:                                               ; preds = %4
  %23 = invoke { double, double } @_ZN3JPH4Vec35sZeroEv()
          to label %24 unwind label %28

24:                                               ; preds = %22
  %25 = extractvalue { double, double } %23, 0
  %26 = extractvalue { double, double } %23, 1
  store double %25, ptr %2, align 16
  %.sroa.52.0..sroa_idx = getelementptr inbounds i8, ptr %2, i64 8
  store double %26, ptr %.sroa.52.0..sroa_idx, align 8, !tbaa !10
  %27 = invoke { double, double } @_ZN3JPH4Quat9sIdentityEv()
          to label %32 unwind label %30

28:                                               ; preds = %22
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %35

30:                                               ; preds = %24
  %31 = landingpad { ptr, i32 }
          cleanup
  br label %35

32:                                               ; preds = %24, %12
  %.sink = phi { double, double } [ %15, %12 ], [ %27, %24 ]
  %33 = extractvalue { double, double } %.sink, 0
  %34 = extractvalue { double, double } %.sink, 1
  store double %33, ptr %3, align 16
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %3, i64 8
  store double %34, ptr %.sroa.5.0..sroa_idx, align 8, !tbaa !10
  call void @_ZN3JPH12BodyLockBaseILb0EKNS_4BodyEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #7
  ret void

35:                                               ; preds = %16, %18, %20, %30, %28
  %.pn.pn = phi { ptr, i32 } [ %31, %30 ], [ %29, %28 ], [ %21, %20 ], [ %19, %18 ], [ %17, %16 ]
  call void @_ZN3JPH12BodyLockBaseILb0EKNS_4BodyEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #7
  resume { ptr, i32 } %.pn.pn
}

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Vec35sZeroEv() local_unnamed_addr #5 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Quat9sIdentityEv() local_unnamed_addr #6 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { 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 #6 = { alwaysinline 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, !7, i64 0}
!6 = !{!"_ZTSN3JPH13BodyInterfaceE", !7, i64 0, !7, i64 8, !7, i64 16}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!8, !8, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass