; LLVM IR from zig-gamedev/zphysics :: libs/Jolt/Physics/Character (Character)

; 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 }
%union.anon = type { <4 x float> }
%"class.JPH::Quat" = type { %"class.JPH::Vec4" }
%"class.JPH::Vec4" = type { %union.anon.0 }
%union.anon.0 = type { <4 x float> }
%"class.JPH::BodyCreationSettings" = type { %"class.JPH::Vec3", %"class.JPH::Quat", %"class.JPH::Vec3", %"class.JPH::Vec3", i64, i16, %"class.JPH::CollisionGroup", i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, float, float, float, float, float, float, float, i32, i32, i8, float, %"class.JPH::MassProperties", %"class.JPH::RefConst.4", %"class.JPH::RefConst" }
%"class.JPH::CollisionGroup" = type { %"class.JPH::RefConst.3", i32, i32 }
%"class.JPH::RefConst.3" = type { ptr }
%"class.JPH::MassProperties" = type { float, %"class.JPH::Mat44" }
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::RefConst.4" = type { ptr }
%"class.JPH::RefConst" = type { ptr }
%"class.JPH::Character" = type <{ %"class.JPH::CharacterBase", %"class.JPH::BodyID", i16, [10 x i8] }>
%"class.JPH::CharacterBase" = type { ptr, %"class.JPH::RefTarget", ptr, %"class.JPH::RefConst", %"class.JPH::Vec3", %"class.JPH::Plane", float, i32, %"class.JPH::BodyID", %"class.JPH::SubShapeID", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::RefConst.1", i64 }
%"class.JPH::RefTarget" = type { %"struct.std::atomic" }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i32 }
%"class.JPH::Plane" = type { %"class.JPH::Vec4" }
%"class.JPH::SubShapeID" = type { i32 }
%"class.JPH::RefConst.1" = type { ptr }
%"class.JPH::BodyID" = type { i32 }
%"class.JPH::CharacterSettings" = type { %"class.JPH::CharacterBaseSettings", i16, float, float, float }
%"class.JPH::CharacterBaseSettings" = type { ptr, %"class.JPH::RefTarget.2", %"class.JPH::Vec3", %"class.JPH::Plane", float, i8, %"class.JPH::RefConst" }
%"class.JPH::RefTarget.2" = type { %"struct.std::atomic" }

@_ZTVN3JPH9CharacterE = external dso_local unnamed_addr constant { [6 x ptr] }, align 8

; 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: mustprogress uwtable
define dso_local void @_ZN3JPH9CharacterC2EPKNS_17CharacterSettingsENS_4Vec3ENS_4QuatEmPNS_13PhysicsSystemE(ptr noundef nonnull align 16 dereferenceable(150) %0, ptr noundef %1, double %2, double %3, double %4, double %5, i64 noundef %6, ptr noundef %7) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %9 = alloca %"class.JPH::Vec3", align 16
  %10 = alloca %"class.JPH::Quat", align 16
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i64, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca %"class.JPH::BodyCreationSettings", align 16
  %18 = alloca %"class.JPH::Vec3", align 16
  %19 = alloca %"class.JPH::Quat", align 16
  %20 = alloca ptr, align 8
  %21 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 0
  store double %2, ptr %21, align 16
  %22 = getelementptr inbounds { double, double }, ptr %9, i32 0, i32 1
  store double %3, ptr %22, align 8
  %23 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 0
  store double %4, ptr %23, align 16
  %24 = getelementptr inbounds { double, double }, ptr %10, i32 0, i32 1
  store double %5, ptr %24, align 8
  store ptr %0, ptr %11, align 8, !tbaa !5
  store ptr %1, ptr %12, align 8, !tbaa !5
  store i64 %6, ptr %13, align 8, !tbaa !9
  store ptr %7, ptr %14, align 8, !tbaa !5
  %25 = load ptr, ptr %11, align 8
  %26 = load ptr, ptr %12, align 8, !tbaa !5
  %27 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZN3JPH13CharacterBaseC2EPKNS_21CharacterBaseSettingsEPNS_13PhysicsSystemE(ptr noundef nonnull align 16 dereferenceable(144) %25, ptr noundef %26, ptr noundef %27)
  store ptr getelementptr inbounds inrange(-16, 32) ({ [6 x ptr] }, ptr @_ZTVN3JPH9CharacterE, i32 0, i32 0, i32 2), ptr %25, align 16, !tbaa !11
  %28 = getelementptr inbounds %"class.JPH::Character", ptr %25, i32 0, i32 1
  invoke void @_ZN3JPH6BodyIDC2Ev(ptr noundef nonnull align 4 dereferenceable(4) %28)
          to label %29 unwind label %88

