; LLVM IR from jrouwe/JoltPhysics :: Jolt/Physics/Body/Body.ll (ZN3JPH4Body13SetMotionTypeENS_11EMotionTypeE)

; 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"

%"struct.JPH::AssertLastParam" = type { i8 }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::Body" = type <{ %"class.JPH::Vec3", %"class.JPH::Quat", %"class.JPH::AABox", %"class.JPH::RefConst", ptr, i64, %"class.JPH::CollisionGroup", float, float, %"class.JPH::BodyID", i16, i8, %"class.JPH::BroadPhaseLayer", i8, %"struct.std::atomic.2", [6 x i8] }>
%"class.JPH::Quat" = type { %"class.JPH::Vec4" }
%"class.JPH::Vec4" = type { %union.anon.0 }
%union.anon.0 = type { <4 x float> }
%"class.JPH::AABox" = type { %"class.JPH::Vec3", %"class.JPH::Vec3" }
%"class.JPH::RefConst" = type { ptr }
%"class.JPH::CollisionGroup" = type { %"class.JPH::RefConst.1", i32, i32 }
%"class.JPH::RefConst.1" = type { ptr }
%"class.JPH::BodyID" = type { i32 }
%"class.JPH::BroadPhaseLayer" = type { i8 }
%"struct.std::atomic.2" = type { %"struct.std::__atomic_base.3" }
%"struct.std::__atomic_base.3" = type { i8 }
%"class.JPH::MotionProperties" = 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, [10 x i8] }>
%"class.JPH::Float3" = type { float, float, float }
%"class.JPH::Sphere" = type { %"class.JPH::Float3", float }

