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

; 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::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::CollideShapeSettings" = type <{ %"class.JPH::CollideSettingsBase", float, i8, [11 x i8] }>
%"class.JPH::CollideSettingsBase" = type { i8, i8, float, float, %"class.JPH::Vec3" }
%"class.JPH::IgnoreSingleBodyFilterChained" = type { %"class.JPH::BodyFilter", %"class.JPH::BodyID", ptr }
%"class.JPH::BodyFilter" = type { ptr }
%"class.JPH::BodyID" = type { i32 }
%"class.JPH::AABox" = type { %"class.JPH::Vec3", %"class.JPH::Vec3" }
%class.MyCollector = type { %"class.JPH::CollisionCollector.31", ptr, %"class.JPH::Mat44", %"class.JPH::Vec3", ptr, ptr, ptr, ptr, %"class.JPH::InternalEdgeRemovingCollector" }
%"class.JPH::CollisionCollector.31" = type { ptr, float, ptr }
%"class.JPH::InternalEdgeRemovingCollector" = type { %"class.JPH::CollisionCollector", ptr, %"class.JPH::StaticArray.32", [12 x i8], %"class.JPH::StaticArray.33" }
%"class.JPH::CollisionCollector" = type { ptr, float, ptr }
%"class.JPH::StaticArray.32" = type { i32, [128 x %"struct.JPH::StaticArray<JPH::Float3, 128>::Storage"] }
%"struct.JPH::StaticArray<JPH::Float3, 128>::Storage" = type { [12 x i8] }
%"class.JPH::StaticArray.33" = type { i32, [12 x i8], [16 x %"struct.JPH::StaticArray<JPH::CollideShapeResult, 16>::Storage"] }
%"struct.JPH::StaticArray<JPH::CollideShapeResult, 16>::Storage" = type { [1120 x i8] }
%"class.JPH::CharacterVirtual" = type <{ %"class.JPH::CharacterBase", ptr, ptr, i8, [3 x i8], float, i32, i32, float, float, float, i32, float, float, i8, [3 x i8], float, float, [12 x i8], %"class.JPH::Vec3", %"class.JPH::Vec3", %"class.JPH::Quat", %"class.JPH::Vec3", %"class.JPH::Array.2", float, i8, [3 x i8], i64, %"class.JPH::BodyID", [4 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::RefConst" = type { ptr }
%"class.JPH::Plane" = type { %"class.JPH::Vec4" }
%"class.JPH::SubShapeID" = type { i32 }
%"class.JPH::RefConst.1" = type { ptr }
%"class.JPH::Array.2" = type { i64, i64, 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: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Vec310sReplicateEf(float noundef) #2 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3JPH16CharacterVirtual14CheckCollisionENS_4Vec3ENS_4QuatES1_fPKNS_5ShapeES1_RNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_21BroadPhaseLayerFilterERKNS_17ObjectLayerFilterERKNS_10BodyFilterERKNS_11ShapeFilterE(ptr noundef nonnull align 16 dereferenceable(332) %0, double %1, double %2, double %3, double %4, double %5, double %6, float noundef %7, ptr noundef %8, ptr noundef byval(%"class.JPH::Vec3") align 16 %9, ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(12) %14) #4 align 2 personality ptr @__gxx_personality_v0 {
  %16 = alloca %"class.JPH::Vec3", align 16
  %17 = alloca %"class.JPH::Quat", align 16
  %18 = alloca %"class.JPH::Vec3", align 16
  %19 = alloca ptr, align 8
  %20 = alloca float, align 4
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca %"class.JPH::Mat44", align 16
  %28 = alloca %"class.JPH::Vec3", align 16
  %29 = alloca %"class.JPH::Quat", align 16
  %30 = alloca %"class.JPH::CollideShapeSettings", align 16
  %31 = alloca %"class.JPH::IgnoreSingleBodyFilterChained", align 8
  %32 = alloca %"class.JPH::BodyID", align 4
  %33 = alloca %"class.JPH::AABox", align 16
  %34 = alloca %"class.JPH::Vec3", align 16
  %35 = alloca ptr, align 8
  %36 = alloca i32, align 4
  %37 = alloca %"class.JPH::Vec3", align 16
  %38 = alloca %class.MyCollector, align 16
  %39 = alloca %"class.JPH::Vec3", align 16
  %40 = alloca %"class.JPH::Vec3", align 16
  %41 = alloca %"class.JPH::Vec3", align 16
  %42 = alloca %"class.JPH::Vec3", align 16
  %43 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 0
  store double %1, ptr %43, align 16
  %44 = getelementptr inbounds { double, double }, ptr %16, i32 0, i32 1
  store double %2, ptr %44, align 8
  %45 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 0
  store double %3, ptr %45, align 16
  %46 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 1
  store double %4, ptr %46, align 8
  %47 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 0
  store double %5, ptr %47, align 16
  %48 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 1
  store double %6, ptr %48, align 8
  store ptr %0, ptr %19, align 8, !tbaa !5
  store float %7, ptr %20, align 4, !tbaa !9
  store ptr %8, ptr %21, align 8, !tbaa !5
  store ptr %10, ptr %22, align 8, !tbaa !5
  store ptr %11, ptr %23, align 8, !tbaa !5
  store ptr %12, ptr %24, align 8, !tbaa !5
  store ptr %13, ptr %25, align 8, !tbaa !5
  store ptr %14, ptr %26, align 8, !tbaa !5
  %49 = load ptr, ptr %19, align 8
  call void @llvm.lifetime.start.p0(i64 64, ptr %27) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %28, ptr align 16 %16, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %29, ptr align 16 %17, i64 16, i1 false), !tbaa.struct !11
  %50 = load ptr, ptr %21, align 8, !tbaa !5
  %51 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 0
  %52 = load double, ptr %51, align 16
  %53 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 1
  %54 = load double, ptr %53, align 8
  %55 = getelementptr inbounds { double, double }, ptr %29, i32 0, i32 0
  %56 = load double, ptr %55, align 16
  %57 = getelementptr inbounds { double, double }, ptr %29, i32 0, i32 1
  %58 = load double, ptr %57, align 8
  call void @_ZNK3JPH16CharacterVirtual24GetCenterOfMassTransformENS_4Vec3ENS_4QuatEPKNS_5ShapeE(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %27, ptr noundef nonnull align 16 dereferenceable(332) %49, double %52, double %54, double %56, double %58, ptr noundef %50)
  call void @llvm.lifetime.start.p0(i64 48, ptr %30) #8
  call void @_ZN3JPH20CollideShapeSettingsC2Ev(ptr noundef nonnull align 16 dereferenceable(37) %30)
  %59 = getelementptr inbounds %"class.JPH::CharacterVirtual", ptr %49, i32 0, i32 3
  %60 = load i8, ptr %59, align 16, !tbaa !13
  %61 = getelementptr inbounds %"class.JPH::CollideShapeSettings", ptr %30, i32 0, i32 2
  store i8 %60, ptr %61, align 4, !tbaa !33
  %62 = getelementptr inbounds %"class.JPH::CollideSettingsBase", ptr %30, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %62, ptr align 16 %18, i64 16, i1 false), !tbaa.struct !11
  %63 = getelementptr inbounds %"class.JPH::CharacterVirtual", ptr %49, i32 0, i32 10
  %64 = load float, ptr %63, align 8, !tbaa !38
  %65 = load float, ptr %20, align 4, !tbaa !9
  %66 = fadd float %64, %65
  %67 = getelementptr inbounds %"class.JPH::CollideShapeSettings", ptr %30, i32 0, i32 1
  store float %66, ptr %67, align 16, !tbaa !39
  call void @llvm.lifetime.start.p0(i64 24, ptr %31) #8
  %68 = getelementptr inbounds %"class.JPH::CharacterVirtual", ptr %49, i32 0, i32 28
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %32, ptr align 8 %68, i64 4, i1 false), !tbaa.struct !40
  %69 = load ptr, ptr %25, align 8, !tbaa !5
  %70 = getelementptr inbounds %"class.JPH::BodyID", ptr %32, i32 0, i32 0
  %71 = load i32, ptr %70, align 4
  call void @_ZN3JPH29IgnoreSingleBodyFilterChainedC2ENS_6BodyIDERKNS_10BodyFilterE(ptr noundef nonnull align 8 dereferenceable(24) %31, i32 %71, ptr noundef nonnull align 8 dereferenceable(8) %69)
  %72 = getelementptr inbounds %"class.JPH::CharacterVirtual", ptr %49, i32 0, i32 14
  %73 = load i8, ptr %72, align 8, !tbaa !42, !range !43, !noundef !44
  %74 = trunc i8 %73 to i1
  br i1 %74, label %75, label %146