29:                                               ; preds = %8
  %30 = getelementptr inbounds %"class.JPH::Character", ptr %25, i32 0, i32 2
  %31 = load ptr, ptr %12, align 8, !tbaa !5
  %32 = getelementptr inbounds %"class.JPH::CharacterSettings", ptr %31, i32 0, i32 1
  %33 = load i16, ptr %32, align 16, !tbaa !13
  store i16 %33, ptr %30, align 4, !tbaa !27
  call void @llvm.lifetime.start.p0(i64 256, ptr %17) #6
  %34 = getelementptr inbounds %"class.JPH::CharacterBase", ptr %25, i32 0, i32 3
  %35 = invoke noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEcvPKS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %34)
          to label %36 unwind label %92

36:                                               ; preds = %29
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %18, ptr align 16 %9, i64 16, i1 false), !tbaa.struct !35
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %19, ptr align 16 %10, i64 16, i1 false), !tbaa.struct !35
  %37 = getelementptr inbounds %"class.JPH::Character", ptr %25, i32 0, i32 2
  %38 = load i16, ptr %37, align 4, !tbaa !27
  %39 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 0
  %40 = load double, ptr %39, align 16
  %41 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 1
  %42 = load double, ptr %41, align 8
  %43 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 0
  %44 = load double, ptr %43, align 16
  %45 = getelementptr inbounds { double, double }, ptr %19, i32 0, i32 1
  %46 = load double, ptr %45, align 8
  invoke void @_ZN3JPH20BodyCreationSettingsC2EPKNS_5ShapeENS_4Vec3ENS_4QuatENS_11EMotionTypeEt(ptr noundef nonnull align 16 dereferenceable(256) %17, ptr noundef %35, double %40, double %42, double %44, double %46, i8 noundef zeroext 2, i16 noundef zeroext %38)
          to label %47 unwind label %92

47:                                               ; preds = %36
  %48 = invoke noundef zeroext i8 @_ZN3JPHorENS_12EAllowedDOFsES0_(i8 noundef zeroext 1, i8 noundef zeroext 2)
          to label %49 unwind label %96

49:                                               ; preds = %47
  %50 = invoke noundef zeroext i8 @_ZN3JPHorENS_12EAllowedDOFsES0_(i8 noundef zeroext %48, i8 noundef zeroext 4)
          to label %51 unwind label %96

