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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"struct.JPH::AssertLastParam" = type { i8 }
%"class.JPH::CollideShapeSettings" = type <{ %"class.JPH::CollideSettingsBase", float, i8, [11 x i8] }>
%"class.JPH::CollideSettingsBase" = type { i8, i8, float, float, %"class.JPH::Vec3" }
%"class.JPH::Vec3" = type { %union.anon.13 }
%union.anon.13 = type { <4 x float> }
%"union.JPH::SimShapeFilterWrapperUnion" = type { %"class.JPH::SimShapeFilterWrapper" }
%"class.JPH::SimShapeFilterWrapper" = type { %"class.JPH::ShapeFilter.base", ptr, ptr, ptr }
%"class.JPH::ShapeFilter.base" = type <{ ptr, %"class.JPH::BodyID" }>
%"class.JPH::BodyID" = type { i32 }
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::Vec4" = type { %union.anon.42 }
%union.anon.42 = type { <4 x float> }
%"class.JPH::Quat" = type { %"class.JPH::Vec4" }
%class.ReductionCollideShapeCollector = type { %"class.JPH::CollisionCollector.48", ptr, ptr, ptr, i8, [15 x i8], %"class.JPH::StaticArray.49" }
%"class.JPH::CollisionCollector.48" = type { ptr, float, ptr }
%"class.JPH::StaticArray.49" = type { i32, [12 x i8], [32 x %"struct.JPH::StaticArray<MyManifold, 32>::Storage"] }
%"struct.JPH::StaticArray<MyManifold, 32>::Storage" = type { [2144 x i8] }
%class.NonReductionCollideShapeCollector = type <{ %"class.JPH::CollisionCollector.48", ptr, ptr, ptr, ptr, ptr, i8, i8, [6 x i8] }>
%"class.JPH::PhysicsSystem" = type <{ ptr, ptr, %"class.JPH::BodyManager", %"class.JPH::BodyLockInterfaceNoLock", %"class.JPH::BodyLockInterfaceLocking", %"class.JPH::BodyInterface", %"class.JPH::BodyInterface", %"class.JPH::NarrowPhaseQuery", %"class.JPH::NarrowPhaseQuery", ptr, ptr, ptr, %"class.std::function", %"struct.JPH::PhysicsSettings", [4 x i8], %"class.JPH::ContactConstraintManager", %"class.JPH::ConstraintManager", %"class.JPH::IslandBuilder", %"class.JPH::LargeIslandSplitter", %"class.JPH::Mutex", %"class.JPH::Array.10", %"class.JPH::Vec3", float, [12 x i8] }>
%"class.JPH::BodyManager" = type <{ %"class.JPH::Array", i32, [4 x i8], i64, %"class.JPH::Mutex", %"class.JPH::MutexArray", %"class.JPH::Array.0", %"class.JPH::Mutex", [2 x ptr], [2 x %"struct.std::atomic"], i32, [4 x i8], %"class.JPH::Mutex", %"class.JPH::Array.3", ptr, ptr, i8, [7 x i8] }>
%"class.JPH::Array" = type { i64, i64, ptr }
%"class.JPH::MutexArray" = type <{ ptr, i32, [4 x i8] }>
%"class.JPH::Array.0" = type { i64, i64, ptr }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i32 }
%"class.JPH::Array.3" = type { i64, i64, ptr }
%"class.JPH::BodyLockInterfaceNoLock" = type { %"class.JPH::BodyLockInterface" }
%"class.JPH::BodyLockInterface" = type { ptr, ptr }
%"class.JPH::BodyLockInterfaceLocking" = type { %"class.JPH::BodyLockInterface" }
%"class.JPH::BodyInterface" = type { ptr, ptr, ptr }
%"class.JPH::NarrowPhaseQuery" = type { ptr, ptr }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%"struct.JPH::PhysicsSettings" = type <{ i32, i32, i32, float, float, float, float, float, float, float, float, float, float, float, i32, i32, float, float, float, i8, i8, i8, i8, i8, i8, i8, i8 }>
%"class.JPH::ContactConstraintManager" = type { [8 x i8], [2 x %"class.JPH::ContactConstraintManager::ManifoldCache"], i32, ptr, ptr, ptr, ptr, ptr, i32, %"struct.std::atomic", ptr }
%"class.JPH::ContactConstraintManager::ManifoldCache" = type <{ %"class.JPH::LFHMAllocator", %"class.JPH::LockFreeHashMap", %"class.JPH::LockFreeHashMap.6", i8, [7 x i8] }>
%"class.JPH::LFHMAllocator" = type { ptr, i32, %"struct.std::atomic" }
%"class.JPH::LockFreeHashMap" = type { ptr, %"struct.std::atomic", ptr, i32, i32 }
%"class.JPH::LockFreeHashMap.6" = type { ptr, %"struct.std::atomic", ptr, i32, i32 }
%"class.JPH::ConstraintManager" = type { ptr, %"class.JPH::Array.7", %"class.JPH::Mutex" }
%"class.JPH::Array.7" = type { i64, i64, ptr }
%"class.JPH::IslandBuilder" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i32, i32 }
%"class.JPH::LargeIslandSplitter" = type <{ i32, [4 x i8], ptr, ptr, ptr, i32, %"struct.std::atomic", i32, [4 x i8], ptr, %"struct.std::atomic", [4 x i8] }>
%"class.JPH::Mutex" = type { %"class.std::mutex", %"class.std::thread::id" }
%"class.std::mutex" = type { %"class.std::__mutex_base" }
%"class.std::__mutex_base" = type { %union.pthread_mutex_t }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::thread::id" = type { i64 }
%"class.JPH::Array.10" = type { i64, i64, ptr }
%"struct.JPH::BodyPair" = type { %"class.JPH::BodyID", %"class.JPH::BodyID" }
%"class.JPH::ContactManifold" = type { %"class.JPH::Vec3", %"class.JPH::Vec3", float, %"class.JPH::SubShapeID", %"class.JPH::SubShapeID", [4 x i8], %"class.JPH::StaticArray.50", %"class.JPH::StaticArray.50" }
%"class.JPH::SubShapeID" = type { i32 }
%"class.JPH::StaticArray.50" = type { i32, [12 x i8], [64 x %"struct.JPH::StaticArray<JPH::Vec3, 64>::Storage"] }
%"struct.JPH::StaticArray<JPH::Vec3, 64>::Storage" = type { [16 x i8] }
%class.MyManifold = type { %"class.JPH::ContactManifold", %"class.JPH::Vec3" }

@.str.24 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [18 x i8], align 1

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

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: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef, ptr noundef, i32 noundef) #1

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(122) ptr @_ZN3JPH11BodyManager7GetBodyERKNS_6BodyIDE(ptr noundef nonnull align 8 dereferenceable(297), ptr noundef nonnull align 4 dereferenceable(4)) #3 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH13PhysicsSystem15ProcessBodyPairERNS_24ContactConstraintManager16ContactAllocatorERKNS_8BodyPairE(ptr noundef nonnull align 16 dereferenceable(1172) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(8) %2) #3 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"struct.JPH::AssertLastParam", align 1
  %10 = alloca i32, align 4
  %11 = alloca i8, align 1
  %12 = alloca i8, align 1
  %13 = alloca ptr, align 8
  %14 = alloca %"class.JPH::CollideShapeSettings", align 16
  %15 = alloca %"class.JPH::Vec3", align 16
  %16 = alloca %"class.JPH::Vec3", align 16
  %17 = alloca %"class.JPH::Vec3", align 16
  %18 = alloca %"union.JPH::SimShapeFilterWrapperUnion", align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca i32, align 4
  %22 = alloca %"class.JPH::Vec3", align 16
  %23 = alloca %"class.JPH::Mat44", align 16
  %24 = alloca %"class.JPH::Quat", align 16
  %25 = alloca %"class.JPH::Mat44", align 16
  %26 = alloca %"class.JPH::Mat44", align 16
  %27 = alloca %"class.JPH::Mat44", align 16
  %28 = alloca %"class.JPH::Vec3", align 16
  %29 = alloca %class.ReductionCollideShapeCollector, align 16
  %30 = alloca ptr, align 8
  %31 = alloca ptr, align 8
  %32 = alloca ptr, align 8
  %33 = alloca ptr, align 8
  %34 = alloca %"class.JPH::Vec3", align 16
  %35 = alloca %"class.JPH::Vec3", align 16
  %36 = alloca %class.NonReductionCollideShapeCollector, align 8
  %37 = alloca [2 x %"class.JPH::BodyID"], align 4
  %38 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %39 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #10
  %40 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %39, i32 0, i32 2
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = getelementptr inbounds %"struct.JPH::BodyPair", ptr %41, i32 0, i32 0
  %43 = call noundef nonnull align 16 dereferenceable(122) ptr @_ZN3JPH11BodyManager7GetBodyERKNS_6BodyIDE(ptr noundef nonnull align 8 dereferenceable(297) %40, ptr noundef nonnull align 4 dereferenceable(4) %42)
  store ptr %43, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #10
  %44 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %39, i32 0, i32 2
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = getelementptr inbounds %"struct.JPH::BodyPair", ptr %45, i32 0, i32 1
  %47 = call noundef nonnull align 16 dereferenceable(122) ptr @_ZN3JPH11BodyManager7GetBodyERKNS_6BodyIDE(ptr noundef nonnull align 8 dereferenceable(297) %44, ptr noundef nonnull align 4 dereferenceable(4) %46)
  store ptr %47, ptr %8, align 8, !tbaa !5
  br label %48

48:                                               ; preds = %3
  %49 = load ptr, ptr %7, align 8, !tbaa !5
  %50 = call noundef zeroext i1 @_ZNK3JPH4Body8IsActiveEv(ptr noundef nonnull align 16 dereferenceable(122) %49)
  br i1 %50, label %54, label %51

51:                                               ; preds = %48
  %52 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.53, ptr noundef @.str.24, i32 noundef 992)
  br i1 %52, label %53, label %54

53:                                               ; preds = %51
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #10, !srcloc !9
  br label %54

54:                                               ; preds = %53, %51, %48
  br label %55

55:                                               ; preds = %54
  br label %56

56:                                               ; preds = %55
  %57 = load ptr, ptr %8, align 8, !tbaa !5
  %58 = call noundef zeroext i1 @_ZNK3JPH4Body10IsSoftBodyEv(ptr noundef nonnull align 16 dereferenceable(122) %57)
  br i1 %58, label %59, label %67

59:                                               ; preds = %56
  %60 = load ptr, ptr %8, align 8, !tbaa !5
  %61 = call noundef zeroext i1 @_ZNK3JPH4Body8IsActiveEv(ptr noundef nonnull align 16 dereferenceable(122) %60)
  br i1 %61, label %66, label %62

62:                                               ; preds = %59
  %63 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %39, i32 0, i32 2
  %64 = load ptr, ptr %6, align 8, !tbaa !5
  %65 = getelementptr inbounds %"struct.JPH::BodyPair", ptr %64, i32 0, i32 1
  call void @_ZN3JPH11BodyManager14ActivateBodiesEPKNS_6BodyIDEi(ptr noundef nonnull align 8 dereferenceable(297) %63, ptr noundef %65, i32 noundef 1)
  br label %66

66:                                               ; preds = %62, %59
  store i32 1, ptr %10, align 4
  br label %424

67:                                               ; preds = %56
  %68 = load ptr, ptr %7, align 8, !tbaa !5
  %69 = call noundef zeroext i8 @_ZNK3JPH4Body13GetMotionTypeEv(ptr noundef nonnull align 16 dereferenceable(122) %68)
  %70 = load ptr, ptr %8, align 8, !tbaa !5
  %71 = call noundef zeroext i8 @_ZNK3JPH4Body13GetMotionTypeEv(ptr noundef nonnull align 16 dereferenceable(122) %70)
  %72 = icmp ult i8 %69, %71
  br i1 %72, label %85, label %73

73:                                               ; preds = %67
  %74 = load ptr, ptr %7, align 8, !tbaa !5
  %75 = call noundef zeroext i8 @_ZNK3JPH4Body13GetMotionTypeEv(ptr noundef nonnull align 16 dereferenceable(122) %74)
  %76 = load ptr, ptr %8, align 8, !tbaa !5
  %77 = call noundef zeroext i8 @_ZNK3JPH4Body13GetMotionTypeEv(ptr noundef nonnull align 16 dereferenceable(122) %76)
  %78 = icmp eq i8 %75, %77
  br i1 %78, label %79, label %86

79:                                               ; preds = %73
  %80 = load ptr, ptr %6, align 8, !tbaa !5
  %81 = getelementptr inbounds %"struct.JPH::BodyPair", ptr %80, i32 0, i32 1
  %82 = load ptr, ptr %6, align 8, !tbaa !5
  %83 = getelementptr inbounds %"struct.JPH::BodyPair", ptr %82, i32 0, i32 0
  %84 = call noundef zeroext i1 @_ZNK3JPH6BodyIDltERKS0_(ptr noundef nonnull align 4 dereferenceable(4) %81, ptr noundef nonnull align 4 dereferenceable(4) %83)
  br i1 %84, label %85, label %86