75:                                               ; preds = %15
  %76 = getelementptr inbounds %"class.JPH::CollideSettingsBase", ptr %30, i32 0, i32 0
  store i8 1, ptr %76, align 16, !tbaa !45
  %77 = getelementptr inbounds %"class.JPH::CollideSettingsBase", ptr %30, i32 0, i32 1
  store i8 0, ptr %77, align 1, !tbaa !46
  call void @llvm.lifetime.start.p0(i64 32, ptr %33) #8
  %78 = load ptr, ptr %21, align 8, !tbaa !5
  %79 = invoke { double, double } @_ZN3JPH4Vec310sReplicateEf(float noundef 1.000000e+00)
          to label %80 unwind label %132

80:                                               ; preds = %75
  %81 = getelementptr inbounds %"class.JPH::Vec3", ptr %34, i32 0, i32 0
  %82 = getelementptr inbounds %union.anon, ptr %81, i32 0, i32 0
  %83 = getelementptr inbounds { double, double }, ptr %82, i32 0, i32 0
  %84 = extractvalue { double, double } %79, 0
  store double %84, ptr %83, align 16
  %85 = getelementptr inbounds { double, double }, ptr %82, i32 0, i32 1
  %86 = extractvalue { double, double } %79, 1
  store double %86, ptr %85, align 8
  %87 = getelementptr inbounds { double, double }, ptr %34, i32 0, i32 0
  %88 = load double, ptr %87, align 16
  %89 = getelementptr inbounds { double, double }, ptr %34, i32 0, i32 1
  %90 = load double, ptr %89, align 8
  %91 = load ptr, ptr %78, align 8, !tbaa !47
  %92 = getelementptr inbounds ptr, ptr %91, i64 6
  %93 = load ptr, ptr %92, align 8
  invoke void %93(ptr dead_on_unwind writable sret(%"class.JPH::AABox") align 16 %33, ptr noundef nonnull align 8 dereferenceable(26) %78, ptr noundef nonnull align 16 dereferenceable(64) %27, double %88, double %90)
          to label %94 unwind label %132

94:                                               ; preds = %80
  %95 = getelementptr inbounds %"class.JPH::CollideShapeSettings", ptr %30, i32 0, i32 1
  %96 = load float, ptr %95, align 16, !tbaa !39
  %97 = invoke { double, double } @_ZN3JPH4Vec310sReplicateEf(float noundef %96)
          to label %98 unwind label %132

98:                                               ; preds = %94
  %99 = getelementptr inbounds %"class.JPH::Vec3", ptr %37, i32 0, i32 0
  %100 = getelementptr inbounds %union.anon, ptr %99, i32 0, i32 0
  %101 = getelementptr inbounds { double, double }, ptr %100, i32 0, i32 0
  %102 = extractvalue { double, double } %97, 0
  store double %102, ptr %101, align 16
  %103 = getelementptr inbounds { double, double }, ptr %100, i32 0, i32 1
  %104 = extractvalue { double, double } %97, 1
  store double %104, ptr %103, align 8
  %105 = getelementptr inbounds { double, double }, ptr %37, i32 0, i32 0
  %106 = load double, ptr %105, align 16
  %107 = getelementptr inbounds { double, double }, ptr %37, i32 0, i32 1
  %108 = load double, ptr %107, align 8
  invoke void @_ZN3JPH5AABox8ExpandByENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(32) %33, double %106, double %108)
          to label %109 unwind label %132