51:                                               ; preds = %49
  %52 = getelementptr inbounds %"class.JPH::BodyCreationSettings", ptr %17, i32 0, i32 8
  store i8 %50, ptr %52, align 1, !tbaa !37
  %53 = load ptr, ptr %12, align 8, !tbaa !5
  %54 = getelementptr inbounds %"class.JPH::CharacterBaseSettings", ptr %53, i32 0, i32 5
  %55 = load i8, ptr %54, align 4, !tbaa !49, !range !50, !noundef !51
  %56 = trunc i8 %55 to i1
  %57 = getelementptr inbounds %"class.JPH::BodyCreationSettings", ptr %17, i32 0, i32 15
  %58 = zext i1 %56 to i8
  store i8 %58, ptr %57, align 8, !tbaa !52
  %59 = getelementptr inbounds %"class.JPH::BodyCreationSettings", ptr %17, i32 0, i32 26
  store i8 2, ptr %59, align 16, !tbaa !53
  %60 = load ptr, ptr %12, align 8, !tbaa !5
  %61 = getelementptr inbounds %"class.JPH::CharacterSettings", ptr %60, i32 0, i32 2
  %62 = load float, ptr %61, align 4, !tbaa !54
  %63 = getelementptr inbounds %"class.JPH::BodyCreationSettings", ptr %17, i32 0, i32 28
  %64 = getelementptr inbounds %"class.JPH::MassProperties", ptr %63, i32 0, i32 0
  store float %62, ptr %64, align 16, !tbaa !55
  %65 = load ptr, ptr %12, align 8, !tbaa !5
  %66 = getelementptr inbounds %"class.JPH::CharacterSettings", ptr %65, i32 0, i32 3
  %67 = load float, ptr %66, align 8, !tbaa !56
  %68 = getelementptr inbounds %"class.JPH::BodyCreationSettings", ptr %17, i32 0, i32 17
  store float %67, ptr %68, align 4, !tbaa !57
  %69 = load ptr, ptr %12, align 8, !tbaa !5
  %70 = getelementptr inbounds %"class.JPH::CharacterSettings", ptr %69, i32 0, i32 4
  %71 = load float, ptr %70, align 4, !tbaa !58
  %72 = getelementptr inbounds %"class.JPH::BodyCreationSettings", ptr %17, i32 0, i32 23
  store float %71, ptr %72, align 4, !tbaa !59
  %73 = load i64, ptr %13, align 8, !tbaa !9
  %74 = getelementptr inbounds %"class.JPH::BodyCreationSettings", ptr %17, i32 0, i32 4
  store i64 %73, ptr %74, align 16, !tbaa !60
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %75 = getelementptr inbounds %"class.JPH::CharacterBase", ptr %25, i32 0, i32 2
  %76 = load ptr, ptr %75, align 16, !tbaa !61
  %77 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH13PhysicsSystem16GetBodyInterfaceEv(ptr noundef nonnull align 16 dereferenceable(1140) %76)
          to label %78 unwind label %100

78:                                               ; preds = %51
  %79 = invoke noundef ptr @_ZN3JPH13BodyInterface10CreateBodyERKNS_20BodyCreationSettingsE(ptr noundef nonnull align 8 dereferenceable(24) %77, ptr noundef nonnull align 16 dereferenceable(256) %17)
          to label %80 unwind label %100

80:                                               ; preds = %78
  store ptr %79, ptr %20, align 8, !tbaa !5
  %81 = load ptr, ptr %20, align 8, !tbaa !5
  %82 = icmp ne ptr %81, null
  br i1 %82, label %83, label %104

83:                                               ; preds = %80
  %84 = load ptr, ptr %20, align 8, !tbaa !5
  %85 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH4Body5GetIDEv(ptr noundef nonnull align 16 dereferenceable(122) %84)
          to label %86 unwind label %100

86:                                               ; preds = %83
  %87 = getelementptr inbounds %"class.JPH::Character", ptr %25, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %87, ptr align 4 %85, i64 4, i1 false), !tbaa.struct !62
  br label %104

88:                                               ; preds = %8
  %89 = landingpad { ptr, i32 }
          cleanup
  %90 = extractvalue { ptr, i32 } %89, 0
  store ptr %90, ptr %15, align 8
  %91 = extractvalue { ptr, i32 } %89, 1
  store i32 %91, ptr %16, align 4
  br label %107

92:                                               ; preds = %36, %29
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %15, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %16, align 4
  br label %106

96:                                               ; preds = %49, %47
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %15, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %16, align 4
  br label %105

100:                                              ; preds = %83, %78, %51
  %101 = landingpad { ptr, i32 }
          cleanup
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %15, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  br label %105