@.str = external hidden unnamed_addr constant [68 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [111 x i8], align 1

; 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: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Vec35sZeroEv() #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH4Body13SetMotionTypeENS_11EMotionTypeE(ptr noundef nonnull align 16 dereferenceable(122) %0, i8 noundef zeroext %1) #2 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca i8, align 1
  %5 = alloca %"struct.JPH::AssertLastParam", align 1
  %6 = alloca %"struct.JPH::AssertLastParam", align 1
  %7 = alloca %"struct.JPH::AssertLastParam", align 1
  %8 = alloca %"class.JPH::Vec3", align 16
  %9 = alloca %"class.JPH::Vec3", align 16
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i8 %1, ptr %4, align 1, !tbaa !9
  %10 = load ptr, ptr %3, align 8
  %11 = getelementptr inbounds %"class.JPH::Body", ptr %10, i32 0, i32 13
  %12 = load i8, ptr %11, align 8, !tbaa !11
  %13 = load i8, ptr %4, align 1, !tbaa !9
  %14 = icmp eq i8 %12, %13
  br i1 %14, label %15, label %16

15:                                               ; preds = %2
  br label %87

16:                                               ; preds = %2
  br label %17

17:                                               ; preds = %16
  %18 = load i8, ptr %4, align 1, !tbaa !9
  %19 = icmp eq i8 %18, 0
  br i1 %19, label %27, label %20

20:                                               ; preds = %17
  %21 = getelementptr inbounds %"class.JPH::Body", ptr %10, i32 0, i32 4
  %22 = load ptr, ptr %21, align 8, !tbaa !29
  %23 = icmp ne ptr %22, null
  br i1 %23, label %27, label %24

24:                                               ; preds = %20
  %25 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jS1_NS_15AssertLastParamE(ptr noundef @.str, ptr noundef @.str.3, i32 noundef 42, ptr noundef @.str.4)
  br i1 %25, label %26, label %27

26:                                               ; preds = %24
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #7, !srcloc !30
  br label %27

27:                                               ; preds = %26, %24, %20, %17
  br label %28

28:                                               ; preds = %27
  br label %29

29:                                               ; preds = %28
  %30 = load i8, ptr %4, align 1, !tbaa !9
  %31 = icmp ne i8 %30, 0
  br i1 %31, label %37, label %32

32:                                               ; preds = %29
  %33 = call noundef zeroext i1 @_ZNK3JPH4Body8IsActiveEv(ptr noundef nonnull align 16 dereferenceable(122) %10)
  br i1 %33, label %34, label %37

34:                                               ; preds = %32
  %35 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jS1_NS_15AssertLastParamE(ptr noundef @.str.5, ptr noundef @.str.3, i32 noundef 43, ptr noundef @.str.6)
  br i1 %35, label %36, label %37

36:                                               ; preds = %34
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #7, !srcloc !31
  br label %37

37:                                               ; preds = %36, %34, %32, %29
  br label %38

38:                                               ; preds = %37
  br label %39

39:                                               ; preds = %38
  %40 = load i8, ptr %4, align 1, !tbaa !9
  %41 = icmp eq i8 %40, 2
  br i1 %41, label %47, label %42

42:                                               ; preds = %39
  %43 = call noundef zeroext i1 @_ZNK3JPH4Body10IsSoftBodyEv(ptr noundef nonnull align 16 dereferenceable(122) %10)
  br i1 %43, label %44, label %47

44:                                               ; preds = %42
  %45 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jS1_NS_15AssertLastParamE(ptr noundef @.str.7, ptr noundef @.str.3, i32 noundef 44, ptr noundef @.str.8)
  br i1 %45, label %46, label %47

46:                                               ; preds = %44
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #7, !srcloc !32
  br label %47

47:                                               ; preds = %46, %44, %42, %39
  br label %48

48:                                               ; preds = %47
  %49 = load i8, ptr %4, align 1, !tbaa !9
  %50 = getelementptr inbounds %"class.JPH::Body", ptr %10, i32 0, i32 13
  store i8 %49, ptr %50, align 8, !tbaa !11
  %51 = getelementptr inbounds %"class.JPH::Body", ptr %10, i32 0, i32 4
  %52 = load ptr, ptr %51, align 8, !tbaa !29
  %53 = icmp ne ptr %52, null
  br i1 %53, label %54, label %87

54:                                               ; preds = %48
  %55 = load i8, ptr %4, align 1, !tbaa !9
  %56 = getelementptr inbounds %"class.JPH::Body", ptr %10, i32 0, i32 4
  %57 = load ptr, ptr %56, align 8, !tbaa !29
  %58 = getelementptr inbounds %"class.JPH::MotionProperties", ptr %57, i32 0, i32 23
  store i8 %55, ptr %58, align 1, !tbaa !33
  %59 = load i8, ptr %4, align 1, !tbaa !9
  switch i8 %59, label %86 [
    i8 0, label %60
    i8 1, label %81
    i8 2, label %86
  ]

60:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #7
  %61 = call { double, double } @_ZN3JPH4Vec35sZeroEv()
  %62 = getelementptr inbounds %"class.JPH::Vec3", ptr %8, i32 0, i32 0
  %63 = getelementptr inbounds %union.anon, ptr %62, i32 0, i32 0
  %64 = getelementptr inbounds { double, double }, ptr %63, i32 0, i32 0
  %65 = extractvalue { double, double } %61, 0
  store double %65, ptr %64, align 16
  %66 = getelementptr inbounds { double, double }, ptr %63, i32 0, i32 1
  %67 = extractvalue { double, double } %61, 1
  store double %67, ptr %66, align 8
  %68 = getelementptr inbounds %"class.JPH::Body", ptr %10, i32 0, i32 4
  %69 = load ptr, ptr %68, align 8, !tbaa !29
  %70 = getelementptr inbounds %"class.JPH::MotionProperties", ptr %69, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %70, ptr align 16 %8, i64 16, i1 false), !tbaa.struct !39
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #7
  %71 = call { double, double } @_ZN3JPH4Vec35sZeroEv()
  %72 = getelementptr inbounds %"class.JPH::Vec3", ptr %9, i32 0, i32 0
  %73 = getelementptr inbounds %union.anon, ptr %72, i32 0, i32 0
  %74 = getelementptr inbounds { double, double }, ptr %73, i32 0, i32 0
  %75 = extractvalue { double, double } %71, 0
  store double %75, ptr %74, align 16
  %76 = getelementptr inbounds { double, double }, ptr %73, i32 0, i32 1
  %77 = extractvalue { double, double } %71, 1
  store double %77, ptr %76, align 8
  %78 = getelementptr inbounds %"class.JPH::Body", ptr %10, i32 0, i32 4
  %79 = load ptr, ptr %78, align 8, !tbaa !29
  %80 = getelementptr inbounds %"class.JPH::MotionProperties", ptr %79, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %80, ptr align 16 %9, i64 16, i1 false), !tbaa.struct !39
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #7
  br label %81