85:                                               ; preds = %79, %67
  call void @_ZSt4swapIPN3JPH4BodyEENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS6_ESt18is_move_assignableIS6_EEE5valueEvE4typeERS6_SF_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #10
  br label %86

86:                                               ; preds = %85, %79, %73
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #10
  store i8 0, ptr %11, align 1, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #10
  store i8 0, ptr %12, align 1, !tbaa !10
  %87 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %39, i32 0, i32 13
  %88 = getelementptr inbounds %"struct.JPH::PhysicsSettings", ptr %87, i32 0, i32 21
  %89 = load i8, ptr %88, align 2, !tbaa !12, !range !43, !noundef !44
  %90 = trunc i8 %89 to i1
  br i1 %90, label %91, label %102

91:                                               ; preds = %86
  %92 = load ptr, ptr %7, align 8, !tbaa !5
  %93 = call noundef zeroext i1 @_ZNK3JPH4Body23IsCollisionCacheInvalidEv(ptr noundef nonnull align 16 dereferenceable(122) %92)
  br i1 %93, label %102, label %94

94:                                               ; preds = %91
  %95 = load ptr, ptr %8, align 8, !tbaa !5
  %96 = call noundef zeroext i1 @_ZNK3JPH4Body23IsCollisionCacheInvalidEv(ptr noundef nonnull align 16 dereferenceable(122) %95)
  br i1 %96, label %102, label %97

97:                                               ; preds = %94
  %98 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %39, i32 0, i32 15
  %99 = load ptr, ptr %5, align 8, !tbaa !5
  %100 = load ptr, ptr %7, align 8, !tbaa !5
  %101 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN3JPH24ContactConstraintManager20GetContactsFromCacheERNS0_16ContactAllocatorERNS_4BodyES4_RbS5_(ptr noundef nonnull align 8 dereferenceable(248) %98, ptr noundef nonnull align 8 dereferenceable(32) %99, ptr noundef nonnull align 16 dereferenceable(122) %100, ptr noundef nonnull align 16 dereferenceable(122) %101, ptr noundef nonnull align 1 dereferenceable(1) %11, ptr noundef nonnull align 1 dereferenceable(1) %12)
  br label %102

102:                                              ; preds = %97, %94, %91, %86
  %103 = load i8, ptr %11, align 1, !tbaa !10, !range !43, !noundef !44
  %104 = trunc i8 %103 to i1
  br i1 %104, label %373, label %105

105:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #10
  %106 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %39, i32 0, i32 15
  %107 = load ptr, ptr %5, align 8, !tbaa !5
  %108 = load ptr, ptr %7, align 8, !tbaa !5
  %109 = load ptr, ptr %8, align 8, !tbaa !5
  %110 = call noundef ptr @_ZN3JPH24ContactConstraintManager11AddBodyPairERNS0_16ContactAllocatorERKNS_4BodyES5_(ptr noundef nonnull align 8 dereferenceable(248) %106, ptr noundef nonnull align 8 dereferenceable(32) %107, ptr noundef nonnull align 16 dereferenceable(122) %108, ptr noundef nonnull align 16 dereferenceable(122) %109)
  store ptr %110, ptr %13, align 8, !tbaa !5
  %111 = load ptr, ptr %13, align 8, !tbaa !5
  %112 = icmp eq ptr %111, null
  br i1 %112, label %113, label %114

113:                                              ; preds = %105
  store i32 1, ptr %10, align 4
  br label %366

114:                                              ; preds = %105
  call void @llvm.lifetime.start.p0(i64 48, ptr %14) #10
  call void @_ZN3JPH20CollideShapeSettingsC2Ev(ptr noundef nonnull align 16 dereferenceable(37) %14)
  %115 = getelementptr inbounds %"class.JPH::CollideSettingsBase", ptr %14, i32 0, i32 1
  store i8 0, ptr %115, align 1, !tbaa !45
  %116 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %39, i32 0, i32 13
  %117 = getelementptr inbounds %"struct.JPH::PhysicsSettings", ptr %116, i32 0, i32 25
  %118 = load i8, ptr %117, align 2, !tbaa !49, !range !43, !noundef !44
  %119 = trunc i8 %118 to i1
  %120 = zext i1 %119 to i64
  %121 = select i1 %119, i8 0, i8 1
  %122 = getelementptr inbounds %"class.JPH::CollideSettingsBase", ptr %14, i32 0, i32 0
  store i8 %121, ptr %122, align 16, !tbaa !50
  %123 = load ptr, ptr %7, align 8, !tbaa !5
  %124 = call noundef zeroext i1 @_ZNK3JPH4Body8IsSensorEv(ptr noundef nonnull align 16 dereferenceable(122) %123)
  br i1 %124, label %128, label %125

125:                                              ; preds = %114
  %126 = load ptr, ptr %8, align 8, !tbaa !5
  %127 = call noundef zeroext i1 @_ZNK3JPH4Body8IsSensorEv(ptr noundef nonnull align 16 dereferenceable(122) %126)
  br i1 %127, label %128, label %129

128:                                              ; preds = %125, %114
  br label %133

129:                                              ; preds = %125
  %130 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %39, i32 0, i32 13
  %131 = getelementptr inbounds %"struct.JPH::PhysicsSettings", ptr %130, i32 0, i32 4
  %132 = load float, ptr %131, align 8, !tbaa !51
  br label %133

133:                                              ; preds = %129, %128
  %134 = phi float [ 0.000000e+00, %128 ], [ %132, %129 ]
  %135 = getelementptr inbounds %"class.JPH::CollideShapeSettings", ptr %14, i32 0, i32 1
  store float %134, ptr %135, align 16, !tbaa !52
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #10
  %136 = load ptr, ptr %7, align 8, !tbaa !5
  %137 = call { double, double } @_ZNK3JPH4Body17GetLinearVelocityEv(ptr noundef nonnull align 16 dereferenceable(122) %136)
  %138 = getelementptr inbounds %"class.JPH::Vec3", ptr %16, i32 0, i32 0
  %139 = getelementptr inbounds %union.anon.13, ptr %138, i32 0, i32 0
  %140 = getelementptr inbounds { double, double }, ptr %139, i32 0, i32 0
  %141 = extractvalue { double, double } %137, 0
  store double %141, ptr %140, align 16
  %142 = getelementptr inbounds { double, double }, ptr %139, i32 0, i32 1
  %143 = extractvalue { double, double } %137, 1
  store double %143, ptr %142, align 8
  %144 = load ptr, ptr %8, align 8, !tbaa !5
  %145 = call { double, double } @_ZNK3JPH4Body17GetLinearVelocityEv(ptr noundef nonnull align 16 dereferenceable(122) %144)
  %146 = getelementptr inbounds %"class.JPH::Vec3", ptr %17, i32 0, i32 0
  %147 = getelementptr inbounds %union.anon.13, ptr %146, i32 0, i32 0
  %148 = getelementptr inbounds { double, double }, ptr %147, i32 0, i32 0
  %149 = extractvalue { double, double } %145, 0
  store double %149, ptr %148, align 16
  %150 = getelementptr inbounds { double, double }, ptr %147, i32 0, i32 1
  %151 = extractvalue { double, double } %145, 1
  store double %151, ptr %150, align 8
  %152 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 0
  %153 = load double, ptr %152, align 16
  %154 = getelementptr inbounds { double, double }, ptr %17, i32 0, i32 1
  %155 = load double, ptr %154, align 8
  %156 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %16, double %153, double %155)
  %157 = getelementptr inbounds %"class.JPH::Vec3", ptr %15, i32 0, i32 0
  %158 = getelementptr inbounds %union.anon.13, ptr %157, i32 0, i32 0
  %159 = getelementptr inbounds { double, double }, ptr %158, i32 0, i32 0
  %160 = extractvalue { double, double } %156, 0
  store double %160, ptr %159, align 16
  %161 = getelementptr inbounds { double, double }, ptr %158, i32 0, i32 1
  %162 = extractvalue { double, double } %156, 1
  store double %162, ptr %161, align 8
  %163 = getelementptr inbounds %"class.JPH::CollideSettingsBase", ptr %14, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %163, ptr align 16 %15, i64 16, i1 false), !tbaa.struct !55
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #10
  call void @llvm.lifetime.start.p0(i64 40, ptr %18) #10
  %164 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %39, i32 0, i32 11
  %165 = load ptr, ptr %164, align 16, !tbaa !57
  %166 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZN3JPH26SimShapeFilterWrapperUnionC2EPKNS_14SimShapeFilterEPKNS_4BodyE(ptr noundef nonnull align 8 dereferenceable(40) %18, ptr noundef %165, ptr noundef %166)
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #10
  %167 = invoke noundef nonnull align 8 dereferenceable(40) ptr @_ZN3JPH26SimShapeFilterWrapperUnion24GetSimShapeFilterWrapperEv(ptr noundef nonnull align 8 dereferenceable(40) %18)
          to label %168 unwind label %242

168:                                              ; preds = %133
  store ptr %167, ptr %19, align 8, !tbaa !5
  %169 = load ptr, ptr %19, align 8, !tbaa !5
  %170 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_ZN3JPH21SimShapeFilterWrapper8SetBody2EPKNS_4BodyE(ptr noundef nonnull align 8 dereferenceable(40) %169, ptr noundef %170)
          to label %171 unwind label %242

171:                                              ; preds = %168
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #10
  %172 = load ptr, ptr %7, align 8, !tbaa !5
  %173 = invoke { double, double } @_ZNK3JPH4Body23GetCenterOfMassPositionEv(ptr noundef nonnull align 16 dereferenceable(122) %172)
          to label %174 unwind label %246

174:                                              ; preds = %171
  %175 = getelementptr inbounds %"class.JPH::Vec3", ptr %22, i32 0, i32 0
  %176 = getelementptr inbounds %union.anon.13, ptr %175, i32 0, i32 0
  %177 = getelementptr inbounds { double, double }, ptr %176, i32 0, i32 0
  %178 = extractvalue { double, double } %173, 0
  store double %178, ptr %177, align 16
  %179 = getelementptr inbounds { double, double }, ptr %176, i32 0, i32 1
  %180 = extractvalue { double, double } %173, 1
  store double %180, ptr %179, align 8
  call void @llvm.lifetime.start.p0(i64 64, ptr %23) #10
  %181 = load ptr, ptr %7, align 8, !tbaa !5
  %182 = invoke { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122) %181)
          to label %183 unwind label %250

183:                                              ; preds = %174
  %184 = getelementptr inbounds %"class.JPH::Quat", ptr %24, i32 0, i32 0
  %185 = getelementptr inbounds %"class.JPH::Vec4", ptr %184, i32 0, i32 0
  %186 = getelementptr inbounds %union.anon.42, ptr %185, i32 0, i32 0
  %187 = getelementptr inbounds { double, double }, ptr %186, i32 0, i32 0
  %188 = extractvalue { double, double } %182, 0
  store double %188, ptr %187, align 16
  %189 = getelementptr inbounds { double, double }, ptr %186, i32 0, i32 1
  %190 = extractvalue { double, double } %182, 1
  store double %190, ptr %189, align 8
  %191 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 0
  %192 = load double, ptr %191, align 16
  %193 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 1
  %194 = load double, ptr %193, align 8
  invoke void @_ZN3JPH5Mat449sRotationENS_4QuatE(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %23, double %192, double %194)
          to label %195 unwind label %250

195:                                              ; preds = %183
  call void @llvm.lifetime.start.p0(i64 64, ptr %25) #10
  call void @llvm.lifetime.start.p0(i64 64, ptr %26) #10
  call void @llvm.lifetime.start.p0(i64 64, ptr %27) #10
  %196 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_ZNK3JPH4Body24GetCenterOfMassTransformEv(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %27, ptr noundef nonnull align 16 dereferenceable(122) %196)
          to label %197 unwind label %254

197:                                              ; preds = %195
  %198 = invoke { double, double } @_ZNK3JPH4Vec3ngEv(ptr noundef nonnull align 16 dereferenceable(16) %22)
          to label %199 unwind label %254

199:                                              ; preds = %197
  %200 = getelementptr inbounds %"class.JPH::Vec3", ptr %28, i32 0, i32 0
  %201 = getelementptr inbounds %union.anon.13, ptr %200, i32 0, i32 0
  %202 = getelementptr inbounds { double, double }, ptr %201, i32 0, i32 0
  %203 = extractvalue { double, double } %198, 0
  store double %203, ptr %202, align 16
  %204 = getelementptr inbounds { double, double }, ptr %201, i32 0, i32 1
  %205 = extractvalue { double, double } %198, 1
  store double %205, ptr %204, align 8
  %206 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 0
  %207 = load double, ptr %206, align 16
  %208 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 1
  %209 = load double, ptr %208, align 8
  invoke void @_ZNK3JPH5Mat4414PostTranslatedENS_4Vec3E(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %26, ptr noundef nonnull align 16 dereferenceable(64) %27, double %207, double %209)
          to label %210 unwind label %254