104:                                              ; preds = %86, %80
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %17) #6
  call void @llvm.lifetime.end.p0(i64 256, ptr %17) #6
  ret void

105:                                              ; preds = %100, %96
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %17) #6
  br label %106

106:                                              ; preds = %105, %92
  call void @llvm.lifetime.end.p0(i64 256, ptr %17) #6
  br label %107

107:                                              ; preds = %106, %88
  call void @_ZN3JPH13CharacterBaseD2Ev(ptr noundef nonnull align 16 dereferenceable(144) %25) #6
  br label %108

108:                                              ; preds = %107
  %109 = load ptr, ptr %15, align 8
  %110 = load i32, ptr %16, align 4
  %111 = insertvalue { ptr, i32 } poison, ptr %109, 0
  %112 = insertvalue { ptr, i32 } %111, i32 %110, 1
  resume { ptr, i32 } %112
}

declare void @_ZN3JPH13CharacterBaseC2EPKNS_21CharacterBaseSettingsEPNS_13PhysicsSystemE(ptr noundef nonnull align 16 dereferenceable(144), ptr noundef, ptr noundef) unnamed_addr #2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEcvPKS1_Ev(ptr noundef nonnull align 8 dereferenceable(8)) #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: mustprogress uwtable
declare dso_local void @_ZN3JPH20BodyCreationSettingsC2EPKNS_5ShapeENS_4Vec3ENS_4QuatENS_11EMotionTypeEt(ptr noundef nonnull align 16 dereferenceable(256), ptr noundef, double, double, double, double, i8 noundef zeroext, i16 noundef zeroext) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i8 @_ZN3JPHorENS_12EAllowedDOFsES0_(i8 noundef zeroext, i8 noundef zeroext) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH13PhysicsSystem16GetBodyInterfaceEv(ptr noundef nonnull align 16 dereferenceable(1140)) #3 align 2