109:                                              ; preds = %98
  call void @llvm.lifetime.start.p0(i64 19664, ptr %38) #8
  %110 = load ptr, ptr %21, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %39, ptr align 16 %9, i64 16, i1 false), !tbaa.struct !11
  %111 = load ptr, ptr %22, align 8, !tbaa !5
  %112 = getelementptr inbounds %"class.JPH::CharacterBase", ptr %49, i32 0, i32 2
  %113 = load ptr, ptr %112, align 16, !tbaa !49
  %114 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3JPH13PhysicsSystem20GetBodyLockInterfaceEv(ptr noundef nonnull align 16 dereferenceable(1140) %113)
          to label %115 unwind label %136

115:                                              ; preds = %109
  %116 = load ptr, ptr %26, align 8, !tbaa !5
  %117 = getelementptr inbounds { double, double }, ptr %39, i32 0, i32 0
  %118 = load double, ptr %117, align 16
  %119 = getelementptr inbounds { double, double }, ptr %39, i32 0, i32 1
  %120 = load double, ptr %119, align 8
  invoke void @_ZZNK3JPH16CharacterVirtual14CheckCollisionENS_4Vec3ENS_4QuatES1_fPKNS_5ShapeES1_RNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_21BroadPhaseLayerFilterERKNS_17ObjectLayerFilterERKNS_10BodyFilterERKNS_11ShapeFilterEEN11MyCollectorC2ES5_RKNS_5Mat44ERKNS_20CollideShapeSettingsES1_SA_RKNS_17BodyLockInterfaceESJ_SM_(ptr noundef nonnull align 16 dereferenceable(19664) %38, ptr noundef %110, ptr noundef nonnull align 16 dereferenceable(64) %27, ptr noundef nonnull align 16 dereferenceable(37) %30, double %118, double %120, ptr noundef nonnull align 8 dereferenceable(24) %111, ptr noundef nonnull align 8 dereferenceable(16) %114, ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull align 8 dereferenceable(12) %116)
          to label %121 unwind label %136

121:                                              ; preds = %115
  %122 = getelementptr inbounds %"class.JPH::CharacterBase", ptr %49, i32 0, i32 2
  %123 = load ptr, ptr %122, align 16, !tbaa !49
  %124 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3JPH13PhysicsSystem18GetBroadPhaseQueryEv(ptr noundef nonnull align 16 dereferenceable(1140) %123)
          to label %125 unwind label %140

125:                                              ; preds = %121
  %126 = load ptr, ptr %23, align 8, !tbaa !5
  %127 = load ptr, ptr %24, align 8, !tbaa !5
  %128 = load ptr, ptr %124, align 8, !tbaa !47
  %129 = getelementptr inbounds ptr, ptr %128, i64 3
  %130 = load ptr, ptr %129, align 8
  invoke void %130(ptr noundef nonnull align 8 dereferenceable(8) %124, ptr noundef nonnull align 16 dereferenceable(32) %33, ptr noundef nonnull align 8 dereferenceable(24) %38, ptr noundef nonnull align 8 dereferenceable(8) %126, ptr noundef nonnull align 8 dereferenceable(8) %127)
          to label %131 unwind label %140

131:                                              ; preds = %125
  call void @_ZZNK3JPH16CharacterVirtual14CheckCollisionENS_4Vec3ENS_4QuatES1_fPKNS_5ShapeES1_RNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_21BroadPhaseLayerFilterERKNS_17ObjectLayerFilterERKNS_10BodyFilterERKNS_11ShapeFilterEEN11MyCollectorD2Ev(ptr noundef nonnull align 16 dereferenceable(19664) %38) #8
  call void @llvm.lifetime.end.p0(i64 19664, ptr %38) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %33) #8
  br label %178

132:                                              ; preds = %98, %94, %80, %75
  %133 = landingpad { ptr, i32 }
          cleanup
  %134 = extractvalue { ptr, i32 } %133, 0
  store ptr %134, ptr %35, align 8
  %135 = extractvalue { ptr, i32 } %133, 1
  store i32 %135, ptr %36, align 4
  br label %145

136:                                              ; preds = %115, %109
  %137 = landingpad { ptr, i32 }
          cleanup
  %138 = extractvalue { ptr, i32 } %137, 0
  store ptr %138, ptr %35, align 8
  %139 = extractvalue { ptr, i32 } %137, 1
  store i32 %139, ptr %36, align 4
  br label %144

140:                                              ; preds = %125, %121
  %141 = landingpad { ptr, i32 }
          cleanup
  %142 = extractvalue { ptr, i32 } %141, 0
  store ptr %142, ptr %35, align 8
  %143 = extractvalue { ptr, i32 } %141, 1
  store i32 %143, ptr %36, align 4
  call void @_ZZNK3JPH16CharacterVirtual14CheckCollisionENS_4Vec3ENS_4QuatES1_fPKNS_5ShapeES1_RNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_21BroadPhaseLayerFilterERKNS_17ObjectLayerFilterERKNS_10BodyFilterERKNS_11ShapeFilterEEN11MyCollectorD2Ev(ptr noundef nonnull align 16 dereferenceable(19664) %38) #8
  br label %144

144:                                              ; preds = %140, %136
  call void @llvm.lifetime.end.p0(i64 19664, ptr %38) #8
  br label %145

145:                                              ; preds = %144, %132
  call void @llvm.lifetime.end.p0(i64 32, ptr %33) #8
  br label %197

146:                                              ; preds = %15
  %147 = getelementptr inbounds %"class.JPH::CollideSettingsBase", ptr %30, i32 0, i32 0
  store i8 0, ptr %147, align 16, !tbaa !45
  %148 = getelementptr inbounds %"class.JPH::CharacterBase", ptr %49, i32 0, i32 2
  %149 = load ptr, ptr %148, align 16, !tbaa !49
  %150 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3JPH13PhysicsSystem19GetNarrowPhaseQueryEv(ptr noundef nonnull align 16 dereferenceable(1140) %149)
          to label %151 unwind label %174

151:                                              ; preds = %146
  %152 = load ptr, ptr %21, align 8, !tbaa !5
  %153 = invoke { double, double } @_ZN3JPH4Vec310sReplicateEf(float noundef 1.000000e+00)
          to label %154 unwind label %174