210:                                              ; preds = %199
  invoke void @_ZNK3JPH5Mat447ToMat44Ev(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %25, ptr noundef nonnull align 16 dereferenceable(64) %26)
          to label %211 unwind label %254

211:                                              ; preds = %210
  call void @llvm.lifetime.end.p0(i64 64, ptr %27) #10
  call void @llvm.lifetime.end.p0(i64 64, ptr %26) #10
  %212 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %39, i32 0, i32 13
  %213 = getelementptr inbounds %"struct.JPH::PhysicsSettings", ptr %212, i32 0, i32 22
  %214 = load i8, ptr %213, align 1, !tbaa !58, !range !43, !noundef !44
  %215 = trunc i8 %214 to i1
  br i1 %215, label %216, label %342

216:                                              ; preds = %211
  %217 = load ptr, ptr %7, align 8, !tbaa !5
  %218 = load ptr, ptr %8, align 8, !tbaa !5
  %219 = invoke noundef zeroext i1 @_ZNK3JPH4Body31GetUseManifoldReductionWithBodyERKS0_(ptr noundef nonnull align 16 dereferenceable(122) %217, ptr noundef nonnull align 16 dereferenceable(122) %218)
          to label %220 unwind label %258

220:                                              ; preds = %216
  br i1 %219, label %221, label %342

221:                                              ; preds = %220
  call void @llvm.lifetime.start.p0(i64 68688, ptr %29) #10
  %222 = load ptr, ptr %7, align 8, !tbaa !5
  %223 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_ZZN3JPH13PhysicsSystem15ProcessBodyPairERNS_24ContactConstraintManager16ContactAllocatorERKNS_8BodyPairEEN30ReductionCollideShapeCollectorC2EPS0_PKNS_4BodyESB_(ptr noundef nonnull align 16 dereferenceable(68688) %29, ptr noundef %39, ptr noundef %222, ptr noundef %223)
          to label %224 unwind label %262

224:                                              ; preds = %221
  %225 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %39, i32 0, i32 12
  %226 = load ptr, ptr %7, align 8, !tbaa !5
  %227 = load ptr, ptr %8, align 8, !tbaa !5
  %228 = load ptr, ptr %19, align 8, !tbaa !5
  invoke void @_ZNKSt8functionIFvRKN3JPH4BodyES3_RKNS0_5Mat44ES6_RNS0_20CollideShapeSettingsERNS0_18CollisionCollectorINS0_18CollideShapeResultENS0_36CollisionCollectorTraitsCollideShapeEEERKNS0_11ShapeFilterEEEclES3_S3_S6_S6_S8_SD_SG_(ptr noundef nonnull align 8 dereferenceable(32) %225, ptr noundef nonnull align 16 dereferenceable(122) %226, ptr noundef nonnull align 16 dereferenceable(122) %227, ptr noundef nonnull align 16 dereferenceable(64) %23, ptr noundef nonnull align 16 dereferenceable(64) %25, ptr noundef nonnull align 16 dereferenceable(37) %14, ptr noundef nonnull align 8 dereferenceable(24) %29, ptr noundef nonnull align 8 dereferenceable(12) %228)
          to label %229 unwind label %266

229:                                              ; preds = %224
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #10
  %230 = getelementptr inbounds %class.ReductionCollideShapeCollector, ptr %29, i32 0, i32 6
  store ptr %230, ptr %30, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #10
  %231 = load ptr, ptr %30, align 8, !tbaa !5
  %232 = invoke noundef ptr @_ZN3JPH11StaticArrayIZNS_13PhysicsSystem15ProcessBodyPairERNS_24ContactConstraintManager16ContactAllocatorERKNS_8BodyPairEE10MyManifoldLj32EE5beginEv(ptr noundef nonnull align 16 dereferenceable(68624) %231)
          to label %233 unwind label %270

233:                                              ; preds = %229
  store ptr %232, ptr %31, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #10
  %234 = load ptr, ptr %30, align 8, !tbaa !5
  %235 = invoke noundef ptr @_ZN3JPH11StaticArrayIZNS_13PhysicsSystem15ProcessBodyPairERNS_24ContactConstraintManager16ContactAllocatorERKNS_8BodyPairEE10MyManifoldLj32EE3endEv(ptr noundef nonnull align 16 dereferenceable(68624) %234)
          to label %236 unwind label %274

236:                                              ; preds = %233
  store ptr %235, ptr %32, align 8, !tbaa !5
  br label %237

237:                                              ; preds = %333, %236
  %238 = load ptr, ptr %31, align 8, !tbaa !5
  %239 = load ptr, ptr %32, align 8, !tbaa !5
  %240 = icmp ne ptr %238, %239
  br i1 %240, label %278, label %241

241:                                              ; preds = %237
  store i32 4, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #10
  br label %339

242:                                              ; preds = %168, %133
  %243 = landingpad { ptr, i32 }
          cleanup
  %244 = extractvalue { ptr, i32 } %243, 0
  store ptr %244, ptr %20, align 8
  %245 = extractvalue { ptr, i32 } %243, 1
  store i32 %245, ptr %21, align 4
  br label %372

246:                                              ; preds = %171
  %247 = landingpad { ptr, i32 }
          cleanup
  %248 = extractvalue { ptr, i32 } %247, 0
  store ptr %248, ptr %20, align 8
  %249 = extractvalue { ptr, i32 } %247, 1
  store i32 %249, ptr %21, align 4
  br label %371

250:                                              ; preds = %183, %174
  %251 = landingpad { ptr, i32 }
          cleanup
  %252 = extractvalue { ptr, i32 } %251, 0
  store ptr %252, ptr %20, align 8
  %253 = extractvalue { ptr, i32 } %251, 1
  store i32 %253, ptr %21, align 4
  br label %370

254:                                              ; preds = %210, %199, %197, %195
  %255 = landingpad { ptr, i32 }
          cleanup
  %256 = extractvalue { ptr, i32 } %255, 0
  store ptr %256, ptr %20, align 8
  %257 = extractvalue { ptr, i32 } %255, 1
  store i32 %257, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 64, ptr %27) #10
  call void @llvm.lifetime.end.p0(i64 64, ptr %26) #10
  br label %369

258:                                              ; preds = %216
  %259 = landingpad { ptr, i32 }
          cleanup
  %260 = extractvalue { ptr, i32 } %259, 0
  store ptr %260, ptr %20, align 8
  %261 = extractvalue { ptr, i32 } %259, 1
  store i32 %261, ptr %21, align 4
  br label %369

262:                                              ; preds = %221
  %263 = landingpad { ptr, i32 }
          cleanup
  %264 = extractvalue { ptr, i32 } %263, 0
  store ptr %264, ptr %20, align 8
  %265 = extractvalue { ptr, i32 } %263, 1
  store i32 %265, ptr %21, align 4
  br label %341

266:                                              ; preds = %224
  %267 = landingpad { ptr, i32 }
          cleanup
  %268 = extractvalue { ptr, i32 } %267, 0
  store ptr %268, ptr %20, align 8
  %269 = extractvalue { ptr, i32 } %267, 1
  store i32 %269, ptr %21, align 4
  br label %340

270:                                              ; preds = %229
  %271 = landingpad { ptr, i32 }
          cleanup
  %272 = extractvalue { ptr, i32 } %271, 0
  store ptr %272, ptr %20, align 8
  %273 = extractvalue { ptr, i32 } %271, 1
  store i32 %273, ptr %21, align 4
  br label %338

274:                                              ; preds = %233
  %275 = landingpad { ptr, i32 }
          cleanup
  %276 = extractvalue { ptr, i32 } %275, 0
  store ptr %276, ptr %20, align 8
  %277 = extractvalue { ptr, i32 } %275, 1
  store i32 %277, ptr %21, align 4
  br label %337

278:                                              ; preds = %237
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #10
  %279 = load ptr, ptr %31, align 8, !tbaa !5
  store ptr %279, ptr %33, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %34) #10
  %280 = load ptr, ptr %33, align 8, !tbaa !5
  %281 = getelementptr inbounds %"class.JPH::ContactManifold", ptr %280, i32 0, i32 1
  %282 = invoke { double, double } @_ZNK3JPH4Vec310NormalizedEv(ptr noundef nonnull align 16 dereferenceable(16) %281)
          to label %283 unwind label %309

283:                                              ; preds = %278
  %284 = getelementptr inbounds %"class.JPH::Vec3", ptr %34, i32 0, i32 0
  %285 = getelementptr inbounds %union.anon.13, ptr %284, i32 0, i32 0
  %286 = getelementptr inbounds { double, double }, ptr %285, i32 0, i32 0
  %287 = extractvalue { double, double } %282, 0
  store double %287, ptr %286, align 16
  %288 = getelementptr inbounds { double, double }, ptr %285, i32 0, i32 1
  %289 = extractvalue { double, double } %282, 1
  store double %289, ptr %288, align 8
  %290 = load ptr, ptr %33, align 8, !tbaa !5
  %291 = getelementptr inbounds %"class.JPH::ContactManifold", ptr %290, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %291, ptr align 16 %34, i64 16, i1 false), !tbaa.struct !55
  call void @llvm.lifetime.end.p0(i64 16, ptr %34) #10
  %292 = load ptr, ptr %33, align 8, !tbaa !5
  %293 = getelementptr inbounds %"class.JPH::ContactManifold", ptr %292, i32 0, i32 6
  %294 = invoke noundef i32 @_ZNK3JPH11StaticArrayINS_4Vec3ELj64EE4sizeEv(ptr noundef nonnull align 16 dereferenceable(1040) %293)
          to label %295 unwind label %313

295:                                              ; preds = %283
  %296 = icmp ugt i32 %294, 4
  br i1 %296, label %297, label %317

297:                                              ; preds = %295
  %298 = load ptr, ptr %33, align 8, !tbaa !5
  %299 = getelementptr inbounds %"class.JPH::ContactManifold", ptr %298, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %35, ptr align 16 %299, i64 16, i1 false), !tbaa.struct !55
  %300 = load ptr, ptr %33, align 8, !tbaa !5
  %301 = getelementptr inbounds %"class.JPH::ContactManifold", ptr %300, i32 0, i32 6
  %302 = load ptr, ptr %33, align 8, !tbaa !5
  %303 = getelementptr inbounds %"class.JPH::ContactManifold", ptr %302, i32 0, i32 7
  %304 = getelementptr inbounds { double, double }, ptr %35, i32 0, i32 0
  %305 = load double, ptr %304, align 16
  %306 = getelementptr inbounds { double, double }, ptr %35, i32 0, i32 1
  %307 = load double, ptr %306, align 8
  invoke void @_ZN3JPH18PruneContactPointsENS_4Vec3ERNS_11StaticArrayIS0_Lj64EEES3_(double %305, double %307, ptr noundef nonnull align 16 dereferenceable(1040) %301, ptr noundef nonnull align 16 dereferenceable(1040) %303)
          to label %308 unwind label %313

308:                                              ; preds = %297
  br label %317

309:                                              ; preds = %278
  %310 = landingpad { ptr, i32 }
          cleanup
  %311 = extractvalue { ptr, i32 } %310, 0
  store ptr %311, ptr %20, align 8
  %312 = extractvalue { ptr, i32 } %310, 1
  store i32 %312, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %34) #10
  br label %336

313:                                              ; preds = %317, %297, %283
  %314 = landingpad { ptr, i32 }
          cleanup
  %315 = extractvalue { ptr, i32 } %314, 0
  store ptr %315, ptr %20, align 8
  %316 = extractvalue { ptr, i32 } %314, 1
  store i32 %316, ptr %21, align 4
  br label %336

317:                                              ; preds = %308, %295
  %318 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %39, i32 0, i32 15
  %319 = load ptr, ptr %5, align 8, !tbaa !5
  %320 = load ptr, ptr %13, align 8, !tbaa !5
  %321 = load ptr, ptr %7, align 8, !tbaa !5
  %322 = load ptr, ptr %8, align 8, !tbaa !5
  %323 = load ptr, ptr %33, align 8, !tbaa !5
  %324 = invoke noundef zeroext i1 @_ZN3JPH24ContactConstraintManager20AddContactConstraintERNS0_16ContactAllocatorEPvRNS_4BodyES5_RKNS_15ContactManifoldE(ptr noundef nonnull align 8 dereferenceable(248) %318, ptr noundef nonnull align 8 dereferenceable(32) %319, ptr noundef %320, ptr noundef nonnull align 16 dereferenceable(122) %321, ptr noundef nonnull align 16 dereferenceable(122) %322, ptr noundef nonnull align 16 dereferenceable(2128) %323)
          to label %325 unwind label %313

325:                                              ; preds = %317
  %326 = zext i1 %324 to i32
  %327 = load i8, ptr %12, align 1, !tbaa !10, !range !43, !noundef !44
  %328 = trunc i8 %327 to i1
  %329 = zext i1 %328 to i32
  %330 = or i32 %329, %326
  %331 = icmp ne i32 %330, 0
  %332 = zext i1 %331 to i8
  store i8 %332, ptr %12, align 1, !tbaa !10
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #10
  br label %333