declare noundef ptr @_ZN3JPH13BodyInterface10CreateBodyERKNS_20BodyCreationSettingsE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 16 dereferenceable(256)) #2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256)) unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH13CharacterBaseD2Ev(ptr noundef nonnull align 16 dereferenceable(144)) unnamed_addr #3 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"vtable pointer", !8, i64 0}
!13 = !{!14, !26, i64 64}
!14 = !{!"_ZTSN3JPH17CharacterSettingsE", !15, i64 0, !26, i64 64, !23, i64 68, !23, i64 72, !23, i64 76}
!15 = !{!"_ZTSN3JPH21CharacterBaseSettingsE", !16, i64 8, !20, i64 16, !21, i64 32, !23, i64 48, !24, i64 52, !25, i64 56}
!16 = !{!"_ZTSN3JPH9RefTargetINS_21CharacterBaseSettingsEEE", !17, i64 0}
!17 = !{!"_ZTSSt6atomicIjE", !18, i64 0}
!18 = !{!"_ZTSSt13__atomic_baseIjE", !19, i64 0}
!19 = !{!"int", !7, i64 0}
!20 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!21 = !{!"_ZTSN3JPH5PlaneE", !22, i64 0}
!22 = !{!"_ZTSN3JPH4Vec4E", !7, i64 0}
!23 = !{!"float", !7, i64 0}
!24 = !{!"bool", !7, i64 0}
!25 = !{!"_ZTSN3JPH8RefConstINS_5ShapeEEE", !6, i64 0}
!26 = !{!"short", !7, i64 0}
!27 = !{!28, !26, i64 148}
!28 = !{!"_ZTSN3JPH9CharacterE", !29, i64 0, !32, i64 144, !26, i64 148}
!29 = !{!"_ZTSN3JPH13CharacterBaseE", !30, i64 8, !6, i64 16, !25, i64 24, !20, i64 32, !21, i64 48, !23, i64 64, !31, i64 68, !32, i64 72, !33, i64 76, !20, i64 80, !20, i64 96, !20, i64 112, !34, i64 128, !10, i64 136}
!30 = !{!"_ZTSN3JPH9RefTargetINS_13CharacterBaseEEE", !17, i64 0}
!31 = !{!"_ZTSN3JPH13CharacterBase12EGroundStateE", !7, i64 0}
!32 = !{!"_ZTSN3JPH6BodyIDE", !19, i64 0}
!33 = !{!"_ZTSN3JPH10SubShapeIDE", !19, i64 0}
!34 = !{!"_ZTSN3JPH8RefConstINS_15PhysicsMaterialEEE", !6, i64 0}
!35 = !{i64 0, i64 16, !36}
!36 = !{!7, !7, i64 0}
!37 = !{!38, !43, i64 97}
!38 = !{!"_ZTSN3JPH20BodyCreationSettingsE", !20, i64 0, !39, i64 16, !20, i64 32, !20, i64 48, !10, i64 64, !26, i64 72, !40, i64 80, !42, i64 96, !43, i64 97, !24, i64 98, !24, i64 99, !24, i64 100, !24, i64 101, !24, i64 102, !44, i64 103, !24, i64 104, !24, i64 105, !23, i64 108, !23, i64 112, !23, i64 116, !23, i64 120, !23, i64 124, !23, i64 128, !23, i64 132, !19, i64 136, !19, i64 140, !45, i64 144, !23, i64 148, !46, i64 160, !48, i64 240, !25, i64 248}
!39 = !{!"_ZTSN3JPH4QuatE", !22, i64 0}
!40 = !{!"_ZTSN3JPH14CollisionGroupE", !41, i64 0, !19, i64 8, !19, i64 12}
!41 = !{!"_ZTSN3JPH8RefConstINS_11GroupFilterEEE", !6, i64 0}
!42 = !{!"_ZTSN3JPH11EMotionTypeE", !7, i64 0}
!43 = !{!"_ZTSN3JPH12EAllowedDOFsE", !7, i64 0}
!44 = !{!"_ZTSN3JPH14EMotionQualityE", !7, i64 0}
!45 = !{!"_ZTSN3JPH23EOverrideMassPropertiesE", !7, i64 0}
!46 = !{!"_ZTSN3JPH14MassPropertiesE", !23, i64 0, !47, i64 16}
!47 = !{!"_ZTSN3JPH5Mat44E", !7, i64 0}
!48 = !{!"_ZTSN3JPH8RefConstINS_13ShapeSettingsEEE", !6, i64 0}
!49 = !{!15, !24, i64 52}
!50 = !{i8 0, i8 2}
!51 = !{}
!52 = !{!38, !24, i64 104}
!53 = !{!38, !45, i64 144}
!54 = !{!14, !23, i64 68}
!55 = !{!38, !23, i64 160}
!56 = !{!14, !23, i64 72}
!57 = !{!38, !23, i64 108}
!58 = !{!14, !23, i64 76}
!59 = !{!38, !23, i64 132}
!60 = !{!38, !10, i64 64}
!61 = !{!29, !6, i64 16}
!62 = !{i64 0, i64 4, !63}
!63 = !{!19, !19, 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::BodyCreationSettings" = type { %"class.JPH::Vec3", %"class.JPH::Quat", %"class.JPH::Vec3", %"class.JPH::Vec3", i64, i16, %"class.JPH::CollisionGroup", i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, float, float, float, float, float, float, float, i32, i32, i8, float, %"class.JPH::MassProperties", %"class.JPH::RefConst.4", %"class.JPH::RefConst" }
%"class.JPH::Quat" = type { %"class.JPH::Vec4" }
%"class.JPH::Vec4" = type { %union.anon.0 }
%union.anon.0 = type { <4 x float> }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::CollisionGroup" = type { %"class.JPH::RefConst.3", i32, i32 }
%"class.JPH::RefConst.3" = type { ptr }
%"class.JPH::MassProperties" = type { float, %"class.JPH::Mat44" }
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::RefConst.4" = type { ptr }
%"class.JPH::RefConst" = type { ptr }

@_ZTVN3JPH9CharacterE = external dso_local unnamed_addr constant { [6 x ptr] }, align 8

; 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: mustprogress uwtable
define dso_local void @_ZN3JPH9CharacterC2EPKNS_17CharacterSettingsENS_4Vec3ENS_4QuatEmPNS_13PhysicsSystemE(ptr noundef nonnull align 16 dereferenceable(150) %0, ptr noundef %1, double %2, double %3, double %4, double %5, i64 noundef %6, ptr noundef %7) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %9 = alloca %"class.JPH::BodyCreationSettings", align 16
  tail call void @_ZN3JPH13CharacterBaseC2EPKNS_21CharacterBaseSettingsEPNS_13PhysicsSystemE(ptr noundef nonnull align 16 dereferenceable(144) %0, ptr noundef %1, ptr noundef %7)
  store ptr getelementptr inbounds inrange(-16, 32) (i8, ptr @_ZTVN3JPH9CharacterE, i64 16), ptr %0, align 16, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %0, i64 144
  tail call void @_ZN3JPH6BodyIDC2Ev(ptr noundef nonnull align 4 dereferenceable(4) %10)
  %11 = getelementptr inbounds i8, ptr %0, i64 148
  %12 = getelementptr inbounds i8, ptr %1, i64 64
  %13 = load i16, ptr %12, align 16, !tbaa !8
  store i16 %13, ptr %11, align 4, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %9) #5
  %14 = getelementptr inbounds i8, ptr %0, i64 24
  %15 = tail call noundef ptr @_ZNK3JPH8RefConstINS_5ShapeEEcvPKS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %14)
  %16 = load i16, ptr %11, align 4, !tbaa !24
  invoke void @_ZN3JPH20BodyCreationSettingsC2EPKNS_5ShapeENS_4Vec3ENS_4QuatENS_11EMotionTypeEt(ptr noundef nonnull align 16 dereferenceable(256) %9, ptr noundef %15, double %2, double %3, double %4, double %5, i8 noundef zeroext 2, i16 noundef zeroext %16)
          to label %17 unwind label %43