154:                                              ; preds = %151
  %155 = getelementptr inbounds %"class.JPH::Vec3", ptr %40, i32 0, i32 0
  %156 = getelementptr inbounds %union.anon, ptr %155, i32 0, i32 0
  %157 = getelementptr inbounds { double, double }, ptr %156, i32 0, i32 0
  %158 = extractvalue { double, double } %153, 0
  store double %158, ptr %157, align 16
  %159 = getelementptr inbounds { double, double }, ptr %156, i32 0, i32 1
  %160 = extractvalue { double, double } %153, 1
  store double %160, ptr %159, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %41, ptr align 16 %9, i64 16, i1 false), !tbaa.struct !11
  %161 = load ptr, ptr %22, align 8, !tbaa !5
  %162 = load ptr, ptr %23, align 8, !tbaa !5
  %163 = load ptr, ptr %24, align 8, !tbaa !5
  %164 = load ptr, ptr %26, align 8, !tbaa !5
  %165 = getelementptr inbounds { double, double }, ptr %40, i32 0, i32 0
  %166 = load double, ptr %165, align 16
  %167 = getelementptr inbounds { double, double }, ptr %40, i32 0, i32 1
  %168 = load double, ptr %167, align 8
  %169 = getelementptr inbounds { double, double }, ptr %41, i32 0, i32 0
  %170 = load double, ptr %169, align 16
  %171 = getelementptr inbounds { double, double }, ptr %41, i32 0, i32 1
  %172 = load double, ptr %171, align 8
  invoke void @_ZNK3JPH16NarrowPhaseQuery12CollideShapeEPKNS_5ShapeENS_4Vec3ERKNS_5Mat44ERKNS_20CollideShapeSettingsES4_RNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_21BroadPhaseLayerFilterERKNS_17ObjectLayerFilterERKNS_10BodyFilterERKNS_11ShapeFilterE(ptr noundef nonnull align 8 dereferenceable(16) %150, ptr noundef %152, double %166, double %168, ptr noundef nonnull align 16 dereferenceable(64) %27, ptr noundef nonnull align 16 dereferenceable(37) %30, double %170, double %172, ptr noundef nonnull align 8 dereferenceable(24) %161, ptr noundef nonnull align 8 dereferenceable(8) %162, ptr noundef nonnull align 8 dereferenceable(8) %163, ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull align 8 dereferenceable(12) %164)
          to label %173 unwind label %174

173:                                              ; preds = %154
  br label %178

174:                                              ; preds = %184, %182, %154, %151, %146
  %175 = landingpad { ptr, i32 }
          cleanup
  %176 = extractvalue { ptr, i32 } %175, 0
  store ptr %176, ptr %35, align 8
  %177 = extractvalue { ptr, i32 } %175, 1
  store i32 %177, ptr %36, align 4
  br label %197

178:                                              ; preds = %173, %131
  %179 = getelementptr inbounds %"class.JPH::CharacterVirtual", ptr %49, i32 0, i32 2
  %180 = load ptr, ptr %179, align 8, !tbaa !50
  %181 = icmp ne ptr %180, null
  br i1 %181, label %182, label %196

182:                                              ; preds = %178
  %183 = load ptr, ptr %22, align 8, !tbaa !5
  invoke void @_ZN3JPH18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEE10SetContextEPKNS_16TransformedShapeE(ptr noundef nonnull align 8 dereferenceable(24) %183, ptr noundef null)
          to label %184 unwind label %174

184:                                              ; preds = %182
  %185 = getelementptr inbounds %"class.JPH::CharacterVirtual", ptr %49, i32 0, i32 2
  %186 = load ptr, ptr %185, align 8, !tbaa !50
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %42, ptr align 16 %9, i64 16, i1 false), !tbaa.struct !11
  %187 = load ptr, ptr %22, align 8, !tbaa !5
  %188 = getelementptr inbounds { double, double }, ptr %42, i32 0, i32 0
  %189 = load double, ptr %188, align 16
  %190 = getelementptr inbounds { double, double }, ptr %42, i32 0, i32 1
  %191 = load double, ptr %190, align 8
  %192 = load ptr, ptr %186, align 8, !tbaa !47
  %193 = getelementptr inbounds ptr, ptr %192, i64 2
  %194 = load ptr, ptr %193, align 8
  invoke void %194(ptr noundef nonnull align 8 dereferenceable(8) %186, ptr noundef %49, ptr noundef nonnull align 16 dereferenceable(64) %27, ptr noundef nonnull align 16 dereferenceable(37) %30, double %189, double %191, ptr noundef nonnull align 8 dereferenceable(24) %187)
          to label %195 unwind label %174

195:                                              ; preds = %184
  br label %196

196:                                              ; preds = %195, %178
  call void @_ZN3JPH10BodyFilterD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %31) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 64, ptr %27) #8
  ret void

197:                                              ; preds = %174, %145
  call void @_ZN3JPH10BodyFilterD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %31) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 48, ptr %30) #8
  call void @llvm.lifetime.end.p0(i64 64, ptr %27) #8
  br label %198

198:                                              ; preds = %197
  %199 = load ptr, ptr %35, align 8
  %200 = load i32, ptr %36, align 4
  %201 = insertvalue { ptr, i32 } poison, ptr %199, 0
  %202 = insertvalue { ptr, i32 } %201, i32 %200, 1
  resume { ptr, i32 } %202
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK3JPH16CharacterVirtual24GetCenterOfMassTransformENS_4Vec3ENS_4QuatEPKNS_5ShapeE(ptr dead_on_unwind noalias writable sret(%"class.JPH::Mat44") align 16, ptr noundef nonnull align 16 dereferenceable(332), double, double, double, double, ptr noundef) #5 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH20CollideShapeSettingsC2Ev(ptr noundef nonnull align 16 dereferenceable(37)) unnamed_addr #5 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH5AABox8ExpandByENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(32), double, double) #4 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZZNK3JPH16CharacterVirtual14CheckCollisionENS_4Vec3ENS_4QuatES1_fPKNS_5ShapeES1_RNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_21BroadPhaseLayerFilterERKNS_17ObjectLayerFilterERKNS_10BodyFilterERKNS_11ShapeFilterEEN11MyCollectorC2ES5_RKNS_5Mat44ERKNS_20CollideShapeSettingsES1_SA_RKNS_17BodyLockInterfaceESJ_SM_(ptr noundef nonnull align 16 dereferenceable(19664), ptr noundef, ptr noundef nonnull align 16 dereferenceable(64), ptr noundef nonnull align 16 dereferenceable(37), double, double, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(12)) unnamed_addr #4 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZZNK3JPH16CharacterVirtual14CheckCollisionENS_4Vec3ENS_4QuatES1_fPKNS_5ShapeES1_RNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_21BroadPhaseLayerFilterERKNS_17ObjectLayerFilterERKNS_10BodyFilterERKNS_11ShapeFilterEEN11MyCollectorD2Ev(ptr noundef nonnull align 16 dereferenceable(19664)) unnamed_addr #3 align 2

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