333:                                              ; preds = %325
  %334 = load ptr, ptr %31, align 8, !tbaa !5
  %335 = getelementptr inbounds %class.MyManifold, ptr %334, i32 1
  store ptr %335, ptr %31, align 8, !tbaa !5
  br label %237

336:                                              ; preds = %313, %309
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #10
  br label %337

337:                                              ; preds = %336, %274
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #10
  br label %338

338:                                              ; preds = %337, %270
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #10
  br label %340

339:                                              ; preds = %241
  call void @_ZZN3JPH13PhysicsSystem15ProcessBodyPairERNS_24ContactConstraintManager16ContactAllocatorERKNS_8BodyPairEEN30ReductionCollideShapeCollectorD2Ev(ptr noundef nonnull align 16 dereferenceable(68688) %29) #10
  call void @llvm.lifetime.end.p0(i64 68688, ptr %29) #10
  br label %365

340:                                              ; preds = %338, %266
  call void @_ZZN3JPH13PhysicsSystem15ProcessBodyPairERNS_24ContactConstraintManager16ContactAllocatorERKNS_8BodyPairEEN30ReductionCollideShapeCollectorD2Ev(ptr noundef nonnull align 16 dereferenceable(68688) %29) #10
  br label %341

341:                                              ; preds = %340, %262
  call void @llvm.lifetime.end.p0(i64 68688, ptr %29) #10
  br label %369

342:                                              ; preds = %220, %211
  call void @llvm.lifetime.start.p0(i64 72, ptr %36) #10
  %343 = load ptr, ptr %5, align 8, !tbaa !5
  %344 = load ptr, ptr %7, align 8, !tbaa !5
  %345 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_ZZN3JPH13PhysicsSystem15ProcessBodyPairERNS_24ContactConstraintManager16ContactAllocatorERKNS_8BodyPairEEN33NonReductionCollideShapeCollectorC2EPS0_S3_PNS_4BodyESA_RKPv(ptr noundef nonnull align 8 dereferenceable(66) %36, ptr noundef %39, ptr noundef nonnull align 8 dereferenceable(32) %343, ptr noundef %344, ptr noundef %345, ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %346 unwind label %356

346:                                              ; preds = %342
  %347 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %39, i32 0, i32 12
  %348 = load ptr, ptr %7, align 8, !tbaa !5
  %349 = load ptr, ptr %8, align 8, !tbaa !5
  %350 = load ptr, ptr %19, align 8, !tbaa !5
  invoke void @_ZNKSt8functionIFvRKN3JPH4BodyES3_RKNS0_5Mat44ES6_RNS0_20CollideShapeSettingsERNS0_18CollisionCollectorINS0_18CollideShapeResultENS0_36CollisionCollectorTraitsCollideShapeEEERKNS0_11ShapeFilterEEEclES3_S3_S6_S6_S8_SD_SG_(ptr noundef nonnull align 8 dereferenceable(32) %347, ptr noundef nonnull align 16 dereferenceable(122) %348, ptr noundef nonnull align 16 dereferenceable(122) %349, ptr noundef nonnull align 16 dereferenceable(64) %23, ptr noundef nonnull align 16 dereferenceable(64) %25, ptr noundef nonnull align 16 dereferenceable(37) %14, ptr noundef nonnull align 8 dereferenceable(24) %36, ptr noundef nonnull align 8 dereferenceable(12) %350)
          to label %351 unwind label %360

351:                                              ; preds = %346
  %352 = getelementptr inbounds %class.NonReductionCollideShapeCollector, ptr %36, i32 0, i32 7
  %353 = load i8, ptr %352, align 1, !tbaa !59, !range !43, !noundef !44
  %354 = trunc i8 %353 to i1
  %355 = zext i1 %354 to i8
  store i8 %355, ptr %12, align 1, !tbaa !10
  call void @_ZN3JPH18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(66) %36) #10
  call void @llvm.lifetime.end.p0(i64 72, ptr %36) #10
  br label %365

356:                                              ; preds = %342
  %357 = landingpad { ptr, i32 }
          cleanup
  %358 = extractvalue { ptr, i32 } %357, 0
  store ptr %358, ptr %20, align 8
  %359 = extractvalue { ptr, i32 } %357, 1
  store i32 %359, ptr %21, align 4
  br label %364

360:                                              ; preds = %346
  %361 = landingpad { ptr, i32 }
          cleanup
  %362 = extractvalue { ptr, i32 } %361, 0
  store ptr %362, ptr %20, align 8
  %363 = extractvalue { ptr, i32 } %361, 1
  store i32 %363, ptr %21, align 4
  call void @_ZN3JPH18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(66) %36) #10
  br label %364

364:                                              ; preds = %360, %356
  call void @llvm.lifetime.end.p0(i64 72, ptr %36) #10
  br label %369

365:                                              ; preds = %351, %339
  call void @llvm.lifetime.end.p0(i64 64, ptr %25) #10
  call void @llvm.lifetime.end.p0(i64 64, ptr %23) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #10
  call void @_ZN3JPH26SimShapeFilterWrapperUnionD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %18) #10
  call void @llvm.lifetime.end.p0(i64 40, ptr %18) #10
  call void @llvm.lifetime.end.p0(i64 48, ptr %14) #10
  store i32 0, ptr %10, align 4
  br label %366

366:                                              ; preds = %365, %113
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #10
  %367 = load i32, ptr %10, align 4
  switch i32 %367, label %423 [
    i32 0, label %368
  ]

368:                                              ; preds = %366
  br label %373

369:                                              ; preds = %364, %341, %258, %254
  call void @llvm.lifetime.end.p0(i64 64, ptr %25) #10
  br label %370

370:                                              ; preds = %369, %250
  call void @llvm.lifetime.end.p0(i64 64, ptr %23) #10
  br label %371

371:                                              ; preds = %370, %246
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #10
  br label %372

372:                                              ; preds = %371, %242
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #10
  call void @_ZN3JPH26SimShapeFilterWrapperUnionD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %18) #10
  call void @llvm.lifetime.end.p0(i64 40, ptr %18) #10
  call void @llvm.lifetime.end.p0(i64 48, ptr %14) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #10
  br label %427

373:                                              ; preds = %368, %102
  %374 = load i8, ptr %12, align 1, !tbaa !10, !range !43, !noundef !44
  %375 = trunc i8 %374 to i1
  br i1 %375, label %376, label %422

376:                                              ; preds = %373
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #10
  %377 = getelementptr inbounds [2 x %"class.JPH::BodyID"], ptr %37, i32 0, i32 0
  %378 = getelementptr inbounds %"class.JPH::BodyID", ptr %377, i64 2
  br label %379

379:                                              ; preds = %379, %376
  %380 = phi ptr [ %377, %376 ], [ %381, %379 ]
  call void @_ZN3JPH6BodyIDC2Ev(ptr noundef nonnull align 4 dereferenceable(4) %380)
  %381 = getelementptr inbounds %"class.JPH::BodyID", ptr %380, i64 1
  %382 = icmp eq ptr %381, %378
  br i1 %382, label %383, label %379

383:                                              ; preds = %379
  call void @llvm.lifetime.start.p0(i64 4, ptr %38) #10
  store i32 0, ptr %38, align 4, !tbaa !62
  %384 = load ptr, ptr %7, align 8, !tbaa !5
  %385 = call noundef zeroext i1 @_ZNK3JPH4Body9IsDynamicEv(ptr noundef nonnull align 16 dereferenceable(122) %384)
  br i1 %385, label %386, label %396

386:                                              ; preds = %383
  %387 = load ptr, ptr %7, align 8, !tbaa !5
  %388 = call noundef zeroext i1 @_ZNK3JPH4Body8IsActiveEv(ptr noundef nonnull align 16 dereferenceable(122) %387)
  br i1 %388, label %396, label %389

389:                                              ; preds = %386
  %390 = load ptr, ptr %7, align 8, !tbaa !5
  %391 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH4Body5GetIDEv(ptr noundef nonnull align 16 dereferenceable(122) %390)
  %392 = load i32, ptr %38, align 4, !tbaa !62
  %393 = add nsw i32 %392, 1
  store i32 %393, ptr %38, align 4, !tbaa !62
  %394 = sext i32 %392 to i64
  %395 = getelementptr inbounds [2 x %"class.JPH::BodyID"], ptr %37, i64 0, i64 %394
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %395, ptr align 4 %391, i64 4, i1 false), !tbaa.struct !63
  br label %396

396:                                              ; preds = %389, %386, %383
  %397 = load ptr, ptr %8, align 8, !tbaa !5
  %398 = call noundef zeroext i1 @_ZNK3JPH4Body9IsDynamicEv(ptr noundef nonnull align 16 dereferenceable(122) %397)
  br i1 %398, label %399, label %409

399:                                              ; preds = %396
  %400 = load ptr, ptr %8, align 8, !tbaa !5
  %401 = call noundef zeroext i1 @_ZNK3JPH4Body8IsActiveEv(ptr noundef nonnull align 16 dereferenceable(122) %400)
  br i1 %401, label %409, label %402

402:                                              ; preds = %399
  %403 = load ptr, ptr %8, align 8, !tbaa !5
  %404 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH4Body5GetIDEv(ptr noundef nonnull align 16 dereferenceable(122) %403)
  %405 = load i32, ptr %38, align 4, !tbaa !62
  %406 = add nsw i32 %405, 1
  store i32 %406, ptr %38, align 4, !tbaa !62
  %407 = sext i32 %405 to i64
  %408 = getelementptr inbounds [2 x %"class.JPH::BodyID"], ptr %37, i64 0, i64 %407
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %408, ptr align 4 %404, i64 4, i1 false), !tbaa.struct !63
  br label %409

409:                                              ; preds = %402, %399, %396
  %410 = load i32, ptr %38, align 4, !tbaa !62
  %411 = icmp sgt i32 %410, 0
  br i1 %411, label %412, label %416

412:                                              ; preds = %409
  %413 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %39, i32 0, i32 2
  %414 = getelementptr inbounds [2 x %"class.JPH::BodyID"], ptr %37, i64 0, i64 0
  %415 = load i32, ptr %38, align 4, !tbaa !62
  call void @_ZN3JPH11BodyManager14ActivateBodiesEPKNS_6BodyIDEi(ptr noundef nonnull align 8 dereferenceable(297) %413, ptr noundef %414, i32 noundef %415)
  br label %416

416:                                              ; preds = %412, %409
  %417 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %39, i32 0, i32 17
  %418 = load ptr, ptr %7, align 8, !tbaa !5
  %419 = call noundef i32 @_ZNK3JPH4Body30GetIndexInActiveBodiesInternalEv(ptr noundef nonnull align 16 dereferenceable(122) %418)
  %420 = load ptr, ptr %8, align 8, !tbaa !5
  %421 = call noundef i32 @_ZNK3JPH4Body30GetIndexInActiveBodiesInternalEv(ptr noundef nonnull align 16 dereferenceable(122) %420)
  call void @_ZN3JPH13IslandBuilder10LinkBodiesEjj(ptr noundef nonnull align 8 dereferenceable(112) %417, i32 noundef %419, i32 noundef %421)
  call void @llvm.lifetime.end.p0(i64 4, ptr %38) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #10
  br label %422

422:                                              ; preds = %416, %373
  store i32 0, ptr %10, align 4
  br label %423

423:                                              ; preds = %422, %366
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #10
  br label %424

424:                                              ; preds = %423, %66
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #10
  %425 = load i32, ptr %10, align 4
  switch i32 %425, label %432 [
    i32 0, label %426
    i32 1, label %426
  ]

426:                                              ; preds = %424, %424
  ret void

427:                                              ; preds = %372
  %428 = load ptr, ptr %20, align 8
  %429 = load i32, ptr %21, align 4
  %430 = insertvalue { ptr, i32 } poison, ptr %428, 0
  %431 = insertvalue { ptr, i32 } %430, i32 %429, 1
  resume { ptr, i32 } %431

432:                                              ; preds = %424
  unreachable
}

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

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

declare void @_ZN3JPH11BodyManager14ActivateBodiesEPKNS_6BodyIDEi(ptr noundef nonnull align 8 dereferenceable(297), ptr noundef, i32 noundef) #5

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIPN3JPH4BodyEENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS6_ESt18is_move_assignableIS6_EEE5valueEvE4typeERS6_SF_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

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

declare void @_ZN3JPH24ContactConstraintManager20GetContactsFromCacheERNS0_16ContactAllocatorERNS_4BodyES4_RbS5_(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 16 dereferenceable(122), ptr noundef nonnull align 16 dereferenceable(122), ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) #5