17:                                               ; preds = %8
  %18 = call noundef zeroext i8 @_ZN3JPHorENS_12EAllowedDOFsES0_(i8 noundef zeroext 1, i8 noundef zeroext 2)
  %19 = call noundef zeroext i8 @_ZN3JPHorENS_12EAllowedDOFsES0_(i8 noundef zeroext %18, i8 noundef zeroext 4)
  %20 = getelementptr inbounds i8, ptr %9, i64 97
  store i8 %19, ptr %20, align 1, !tbaa !33
  %21 = getelementptr inbounds i8, ptr %1, i64 52
  %22 = load i8, ptr %21, align 4, !tbaa !45, !range !46, !noundef !47
  %23 = getelementptr inbounds i8, ptr %9, i64 104
  store i8 %22, ptr %23, align 8, !tbaa !48
  %24 = getelementptr inbounds i8, ptr %9, i64 144
  store i8 2, ptr %24, align 16, !tbaa !49
  %25 = getelementptr inbounds i8, ptr %1, i64 68
  %26 = load float, ptr %25, align 4, !tbaa !50
  %27 = getelementptr inbounds i8, ptr %9, i64 160
  store float %26, ptr %27, align 16, !tbaa !51
  %28 = getelementptr inbounds i8, ptr %1, i64 72
  %29 = load float, ptr %28, align 8, !tbaa !52
  %30 = getelementptr inbounds i8, ptr %9, i64 108
  store float %29, ptr %30, align 4, !tbaa !53
  %31 = getelementptr inbounds i8, ptr %1, i64 76
  %32 = load float, ptr %31, align 4, !tbaa !54
  %33 = getelementptr inbounds i8, ptr %9, i64 132
  store float %32, ptr %33, align 4, !tbaa !55
  %34 = getelementptr inbounds i8, ptr %9, i64 64
  store i64 %6, ptr %34, align 16, !tbaa !56
  %35 = getelementptr inbounds i8, ptr %0, i64 16
  %36 = load ptr, ptr %35, align 16, !tbaa !57
  %37 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH13PhysicsSystem16GetBodyInterfaceEv(ptr noundef nonnull align 16 dereferenceable(1140) %36)
  %38 = invoke noundef ptr @_ZN3JPH13BodyInterface10CreateBodyERKNS_20BodyCreationSettingsE(ptr noundef nonnull align 8 dereferenceable(24) %37, ptr noundef nonnull align 16 dereferenceable(256) %9)
          to label %39 unwind label %45