declare void @_ZNK3JPH16NarrowPhaseQuery12CollideShapeEPKNS_5ShapeENS_4Vec3ERKNS_5Mat44ERKNS_20CollideShapeSettingsES4_RNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_21BroadPhaseLayerFilterERKNS_17ObjectLayerFilterERKNS_10BodyFilterERKNS_11ShapeFilterE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, double, double, ptr noundef nonnull align 16 dereferenceable(64), ptr noundef nonnull align 16 dereferenceable(37), double, double, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(12)) #7

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="128" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 #6 = { 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 #7 = { "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, !10, i64 0}
!10 = !{!"float", !7, i64 0}
!11 = !{i64 0, i64 16, !12}
!12 = !{!7, !7, i64 0}
!13 = !{!14, !29, i64 160}
!14 = !{!"_ZTSN3JPH16CharacterVirtualE", !15, i64 0, !6, i64 144, !6, i64 152, !29, i64 160, !10, i64 164, !19, i64 168, !19, i64 172, !10, i64 176, !10, i64 180, !10, i64 184, !19, i64 188, !10, i64 192, !10, i64 196, !30, i64 200, !10, i64 204, !10, i64 208, !21, i64 224, !21, i64 240, !31, i64 256, !21, i64 272, !32, i64 288, !10, i64 312, !30, i64 316, !28, i64 320, !25, i64 328}
!15 = !{!"_ZTSN3JPH13CharacterBaseE", !16, i64 8, !6, i64 16, !20, i64 24, !21, i64 32, !22, i64 48, !10, i64 64, !24, i64 68, !25, i64 72, !26, i64 76, !21, i64 80, !21, i64 96, !21, i64 112, !27, i64 128, !28, i64 136}
!16 = !{!"_ZTSN3JPH9RefTargetINS_13CharacterBaseEEE", !17, i64 0}
!17 = !{!"_ZTSSt6atomicIjE", !18, i64 0}
!18 = !{!"_ZTSSt13__atomic_baseIjE", !19, i64 0}
!19 = !{!"int", !7, i64 0}
!20 = !{!"_ZTSN3JPH8RefConstINS_5ShapeEEE", !6, i64 0}
!21 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!22 = !{!"_ZTSN3JPH5PlaneE", !23, i64 0}
!23 = !{!"_ZTSN3JPH4Vec4E", !7, i64 0}
!24 = !{!"_ZTSN3JPH13CharacterBase12EGroundStateE", !7, i64 0}
!25 = !{!"_ZTSN3JPH6BodyIDE", !19, i64 0}
!26 = !{!"_ZTSN3JPH10SubShapeIDE", !19, i64 0}
!27 = !{!"_ZTSN3JPH8RefConstINS_15PhysicsMaterialEEE", !6, i64 0}
!28 = !{!"long", !7, i64 0}
!29 = !{!"_ZTSN3JPH13EBackFaceModeE", !7, i64 0}
!30 = !{!"bool", !7, i64 0}
!31 = !{!"_ZTSN3JPH4QuatE", !23, i64 0}
!32 = !{!"_ZTSN3JPH5ArrayINS_16CharacterVirtual7ContactENS_12STLAllocatorIS2_EEEE", !28, i64 0, !28, i64 8, !6, i64 16}
!33 = !{!34, !29, i64 36}
!34 = !{!"_ZTSN3JPH20CollideShapeSettingsE", !35, i64 0, !10, i64 32, !29, i64 36}
!35 = !{!"_ZTSN3JPH19CollideSettingsBaseE", !36, i64 0, !37, i64 1, !10, i64 4, !10, i64 8, !21, i64 16}
!36 = !{!"_ZTSN3JPH15EActiveEdgeModeE", !7, i64 0}
!37 = !{!"_ZTSN3JPH17ECollectFacesModeE", !7, i64 0}
!38 = !{!14, !10, i64 184}
!39 = !{!34, !10, i64 32}
!40 = !{i64 0, i64 4, !41}
!41 = !{!19, !19, i64 0}
!42 = !{!14, !30, i64 200}
!43 = !{i8 0, i8 2}
!44 = !{}
!45 = !{!35, !36, i64 0}
!46 = !{!35, !37, i64 1}
!47 = !{!48, !48, i64 0}
!48 = !{!"vtable pointer", !8, i64 0}
!49 = !{!15, !6, i64 16}
!50 = !{!14, !6, i64 152}