declare noundef ptr @_ZN3JPH24ContactConstraintManager11AddBodyPairERNS0_16ContactAllocatorERKNS_4BodyES5_(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 16 dereferenceable(122), ptr noundef nonnull align 16 dereferenceable(122)) #5

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

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH26SimShapeFilterWrapperUnionC2EPKNS_14SimShapeFilterEPKNS_4BodyE(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef, ptr noundef) unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(40) ptr @_ZN3JPH26SimShapeFilterWrapperUnion24GetSimShapeFilterWrapperEv(ptr noundef nonnull align 8 dereferenceable(40)) #7 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH21SimShapeFilterWrapper8SetBody2EPKNS_4BodyE(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef) #7 align 2

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN3JPH5Mat449sRotationENS_4QuatE(ptr dead_on_unwind noalias writable sret(%"class.JPH::Mat44") align 16, double, double) #8 align 2

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Vec3ngEv(ptr noundef nonnull align 16 dereferenceable(16)) #6 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZNK3JPH5Mat447ToMat44Ev(ptr dead_on_unwind noalias writable sret(%"class.JPH::Mat44") align 16, ptr noundef nonnull align 16 dereferenceable(64)) #9 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZZN3JPH13PhysicsSystem15ProcessBodyPairERNS_24ContactConstraintManager16ContactAllocatorERKNS_8BodyPairEEN30ReductionCollideShapeCollectorC2EPS0_PKNS_4BodyESB_(ptr noundef nonnull align 16 dereferenceable(68688), ptr noundef, ptr noundef, ptr noundef) unnamed_addr #7 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNKSt8functionIFvRKN3JPH4BodyES3_RKNS0_5Mat44ES6_RNS0_20CollideShapeSettingsERNS0_18CollisionCollectorINS0_18CollideShapeResultENS0_36CollisionCollectorTraitsCollideShapeEEERKNS0_11ShapeFilterEEEclES3_S3_S6_S6_S8_SD_SG_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 16 dereferenceable(122), ptr noundef nonnull align 16 dereferenceable(122), ptr noundef nonnull align 16 dereferenceable(64), ptr noundef nonnull align 16 dereferenceable(64), ptr noundef nonnull align 16 dereferenceable(37), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(12)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef ptr @_ZN3JPH11StaticArrayIZNS_13PhysicsSystem15ProcessBodyPairERNS_24ContactConstraintManager16ContactAllocatorERKNS_8BodyPairEE10MyManifoldLj32EE5beginEv(ptr noundef nonnull align 16 dereferenceable(68624)) #7 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef ptr @_ZN3JPH11StaticArrayIZNS_13PhysicsSystem15ProcessBodyPairERNS_24ContactConstraintManager16ContactAllocatorERKNS_8BodyPairEE10MyManifoldLj32EE3endEv(ptr noundef nonnull align 16 dereferenceable(68624)) #7 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Vec310NormalizedEv(ptr noundef nonnull align 16 dereferenceable(16)) #8 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3JPH11StaticArrayINS_4Vec3ELj64EE4sizeEv(ptr noundef nonnull align 16 dereferenceable(1040)) #7 align 2

declare void @_ZN3JPH18PruneContactPointsENS_4Vec3ERNS_11StaticArrayIS0_Lj64EEES3_(double, double, ptr noundef nonnull align 16 dereferenceable(1040), ptr noundef nonnull align 16 dereferenceable(1040)) #5