39:                                               ; preds = %17
  %.not = icmp eq ptr %38, null
  br i1 %.not, label %47, label %40

40:                                               ; preds = %39
  %41 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH4Body5GetIDEv(ptr noundef nonnull align 16 dereferenceable(122) %38)
  %42 = load i32, ptr %41, align 4, !tbaa !58
  store i32 %42, ptr %10, align 16, !tbaa !58
  br label %47

43:                                               ; preds = %8
  %44 = landingpad { ptr, i32 }
          cleanup
  br label %48

45:                                               ; preds = %17
  %46 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %9) #5
  br label %48

47:                                               ; preds = %40, %39
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %9) #5
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %9) #5
  ret void

48:                                               ; preds = %45, %43
  %.pn = phi { ptr, i32 } [ %46, %45 ], [ %44, %43 ]
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %9) #5
  call void @_ZN3JPH13CharacterBaseD2Ev(ptr noundef nonnull align 16 dereferenceable(144) %0) #5
  resume { ptr, i32 } %.pn
}

declare void @_ZN3JPH13CharacterBaseC2EPKNS_21CharacterBaseSettingsEPNS_13PhysicsSystemE(ptr noundef nonnull align 16 dereferenceable(144), ptr noundef, ptr noundef) unnamed_addr #2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH20BodyCreationSettingsC2EPKNS_5ShapeENS_4Vec3ENS_4QuatENS_11EMotionTypeEt(ptr noundef nonnull align 16 dereferenceable(256), ptr noundef, double, double, double, double, i8 noundef zeroext, i16 noundef zeroext) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i8 @_ZN3JPHorENS_12EAllowedDOFsES0_(i8 noundef zeroext, i8 noundef zeroext) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH13PhysicsSystem16GetBodyInterfaceEv(ptr noundef nonnull align 16 dereferenceable(1140)) local_unnamed_addr #3 align 2