; 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::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::Vec4" = type { %union.anon.0 }
%union.anon.0 = type { <4 x float> }
%"class.JPH::CollideShapeSettings" = type <{ %"class.JPH::CollideSettingsBase", float, i8, [11 x i8] }>
%"class.JPH::CollideSettingsBase" = type { i8, i8, float, float, %"class.JPH::Vec3" }
%"class.JPH::IgnoreSingleBodyFilterChained" = type { %"class.JPH::BodyFilter", %"class.JPH::BodyID", ptr }
%"class.JPH::BodyFilter" = type { ptr }
%"class.JPH::BodyID" = type { i32 }
%"class.JPH::AABox" = type { %"class.JPH::Vec3", %"class.JPH::Vec3" }
%class.MyCollector = type { %"class.JPH::CollisionCollector.31", ptr, %"class.JPH::Mat44", %"class.JPH::Vec3", ptr, ptr, ptr, ptr, %"class.JPH::InternalEdgeRemovingCollector" }
%"class.JPH::CollisionCollector.31" = type { ptr, float, ptr }
%"class.JPH::InternalEdgeRemovingCollector" = type { %"class.JPH::CollisionCollector", ptr, %"class.JPH::StaticArray.32", [12 x i8], %"class.JPH::StaticArray.33" }
%"class.JPH::CollisionCollector" = type { ptr, float, ptr }
%"class.JPH::StaticArray.32" = type { i32, [128 x %"struct.JPH::StaticArray<JPH::Float3, 128>::Storage"] }
%"struct.JPH::StaticArray<JPH::Float3, 128>::Storage" = type { [12 x i8] }
%"class.JPH::StaticArray.33" = type { i32, [12 x i8], [16 x %"struct.JPH::StaticArray<JPH::CollideShapeResult, 16>::Storage"] }
%"struct.JPH::StaticArray<JPH::CollideShapeResult, 16>::Storage" = type { [1120 x i8] }

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3JPH16CharacterVirtual14CheckCollisionENS_4Vec3ENS_4QuatES1_fPKNS_5ShapeES1_RNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_21BroadPhaseLayerFilterERKNS_17ObjectLayerFilterERKNS_10BodyFilterERKNS_11ShapeFilterE(ptr noundef nonnull align 16 dereferenceable(332) %0, double %1, double %2, double %3, double %4, double %5, double %6, float noundef %7, ptr noundef %8, ptr nocapture noundef readonly byval(%"class.JPH::Vec3") align 16 %9, ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(12) %14) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %16 = alloca %"class.JPH::Mat44", align 16
  %17 = alloca %"class.JPH::CollideShapeSettings", align 16
  %18 = alloca %"class.JPH::IgnoreSingleBodyFilterChained", align 8
  %19 = alloca %"class.JPH::AABox", align 16
  %20 = alloca %class.MyCollector, align 16
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %16) #7
  call void @_ZNK3JPH16CharacterVirtual24GetCenterOfMassTransformENS_4Vec3ENS_4QuatEPKNS_5ShapeE(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %16, ptr noundef nonnull align 16 dereferenceable(332) %0, double %1, double %2, double %3, double %4, ptr noundef %8)
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %17) #7
  call void @_ZN3JPH20CollideShapeSettingsC2Ev(ptr noundef nonnull align 16 dereferenceable(37) %17)
  %21 = getelementptr inbounds i8, ptr %0, i64 160
  %22 = load i8, ptr %21, align 16, !tbaa !5
  %23 = getelementptr inbounds i8, ptr %17, i64 36
  store i8 %22, ptr %23, align 4, !tbaa !29
  %24 = getelementptr inbounds i8, ptr %17, i64 16
  store double %5, ptr %24, align 16
  %.sroa.234.0..sroa_idx = getelementptr inbounds i8, ptr %17, i64 24
  store double %6, ptr %.sroa.234.0..sroa_idx, align 8, !tbaa !34
  %25 = getelementptr inbounds i8, ptr %0, i64 184
  %26 = load float, ptr %25, align 8, !tbaa !35
  %27 = fadd float %26, %7
  %28 = getelementptr inbounds i8, ptr %17, i64 32
  store float %27, ptr %28, align 16, !tbaa !36
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %18) #7
  %29 = getelementptr inbounds i8, ptr %0, i64 328
  %.sroa.011.0.copyload = load i32, ptr %29, align 8, !tbaa !37
  call void @_ZN3JPH29IgnoreSingleBodyFilterChainedC2ENS_6BodyIDERKNS_10BodyFilterE(ptr noundef nonnull align 8 dereferenceable(24) %18, i32 %.sroa.011.0.copyload, ptr noundef nonnull align 8 dereferenceable(8) %13)
  %30 = getelementptr inbounds i8, ptr %0, i64 200
  %31 = load i8, ptr %30, align 8, !tbaa !38, !range !39, !noundef !40
  %32 = trunc nuw i8 %31 to i1
  br i1 %32, label %33, label %67

33:                                               ; preds = %15
  store i8 1, ptr %17, align 16, !tbaa !41
  %34 = getelementptr inbounds i8, ptr %17, i64 1
  store i8 0, ptr %34, align 1, !tbaa !42
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %19) #7
  %35 = invoke { double, double } @_ZN3JPH4Vec310sReplicateEf(float noundef 1.000000e+00)
          to label %36 unwind label %59

36:                                               ; preds = %33
  %37 = extractvalue { double, double } %35, 0
  %38 = extractvalue { double, double } %35, 1
  %39 = load ptr, ptr %8, align 8, !tbaa !43
  %40 = getelementptr inbounds i8, ptr %39, i64 48
  %41 = load ptr, ptr %40, align 8
  invoke void %41(ptr dead_on_unwind nonnull writable sret(%"class.JPH::AABox") align 16 %19, ptr noundef nonnull align 8 dereferenceable(26) %8, ptr noundef nonnull align 16 dereferenceable(64) %16, double %37, double %38)
          to label %42 unwind label %59

42:                                               ; preds = %36
  %43 = load float, ptr %28, align 16, !tbaa !36
  %44 = invoke { double, double } @_ZN3JPH4Vec310sReplicateEf(float noundef %43)
          to label %45 unwind label %59

45:                                               ; preds = %42
  %46 = extractvalue { double, double } %44, 0
  %47 = extractvalue { double, double } %44, 1
  invoke void @_ZN3JPH5AABox8ExpandByENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(32) %19, double %46, double %47)
          to label %48 unwind label %59

48:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 19664, ptr nonnull %20) #7
  %.sroa.05.0.copyload = load double, ptr %9, align 16
  %.sroa.26.0..sroa_idx = getelementptr inbounds i8, ptr %9, i64 8
  %.sroa.26.0.copyload = load double, ptr %.sroa.26.0..sroa_idx, align 8, !tbaa !34
  %49 = getelementptr inbounds i8, ptr %0, i64 16
  %50 = load ptr, ptr %49, align 16, !tbaa !45
  %51 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3JPH13PhysicsSystem20GetBodyLockInterfaceEv(ptr noundef nonnull align 16 dereferenceable(1140) %50)
  invoke void @_ZZNK3JPH16CharacterVirtual14CheckCollisionENS_4Vec3ENS_4QuatES1_fPKNS_5ShapeES1_RNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_21BroadPhaseLayerFilterERKNS_17ObjectLayerFilterERKNS_10BodyFilterERKNS_11ShapeFilterEEN11MyCollectorC2ES5_RKNS_5Mat44ERKNS_20CollideShapeSettingsES1_SA_RKNS_17BodyLockInterfaceESJ_SM_(ptr noundef nonnull align 16 dereferenceable(19664) %20, ptr noundef nonnull %8, ptr noundef nonnull align 16 dereferenceable(64) %16, ptr noundef nonnull align 16 dereferenceable(37) %17, double %.sroa.05.0.copyload, double %.sroa.26.0.copyload, ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(16) %51, ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(12) %14)
          to label %52 unwind label %61