declare noundef zeroext i1 @_ZN3JPH24ContactConstraintManager20AddContactConstraintERNS0_16ContactAllocatorEPvRNS_4BodyES5_RKNS_15ContactManifoldE(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 16 dereferenceable(122), ptr noundef nonnull align 16 dereferenceable(122), ptr noundef nonnull align 16 dereferenceable(2128)) #5

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZZN3JPH13PhysicsSystem15ProcessBodyPairERNS_24ContactConstraintManager16ContactAllocatorERKNS_8BodyPairEEN33NonReductionCollideShapeCollectorC2EPS0_S3_PNS_4BodyESA_RKPv(ptr noundef nonnull align 8 dereferenceable(66), ptr noundef, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #7 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH6BodyIDC2Ev(ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #7 align 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

declare void @_ZN3JPH13IslandBuilder10LinkBodiesEjj(ptr noundef nonnull align 8 dereferenceable(112), i32 noundef, i32 noundef) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3JPH4Body30GetIndexInActiveBodiesInternalEv(ptr noundef nonnull align 16 dereferenceable(122)) #7 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="128" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 #8 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #9 = { alwaysinline 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 #10 = { 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 = !{i64 2160019498}
!10 = !{!11, !11, i64 0}
!11 = !{!"bool", !7, i64 0}
!12 = !{!13, !11, i64 566}
!13 = !{!"_ZTSN3JPH13PhysicsSystemE", !6, i64 0, !6, i64 8, !14, i64 16, !25, i64 320, !27, i64 336, !28, i64 352, !28, i64 376, !29, i64 400, !29, i64 416, !6, i64 432, !6, i64 440, !6, i64 448, !30, i64 456, !32, i64 488, !34, i64 576, !37, i64 824, !39, i64 904, !40, i64 1016, !18, i64 1080, !41, i64 1128, !42, i64 1152, !33, i64 1168}
!14 = !{!"_ZTSN3JPH11BodyManagerE", !15, i64 0, !17, i64 24, !16, i64 32, !18, i64 40, !22, i64 88, !23, i64 104, !18, i64 128, !7, i64 176, !7, i64 192, !17, i64 200, !18, i64 208, !24, i64 256, !6, i64 280, !6, i64 288, !11, i64 296}
!15 = !{!"_ZTSN3JPH5ArrayIPNS_4BodyENS_12STLAllocatorIS2_EEEE", !16, i64 0, !16, i64 8, !6, i64 16}
!16 = !{!"long", !7, i64 0}
!17 = !{!"int", !7, i64 0}
!18 = !{!"_ZTSN3JPH5MutexE", !19, i64 0, !21, i64 40}
!19 = !{!"_ZTSSt5mutex", !20, i64 0}
!20 = !{!"_ZTSSt12__mutex_base", !7, i64 0}
!21 = !{!"_ZTSNSt6thread2idE", !16, i64 0}
!22 = !{!"_ZTSN3JPH10MutexArrayINS_11SharedMutexEEE", !6, i64 0, !17, i64 8}
!23 = !{!"_ZTSN3JPH5ArrayIhNS_12STLAllocatorIhEEEE", !16, i64 0, !16, i64 8, !6, i64 16}
!24 = !{!"_ZTSN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEEE", !16, i64 0, !16, i64 8, !6, i64 16}
!25 = !{!"_ZTSN3JPH23BodyLockInterfaceNoLockE", !26, i64 0}
!26 = !{!"_ZTSN3JPH17BodyLockInterfaceE", !6, i64 8}
!27 = !{!"_ZTSN3JPH24BodyLockInterfaceLockingE", !26, i64 0}
!28 = !{!"_ZTSN3JPH13BodyInterfaceE", !6, i64 0, !6, i64 8, !6, i64 16}
!29 = !{!"_ZTSN3JPH16NarrowPhaseQueryE", !6, i64 0, !6, i64 8}
!30 = !{!"_ZTSSt8functionIFvRKN3JPH4BodyES3_RKNS0_5Mat44ES6_RNS0_20CollideShapeSettingsERNS0_18CollisionCollectorINS0_18CollideShapeResultENS0_36CollisionCollectorTraitsCollideShapeEEERKNS0_11ShapeFilterEEE", !31, i64 0, !6, i64 24}
!31 = !{!"_ZTSSt14_Function_base", !7, i64 0, !6, i64 16}
!32 = !{!"_ZTSN3JPH15PhysicsSettingsE", !17, i64 0, !17, i64 4, !17, i64 8, !33, i64 12, !33, i64 16, !33, i64 20, !33, i64 24, !33, i64 28, !33, i64 32, !33, i64 36, !33, i64 40, !33, i64 44, !33, i64 48, !33, i64 52, !17, i64 56, !17, i64 60, !33, i64 64, !33, i64 68, !33, i64 72, !11, i64 76, !11, i64 77, !11, i64 78, !11, i64 79, !11, i64 80, !11, i64 81, !11, i64 82}
!33 = !{!"float", !7, i64 0}
!34 = !{!"_ZTSN3JPH24ContactConstraintManagerE", !7, i64 8, !17, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !17, i64 232, !35, i64 236, !6, i64 240}
!35 = !{!"_ZTSSt6atomicIjE", !36, i64 0}
!36 = !{!"_ZTSSt13__atomic_baseIjE", !17, i64 0}
!37 = !{!"_ZTSN3JPH17ConstraintManagerE", !6, i64 0, !38, i64 8, !18, i64 32}
!38 = !{!"_ZTSN3JPH5ArrayINS_3RefINS_10ConstraintEEENS_12STLAllocatorIS3_EEEE", !16, i64 0, !16, i64 8, !6, i64 16}
!39 = !{!"_ZTSN3JPH13IslandBuilderE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !17, i64 88, !17, i64 92, !17, i64 96, !17, i64 100, !17, i64 104, !17, i64 108}
!40 = !{!"_ZTSN3JPH19LargeIslandSplitterE", !17, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !17, i64 32, !35, i64 36, !17, i64 40, !6, i64 48, !35, i64 56}
!41 = !{!"_ZTSN3JPH5ArrayIPNS_19PhysicsStepListenerENS_12STLAllocatorIS2_EEEE", !16, i64 0, !16, i64 8, !6, i64 16}
!42 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!43 = !{i8 0, i8 2}
!44 = !{}
!45 = !{!46, !48, i64 1}
!46 = !{!"_ZTSN3JPH19CollideSettingsBaseE", !47, i64 0, !48, i64 1, !33, i64 4, !33, i64 8, !42, i64 16}
!47 = !{!"_ZTSN3JPH15EActiveEdgeModeE", !7, i64 0}
!48 = !{!"_ZTSN3JPH17ECollectFacesModeE", !7, i64 0}
!49 = !{!13, !11, i64 570}
!50 = !{!46, !47, i64 0}
!51 = !{!13, !33, i64 504}
!52 = !{!53, !33, i64 32}
!53 = !{!"_ZTSN3JPH20CollideShapeSettingsE", !46, i64 0, !33, i64 32, !54, i64 36}
!54 = !{!"_ZTSN3JPH13EBackFaceModeE", !7, i64 0}
!55 = !{i64 0, i64 16, !56}
!56 = !{!7, !7, i64 0}
!57 = !{!13, !6, i64 448}
!58 = !{!13, !11, i64 567}
!59 = !{!60, !11, i64 65}
!60 = !{!"_ZTSZN3JPH13PhysicsSystem15ProcessBodyPairERNS_24ContactConstraintManager16ContactAllocatorERKNS_8BodyPairEE33NonReductionCollideShapeCollector", !61, i64 0, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !11, i64 64, !11, i64 65}
!61 = !{!"_ZTSN3JPH18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEE", !33, i64 8, !6, i64 16}
!62 = !{!17, !17, i64 0}
!63 = !{i64 0, i64 4, !62}


; 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::CollideShapeSettings" = type <{ %"class.JPH::CollideSettingsBase", float, i8, [11 x i8] }>
%"class.JPH::CollideSettingsBase" = type { i8, i8, float, float, %"class.JPH::Vec3" }
%"class.JPH::Vec3" = type { %union.anon.13 }
%union.anon.13 = type { <4 x float> }
%"union.JPH::SimShapeFilterWrapperUnion" = type { %"class.JPH::SimShapeFilterWrapper" }
%"class.JPH::SimShapeFilterWrapper" = type { %"class.JPH::ShapeFilter.base", ptr, ptr, ptr }
%"class.JPH::ShapeFilter.base" = type <{ ptr, %"class.JPH::BodyID" }>
%"class.JPH::BodyID" = type { i32 }
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::Vec4" = type { %union.anon.42 }
%union.anon.42 = type { <4 x float> }
%class.ReductionCollideShapeCollector = type { %"class.JPH::CollisionCollector.48", ptr, ptr, ptr, i8, [15 x i8], %"class.JPH::StaticArray.49" }
%"class.JPH::CollisionCollector.48" = type { ptr, float, ptr }
%"class.JPH::StaticArray.49" = type { i32, [12 x i8], [32 x %"struct.JPH::StaticArray<MyManifold, 32>::Storage"] }
%"struct.JPH::StaticArray<MyManifold, 32>::Storage" = type { [2144 x i8] }
%class.NonReductionCollideShapeCollector = type <{ %"class.JPH::CollisionCollector.48", ptr, ptr, ptr, ptr, ptr, i8, i8, [6 x i8] }>

@.str.24 = external hidden unnamed_addr constant [83 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [18 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(122) ptr @_ZN3JPH11BodyManager7GetBodyERKNS_6BodyIDE(ptr noundef nonnull align 8 dereferenceable(297), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH13PhysicsSystem15ProcessBodyPairERNS_24ContactConstraintManager16ContactAllocatorERKNS_8BodyPairE(ptr noundef nonnull align 16 dereferenceable(1172) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(8) %2) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i8, align 1
  %7 = alloca i8, align 1
  %8 = alloca ptr, align 8
  %9 = alloca %"class.JPH::CollideShapeSettings", align 16
  %10 = alloca %"class.JPH::Vec3", align 16
  %11 = alloca %"union.JPH::SimShapeFilterWrapperUnion", align 8
  %12 = alloca %"class.JPH::Vec3", align 16
  %13 = alloca %"class.JPH::Mat44", align 16
  %14 = alloca %"class.JPH::Mat44", align 16
  %15 = alloca %"class.JPH::Mat44", align 16
  %16 = alloca %"class.JPH::Mat44", align 16
  %17 = alloca %class.ReductionCollideShapeCollector, align 16
  %18 = alloca %class.NonReductionCollideShapeCollector, align 8
  %19 = alloca [2 x %"class.JPH::BodyID"], align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #9
  %20 = getelementptr inbounds i8, ptr %0, i64 16
  %21 = tail call noundef nonnull align 16 dereferenceable(122) ptr @_ZN3JPH11BodyManager7GetBodyERKNS_6BodyIDE(ptr noundef nonnull align 8 dereferenceable(297) %20, ptr noundef nonnull align 4 dereferenceable(4) %2)
  store ptr %21, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #9
  %22 = getelementptr inbounds i8, ptr %2, i64 4
  %23 = tail call noundef nonnull align 16 dereferenceable(122) ptr @_ZN3JPH11BodyManager7GetBodyERKNS_6BodyIDE(ptr noundef nonnull align 8 dereferenceable(297) %20, ptr noundef nonnull align 4 dereferenceable(4) %22)
  store ptr %23, ptr %5, align 8, !tbaa !5
  %24 = tail call noundef zeroext i1 @_ZNK3JPH4Body8IsActiveEv(ptr noundef nonnull align 16 dereferenceable(122) %21)
  br i1 %24, label %28, label %25

25:                                               ; preds = %3
  %26 = tail call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.53, ptr noundef nonnull @.str.24, i32 noundef 992)
  br i1 %26, label %27, label %28

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

28:                                               ; preds = %27, %25, %3
  %29 = tail call noundef zeroext i1 @_ZNK3JPH4Body10IsSoftBodyEv(ptr noundef nonnull align 16 dereferenceable(122) %23)
  br i1 %29, label %30, label %33

30:                                               ; preds = %28
  %31 = tail call noundef zeroext i1 @_ZNK3JPH4Body8IsActiveEv(ptr noundef nonnull align 16 dereferenceable(122) %23)
  br i1 %31, label %218, label %32

32:                                               ; preds = %30
  tail call void @_ZN3JPH11BodyManager14ActivateBodiesEPKNS_6BodyIDEi(ptr noundef nonnull align 8 dereferenceable(297) %20, ptr noundef nonnull %22, i32 noundef 1)
  br label %218

33:                                               ; preds = %28
  %34 = tail call noundef zeroext i8 @_ZNK3JPH4Body13GetMotionTypeEv(ptr noundef nonnull align 16 dereferenceable(122) %21)
  %35 = tail call noundef zeroext i8 @_ZNK3JPH4Body13GetMotionTypeEv(ptr noundef nonnull align 16 dereferenceable(122) %23)
  %36 = icmp ult i8 %34, %35
  br i1 %36, label %43, label %37

37:                                               ; preds = %33
  %38 = tail call noundef zeroext i8 @_ZNK3JPH4Body13GetMotionTypeEv(ptr noundef nonnull align 16 dereferenceable(122) %21)
  %39 = tail call noundef zeroext i8 @_ZNK3JPH4Body13GetMotionTypeEv(ptr noundef nonnull align 16 dereferenceable(122) %23)
  %40 = icmp eq i8 %38, %39
  br i1 %40, label %41, label %44

41:                                               ; preds = %37
  %42 = tail call noundef zeroext i1 @_ZNK3JPH6BodyIDltERKS0_(ptr noundef nonnull align 4 dereferenceable(4) %22, ptr noundef nonnull align 4 dereferenceable(4) %2)
  br i1 %42, label %43, label %44

43:                                               ; preds = %41, %33
  call void @_ZSt4swapIPN3JPH4BodyEENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS6_ESt18is_move_assignableIS6_EEE5valueEvE4typeERS6_SF_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #9
  br label %44

44:                                               ; preds = %43, %41, %37
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #9
  store i8 0, ptr %6, align 1, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #9
  store i8 0, ptr %7, align 1, !tbaa !10
  %45 = getelementptr inbounds i8, ptr %0, i64 566
  %46 = load i8, ptr %45, align 2, !tbaa !12, !range !43, !noundef !44
  %47 = trunc nuw i8 %46 to i1
  br i1 %47, label %48, label %58

48:                                               ; preds = %44
  %49 = load ptr, ptr %4, align 8, !tbaa !5
  %50 = call noundef zeroext i1 @_ZNK3JPH4Body23IsCollisionCacheInvalidEv(ptr noundef nonnull align 16 dereferenceable(122) %49)
  br i1 %50, label %58, label %51

51:                                               ; preds = %48
  %52 = load ptr, ptr %5, align 8, !tbaa !5
  %53 = call noundef zeroext i1 @_ZNK3JPH4Body23IsCollisionCacheInvalidEv(ptr noundef nonnull align 16 dereferenceable(122) %52)
  br i1 %53, label %58, label %54

54:                                               ; preds = %51
  %55 = getelementptr inbounds i8, ptr %0, i64 576
  %56 = load ptr, ptr %4, align 8, !tbaa !5
  %57 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN3JPH24ContactConstraintManager20GetContactsFromCacheERNS0_16ContactAllocatorERNS_4BodyES4_RbS5_(ptr noundef nonnull align 8 dereferenceable(248) %55, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 16 dereferenceable(122) %56, ptr noundef nonnull align 16 dereferenceable(122) %57, ptr noundef nonnull align 1 dereferenceable(1) %6, ptr noundef nonnull align 1 dereferenceable(1) %7)
  br label %58

58:                                               ; preds = %54, %51, %48, %44
  %59 = load i8, ptr %6, align 1, !tbaa !10, !range !43, !noundef !44
  %60 = trunc nuw i8 %59 to i1
  br i1 %60, label %183, label %61

61:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #9
  %62 = getelementptr inbounds i8, ptr %0, i64 576
  %63 = load ptr, ptr %4, align 8, !tbaa !5
  %64 = load ptr, ptr %5, align 8, !tbaa !5
  %65 = call noundef ptr @_ZN3JPH24ContactConstraintManager11AddBodyPairERNS0_16ContactAllocatorERKNS_4BodyES5_(ptr noundef nonnull align 8 dereferenceable(248) %62, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 16 dereferenceable(122) %63, ptr noundef nonnull align 16 dereferenceable(122) %64)
  store ptr %65, ptr %8, align 8, !tbaa !5
  %.not54 = icmp eq ptr %65, null
  br i1 %.not54, label %.critedge, label %66

66:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %9) #9
  call void @_ZN3JPH20CollideShapeSettingsC2Ev(ptr noundef nonnull align 16 dereferenceable(37) %9)
  %67 = getelementptr inbounds i8, ptr %9, i64 1
  store i8 0, ptr %67, align 1, !tbaa !45
  %68 = getelementptr inbounds i8, ptr %0, i64 570
  %69 = load i8, ptr %68, align 2, !tbaa !49, !range !43, !noundef !44
  %not. = xor i8 %69, 1
  store i8 %not., ptr %9, align 16, !tbaa !50
  %70 = load ptr, ptr %4, align 8, !tbaa !5
  %71 = call noundef zeroext i1 @_ZNK3JPH4Body8IsSensorEv(ptr noundef nonnull align 16 dereferenceable(122) %70)
  br i1 %71, label %78, label %72

72:                                               ; preds = %66
  %73 = load ptr, ptr %5, align 8, !tbaa !5
  %74 = call noundef zeroext i1 @_ZNK3JPH4Body8IsSensorEv(ptr noundef nonnull align 16 dereferenceable(122) %73)
  br i1 %74, label %78, label %75

75:                                               ; preds = %72
  %76 = getelementptr inbounds i8, ptr %0, i64 504
  %77 = load float, ptr %76, align 8, !tbaa !51
  br label %78

78:                                               ; preds = %66, %72, %75
  %79 = phi float [ %77, %75 ], [ 0.000000e+00, %72 ], [ 0.000000e+00, %66 ]
  %80 = getelementptr inbounds i8, ptr %9, i64 32
  store float %79, ptr %80, align 16, !tbaa !52
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #9
  %81 = load ptr, ptr %4, align 8, !tbaa !5
  %82 = call { double, double } @_ZNK3JPH4Body17GetLinearVelocityEv(ptr noundef nonnull align 16 dereferenceable(122) %81)
  %83 = extractvalue { double, double } %82, 0
  store double %83, ptr %10, align 16
  %84 = getelementptr inbounds i8, ptr %10, i64 8
  %85 = extractvalue { double, double } %82, 1
  store double %85, ptr %84, align 8
  %86 = load ptr, ptr %5, align 8, !tbaa !5
  %87 = call { double, double } @_ZNK3JPH4Body17GetLinearVelocityEv(ptr noundef nonnull align 16 dereferenceable(122) %86)
  %88 = extractvalue { double, double } %87, 0
  %89 = extractvalue { double, double } %87, 1
  %90 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %10, double %88, double %89)
  %91 = extractvalue { double, double } %90, 0
  %92 = extractvalue { double, double } %90, 1
  %93 = getelementptr inbounds i8, ptr %9, i64 16
  store double %91, ptr %93, align 16
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %9, i64 24
  store double %92, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !55
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #9
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %11) #9
  %94 = getelementptr inbounds i8, ptr %0, i64 448
  %95 = load ptr, ptr %94, align 16, !tbaa !56
  %96 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZN3JPH26SimShapeFilterWrapperUnionC2EPKNS_14SimShapeFilterEPKNS_4BodyE(ptr noundef nonnull align 8 dereferenceable(40) %11, ptr noundef %95, ptr noundef %96)
  %97 = call noundef nonnull align 8 dereferenceable(40) ptr @_ZN3JPH26SimShapeFilterWrapperUnion24GetSimShapeFilterWrapperEv(ptr noundef nonnull align 8 dereferenceable(40) %11)
  %98 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN3JPH21SimShapeFilterWrapper8SetBody2EPKNS_4BodyE(ptr noundef nonnull align 8 dereferenceable(40) %97, ptr noundef %98)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #9
  %99 = load ptr, ptr %4, align 8, !tbaa !5
  %100 = invoke { double, double } @_ZNK3JPH4Body23GetCenterOfMassPositionEv(ptr noundef nonnull align 16 dereferenceable(122) %99)
          to label %101 unwind label %135

101:                                              ; preds = %78
  %102 = extractvalue { double, double } %100, 0
  store double %102, ptr %12, align 16
  %103 = getelementptr inbounds i8, ptr %12, i64 8
  %104 = extractvalue { double, double } %100, 1
  store double %104, ptr %103, align 8
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %13) #9
  %105 = load ptr, ptr %4, align 8, !tbaa !5
  %106 = invoke { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122) %105)
          to label %107 unwind label %137

107:                                              ; preds = %101
  %108 = extractvalue { double, double } %106, 0
  %109 = extractvalue { double, double } %106, 1
  invoke void @_ZN3JPH5Mat449sRotationENS_4QuatE(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %13, double %108, double %109)
          to label %110 unwind label %137

110:                                              ; preds = %107
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %14) #9
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %15) #9
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %16) #9
  %111 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZNK3JPH4Body24GetCenterOfMassTransformEv(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %16, ptr noundef nonnull align 16 dereferenceable(122) %111)
          to label %112 unwind label %139

112:                                              ; preds = %110
  %113 = invoke { double, double } @_ZNK3JPH4Vec3ngEv(ptr noundef nonnull align 16 dereferenceable(16) %12)
          to label %114 unwind label %139

114:                                              ; preds = %112
  %115 = extractvalue { double, double } %113, 0
  %116 = extractvalue { double, double } %113, 1
  invoke void @_ZNK3JPH5Mat4414PostTranslatedENS_4Vec3E(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %15, ptr noundef nonnull align 16 dereferenceable(64) %16, double %115, double %116)
          to label %117 unwind label %139

117:                                              ; preds = %114
  call void @_ZNK3JPH5Mat447ToMat44Ev(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %14, ptr noundef nonnull align 16 dereferenceable(64) %15)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %16) #9
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %15) #9
  %118 = getelementptr inbounds i8, ptr %0, i64 567
  %119 = load i8, ptr %118, align 1, !tbaa !57, !range !43, !noundef !44
  %120 = trunc nuw i8 %119 to i1
  br i1 %120, label %121, label %168

121:                                              ; preds = %117
  %122 = load ptr, ptr %4, align 8, !tbaa !5
  %123 = load ptr, ptr %5, align 8, !tbaa !5
  %124 = call noundef zeroext i1 @_ZNK3JPH4Body31GetUseManifoldReductionWithBodyERKS0_(ptr noundef nonnull align 16 dereferenceable(122) %122, ptr noundef nonnull align 16 dereferenceable(122) %123)
  br i1 %124, label %125, label %168