declare noundef ptr @_ZN3JPH13BodyInterface10CreateBodyERKNS_20BodyCreationSettingsE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 16 dereferenceable(256)) local_unnamed_addr #2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256)) unnamed_addr #4 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH13CharacterBaseD2Ev(ptr noundef nonnull align 16 dereferenceable(144)) unnamed_addr #3 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !23, i64 64}
!9 = !{!"_ZTSN3JPH17CharacterSettingsE", !10, i64 0, !23, i64 64, !19, i64 68, !19, i64 72, !19, i64 76}
!10 = !{!"_ZTSN3JPH21CharacterBaseSettingsE", !11, i64 8, !16, i64 16, !17, i64 32, !19, i64 48, !20, i64 52, !21, i64 56}
!11 = !{!"_ZTSN3JPH9RefTargetINS_21CharacterBaseSettingsEEE", !12, i64 0}
!12 = !{!"_ZTSSt6atomicIjE", !13, i64 0}
!13 = !{!"_ZTSSt13__atomic_baseIjE", !14, i64 0}
!14 = !{!"int", !15, i64 0}
!15 = !{!"omnipotent char", !7, i64 0}
!16 = !{!"_ZTSN3JPH4Vec3E", !15, i64 0}
!17 = !{!"_ZTSN3JPH5PlaneE", !18, i64 0}
!18 = !{!"_ZTSN3JPH4Vec4E", !15, i64 0}
!19 = !{!"float", !15, i64 0}
!20 = !{!"bool", !15, i64 0}
!21 = !{!"_ZTSN3JPH8RefConstINS_5ShapeEEE", !22, i64 0}
!22 = !{!"any pointer", !15, i64 0}
!23 = !{!"short", !15, i64 0}
!24 = !{!25, !23, i64 148}
!25 = !{!"_ZTSN3JPH9CharacterE", !26, i64 0, !29, i64 144, !23, i64 148}
!26 = !{!"_ZTSN3JPH13CharacterBaseE", !27, i64 8, !22, i64 16, !21, i64 24, !16, i64 32, !17, i64 48, !19, i64 64, !28, i64 68, !29, i64 72, !30, i64 76, !16, i64 80, !16, i64 96, !16, i64 112, !31, i64 128, !32, i64 136}
!27 = !{!"_ZTSN3JPH9RefTargetINS_13CharacterBaseEEE", !12, i64 0}
!28 = !{!"_ZTSN3JPH13CharacterBase12EGroundStateE", !15, i64 0}
!29 = !{!"_ZTSN3JPH6BodyIDE", !14, i64 0}
!30 = !{!"_ZTSN3JPH10SubShapeIDE", !14, i64 0}
!31 = !{!"_ZTSN3JPH8RefConstINS_15PhysicsMaterialEEE", !22, i64 0}
!32 = !{!"long", !15, i64 0}
!33 = !{!34, !39, i64 97}
!34 = !{!"_ZTSN3JPH20BodyCreationSettingsE", !16, i64 0, !35, i64 16, !16, i64 32, !16, i64 48, !32, i64 64, !23, i64 72, !36, i64 80, !38, i64 96, !39, i64 97, !20, i64 98, !20, i64 99, !20, i64 100, !20, i64 101, !20, i64 102, !40, i64 103, !20, i64 104, !20, i64 105, !19, i64 108, !19, i64 112, !19, i64 116, !19, i64 120, !19, i64 124, !19, i64 128, !19, i64 132, !14, i64 136, !14, i64 140, !41, i64 144, !19, i64 148, !42, i64 160, !44, i64 240, !21, i64 248}
!35 = !{!"_ZTSN3JPH4QuatE", !18, i64 0}
!36 = !{!"_ZTSN3JPH14CollisionGroupE", !37, i64 0, !14, i64 8, !14, i64 12}
!37 = !{!"_ZTSN3JPH8RefConstINS_11GroupFilterEEE", !22, i64 0}
!38 = !{!"_ZTSN3JPH11EMotionTypeE", !15, i64 0}
!39 = !{!"_ZTSN3JPH12EAllowedDOFsE", !15, i64 0}
!40 = !{!"_ZTSN3JPH14EMotionQualityE", !15, i64 0}
!41 = !{!"_ZTSN3JPH23EOverrideMassPropertiesE", !15, i64 0}
!42 = !{!"_ZTSN3JPH14MassPropertiesE", !19, i64 0, !43, i64 16}
!43 = !{!"_ZTSN3JPH5Mat44E", !15, i64 0}
!44 = !{!"_ZTSN3JPH8RefConstINS_13ShapeSettingsEEE", !22, i64 0}
!45 = !{!10, !20, i64 52}
!46 = !{i8 0, i8 2}
!47 = !{}
!48 = !{!34, !20, i64 104}
!49 = !{!34, !41, i64 144}
!50 = !{!9, !19, i64 68}
!51 = !{!34, !19, i64 160}
!52 = !{!9, !19, i64 72}
!53 = !{!34, !19, i64 108}
!54 = !{!9, !19, i64 76}
!55 = !{!34, !19, i64 132}
!56 = !{!34, !32, i64 64}
!57 = !{!26, !22, i64 16}
!58 = !{!14, !14, i64 0}


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