52:                                               ; preds = %48
  %53 = load ptr, ptr %49, align 16, !tbaa !45
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3JPH13PhysicsSystem18GetBroadPhaseQueryEv(ptr noundef nonnull align 16 dereferenceable(1140) %53)
  %55 = load ptr, ptr %54, align 8, !tbaa !43
  %56 = getelementptr inbounds i8, ptr %55, i64 24
  %57 = load ptr, ptr %56, align 8
  invoke void %57(ptr noundef nonnull align 8 dereferenceable(8) %54, ptr noundef nonnull align 16 dereferenceable(32) %19, ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %58 unwind label %63

58:                                               ; preds = %52
  call void @_ZZNK3JPH16CharacterVirtual14CheckCollisionENS_4Vec3ENS_4QuatES1_fPKNS_5ShapeES1_RNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_21BroadPhaseLayerFilterERKNS_17ObjectLayerFilterERKNS_10BodyFilterERKNS_11ShapeFilterEEN11MyCollectorD2Ev(ptr noundef nonnull align 16 dereferenceable(19664) %20) #7
  call void @llvm.lifetime.end.p0(i64 19664, ptr nonnull %20) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %19) #7
  br label %77

59:                                               ; preds = %45, %42, %36, %33
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %66

61:                                               ; preds = %48
  %62 = landingpad { ptr, i32 }
          cleanup
  br label %65

63:                                               ; preds = %52
  %64 = landingpad { ptr, i32 }
          cleanup
  call void @_ZZNK3JPH16CharacterVirtual14CheckCollisionENS_4Vec3ENS_4QuatES1_fPKNS_5ShapeES1_RNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_21BroadPhaseLayerFilterERKNS_17ObjectLayerFilterERKNS_10BodyFilterERKNS_11ShapeFilterEEN11MyCollectorD2Ev(ptr noundef nonnull align 16 dereferenceable(19664) %20) #7
  br label %65

65:                                               ; preds = %63, %61
  %.pn = phi { ptr, i32 } [ %64, %63 ], [ %62, %61 ]
  call void @llvm.lifetime.end.p0(i64 19664, ptr nonnull %20) #7
  br label %66

66:                                               ; preds = %65, %59
  %.pn.pn = phi { ptr, i32 } [ %.pn, %65 ], [ %60, %59 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %19) #7
  br label %86

67:                                               ; preds = %15
  store i8 0, ptr %17, align 16, !tbaa !41
  %68 = getelementptr inbounds i8, ptr %0, i64 16
  %69 = load ptr, ptr %68, align 16, !tbaa !45
  %70 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3JPH13PhysicsSystem19GetNarrowPhaseQueryEv(ptr noundef nonnull align 16 dereferenceable(1140) %69)
  %71 = invoke { double, double } @_ZN3JPH4Vec310sReplicateEf(float noundef 1.000000e+00)
          to label %72 unwind label %75

72:                                               ; preds = %67
  %73 = extractvalue { double, double } %71, 0
  %74 = extractvalue { double, double } %71, 1
  %.sroa.01.0.copyload = load double, ptr %9, align 16
  %.sroa.22.0..sroa_idx = getelementptr inbounds i8, ptr %9, i64 8
  %.sroa.22.0.copyload = load double, ptr %.sroa.22.0..sroa_idx, align 8, !tbaa !34
  invoke void @_ZNK3JPH16NarrowPhaseQuery12CollideShapeEPKNS_5ShapeENS_4Vec3ERKNS_5Mat44ERKNS_20CollideShapeSettingsES4_RNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_21BroadPhaseLayerFilterERKNS_17ObjectLayerFilterERKNS_10BodyFilterERKNS_11ShapeFilterE(ptr noundef nonnull align 8 dereferenceable(16) %70, ptr noundef %8, double %73, double %74, ptr noundef nonnull align 16 dereferenceable(64) %16, ptr noundef nonnull align 16 dereferenceable(37) %17, double %.sroa.01.0.copyload, double %.sroa.22.0.copyload, ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(12) %14)
          to label %77 unwind label %75

75:                                               ; preds = %80, %72, %67
  %76 = landingpad { ptr, i32 }
          cleanup
  br label %86

77:                                               ; preds = %72, %58
  %.sroa.2.0.copyload = phi double [ %.sroa.22.0.copyload, %72 ], [ %.sroa.26.0.copyload, %58 ]
  %.sroa.0.0.copyload = phi double [ %.sroa.01.0.copyload, %72 ], [ %.sroa.05.0.copyload, %58 ]
  %78 = getelementptr inbounds i8, ptr %0, i64 152
  %79 = load ptr, ptr %78, align 8, !tbaa !46
  %.not = icmp eq ptr %79, null
  br i1 %.not, label %85, label %80

80:                                               ; preds = %77
  call void @_ZN3JPH18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEE10SetContextEPKNS_16TransformedShapeE(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef null)
  %81 = load ptr, ptr %78, align 8, !tbaa !46
  %82 = load ptr, ptr %81, align 8, !tbaa !43
  %83 = getelementptr inbounds i8, ptr %82, i64 16
  %84 = load ptr, ptr %83, align 8
  invoke void %84(ptr noundef nonnull align 8 dereferenceable(8) %81, ptr noundef nonnull %0, ptr noundef nonnull align 16 dereferenceable(64) %16, ptr noundef nonnull align 16 dereferenceable(37) %17, double %.sroa.0.0.copyload, double %.sroa.2.0.copyload, ptr noundef nonnull align 8 dereferenceable(24) %10)
          to label %85 unwind label %75

85:                                               ; preds = %80, %77
  call void @_ZN3JPH10BodyFilterD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %18) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %16) #7
  ret void