125:                                              ; preds = %121
  call void @llvm.lifetime.start.p0(i64 68688, ptr nonnull %17) #9
  %126 = load ptr, ptr %4, align 8, !tbaa !5
  %127 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZZN3JPH13PhysicsSystem15ProcessBodyPairERNS_24ContactConstraintManager16ContactAllocatorERKNS_8BodyPairEEN30ReductionCollideShapeCollectorC2EPS0_PKNS_4BodyESB_(ptr noundef nonnull align 16 dereferenceable(68688) %17, ptr noundef nonnull %0, ptr noundef %126, ptr noundef %127)
  %128 = getelementptr inbounds i8, ptr %0, i64 456
  %129 = load ptr, ptr %4, align 8, !tbaa !5
  %130 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZNKSt8functionIFvRKN3JPH4BodyES3_RKNS0_5Mat44ES6_RNS0_20CollideShapeSettingsERNS0_18CollisionCollectorINS0_18CollideShapeResultENS0_36CollisionCollectorTraitsCollideShapeEEERKNS0_11ShapeFilterEEEclES3_S3_S6_S6_S8_SD_SG_(ptr noundef nonnull align 8 dereferenceable(32) %128, ptr noundef nonnull align 16 dereferenceable(122) %129, ptr noundef nonnull align 16 dereferenceable(122) %130, ptr noundef nonnull align 16 dereferenceable(64) %13, ptr noundef nonnull align 16 dereferenceable(64) %14, ptr noundef nonnull align 16 dereferenceable(37) %9, ptr noundef nonnull align 8 dereferenceable(24) %17, ptr noundef nonnull align 8 dereferenceable(12) %97)
          to label %131 unwind label %141

131:                                              ; preds = %125
  %132 = getelementptr inbounds i8, ptr %17, i64 64
  %133 = call noundef ptr @_ZN3JPH11StaticArrayIZNS_13PhysicsSystem15ProcessBodyPairERNS_24ContactConstraintManager16ContactAllocatorERKNS_8BodyPairEE10MyManifoldLj32EE5beginEv(ptr noundef nonnull align 16 dereferenceable(68624) %132)
  %134 = call noundef ptr @_ZN3JPH11StaticArrayIZNS_13PhysicsSystem15ProcessBodyPairERNS_24ContactConstraintManager16ContactAllocatorERKNS_8BodyPairEE10MyManifoldLj32EE3endEv(ptr noundef nonnull align 16 dereferenceable(68624) %132)
  %.not58 = icmp eq ptr %133, %134
  br i1 %.not58, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %162, %131
  call void @_ZZN3JPH13PhysicsSystem15ProcessBodyPairERNS_24ContactConstraintManager16ContactAllocatorERKNS_8BodyPairEEN30ReductionCollideShapeCollectorD2Ev(ptr noundef nonnull align 16 dereferenceable(68688) %17) #9
  call void @llvm.lifetime.end.p0(i64 68688, ptr nonnull %17) #9
  br label %179

135:                                              ; preds = %78
  %136 = landingpad { ptr, i32 }
          cleanup
  br label %182

137:                                              ; preds = %107, %101
  %138 = landingpad { ptr, i32 }
          cleanup
  br label %181

139:                                              ; preds = %114, %112, %110
  %140 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %16) #9
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %15) #9
  br label %180

141:                                              ; preds = %125
  %142 = landingpad { ptr, i32 }
          cleanup
  br label %167

.lr.ph:                                           ; preds = %131, %162
  %.04859 = phi ptr [ %166, %162 ], [ %133, %131 ]
  %143 = getelementptr inbounds i8, ptr %.04859, i64 16
  %144 = invoke { double, double } @_ZNK3JPH4Vec310NormalizedEv(ptr noundef nonnull align 16 dereferenceable(16) %143)
          to label %145 unwind label %153

145:                                              ; preds = %.lr.ph
  %146 = extractvalue { double, double } %144, 0
  %147 = extractvalue { double, double } %144, 1
  store double %146, ptr %143, align 16
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %.04859, i64 24
  store double %147, ptr %.sroa.5.0..sroa_idx, align 8, !tbaa !55
  %148 = getelementptr inbounds i8, ptr %.04859, i64 48
  %149 = call noundef i32 @_ZNK3JPH11StaticArrayINS_4Vec3ELj64EE4sizeEv(ptr noundef nonnull align 16 dereferenceable(1040) %148)
  %150 = icmp ugt i32 %149, 4
  br i1 %150, label %151, label %157

151:                                              ; preds = %145
  %.sroa.0.0.copyload = load double, ptr %143, align 16
  %.sroa.2.0.copyload = load double, ptr %.sroa.5.0..sroa_idx, align 8, !tbaa !55
  %152 = getelementptr inbounds i8, ptr %.04859, i64 1088
  invoke void @_ZN3JPH18PruneContactPointsENS_4Vec3ERNS_11StaticArrayIS0_Lj64EEES3_(double %.sroa.0.0.copyload, double %.sroa.2.0.copyload, ptr noundef nonnull align 16 dereferenceable(1040) %148, ptr noundef nonnull align 16 dereferenceable(1040) %152)
          to label %157 unwind label %155

153:                                              ; preds = %.lr.ph
  %154 = landingpad { ptr, i32 }
          cleanup
  br label %167

155:                                              ; preds = %157, %151
  %156 = landingpad { ptr, i32 }
          cleanup
  br label %167

157:                                              ; preds = %151, %145
  %158 = load ptr, ptr %8, align 8, !tbaa !5
  %159 = load ptr, ptr %4, align 8, !tbaa !5
  %160 = load ptr, ptr %5, align 8, !tbaa !5
  %161 = invoke noundef zeroext i1 @_ZN3JPH24ContactConstraintManager20AddContactConstraintERNS0_16ContactAllocatorEPvRNS_4BodyES5_RKNS_15ContactManifoldE(ptr noundef nonnull align 8 dereferenceable(248) %62, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef %158, ptr noundef nonnull align 16 dereferenceable(122) %159, ptr noundef nonnull align 16 dereferenceable(122) %160, ptr noundef nonnull align 16 dereferenceable(2128) %.04859)
          to label %162 unwind label %155

162:                                              ; preds = %157
  %163 = load i8, ptr %7, align 1, !tbaa !10, !range !43, !noundef !44
  %164 = zext i1 %161 to i8
  %165 = or i8 %163, %164
  store i8 %165, ptr %7, align 1, !tbaa !10
  %166 = getelementptr inbounds i8, ptr %.04859, i64 2144
  %.not = icmp eq ptr %166, %134
  br i1 %.not, label %._crit_edge, label %.lr.ph

167:                                              ; preds = %153, %155, %141
  %.pn.pn = phi { ptr, i32 } [ %142, %141 ], [ %156, %155 ], [ %154, %153 ]
  call void @_ZZN3JPH13PhysicsSystem15ProcessBodyPairERNS_24ContactConstraintManager16ContactAllocatorERKNS_8BodyPairEEN30ReductionCollideShapeCollectorD2Ev(ptr noundef nonnull align 16 dereferenceable(68688) %17) #9
  call void @llvm.lifetime.end.p0(i64 68688, ptr nonnull %17) #9
  br label %180

168:                                              ; preds = %121, %117
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %18) #9
  %169 = load ptr, ptr %4, align 8, !tbaa !5
  %170 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZZN3JPH13PhysicsSystem15ProcessBodyPairERNS_24ContactConstraintManager16ContactAllocatorERKNS_8BodyPairEEN33NonReductionCollideShapeCollectorC2EPS0_S3_PNS_4BodyESA_RKPv(ptr noundef nonnull align 8 dereferenceable(66) %18, ptr noundef nonnull %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef %169, ptr noundef %170, ptr noundef nonnull align 8 dereferenceable(8) %8)
  %171 = getelementptr inbounds i8, ptr %0, i64 456
  %172 = load ptr, ptr %4, align 8, !tbaa !5
  %173 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZNKSt8functionIFvRKN3JPH4BodyES3_RKNS0_5Mat44ES6_RNS0_20CollideShapeSettingsERNS0_18CollisionCollectorINS0_18CollideShapeResultENS0_36CollisionCollectorTraitsCollideShapeEEERKNS0_11ShapeFilterEEEclES3_S3_S6_S6_S8_SD_SG_(ptr noundef nonnull align 8 dereferenceable(32) %171, ptr noundef nonnull align 16 dereferenceable(122) %172, ptr noundef nonnull align 16 dereferenceable(122) %173, ptr noundef nonnull align 16 dereferenceable(64) %13, ptr noundef nonnull align 16 dereferenceable(64) %14, ptr noundef nonnull align 16 dereferenceable(37) %9, ptr noundef nonnull align 8 dereferenceable(24) %18, ptr noundef nonnull align 8 dereferenceable(12) %97)
          to label %174 unwind label %177

174:                                              ; preds = %168
  %175 = getelementptr inbounds i8, ptr %18, i64 65
  %176 = load i8, ptr %175, align 1, !tbaa !58, !range !43, !noundef !44
  store i8 %176, ptr %7, align 1, !tbaa !10
  call void @_ZN3JPH18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(66) %18) #9
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %18) #9
  br label %179

177:                                              ; preds = %168
  %178 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3JPH18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(66) %18) #9
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %18) #9
  br label %180

179:                                              ; preds = %174, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %14) #9
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %13) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #9
  call void @_ZN3JPH26SimShapeFilterWrapperUnionD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %11) #9
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %11) #9
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #9
  br label %183

180:                                              ; preds = %177, %167, %139
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %167 ], [ %178, %177 ], [ %140, %139 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %14) #9
  br label %181

181:                                              ; preds = %180, %137
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %180 ], [ %138, %137 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %13) #9
  br label %182

182:                                              ; preds = %181, %135
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %181 ], [ %136, %135 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #9
  call void @_ZN3JPH26SimShapeFilterWrapperUnionD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %11) #9
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %11) #9
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %9) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #9
  resume { ptr, i32 } %.pn.pn.pn.pn.pn

183:                                              ; preds = %179, %58
  %184 = load i8, ptr %7, align 1, !tbaa !10, !range !43, !noundef !44
  %185 = trunc nuw i8 %184 to i1
  br i1 %185, label %186, label %217

186:                                              ; preds = %183
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #9
  call void @_ZN3JPH6BodyIDC2Ev(ptr noundef nonnull align 4 dereferenceable(4) %19)
  %.ptr.1 = getelementptr inbounds i8, ptr %19, i64 4
  call void @_ZN3JPH6BodyIDC2Ev(ptr noundef nonnull align 4 dereferenceable(4) %.ptr.1)
  %187 = load ptr, ptr %4, align 8, !tbaa !5
  %188 = call noundef zeroext i1 @_ZNK3JPH4Body9IsDynamicEv(ptr noundef nonnull align 16 dereferenceable(122) %187)
  br i1 %188, label %189, label %196

189:                                              ; preds = %186
  %190 = load ptr, ptr %4, align 8, !tbaa !5
  %191 = call noundef zeroext i1 @_ZNK3JPH4Body8IsActiveEv(ptr noundef nonnull align 16 dereferenceable(122) %190)
  br i1 %191, label %196, label %192

192:                                              ; preds = %189
  %193 = load ptr, ptr %4, align 8, !tbaa !5
  %194 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH4Body5GetIDEv(ptr noundef nonnull align 16 dereferenceable(122) %193)
  %195 = load i32, ptr %194, align 4, !tbaa !61
  store i32 %195, ptr %19, align 4, !tbaa !61
  br label %196

196:                                              ; preds = %192, %189, %186
  %197 = phi i1 [ false, %189 ], [ true, %192 ], [ false, %186 ]
  %.0 = phi i32 [ 0, %189 ], [ 1, %192 ], [ 0, %186 ]
  %198 = load ptr, ptr %5, align 8, !tbaa !5
  %199 = call noundef zeroext i1 @_ZNK3JPH4Body9IsDynamicEv(ptr noundef nonnull align 16 dereferenceable(122) %198)
  br i1 %199, label %200, label %209

200:                                              ; preds = %196
  %201 = load ptr, ptr %5, align 8, !tbaa !5
  %202 = call noundef zeroext i1 @_ZNK3JPH4Body8IsActiveEv(ptr noundef nonnull align 16 dereferenceable(122) %201)
  br i1 %202, label %209, label %.thread

.thread:                                          ; preds = %200
  %203 = load ptr, ptr %5, align 8, !tbaa !5
  %204 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH4Body5GetIDEv(ptr noundef nonnull align 16 dereferenceable(122) %203)
  %205 = add nuw nsw i32 %.0, 1
  %206 = zext nneg i32 %.0 to i64
  %207 = getelementptr inbounds [2 x %"class.JPH::BodyID"], ptr %19, i64 0, i64 %206
  %208 = load i32, ptr %204, align 4, !tbaa !61
  store i32 %208, ptr %207, align 4, !tbaa !61
  br label %210

209:                                              ; preds = %200, %196
  br i1 %197, label %210, label %211