81:                                               ; preds = %60, %54
  %82 = getelementptr inbounds %"class.JPH::Body", ptr %10, i32 0, i32 4
  %83 = load ptr, ptr %82, align 8, !tbaa !29
  call void @_ZN3JPH16MotionProperties10ResetForceEv(ptr noundef nonnull align 16 dereferenceable(182) %83)
  %84 = getelementptr inbounds %"class.JPH::Body", ptr %10, i32 0, i32 4
  %85 = load ptr, ptr %84, align 8, !tbaa !29
  call void @_ZN3JPH16MotionProperties11ResetTorqueEv(ptr noundef nonnull align 16 dereferenceable(182) %85)
  br label %86

86:                                               ; preds = %81, %54, %54
  br label %87

87:                                               ; preds = %86, %48, %15
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jS1_NS_15AssertLastParamE(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH4Body8IsActiveEv(ptr noundef nonnull align 16 dereferenceable(122)) #4 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH4Body10IsSoftBodyEv(ptr noundef nonnull align 16 dereferenceable(122)) #4 align 2

; 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) #5

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN3JPH16MotionProperties10ResetForceEv(ptr noundef nonnull align 16 dereferenceable(182)) #6 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN3JPH16MotionProperties11ResetTorqueEv(ptr noundef nonnull align 16 dereferenceable(182)) #6 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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, !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 = !{!"_ZTSN3JPH11EMotionTypeE", !7, i64 0}
!11 = !{!12, !10, i64 120}
!12 = !{!"_ZTSN3JPH4BodyE", !13, i64 0, !14, i64 16, !16, i64 32, !17, i64 64, !6, i64 72, !18, i64 80, !19, i64 88, !22, i64 104, !22, i64 108, !23, i64 112, !24, i64 116, !25, i64 118, !26, i64 119, !10, i64 120, !27, i64 121}
!13 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!14 = !{!"_ZTSN3JPH4QuatE", !15, i64 0}
!15 = !{!"_ZTSN3JPH4Vec4E", !7, i64 0}
!16 = !{!"_ZTSN3JPH5AABoxE", !13, i64 0, !13, i64 16}
!17 = !{!"_ZTSN3JPH8RefConstINS_5ShapeEEE", !6, i64 0}
!18 = !{!"long", !7, i64 0}
!19 = !{!"_ZTSN3JPH14CollisionGroupE", !20, i64 0, !21, i64 8, !21, i64 12}
!20 = !{!"_ZTSN3JPH8RefConstINS_11GroupFilterEEE", !6, i64 0}
!21 = !{!"int", !7, i64 0}
!22 = !{!"float", !7, i64 0}
!23 = !{!"_ZTSN3JPH6BodyIDE", !21, i64 0}
!24 = !{!"short", !7, i64 0}
!25 = !{!"_ZTSN3JPH9EBodyTypeE", !7, i64 0}
!26 = !{!"_ZTSN3JPH15BroadPhaseLayerE", !7, i64 0}
!27 = !{!"_ZTSSt6atomicIhE", !28, i64 0}
!28 = !{!"_ZTSSt13__atomic_baseIhE", !7, i64 0}
!29 = !{!12, !6, i64 72}
!30 = !{i64 2158439575}
!31 = !{i64 2158439985}
!32 = !{i64 2158440490}
!33 = !{!34, !10, i64 181}
!34 = !{!"_ZTSN3JPH16MotionPropertiesE", !13, i64 0, !13, i64 16, !13, i64 32, !14, i64 48, !35, i64 64, !35, i64 76, !22, i64 88, !22, i64 92, !22, i64 96, !22, i64 100, !22, i64 104, !22, i64 108, !21, i64 112, !21, i64 116, !36, i64 120, !37, i64 121, !38, i64 122, !7, i64 123, !7, i64 124, !7, i64 128, !22, i64 176, !25, i64 180, !10, i64 181}
!35 = !{!"_ZTSN3JPH6Float3E", !22, i64 0, !22, i64 4, !22, i64 8}
!36 = !{!"_ZTSN3JPH14EMotionQualityE", !7, i64 0}
!37 = !{!"bool", !7, i64 0}
!38 = !{!"_ZTSN3JPH12EAllowedDOFsE", !7, i64 0}
!39 = !{i64 0, i64 16, !40}
!40 = !{!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"

@.str = external hidden unnamed_addr constant [68 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [79 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [111 x i8], align 1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH4Body13SetMotionTypeENS_11EMotionTypeE(ptr noundef nonnull align 16 dereferenceable(122) %0, i8 noundef zeroext %1) local_unnamed_addr #1 align 2 {
  %3 = getelementptr inbounds i8, ptr %0, i64 120
  %4 = load i8, ptr %3, align 8, !tbaa !5
  %5 = icmp eq i8 %4, %1
  br i1 %5, label %41, label %6

6:                                                ; preds = %2
  %7 = icmp ne i8 %1, 0
  %8 = getelementptr inbounds i8, ptr %0, i64 72
  %9 = load ptr, ptr %8, align 8
  %.not = icmp eq ptr %9, null
  %or.cond = select i1 %7, i1 %.not, i1 false
  br i1 %or.cond, label %10, label %13

10:                                               ; preds = %6
  %11 = tail call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jS1_NS_15AssertLastParamE(ptr noundef nonnull @.str, ptr noundef nonnull @.str.3, i32 noundef 42, ptr noundef nonnull @.str.4)
  br i1 %11, label %12, label %13

12:                                               ; preds = %10
  tail call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #5, !srcloc !27
  br label %13

13:                                               ; preds = %12, %10, %6
  switch i8 %1, label %19 [
    i8 0, label %14
    i8 2, label %24
  ]

14:                                               ; preds = %13
  %15 = tail call noundef zeroext i1 @_ZNK3JPH4Body8IsActiveEv(ptr noundef nonnull align 16 dereferenceable(122) %0)
  br i1 %15, label %16, label %19

16:                                               ; preds = %14
  %17 = tail call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jS1_NS_15AssertLastParamE(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.3, i32 noundef 43, ptr noundef nonnull @.str.6)
  br i1 %17, label %18, label %19

18:                                               ; preds = %16
  tail call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #5, !srcloc !28
  br label %19

19:                                               ; preds = %14, %16, %18, %13
  %20 = tail call noundef zeroext i1 @_ZNK3JPH4Body10IsSoftBodyEv(ptr noundef nonnull align 16 dereferenceable(122) %0)
  br i1 %20, label %21, label %24

21:                                               ; preds = %19
  %22 = tail call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jS1_NS_15AssertLastParamE(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.3, i32 noundef 44, ptr noundef nonnull @.str.8)
  br i1 %22, label %23, label %24

23:                                               ; preds = %21
  tail call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #5, !srcloc !29
  br label %24

24:                                               ; preds = %13, %19, %21, %23
  store i8 %1, ptr %3, align 8, !tbaa !5
  %25 = load ptr, ptr %8, align 8, !tbaa !30
  %.not11 = icmp eq ptr %25, null
  br i1 %.not11, label %41, label %26

26:                                               ; preds = %24
  %27 = getelementptr inbounds i8, ptr %25, i64 181
  store i8 %1, ptr %27, align 1, !tbaa !31
  switch i8 %1, label %41 [
    i8 0, label %28
    i8 1, label %38
  ]

28:                                               ; preds = %26
  %29 = tail call { double, double } @_ZN3JPH4Vec35sZeroEv()
  %30 = extractvalue { double, double } %29, 0
  %31 = extractvalue { double, double } %29, 1
  %32 = load ptr, ptr %8, align 8, !tbaa !30
  store double %30, ptr %32, align 16
  %.sroa.42.0..sroa_idx = getelementptr inbounds i8, ptr %32, i64 8
  store double %31, ptr %.sroa.42.0..sroa_idx, align 8, !tbaa !37
  %33 = tail call { double, double } @_ZN3JPH4Vec35sZeroEv()
  %34 = extractvalue { double, double } %33, 0
  %35 = extractvalue { double, double } %33, 1
  %36 = load ptr, ptr %8, align 8, !tbaa !30
  %37 = getelementptr inbounds i8, ptr %36, i64 16
  store double %34, ptr %37, align 16
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %36, i64 24
  store double %35, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !37
  br label %38

38:                                               ; preds = %28, %26
  %39 = load ptr, ptr %8, align 8, !tbaa !30
  tail call void @_ZN3JPH16MotionProperties10ResetForceEv(ptr noundef nonnull align 16 dereferenceable(182) %39)
  %40 = load ptr, ptr %8, align 8, !tbaa !30
  tail call void @_ZN3JPH16MotionProperties11ResetTorqueEv(ptr noundef nonnull align 16 dereferenceable(182) %40)
  br label %41

41:                                               ; preds = %26, %38, %2, %24
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jS1_NS_15AssertLastParamE(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN3JPH16MotionProperties10ResetForceEv(ptr noundef nonnull align 16 dereferenceable(182)) local_unnamed_addr #4 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN3JPH16MotionProperties11ResetTorqueEv(ptr noundef nonnull align 16 dereferenceable(182)) 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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { inlinehint mustprogress 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 = { 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 #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, !24, i64 120}
!6 = !{!"_ZTSN3JPH4BodyE", !7, i64 0, !10, i64 16, !12, i64 32, !13, i64 64, !14, i64 72, !15, i64 80, !16, i64 88, !19, i64 104, !19, i64 108, !20, i64 112, !21, i64 116, !22, i64 118, !23, i64 119, !24, i64 120, !25, i64 121}
!7 = !{!"_ZTSN3JPH4Vec3E", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN3JPH4QuatE", !11, i64 0}
!11 = !{!"_ZTSN3JPH4Vec4E", !8, i64 0}
!12 = !{!"_ZTSN3JPH5AABoxE", !7, i64 0, !7, i64 16}
!13 = !{!"_ZTSN3JPH8RefConstINS_5ShapeEEE", !14, i64 0}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!"long", !8, i64 0}
!16 = !{!"_ZTSN3JPH14CollisionGroupE", !17, i64 0, !18, i64 8, !18, i64 12}
!17 = !{!"_ZTSN3JPH8RefConstINS_11GroupFilterEEE", !14, i64 0}
!18 = !{!"int", !8, i64 0}
!19 = !{!"float", !8, i64 0}
!20 = !{!"_ZTSN3JPH6BodyIDE", !18, i64 0}
!21 = !{!"short", !8, i64 0}
!22 = !{!"_ZTSN3JPH9EBodyTypeE", !8, i64 0}
!23 = !{!"_ZTSN3JPH15BroadPhaseLayerE", !8, i64 0}
!24 = !{!"_ZTSN3JPH11EMotionTypeE", !8, i64 0}
!25 = !{!"_ZTSSt6atomicIhE", !26, i64 0}
!26 = !{!"_ZTSSt13__atomic_baseIhE", !8, i64 0}
!27 = !{i64 2158439575}
!28 = !{i64 2158439985}
!29 = !{i64 2158440490}
!30 = !{!6, !14, i64 72}
!31 = !{!32, !24, i64 181}
!32 = !{!"_ZTSN3JPH16MotionPropertiesE", !7, i64 0, !7, i64 16, !7, i64 32, !10, i64 48, !33, i64 64, !33, i64 76, !19, i64 88, !19, i64 92, !19, i64 96, !19, i64 100, !19, i64 104, !19, i64 108, !18, i64 112, !18, i64 116, !34, i64 120, !35, i64 121, !36, i64 122, !8, i64 123, !8, i64 124, !8, i64 128, !19, i64 176, !22, i64 180, !24, i64 181}
!33 = !{!"_ZTSN3JPH6Float3E", !19, i64 0, !19, i64 4, !19, i64 8}
!34 = !{!"_ZTSN3JPH14EMotionQualityE", !8, i64 0}
!35 = !{!"bool", !8, i64 0}
!36 = !{!"_ZTSN3JPH12EAllowedDOFsE", !8, i64 0}
!37 = !{!8, !8, i64 0}


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