86:                                               ; preds = %75, %66
  %.pn44 = phi { ptr, i32 } [ %76, %75 ], [ %.pn.pn, %66 ]
  call void @_ZN3JPH10BodyFilterD2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %18) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %17) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %16) #7
  resume { ptr, i32 } %.pn44
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZNK3JPH16CharacterVirtual24GetCenterOfMassTransformENS_4Vec3ENS_4QuatEPKNS_5ShapeE(ptr dead_on_unwind noalias writable sret(%"class.JPH::Mat44") align 16, ptr noundef nonnull align 16 dereferenceable(332), double, double, double, double, ptr noundef) local_unnamed_addr #4 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH5AABox8ExpandByENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(32), double, double) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZZNK3JPH16CharacterVirtual14CheckCollisionENS_4Vec3ENS_4QuatES1_fPKNS_5ShapeES1_RNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_21BroadPhaseLayerFilterERKNS_17ObjectLayerFilterERKNS_10BodyFilterERKNS_11ShapeFilterEEN11MyCollectorC2ES5_RKNS_5Mat44ERKNS_20CollideShapeSettingsES1_SA_RKNS_17BodyLockInterfaceESJ_SM_(ptr noundef nonnull align 16 dereferenceable(19664), ptr noundef, ptr noundef nonnull align 16 dereferenceable(64), ptr noundef nonnull align 16 dereferenceable(37), double, double, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(12)) unnamed_addr #3 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZZNK3JPH16CharacterVirtual14CheckCollisionENS_4Vec3ENS_4QuatES1_fPKNS_5ShapeES1_RNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_21BroadPhaseLayerFilterERKNS_17ObjectLayerFilterERKNS_10BodyFilterERKNS_11ShapeFilterEEN11MyCollectorD2Ev(ptr noundef nonnull align 16 dereferenceable(19664)) unnamed_addr #2 align 2

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

declare void @_ZNK3JPH16NarrowPhaseQuery12CollideShapeEPKNS_5ShapeENS_4Vec3ERKNS_5Mat44ERKNS_20CollideShapeSettingsES4_RNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_21BroadPhaseLayerFilterERKNS_17ObjectLayerFilterERKNS_10BodyFilterERKNS_11ShapeFilterE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, double, double, ptr noundef nonnull align 16 dereferenceable(64), ptr noundef nonnull align 16 dereferenceable(37), double, double, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(12)) local_unnamed_addr #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEE10SetContextEPKNS_16TransformedShapeE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef) local_unnamed_addr #5 align 2

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

attributes #0 = { mustprogress 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 = { 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 #3 = { 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 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 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 #6 = { "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, !25, i64 160}
!6 = !{!"_ZTSN3JPH16CharacterVirtualE", !7, i64 0, !14, i64 144, !14, i64 152, !25, i64 160, !19, i64 164, !11, i64 168, !11, i64 172, !19, i64 176, !19, i64 180, !19, i64 184, !11, i64 188, !19, i64 192, !19, i64 196, !26, i64 200, !19, i64 204, !19, i64 208, !16, i64 224, !16, i64 240, !27, i64 256, !16, i64 272, !28, i64 288, !19, i64 312, !26, i64 316, !24, i64 320, !21, i64 328}
!7 = !{!"_ZTSN3JPH13CharacterBaseE", !8, i64 8, !14, i64 16, !15, i64 24, !16, i64 32, !17, i64 48, !19, i64 64, !20, i64 68, !21, i64 72, !22, i64 76, !16, i64 80, !16, i64 96, !16, i64 112, !23, i64 128, !24, i64 136}
!8 = !{!"_ZTSN3JPH9RefTargetINS_13CharacterBaseEEE", !9, i64 0}
!9 = !{!"_ZTSSt6atomicIjE", !10, i64 0}
!10 = !{!"_ZTSSt13__atomic_baseIjE", !11, i64 0}
!11 = !{!"int", !12, i64 0}
!12 = !{!"omnipotent char", !13, i64 0}
!13 = !{!"Simple C++ TBAA"}
!14 = !{!"any pointer", !12, i64 0}
!15 = !{!"_ZTSN3JPH8RefConstINS_5ShapeEEE", !14, i64 0}
!16 = !{!"_ZTSN3JPH4Vec3E", !12, i64 0}
!17 = !{!"_ZTSN3JPH5PlaneE", !18, i64 0}
!18 = !{!"_ZTSN3JPH4Vec4E", !12, i64 0}
!19 = !{!"float", !12, i64 0}
!20 = !{!"_ZTSN3JPH13CharacterBase12EGroundStateE", !12, i64 0}
!21 = !{!"_ZTSN3JPH6BodyIDE", !11, i64 0}
!22 = !{!"_ZTSN3JPH10SubShapeIDE", !11, i64 0}
!23 = !{!"_ZTSN3JPH8RefConstINS_15PhysicsMaterialEEE", !14, i64 0}
!24 = !{!"long", !12, i64 0}
!25 = !{!"_ZTSN3JPH13EBackFaceModeE", !12, i64 0}
!26 = !{!"bool", !12, i64 0}
!27 = !{!"_ZTSN3JPH4QuatE", !18, i64 0}
!28 = !{!"_ZTSN3JPH5ArrayINS_16CharacterVirtual7ContactENS_12STLAllocatorIS2_EEEE", !24, i64 0, !24, i64 8, !14, i64 16}
!29 = !{!30, !25, i64 36}
!30 = !{!"_ZTSN3JPH20CollideShapeSettingsE", !31, i64 0, !19, i64 32, !25, i64 36}
!31 = !{!"_ZTSN3JPH19CollideSettingsBaseE", !32, i64 0, !33, i64 1, !19, i64 4, !19, i64 8, !16, i64 16}
!32 = !{!"_ZTSN3JPH15EActiveEdgeModeE", !12, i64 0}
!33 = !{!"_ZTSN3JPH17ECollectFacesModeE", !12, i64 0}
!34 = !{!12, !12, i64 0}
!35 = !{!6, !19, i64 184}
!36 = !{!30, !19, i64 32}
!37 = !{!11, !11, i64 0}
!38 = !{!6, !26, i64 200}
!39 = !{i8 0, i8 2}
!40 = !{}
!41 = !{!31, !32, i64 0}
!42 = !{!31, !33, i64 1}
!43 = !{!44, !44, i64 0}
!44 = !{!"vtable pointer", !13, i64 0}
!45 = !{!7, !14, i64 16}
!46 = !{!6, !14, i64 152}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass