; LLVM IR from jrouwe/JoltPhysics :: 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, [2 x i8], float, float, float, i8, [15 x i8] }>
%"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 %87

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 !28
  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 %91

36:                                               ; preds = %29
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %18, ptr align 16 %9, i64 16, i1 false), !tbaa.struct !36
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %19, ptr align 16 %10, i64 16, i1 false), !tbaa.struct !36
  %37 = getelementptr inbounds %"class.JPH::Character", ptr %25, i32 0, i32 2
  %38 = load i16, ptr %37, align 4, !tbaa !28
  %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 %91

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

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

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

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

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

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

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

95:                                               ; preds = %82, %77, %47
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %15, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %17) #6
  br label %100

99:                                               ; preds = %85, %79
  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

100:                                              ; preds = %95, %91
  call void @llvm.lifetime.end.p0(i64 256, ptr %17) #6
  br label %101

101:                                              ; preds = %100, %87
  call void @_ZN3JPH13CharacterBaseD2Ev(ptr noundef nonnull align 16 dereferenceable(144) %25) #6
  br label %102

102:                                              ; preds = %101
  %103 = load ptr, ptr %15, align 8
  %104 = load i32, ptr %16, align 4
  %105 = insertvalue { ptr, i32 } poison, ptr %103, 0
  %106 = insertvalue { ptr, i32 } %105, i32 %104, 1
  resume { ptr, i32 } %106
}

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 nonnull align 8 dereferenceable(24) ptr @_ZN3JPH13PhysicsSystem16GetBodyInterfaceEv(ptr noundef nonnull align 16 dereferenceable(1172)) #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, !27, i64 80}
!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 = !{!"_ZTSN3JPH12EAllowedDOFsE", !7, i64 0}
!28 = !{!29, !26, i64 148}
!29 = !{!"_ZTSN3JPH9CharacterE", !30, i64 0, !33, i64 144, !26, i64 148}
!30 = !{!"_ZTSN3JPH13CharacterBaseE", !31, i64 8, !6, i64 16, !25, i64 24, !20, i64 32, !21, i64 48, !23, i64 64, !32, i64 68, !33, i64 72, !34, i64 76, !20, i64 80, !20, i64 96, !20, i64 112, !35, i64 128, !10, i64 136}
!31 = !{!"_ZTSN3JPH9RefTargetINS_13CharacterBaseEEE", !17, i64 0}
!32 = !{!"_ZTSN3JPH13CharacterBase12EGroundStateE", !7, i64 0}
!33 = !{!"_ZTSN3JPH6BodyIDE", !19, i64 0}
!34 = !{!"_ZTSN3JPH10SubShapeIDE", !19, i64 0}
!35 = !{!"_ZTSN3JPH8RefConstINS_15PhysicsMaterialEEE", !6, i64 0}
!36 = !{i64 0, i64 16, !37}
!37 = !{!7, !7, i64 0}
!38 = !{!14, !27, i64 80}
!39 = !{!40, !27, i64 97}
!40 = !{!"_ZTSN3JPH20BodyCreationSettingsE", !20, i64 0, !41, i64 16, !20, i64 32, !20, i64 48, !10, i64 64, !26, i64 72, !42, i64 80, !44, i64 96, !27, i64 97, !24, i64 98, !24, i64 99, !24, i64 100, !24, i64 101, !24, i64 102, !45, 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, !46, i64 144, !23, i64 148, !47, i64 160, !49, i64 240, !25, i64 248}
!41 = !{!"_ZTSN3JPH4QuatE", !22, i64 0}
!42 = !{!"_ZTSN3JPH14CollisionGroupE", !43, i64 0, !19, i64 8, !19, i64 12}
!43 = !{!"_ZTSN3JPH8RefConstINS_11GroupFilterEEE", !6, i64 0}
!44 = !{!"_ZTSN3JPH11EMotionTypeE", !7, i64 0}
!45 = !{!"_ZTSN3JPH14EMotionQualityE", !7, i64 0}
!46 = !{!"_ZTSN3JPH23EOverrideMassPropertiesE", !7, i64 0}
!47 = !{!"_ZTSN3JPH14MassPropertiesE", !23, i64 0, !48, i64 16}
!48 = !{!"_ZTSN3JPH5Mat44E", !7, i64 0}
!49 = !{!"_ZTSN3JPH8RefConstINS_13ShapeSettingsEEE", !6, i64 0}
!50 = !{!15, !24, i64 52}
!51 = !{i8 0, i8 2}
!52 = !{}
!53 = !{!40, !24, i64 104}
!54 = !{!40, !46, i64 144}
!55 = !{!14, !23, i64 68}
!56 = !{!40, !23, i64 160}
!57 = !{!14, !23, i64 72}
!58 = !{!40, !23, i64 108}
!59 = !{!14, !23, i64 76}
!60 = !{!40, !23, i64 132}
!61 = !{!40, !10, i64 64}
!62 = !{!30, !6, i64 16}
!63 = !{i64 0, i64 4, !64}
!64 = !{!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 !25
  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 !25
  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 = getelementptr inbounds i8, ptr %1, i64 80
  %19 = load i8, ptr %18, align 16, !tbaa !34
  %20 = getelementptr inbounds i8, ptr %9, i64 97
  store i8 %19, ptr %20, align 1, !tbaa !35
  %21 = getelementptr inbounds i8, ptr %1, i64 52
  %22 = load i8, ptr %21, align 4, !tbaa !46, !range !47, !noundef !48
  %23 = getelementptr inbounds i8, ptr %9, i64 104
  store i8 %22, ptr %23, align 8, !tbaa !49
  %24 = getelementptr inbounds i8, ptr %9, i64 144
  store i8 2, ptr %24, align 16, !tbaa !50
  %25 = getelementptr inbounds i8, ptr %1, i64 68
  %26 = load float, ptr %25, align 4, !tbaa !51
  %27 = getelementptr inbounds i8, ptr %9, i64 160
  store float %26, ptr %27, align 16, !tbaa !52
  %28 = getelementptr inbounds i8, ptr %1, i64 72
  %29 = load float, ptr %28, align 8, !tbaa !53
  %30 = getelementptr inbounds i8, ptr %9, i64 108
  store float %29, ptr %30, align 4, !tbaa !54
  %31 = getelementptr inbounds i8, ptr %1, i64 76
  %32 = load float, ptr %31, align 4, !tbaa !55
  %33 = getelementptr inbounds i8, ptr %9, i64 132
  store float %32, ptr %33, align 4, !tbaa !56
  %34 = getelementptr inbounds i8, ptr %9, i64 64
  store i64 %6, ptr %34, align 16, !tbaa !57
  %35 = getelementptr inbounds i8, ptr %0, i64 16
  %36 = load ptr, ptr %35, align 16, !tbaa !58
  %37 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH13PhysicsSystem16GetBodyInterfaceEv(ptr noundef nonnull align 16 dereferenceable(1172) %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 !59
  store i32 %42, ptr %10, align 16, !tbaa !59
  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 nonnull align 8 dereferenceable(24) ptr @_ZN3JPH13PhysicsSystem16GetBodyInterfaceEv(ptr noundef nonnull align 16 dereferenceable(1172)) 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, !24, i64 80}
!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 = !{!"_ZTSN3JPH12EAllowedDOFsE", !15, i64 0}
!25 = !{!26, !23, i64 148}
!26 = !{!"_ZTSN3JPH9CharacterE", !27, i64 0, !30, i64 144, !23, i64 148}
!27 = !{!"_ZTSN3JPH13CharacterBaseE", !28, i64 8, !22, i64 16, !21, i64 24, !16, i64 32, !17, i64 48, !19, i64 64, !29, i64 68, !30, i64 72, !31, i64 76, !16, i64 80, !16, i64 96, !16, i64 112, !32, i64 128, !33, i64 136}
!28 = !{!"_ZTSN3JPH9RefTargetINS_13CharacterBaseEEE", !12, i64 0}
!29 = !{!"_ZTSN3JPH13CharacterBase12EGroundStateE", !15, i64 0}
!30 = !{!"_ZTSN3JPH6BodyIDE", !14, i64 0}
!31 = !{!"_ZTSN3JPH10SubShapeIDE", !14, i64 0}
!32 = !{!"_ZTSN3JPH8RefConstINS_15PhysicsMaterialEEE", !22, i64 0}
!33 = !{!"long", !15, i64 0}
!34 = !{!9, !24, i64 80}
!35 = !{!36, !24, i64 97}
!36 = !{!"_ZTSN3JPH20BodyCreationSettingsE", !16, i64 0, !37, i64 16, !16, i64 32, !16, i64 48, !33, i64 64, !23, i64 72, !38, i64 80, !40, i64 96, !24, i64 97, !20, i64 98, !20, i64 99, !20, i64 100, !20, i64 101, !20, i64 102, !41, 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, !42, i64 144, !19, i64 148, !43, i64 160, !45, i64 240, !21, i64 248}
!37 = !{!"_ZTSN3JPH4QuatE", !18, i64 0}
!38 = !{!"_ZTSN3JPH14CollisionGroupE", !39, i64 0, !14, i64 8, !14, i64 12}
!39 = !{!"_ZTSN3JPH8RefConstINS_11GroupFilterEEE", !22, i64 0}
!40 = !{!"_ZTSN3JPH11EMotionTypeE", !15, i64 0}
!41 = !{!"_ZTSN3JPH14EMotionQualityE", !15, i64 0}
!42 = !{!"_ZTSN3JPH23EOverrideMassPropertiesE", !15, i64 0}
!43 = !{!"_ZTSN3JPH14MassPropertiesE", !19, i64 0, !44, i64 16}
!44 = !{!"_ZTSN3JPH5Mat44E", !15, i64 0}
!45 = !{!"_ZTSN3JPH8RefConstINS_13ShapeSettingsEEE", !22, i64 0}
!46 = !{!10, !20, i64 52}
!47 = !{i8 0, i8 2}
!48 = !{}
!49 = !{!36, !20, i64 104}
!50 = !{!36, !42, i64 144}
!51 = !{!9, !19, i64 68}
!52 = !{!36, !19, i64 160}
!53 = !{!9, !19, i64 72}
!54 = !{!36, !19, i64 108}
!55 = !{!9, !19, i64 76}
!56 = !{!36, !19, i64 132}
!57 = !{!36, !33, i64 64}
!58 = !{!27, !22, i64 16}
!59 = !{!14, !14, i64 0}


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