210:                                              ; preds = %.thread, %209
  %.157 = phi i32 [ %205, %.thread ], [ 1, %209 ]
  call void @_ZN3JPH11BodyManager14ActivateBodiesEPKNS_6BodyIDEi(ptr noundef nonnull align 8 dereferenceable(297) %20, ptr noundef nonnull %19, i32 noundef %.157)
  br label %211

211:                                              ; preds = %210, %209
  %212 = getelementptr inbounds i8, ptr %0, i64 904
  %213 = load ptr, ptr %4, align 8, !tbaa !5
  %214 = call noundef i32 @_ZNK3JPH4Body30GetIndexInActiveBodiesInternalEv(ptr noundef nonnull align 16 dereferenceable(122) %213)
  %215 = load ptr, ptr %5, align 8, !tbaa !5
  %216 = call noundef i32 @_ZNK3JPH4Body30GetIndexInActiveBodiesInternalEv(ptr noundef nonnull align 16 dereferenceable(122) %215)
  call void @_ZN3JPH13IslandBuilder10LinkBodiesEjj(ptr noundef nonnull align 8 dereferenceable(112) %212, i32 noundef %214, i32 noundef %216)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #9
  br label %217

.critedge:                                        ; preds = %61
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #9
  br label %217

217:                                              ; preds = %183, %211, %.critedge
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #9
  br label %218

218:                                              ; preds = %30, %32, %217
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #9
  ret void
}

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

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

declare void @_ZN3JPH11BodyManager14ActivateBodiesEPKNS_6BodyIDEi(ptr noundef nonnull align 8 dereferenceable(297), ptr noundef, i32 noundef) local_unnamed_addr #4

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZSt4swapIPN3JPH4BodyEENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS6_ESt18is_move_assignableIS6_EEE5valueEvE4typeERS6_SF_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

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

declare void @_ZN3JPH24ContactConstraintManager20GetContactsFromCacheERNS0_16ContactAllocatorERNS_4BodyES4_RbS5_(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 16 dereferenceable(122), ptr noundef nonnull align 16 dereferenceable(122), ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #4

declare noundef ptr @_ZN3JPH24ContactConstraintManager11AddBodyPairERNS0_16ContactAllocatorERKNS_4BodyES5_(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 16 dereferenceable(122), ptr noundef nonnull align 16 dereferenceable(122)) local_unnamed_addr #4

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

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH26SimShapeFilterWrapperUnionC2EPKNS_14SimShapeFilterEPKNS_4BodyE(ptr noundef nonnull align 8 dereferenceable(40), ptr noundef, ptr noundef) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(40) ptr @_ZN3JPH26SimShapeFilterWrapperUnion24GetSimShapeFilterWrapperEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #6 align 2

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN3JPH5Mat449sRotationENS_4QuatE(ptr dead_on_unwind noalias writable sret(%"class.JPH::Mat44") align 16, double, double) local_unnamed_addr #7 align 2

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Vec3ngEv(ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #5 align 2

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZNK3JPH5Mat447ToMat44Ev(ptr dead_on_unwind noalias writable sret(%"class.JPH::Mat44") align 16, ptr noundef nonnull align 16 dereferenceable(64)) local_unnamed_addr #8 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZZN3JPH13PhysicsSystem15ProcessBodyPairERNS_24ContactConstraintManager16ContactAllocatorERKNS_8BodyPairEEN30ReductionCollideShapeCollectorC2EPS0_PKNS_4BodyESB_(ptr noundef nonnull align 16 dereferenceable(68688), ptr noundef, ptr noundef, ptr noundef) unnamed_addr #6 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNKSt8functionIFvRKN3JPH4BodyES3_RKNS0_5Mat44ES6_RNS0_20CollideShapeSettingsERNS0_18CollisionCollectorINS0_18CollideShapeResultENS0_36CollisionCollectorTraitsCollideShapeEEERKNS0_11ShapeFilterEEEclES3_S3_S6_S6_S8_SD_SG_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 16 dereferenceable(122), ptr noundef nonnull align 16 dereferenceable(122), ptr noundef nonnull align 16 dereferenceable(64), ptr noundef nonnull align 16 dereferenceable(64), ptr noundef nonnull align 16 dereferenceable(37), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(12)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef ptr @_ZN3JPH11StaticArrayIZNS_13PhysicsSystem15ProcessBodyPairERNS_24ContactConstraintManager16ContactAllocatorERKNS_8BodyPairEE10MyManifoldLj32EE5beginEv(ptr noundef nonnull align 16 dereferenceable(68624)) local_unnamed_addr #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef ptr @_ZN3JPH11StaticArrayIZNS_13PhysicsSystem15ProcessBodyPairERNS_24ContactConstraintManager16ContactAllocatorERKNS_8BodyPairEE10MyManifoldLj32EE3endEv(ptr noundef nonnull align 16 dereferenceable(68624)) local_unnamed_addr #6 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Vec310NormalizedEv(ptr noundef nonnull align 16 dereferenceable(16)) local_unnamed_addr #7 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3JPH11StaticArrayINS_4Vec3ELj64EE4sizeEv(ptr noundef nonnull align 16 dereferenceable(1040)) local_unnamed_addr #6 align 2

declare void @_ZN3JPH18PruneContactPointsENS_4Vec3ERNS_11StaticArrayIS0_Lj64EEES3_(double, double, ptr noundef nonnull align 16 dereferenceable(1040), ptr noundef nonnull align 16 dereferenceable(1040)) local_unnamed_addr #4

declare noundef zeroext i1 @_ZN3JPH24ContactConstraintManager20AddContactConstraintERNS0_16ContactAllocatorEPvRNS_4BodyES5_RKNS_15ContactManifoldE(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef nonnull align 16 dereferenceable(122), ptr noundef nonnull align 16 dereferenceable(122), ptr noundef nonnull align 16 dereferenceable(2128)) local_unnamed_addr #4

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden void @_ZZN3JPH13PhysicsSystem15ProcessBodyPairERNS_24ContactConstraintManager16ContactAllocatorERKNS_8BodyPairEEN33NonReductionCollideShapeCollectorC2EPS0_S3_PNS_4BodyESA_RKPv(ptr noundef nonnull align 8 dereferenceable(66), ptr noundef, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, ptr noundef, ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #6 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH6BodyIDC2Ev(ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #6 align 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 #3 align 2

declare void @_ZN3JPH13IslandBuilder10LinkBodiesEjj(ptr noundef nonnull align 8 dereferenceable(112), i32 noundef, i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK3JPH4Body30GetIndexInActiveBodiesInternalEv(ptr noundef nonnull align 16 dereferenceable(122)) local_unnamed_addr #6 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="128" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #8 = { alwaysinline 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 #9 = { 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 = !{i64 2160019498}
!10 = !{!11, !11, i64 0}
!11 = !{!"bool", !7, i64 0}
!12 = !{!13, !11, i64 566}
!13 = !{!"_ZTSN3JPH13PhysicsSystemE", !6, i64 0, !6, i64 8, !14, i64 16, !25, i64 320, !27, i64 336, !28, i64 352, !28, i64 376, !29, i64 400, !29, i64 416, !6, i64 432, !6, i64 440, !6, i64 448, !30, i64 456, !32, i64 488, !34, i64 576, !37, i64 824, !39, i64 904, !40, i64 1016, !18, i64 1080, !41, i64 1128, !42, i64 1152, !33, i64 1168}
!14 = !{!"_ZTSN3JPH11BodyManagerE", !15, i64 0, !17, i64 24, !16, i64 32, !18, i64 40, !22, i64 88, !23, i64 104, !18, i64 128, !7, i64 176, !7, i64 192, !17, i64 200, !18, i64 208, !24, i64 256, !6, i64 280, !6, i64 288, !11, i64 296}
!15 = !{!"_ZTSN3JPH5ArrayIPNS_4BodyENS_12STLAllocatorIS2_EEEE", !16, i64 0, !16, i64 8, !6, i64 16}
!16 = !{!"long", !7, i64 0}
!17 = !{!"int", !7, i64 0}
!18 = !{!"_ZTSN3JPH5MutexE", !19, i64 0, !21, i64 40}
!19 = !{!"_ZTSSt5mutex", !20, i64 0}
!20 = !{!"_ZTSSt12__mutex_base", !7, i64 0}
!21 = !{!"_ZTSNSt6thread2idE", !16, i64 0}
!22 = !{!"_ZTSN3JPH10MutexArrayINS_11SharedMutexEEE", !6, i64 0, !17, i64 8}
!23 = !{!"_ZTSN3JPH5ArrayIhNS_12STLAllocatorIhEEEE", !16, i64 0, !16, i64 8, !6, i64 16}
!24 = !{!"_ZTSN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEEE", !16, i64 0, !16, i64 8, !6, i64 16}
!25 = !{!"_ZTSN3JPH23BodyLockInterfaceNoLockE", !26, i64 0}
!26 = !{!"_ZTSN3JPH17BodyLockInterfaceE", !6, i64 8}
!27 = !{!"_ZTSN3JPH24BodyLockInterfaceLockingE", !26, i64 0}
!28 = !{!"_ZTSN3JPH13BodyInterfaceE", !6, i64 0, !6, i64 8, !6, i64 16}
!29 = !{!"_ZTSN3JPH16NarrowPhaseQueryE", !6, i64 0, !6, i64 8}
!30 = !{!"_ZTSSt8functionIFvRKN3JPH4BodyES3_RKNS0_5Mat44ES6_RNS0_20CollideShapeSettingsERNS0_18CollisionCollectorINS0_18CollideShapeResultENS0_36CollisionCollectorTraitsCollideShapeEEERKNS0_11ShapeFilterEEE", !31, i64 0, !6, i64 24}
!31 = !{!"_ZTSSt14_Function_base", !7, i64 0, !6, i64 16}
!32 = !{!"_ZTSN3JPH15PhysicsSettingsE", !17, i64 0, !17, i64 4, !17, i64 8, !33, i64 12, !33, i64 16, !33, i64 20, !33, i64 24, !33, i64 28, !33, i64 32, !33, i64 36, !33, i64 40, !33, i64 44, !33, i64 48, !33, i64 52, !17, i64 56, !17, i64 60, !33, i64 64, !33, i64 68, !33, i64 72, !11, i64 76, !11, i64 77, !11, i64 78, !11, i64 79, !11, i64 80, !11, i64 81, !11, i64 82}
!33 = !{!"float", !7, i64 0}
!34 = !{!"_ZTSN3JPH24ContactConstraintManagerE", !7, i64 8, !17, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !17, i64 232, !35, i64 236, !6, i64 240}
!35 = !{!"_ZTSSt6atomicIjE", !36, i64 0}
!36 = !{!"_ZTSSt13__atomic_baseIjE", !17, i64 0}
!37 = !{!"_ZTSN3JPH17ConstraintManagerE", !6, i64 0, !38, i64 8, !18, i64 32}
!38 = !{!"_ZTSN3JPH5ArrayINS_3RefINS_10ConstraintEEENS_12STLAllocatorIS3_EEEE", !16, i64 0, !16, i64 8, !6, i64 16}
!39 = !{!"_ZTSN3JPH13IslandBuilderE", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !17, i64 88, !17, i64 92, !17, i64 96, !17, i64 100, !17, i64 104, !17, i64 108}
!40 = !{!"_ZTSN3JPH19LargeIslandSplitterE", !17, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !17, i64 32, !35, i64 36, !17, i64 40, !6, i64 48, !35, i64 56}
!41 = !{!"_ZTSN3JPH5ArrayIPNS_19PhysicsStepListenerENS_12STLAllocatorIS2_EEEE", !16, i64 0, !16, i64 8, !6, i64 16}
!42 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!43 = !{i8 0, i8 2}
!44 = !{}
!45 = !{!46, !48, i64 1}
!46 = !{!"_ZTSN3JPH19CollideSettingsBaseE", !47, i64 0, !48, i64 1, !33, i64 4, !33, i64 8, !42, i64 16}
!47 = !{!"_ZTSN3JPH15EActiveEdgeModeE", !7, i64 0}
!48 = !{!"_ZTSN3JPH17ECollectFacesModeE", !7, i64 0}
!49 = !{!13, !11, i64 570}
!50 = !{!46, !47, i64 0}
!51 = !{!13, !33, i64 504}
!52 = !{!53, !33, i64 32}
!53 = !{!"_ZTSN3JPH20CollideShapeSettingsE", !46, i64 0, !33, i64 32, !54, i64 36}
!54 = !{!"_ZTSN3JPH13EBackFaceModeE", !7, i64 0}
!55 = !{!7, !7, i64 0}
!56 = !{!13, !6, i64 448}
!57 = !{!13, !11, i64 567}
!58 = !{!59, !11, i64 65}
!59 = !{!"_ZTSZN3JPH13PhysicsSystem15ProcessBodyPairERNS_24ContactConstraintManager16ContactAllocatorERKNS_8BodyPairEE33NonReductionCollideShapeCollector", !60, i64 0, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !11, i64 64, !11, i64 65}
!60 = !{!"_ZTSN3JPH18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEE", !33, i64 8, !6, i64 16}
!61 = !{!17, !17, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass