; LLVM IR from zig-gamedev/zphysics :: libs/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> }
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::Vec4" = type { %union.anon.40 }
%union.anon.40 = type { <4 x float> }
%"class.JPH::Quat" = type { %"class.JPH::Vec4" }
%class.ReductionCollideShapeCollector = type { %"class.JPH::CollisionCollector.46", ptr, ptr, ptr, i8, [15 x i8], %"class.JPH::StaticArray.47" }
%"class.JPH::CollisionCollector.46" = type { ptr, float, ptr }
%"class.JPH::StaticArray.47" = type { i32, [12 x i8], [32 x %"struct.JPH::StaticArray<MyManifold, 32>::Storage"] }
%"struct.JPH::StaticArray<MyManifold, 32>::Storage" = type { [2144 x i8] }
%"class.JPH::SubShapeIDCreator" = type { %"class.JPH::SubShapeID", i32 }
%"class.JPH::SubShapeID" = type { i32 }
%"class.JPH::ShapeFilter" = type <{ ptr, %"class.JPH::BodyID", [4 x i8] }>
%"class.JPH::BodyID" = type { i32 }
%class.NonReductionCollideShapeCollector = type <{ %"class.JPH::CollisionCollector.46", 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, %"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", [8 x i8], %"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 }
%"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.48", %"class.JPH::StaticArray.48" }
%"class.JPH::StaticArray.48" = 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 [90 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: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH13PhysicsSystem15ProcessBodyPairERNS_24ContactConstraintManager16ContactAllocatorERKNS_8BodyPairE(ptr noundef nonnull align 16 dereferenceable(1140) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(8) %2) #4 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 i8, align 1
  %15 = alloca %"class.JPH::CollideShapeSettings", align 16
  %16 = alloca %"class.JPH::Vec3", align 16
  %17 = alloca %"class.JPH::Vec3", align 16
  %18 = alloca %"class.JPH::Vec3", align 16
  %19 = alloca %"class.JPH::Vec3", align 16
  %20 = alloca %"class.JPH::Mat44", align 16
  %21 = alloca %"class.JPH::Quat", align 16
  %22 = alloca %"class.JPH::Mat44", align 16
  %23 = alloca %"class.JPH::Mat44", align 16
  %24 = alloca %"class.JPH::Mat44", align 16
  %25 = alloca %"class.JPH::Vec3", align 16
  %26 = alloca %class.ReductionCollideShapeCollector, align 16
  %27 = alloca %"class.JPH::SubShapeIDCreator", align 4
  %28 = alloca %"class.JPH::SubShapeIDCreator", align 4
  %29 = alloca ptr, align 8
  %30 = alloca ptr, align 8
  %31 = alloca i32, align 4
  %32 = alloca %"class.JPH::Vec3", align 16
  %33 = alloca %"class.JPH::Vec3", align 16
  %34 = alloca %"class.JPH::ShapeFilter", align 8
  %35 = alloca ptr, align 8
  %36 = alloca ptr, align 8
  %37 = alloca ptr, align 8
  %38 = alloca ptr, align 8
  %39 = alloca %"class.JPH::Vec3", align 16
  %40 = alloca %"class.JPH::Vec3", align 16
  %41 = alloca %class.NonReductionCollideShapeCollector, align 8
  %42 = alloca %"class.JPH::SubShapeIDCreator", align 4
  %43 = alloca %"class.JPH::SubShapeIDCreator", align 4
  %44 = alloca ptr, align 8
  %45 = alloca %"class.JPH::Vec3", align 16
  %46 = alloca %"class.JPH::Vec3", align 16
  %47 = alloca %"class.JPH::ShapeFilter", align 8
  %48 = alloca [2 x %"class.JPH::BodyID"], align 4
  %49 = 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
  %50 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #11
  %51 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %50, i32 0, i32 2
  %52 = load ptr, ptr %6, align 8, !tbaa !5
  %53 = getelementptr inbounds %"struct.JPH::BodyPair", ptr %52, i32 0, i32 0
  %54 = call noundef nonnull align 16 dereferenceable(122) ptr @_ZN3JPH11BodyManager7GetBodyERKNS_6BodyIDE(ptr noundef nonnull align 8 dereferenceable(297) %51, ptr noundef nonnull align 4 dereferenceable(4) %53)
  store ptr %54, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #11
  %55 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %50, i32 0, i32 2
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  %57 = getelementptr inbounds %"struct.JPH::BodyPair", ptr %56, i32 0, i32 1
  %58 = call noundef nonnull align 16 dereferenceable(122) ptr @_ZN3JPH11BodyManager7GetBodyERKNS_6BodyIDE(ptr noundef nonnull align 8 dereferenceable(297) %55, ptr noundef nonnull align 4 dereferenceable(4) %57)
  store ptr %58, ptr %8, align 8, !tbaa !5
  br label %59

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

62:                                               ; preds = %59
  %63 = call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.53, ptr noundef @.str.24, i32 noundef 968)
  br i1 %63, label %64, label %65

64:                                               ; preds = %62
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #11, !srcloc !9
  br label %65

65:                                               ; preds = %64, %62, %59
  br label %66

66:                                               ; preds = %65
  br label %67

67:                                               ; preds = %66
  %68 = load ptr, ptr %8, align 8, !tbaa !5
  %69 = call noundef zeroext i1 @_ZNK3JPH4Body10IsSoftBodyEv(ptr noundef nonnull align 16 dereferenceable(122) %68)
  br i1 %69, label %70, label %78

70:                                               ; preds = %67
  %71 = load ptr, ptr %8, align 8, !tbaa !5
  %72 = call noundef zeroext i1 @_ZNK3JPH4Body8IsActiveEv(ptr noundef nonnull align 16 dereferenceable(122) %71)
  br i1 %72, label %77, label %73

73:                                               ; preds = %70
  %74 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %50, i32 0, i32 2
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = getelementptr inbounds %"struct.JPH::BodyPair", ptr %75, i32 0, i32 1
  call void @_ZN3JPH11BodyManager14ActivateBodiesEPKNS_6BodyIDEi(ptr noundef nonnull align 8 dereferenceable(297) %74, ptr noundef %76, i32 noundef 1)
  br label %77

77:                                               ; preds = %73, %70
  store i32 1, ptr %10, align 4
  br label %481

78:                                               ; preds = %67
  %79 = load ptr, ptr %7, align 8, !tbaa !5
  %80 = call noundef zeroext i8 @_ZNK3JPH4Body13GetMotionTypeEv(ptr noundef nonnull align 16 dereferenceable(122) %79)
  %81 = load ptr, ptr %8, align 8, !tbaa !5
  %82 = call noundef zeroext i8 @_ZNK3JPH4Body13GetMotionTypeEv(ptr noundef nonnull align 16 dereferenceable(122) %81)
  %83 = icmp ult i8 %80, %82
  br i1 %83, label %96, label %84

84:                                               ; preds = %78
  %85 = load ptr, ptr %7, align 8, !tbaa !5
  %86 = call noundef zeroext i8 @_ZNK3JPH4Body13GetMotionTypeEv(ptr noundef nonnull align 16 dereferenceable(122) %85)
  %87 = load ptr, ptr %8, align 8, !tbaa !5
  %88 = call noundef zeroext i8 @_ZNK3JPH4Body13GetMotionTypeEv(ptr noundef nonnull align 16 dereferenceable(122) %87)
  %89 = icmp eq i8 %86, %88
  br i1 %89, label %90, label %97

90:                                               ; preds = %84
  %91 = load ptr, ptr %6, align 8, !tbaa !5
  %92 = getelementptr inbounds %"struct.JPH::BodyPair", ptr %91, i32 0, i32 1
  %93 = load ptr, ptr %6, align 8, !tbaa !5
  %94 = getelementptr inbounds %"struct.JPH::BodyPair", ptr %93, i32 0, i32 0
  %95 = call noundef zeroext i1 @_ZNK3JPH6BodyIDltERKS0_(ptr noundef nonnull align 4 dereferenceable(4) %92, ptr noundef nonnull align 4 dereferenceable(4) %94)
  br i1 %95, label %96, label %97

96:                                               ; preds = %90, %78
  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) #11
  br label %97

97:                                               ; preds = %96, %90, %84
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #11
  store i8 0, ptr %11, align 1, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #11
  store i8 0, ptr %12, align 1, !tbaa !10
  %98 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %50, i32 0, i32 11
  %99 = getelementptr inbounds %"struct.JPH::PhysicsSettings", ptr %98, i32 0, i32 21
  %100 = load i8, ptr %99, align 2, !tbaa !12, !range !41, !noundef !42
  %101 = trunc i8 %100 to i1
  br i1 %101, label %102, label %113

102:                                              ; preds = %97
  %103 = load ptr, ptr %7, align 8, !tbaa !5
  %104 = call noundef zeroext i1 @_ZNK3JPH4Body23IsCollisionCacheInvalidEv(ptr noundef nonnull align 16 dereferenceable(122) %103)
  br i1 %104, label %113, label %105

105:                                              ; preds = %102
  %106 = load ptr, ptr %8, align 8, !tbaa !5
  %107 = call noundef zeroext i1 @_ZNK3JPH4Body23IsCollisionCacheInvalidEv(ptr noundef nonnull align 16 dereferenceable(122) %106)
  br i1 %107, label %113, label %108

108:                                              ; preds = %105
  %109 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %50, i32 0, i32 13
  %110 = load ptr, ptr %5, align 8, !tbaa !5
  %111 = load ptr, ptr %7, align 8, !tbaa !5
  %112 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN3JPH24ContactConstraintManager20GetContactsFromCacheERNS0_16ContactAllocatorERNS_4BodyES4_RbS5_(ptr noundef nonnull align 8 dereferenceable(248) %109, ptr noundef nonnull align 8 dereferenceable(32) %110, ptr noundef nonnull align 16 dereferenceable(122) %111, ptr noundef nonnull align 16 dereferenceable(122) %112, ptr noundef nonnull align 1 dereferenceable(1) %11, ptr noundef nonnull align 1 dereferenceable(1) %12)
  br label %113

113:                                              ; preds = %108, %105, %102, %97
  %114 = load i8, ptr %11, align 1, !tbaa !10, !range !41, !noundef !42
  %115 = trunc i8 %114 to i1
  br i1 %115, label %430, label %116

116:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #11
  %117 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %50, i32 0, i32 13
  %118 = load ptr, ptr %5, align 8, !tbaa !5
  %119 = load ptr, ptr %7, align 8, !tbaa !5
  %120 = load ptr, ptr %8, align 8, !tbaa !5
  %121 = call noundef ptr @_ZN3JPH24ContactConstraintManager11AddBodyPairERNS0_16ContactAllocatorERKNS_4BodyES5_(ptr noundef nonnull align 8 dereferenceable(248) %117, ptr noundef nonnull align 8 dereferenceable(32) %118, ptr noundef nonnull align 16 dereferenceable(122) %119, ptr noundef nonnull align 16 dereferenceable(122) %120)
  store ptr %121, ptr %13, align 8, !tbaa !5
  %122 = load ptr, ptr %13, align 8, !tbaa !5
  %123 = icmp eq ptr %122, null
  br i1 %123, label %124, label %125

124:                                              ; preds = %116
  store i32 1, ptr %10, align 4
  br label %426

125:                                              ; preds = %116
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #11
  %126 = load ptr, ptr %7, align 8, !tbaa !5
  %127 = load ptr, ptr %8, align 8, !tbaa !5
  %128 = call noundef zeroext i1 @_ZNK3JPH4Body38GetEnhancedInternalEdgeRemovalWithBodyERKS0_(ptr noundef nonnull align 16 dereferenceable(122) %126, ptr noundef nonnull align 16 dereferenceable(122) %127)
  %129 = zext i1 %128 to i8
  store i8 %129, ptr %14, align 1, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 48, ptr %15) #11
  call void @_ZN3JPH20CollideShapeSettingsC2Ev(ptr noundef nonnull align 16 dereferenceable(37) %15)
  %130 = getelementptr inbounds %"class.JPH::CollideSettingsBase", ptr %15, i32 0, i32 1
  store i8 0, ptr %130, align 1, !tbaa !43
  %131 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %50, i32 0, i32 11
  %132 = getelementptr inbounds %"struct.JPH::PhysicsSettings", ptr %131, i32 0, i32 25
  %133 = load i8, ptr %132, align 2, !tbaa !47, !range !41, !noundef !42
  %134 = trunc i8 %133 to i1
  br i1 %134, label %135, label %139

135:                                              ; preds = %125
  %136 = load i8, ptr %14, align 1, !tbaa !10, !range !41, !noundef !42
  %137 = trunc i8 %136 to i1
  %138 = xor i1 %137, true
  br label %139

139:                                              ; preds = %135, %125
  %140 = phi i1 [ false, %125 ], [ %138, %135 ]
  %141 = zext i1 %140 to i64
  %142 = select i1 %140, i8 0, i8 1
  %143 = getelementptr inbounds %"class.JPH::CollideSettingsBase", ptr %15, i32 0, i32 0
  store i8 %142, ptr %143, align 16, !tbaa !48
  %144 = load ptr, ptr %7, align 8, !tbaa !5
  %145 = call noundef zeroext i1 @_ZNK3JPH4Body8IsSensorEv(ptr noundef nonnull align 16 dereferenceable(122) %144)
  br i1 %145, label %149, label %146

146:                                              ; preds = %139
  %147 = load ptr, ptr %8, align 8, !tbaa !5
  %148 = call noundef zeroext i1 @_ZNK3JPH4Body8IsSensorEv(ptr noundef nonnull align 16 dereferenceable(122) %147)
  br i1 %148, label %149, label %150

149:                                              ; preds = %146, %139
  br label %154

150:                                              ; preds = %146
  %151 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %50, i32 0, i32 11
  %152 = getelementptr inbounds %"struct.JPH::PhysicsSettings", ptr %151, i32 0, i32 4
  %153 = load float, ptr %152, align 16, !tbaa !49
  br label %154

154:                                              ; preds = %150, %149
  %155 = phi float [ 0.000000e+00, %149 ], [ %153, %150 ]
  %156 = getelementptr inbounds %"class.JPH::CollideShapeSettings", ptr %15, i32 0, i32 1
  store float %155, ptr %156, align 16, !tbaa !50
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #11
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #11
  %157 = load ptr, ptr %7, align 8, !tbaa !5
  %158 = call { double, double } @_ZNK3JPH4Body17GetLinearVelocityEv(ptr noundef nonnull align 16 dereferenceable(122) %157)
  %159 = getelementptr inbounds %"class.JPH::Vec3", ptr %17, i32 0, i32 0
  %160 = getelementptr inbounds %union.anon.13, ptr %159, i32 0, i32 0
  %161 = getelementptr inbounds { double, double }, ptr %160, i32 0, i32 0
  %162 = extractvalue { double, double } %158, 0
  store double %162, ptr %161, align 16
  %163 = getelementptr inbounds { double, double }, ptr %160, i32 0, i32 1
  %164 = extractvalue { double, double } %158, 1
  store double %164, ptr %163, align 8
  %165 = load ptr, ptr %8, align 8, !tbaa !5
  %166 = call { double, double } @_ZNK3JPH4Body17GetLinearVelocityEv(ptr noundef nonnull align 16 dereferenceable(122) %165)
  %167 = getelementptr inbounds %"class.JPH::Vec3", ptr %18, i32 0, i32 0
  %168 = getelementptr inbounds %union.anon.13, ptr %167, i32 0, i32 0
  %169 = getelementptr inbounds { double, double }, ptr %168, i32 0, i32 0
  %170 = extractvalue { double, double } %166, 0
  store double %170, ptr %169, align 16
  %171 = getelementptr inbounds { double, double }, ptr %168, i32 0, i32 1
  %172 = extractvalue { double, double } %166, 1
  store double %172, ptr %171, align 8
  %173 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 0
  %174 = load double, ptr %173, align 16
  %175 = getelementptr inbounds { double, double }, ptr %18, i32 0, i32 1
  %176 = load double, ptr %175, align 8
  %177 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %17, double %174, double %176)
  %178 = getelementptr inbounds %"class.JPH::Vec3", ptr %16, i32 0, i32 0
  %179 = getelementptr inbounds %union.anon.13, ptr %178, i32 0, i32 0
  %180 = getelementptr inbounds { double, double }, ptr %179, i32 0, i32 0
  %181 = extractvalue { double, double } %177, 0
  store double %181, ptr %180, align 16
  %182 = getelementptr inbounds { double, double }, ptr %179, i32 0, i32 1
  %183 = extractvalue { double, double } %177, 1
  store double %183, ptr %182, align 8
  %184 = getelementptr inbounds %"class.JPH::CollideSettingsBase", ptr %15, i32 0, i32 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %184, ptr align 16 %16, i64 16, i1 false), !tbaa.struct !53
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #11
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #11
  %185 = load ptr, ptr %7, align 8, !tbaa !5
  %186 = call { double, double } @_ZNK3JPH4Body23GetCenterOfMassPositionEv(ptr noundef nonnull align 16 dereferenceable(122) %185)
  %187 = getelementptr inbounds %"class.JPH::Vec3", ptr %19, i32 0, i32 0
  %188 = getelementptr inbounds %union.anon.13, ptr %187, i32 0, i32 0
  %189 = getelementptr inbounds { double, double }, ptr %188, i32 0, i32 0
  %190 = extractvalue { double, double } %186, 0
  store double %190, ptr %189, align 16
  %191 = getelementptr inbounds { double, double }, ptr %188, i32 0, i32 1
  %192 = extractvalue { double, double } %186, 1
  store double %192, ptr %191, align 8
  call void @llvm.lifetime.start.p0(i64 64, ptr %20) #11
  %193 = load ptr, ptr %7, align 8, !tbaa !5
  %194 = call { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122) %193)
  %195 = getelementptr inbounds %"class.JPH::Quat", ptr %21, i32 0, i32 0
  %196 = getelementptr inbounds %"class.JPH::Vec4", ptr %195, i32 0, i32 0
  %197 = getelementptr inbounds %union.anon.40, ptr %196, i32 0, i32 0
  %198 = getelementptr inbounds { double, double }, ptr %197, i32 0, i32 0
  %199 = extractvalue { double, double } %194, 0
  store double %199, ptr %198, align 16
  %200 = getelementptr inbounds { double, double }, ptr %197, i32 0, i32 1
  %201 = extractvalue { double, double } %194, 1
  store double %201, ptr %200, align 8
  %202 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 0
  %203 = load double, ptr %202, align 16
  %204 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 1
  %205 = load double, ptr %204, align 8
  call void @_ZN3JPH5Mat449sRotationENS_4QuatE(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %20, double %203, double %205)
  call void @llvm.lifetime.start.p0(i64 64, ptr %22) #11
  call void @llvm.lifetime.start.p0(i64 64, ptr %23) #11
  call void @llvm.lifetime.start.p0(i64 64, ptr %24) #11
  %206 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZNK3JPH4Body24GetCenterOfMassTransformEv(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %24, ptr noundef nonnull align 16 dereferenceable(122) %206)
  %207 = call { double, double } @_ZNK3JPH4Vec3ngEv(ptr noundef nonnull align 16 dereferenceable(16) %19)
  %208 = getelementptr inbounds %"class.JPH::Vec3", ptr %25, i32 0, i32 0
  %209 = getelementptr inbounds %union.anon.13, ptr %208, i32 0, i32 0
  %210 = getelementptr inbounds { double, double }, ptr %209, i32 0, i32 0
  %211 = extractvalue { double, double } %207, 0
  store double %211, ptr %210, align 16
  %212 = getelementptr inbounds { double, double }, ptr %209, i32 0, i32 1
  %213 = extractvalue { double, double } %207, 1
  store double %213, ptr %212, align 8
  %214 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 0
  %215 = load double, ptr %214, align 16
  %216 = getelementptr inbounds { double, double }, ptr %25, i32 0, i32 1
  %217 = load double, ptr %216, align 8
  call void @_ZNK3JPH5Mat4414PostTranslatedENS_4Vec3E(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %23, ptr noundef nonnull align 16 dereferenceable(64) %24, double %215, double %217)
  call void @_ZNK3JPH5Mat447ToMat44Ev(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %22, ptr noundef nonnull align 16 dereferenceable(64) %23)
  call void @llvm.lifetime.end.p0(i64 64, ptr %24) #11
  call void @llvm.lifetime.end.p0(i64 64, ptr %23) #11
  %218 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %50, i32 0, i32 11
  %219 = getelementptr inbounds %"struct.JPH::PhysicsSettings", ptr %218, i32 0, i32 22
  %220 = load i8, ptr %219, align 1, !tbaa !55, !range !41, !noundef !42
  %221 = trunc i8 %220 to i1
  br i1 %221, label %222, label %364

222:                                              ; preds = %154
  %223 = load ptr, ptr %7, align 8, !tbaa !5
  %224 = load ptr, ptr %8, align 8, !tbaa !5
  %225 = call noundef zeroext i1 @_ZNK3JPH4Body31GetUseManifoldReductionWithBodyERKS0_(ptr noundef nonnull align 16 dereferenceable(122) %223, ptr noundef nonnull align 16 dereferenceable(122) %224)
  br i1 %225, label %226, label %364

226:                                              ; preds = %222
  call void @llvm.lifetime.start.p0(i64 68688, ptr %26) #11
  %227 = load ptr, ptr %7, align 8, !tbaa !5
  %228 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZZN3JPH13PhysicsSystem15ProcessBodyPairERNS_24ContactConstraintManager16ContactAllocatorERKNS_8BodyPairEEN30ReductionCollideShapeCollectorC2EPS0_PKNS_4BodyESB_(ptr noundef nonnull align 16 dereferenceable(68688) %26, ptr noundef %50, ptr noundef %227, ptr noundef %228)
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #11
  call void @_ZN3JPH17SubShapeIDCreatorC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %27) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #11
  call void @_ZN3JPH17SubShapeIDCreatorC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %28) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #11
  %229 = load i8, ptr %14, align 1, !tbaa !10, !range !41, !noundef !42
  %230 = trunc i8 %229 to i1
  br i1 %230, label %231, label %232

231:                                              ; preds = %226
  br label %233

232:                                              ; preds = %226
  br label %233

233:                                              ; preds = %232, %231
  %234 = phi ptr [ @_ZN3JPH29InternalEdgeRemovingCollector20sCollideShapeVsShapeEPKNS_5ShapeES3_NS_4Vec3ES4_RKNS_5Mat44ES7_RKNS_17SubShapeIDCreatorESA_RKNS_20CollideShapeSettingsERNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_11ShapeFilterE, %231 ], [ @_ZN3JPH17CollisionDispatch20sCollideShapeVsShapeEPKNS_5ShapeES3_NS_4Vec3ES4_RKNS_5Mat44ES7_RKNS_17SubShapeIDCreatorESA_RKNS_20CollideShapeSettingsERNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_11ShapeFilterE, %232 ]
  store ptr %234, ptr %29, align 8, !tbaa !5
  %235 = load ptr, ptr %29, align 8, !tbaa !5
  %236 = load ptr, ptr %7, align 8, !tbaa !5
  %237 = invoke noundef ptr @_ZNK3JPH4Body8GetShapeEv(ptr noundef nonnull align 16 dereferenceable(122) %236)
          to label %238 unwind label %280

238:                                              ; preds = %233
  %239 = load ptr, ptr %8, align 8, !tbaa !5
  %240 = invoke noundef ptr @_ZNK3JPH4Body8GetShapeEv(ptr noundef nonnull align 16 dereferenceable(122) %239)
          to label %241 unwind label %280

241:                                              ; preds = %238
  %242 = invoke { double, double } @_ZN3JPH4Vec310sReplicateEf(float noundef 1.000000e+00)
          to label %243 unwind label %280

243:                                              ; preds = %241
  %244 = getelementptr inbounds %"class.JPH::Vec3", ptr %32, i32 0, i32 0
  %245 = getelementptr inbounds %union.anon.13, ptr %244, i32 0, i32 0
  %246 = getelementptr inbounds { double, double }, ptr %245, i32 0, i32 0
  %247 = extractvalue { double, double } %242, 0
  store double %247, ptr %246, align 16
  %248 = getelementptr inbounds { double, double }, ptr %245, i32 0, i32 1
  %249 = extractvalue { double, double } %242, 1
  store double %249, ptr %248, align 8
  %250 = invoke { double, double } @_ZN3JPH4Vec310sReplicateEf(float noundef 1.000000e+00)
          to label %251 unwind label %280

251:                                              ; preds = %243
  %252 = getelementptr inbounds %"class.JPH::Vec3", ptr %33, i32 0, i32 0
  %253 = getelementptr inbounds %union.anon.13, ptr %252, i32 0, i32 0
  %254 = getelementptr inbounds { double, double }, ptr %253, i32 0, i32 0
  %255 = extractvalue { double, double } %250, 0
  store double %255, ptr %254, align 16
  %256 = getelementptr inbounds { double, double }, ptr %253, i32 0, i32 1
  %257 = extractvalue { double, double } %250, 1
  store double %257, ptr %256, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %34) #11
  call void @llvm.memset.p0.i64(ptr align 8 %34, i8 0, i64 16, i1 false)
  invoke void @_ZN3JPH11ShapeFilterC2Ev(ptr noundef nonnull align 8 dereferenceable(12) %34)
          to label %258 unwind label %284

258:                                              ; preds = %251
  %259 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 0
  %260 = load double, ptr %259, align 16
  %261 = getelementptr inbounds { double, double }, ptr %32, i32 0, i32 1
  %262 = load double, ptr %261, align 8
  %263 = getelementptr inbounds { double, double }, ptr %33, i32 0, i32 0
  %264 = load double, ptr %263, align 16
  %265 = getelementptr inbounds { double, double }, ptr %33, i32 0, i32 1
  %266 = load double, ptr %265, align 8
  invoke void %235(ptr noundef %237, ptr noundef %240, double %260, double %262, double %264, double %266, ptr noundef nonnull align 16 dereferenceable(64) %20, ptr noundef nonnull align 16 dereferenceable(64) %22, ptr noundef nonnull align 4 dereferenceable(8) %27, ptr noundef nonnull align 4 dereferenceable(8) %28, ptr noundef nonnull align 16 dereferenceable(37) %15, ptr noundef nonnull align 8 dereferenceable(24) %26, ptr noundef nonnull align 8 dereferenceable(12) %34)
          to label %267 unwind label %288

267:                                              ; preds = %258
  call void @_ZN3JPH11ShapeFilterD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %34) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr %34) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #11
  %268 = getelementptr inbounds %class.ReductionCollideShapeCollector, ptr %26, i32 0, i32 6
  store ptr %268, ptr %35, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #11
  %269 = load ptr, ptr %35, align 8, !tbaa !5
  %270 = invoke noundef ptr @_ZN3JPH11StaticArrayIZNS_13PhysicsSystem15ProcessBodyPairERNS_24ContactConstraintManager16ContactAllocatorERKNS_8BodyPairEE10MyManifoldLj32EE5beginEv(ptr noundef nonnull align 16 dereferenceable(68624) %269)
          to label %271 unwind label %293

271:                                              ; preds = %267
  store ptr %270, ptr %36, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %37) #11
  %272 = load ptr, ptr %35, align 8, !tbaa !5
  %273 = invoke noundef ptr @_ZN3JPH11StaticArrayIZNS_13PhysicsSystem15ProcessBodyPairERNS_24ContactConstraintManager16ContactAllocatorERKNS_8BodyPairEE10MyManifoldLj32EE3endEv(ptr noundef nonnull align 16 dereferenceable(68624) %272)
          to label %274 unwind label %297

274:                                              ; preds = %271
  store ptr %273, ptr %37, align 8, !tbaa !5
  br label %275

275:                                              ; preds = %356, %274
  %276 = load ptr, ptr %36, align 8, !tbaa !5
  %277 = load ptr, ptr %37, align 8, !tbaa !5
  %278 = icmp ne ptr %276, %277
  br i1 %278, label %301, label %279

279:                                              ; preds = %275
  store i32 4, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #11
  br label %362

280:                                              ; preds = %243, %241, %238, %233
  %281 = landingpad { ptr, i32 }
          cleanup
  %282 = extractvalue { ptr, i32 } %281, 0
  store ptr %282, ptr %30, align 8
  %283 = extractvalue { ptr, i32 } %281, 1
  store i32 %283, ptr %31, align 4
  br label %363

284:                                              ; preds = %251
  %285 = landingpad { ptr, i32 }
          cleanup
  %286 = extractvalue { ptr, i32 } %285, 0
  store ptr %286, ptr %30, align 8
  %287 = extractvalue { ptr, i32 } %285, 1
  store i32 %287, ptr %31, align 4
  br label %292

288:                                              ; preds = %258
  %289 = landingpad { ptr, i32 }
          cleanup
  %290 = extractvalue { ptr, i32 } %289, 0
  store ptr %290, ptr %30, align 8
  %291 = extractvalue { ptr, i32 } %289, 1
  store i32 %291, ptr %31, align 4
  call void @_ZN3JPH11ShapeFilterD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %34) #11
  br label %292

292:                                              ; preds = %288, %284
  call void @llvm.lifetime.end.p0(i64 16, ptr %34) #11
  br label %363

293:                                              ; preds = %267
  %294 = landingpad { ptr, i32 }
          cleanup
  %295 = extractvalue { ptr, i32 } %294, 0
  store ptr %295, ptr %30, align 8
  %296 = extractvalue { ptr, i32 } %294, 1
  store i32 %296, ptr %31, align 4
  br label %361

297:                                              ; preds = %271
  %298 = landingpad { ptr, i32 }
          cleanup
  %299 = extractvalue { ptr, i32 } %298, 0
  store ptr %299, ptr %30, align 8
  %300 = extractvalue { ptr, i32 } %298, 1
  store i32 %300, ptr %31, align 4
  br label %360

301:                                              ; preds = %275
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #11
  %302 = load ptr, ptr %36, align 8, !tbaa !5
  store ptr %302, ptr %38, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %39) #11
  %303 = load ptr, ptr %38, align 8, !tbaa !5
  %304 = getelementptr inbounds %"class.JPH::ContactManifold", ptr %303, i32 0, i32 1
  %305 = invoke { double, double } @_ZNK3JPH4Vec310NormalizedEv(ptr noundef nonnull align 16 dereferenceable(16) %304)
          to label %306 unwind label %332

306:                                              ; preds = %301
  %307 = getelementptr inbounds %"class.JPH::Vec3", ptr %39, i32 0, i32 0
  %308 = getelementptr inbounds %union.anon.13, ptr %307, i32 0, i32 0
  %309 = getelementptr inbounds { double, double }, ptr %308, i32 0, i32 0
  %310 = extractvalue { double, double } %305, 0
  store double %310, ptr %309, align 16
  %311 = getelementptr inbounds { double, double }, ptr %308, i32 0, i32 1
  %312 = extractvalue { double, double } %305, 1
  store double %312, ptr %311, align 8
  %313 = load ptr, ptr %38, align 8, !tbaa !5
  %314 = getelementptr inbounds %"class.JPH::ContactManifold", ptr %313, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %314, ptr align 16 %39, i64 16, i1 false), !tbaa.struct !53
  call void @llvm.lifetime.end.p0(i64 16, ptr %39) #11
  %315 = load ptr, ptr %38, align 8, !tbaa !5
  %316 = getelementptr inbounds %"class.JPH::ContactManifold", ptr %315, i32 0, i32 6
  %317 = invoke noundef i32 @_ZNK3JPH11StaticArrayINS_4Vec3ELj64EE4sizeEv(ptr noundef nonnull align 16 dereferenceable(1040) %316)
          to label %318 unwind label %336

318:                                              ; preds = %306
  %319 = icmp ugt i32 %317, 4
  br i1 %319, label %320, label %340

320:                                              ; preds = %318
  %321 = load ptr, ptr %38, align 8, !tbaa !5
  %322 = getelementptr inbounds %"class.JPH::ContactManifold", ptr %321, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %40, ptr align 16 %322, i64 16, i1 false), !tbaa.struct !53
  %323 = load ptr, ptr %38, align 8, !tbaa !5
  %324 = getelementptr inbounds %"class.JPH::ContactManifold", ptr %323, i32 0, i32 6
  %325 = load ptr, ptr %38, align 8, !tbaa !5
  %326 = getelementptr inbounds %"class.JPH::ContactManifold", ptr %325, i32 0, i32 7
  %327 = getelementptr inbounds { double, double }, ptr %40, i32 0, i32 0
  %328 = load double, ptr %327, align 16
  %329 = getelementptr inbounds { double, double }, ptr %40, i32 0, i32 1
  %330 = load double, ptr %329, align 8
  invoke void @_ZN3JPH18PruneContactPointsENS_4Vec3ERNS_11StaticArrayIS0_Lj64EEES3_(double %328, double %330, ptr noundef nonnull align 16 dereferenceable(1040) %324, ptr noundef nonnull align 16 dereferenceable(1040) %326)
          to label %331 unwind label %336

331:                                              ; preds = %320
  br label %340

332:                                              ; preds = %301
  %333 = landingpad { ptr, i32 }
          cleanup
  %334 = extractvalue { ptr, i32 } %333, 0
  store ptr %334, ptr %30, align 8
  %335 = extractvalue { ptr, i32 } %333, 1
  store i32 %335, ptr %31, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %39) #11
  br label %359

336:                                              ; preds = %340, %320, %306
  %337 = landingpad { ptr, i32 }
          cleanup
  %338 = extractvalue { ptr, i32 } %337, 0
  store ptr %338, ptr %30, align 8
  %339 = extractvalue { ptr, i32 } %337, 1
  store i32 %339, ptr %31, align 4
  br label %359

340:                                              ; preds = %331, %318
  %341 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %50, i32 0, i32 13
  %342 = load ptr, ptr %5, align 8, !tbaa !5
  %343 = load ptr, ptr %13, align 8, !tbaa !5
  %344 = load ptr, ptr %7, align 8, !tbaa !5
  %345 = load ptr, ptr %8, align 8, !tbaa !5
  %346 = load ptr, ptr %38, align 8, !tbaa !5
  %347 = invoke noundef zeroext i1 @_ZN3JPH24ContactConstraintManager20AddContactConstraintERNS0_16ContactAllocatorEPvRNS_4BodyES5_RKNS_15ContactManifoldE(ptr noundef nonnull align 8 dereferenceable(248) %341, ptr noundef nonnull align 8 dereferenceable(32) %342, ptr noundef %343, ptr noundef nonnull align 16 dereferenceable(122) %344, ptr noundef nonnull align 16 dereferenceable(122) %345, ptr noundef nonnull align 16 dereferenceable(2128) %346)
          to label %348 unwind label %336

348:                                              ; preds = %340
  %349 = zext i1 %347 to i32
  %350 = load i8, ptr %12, align 1, !tbaa !10, !range !41, !noundef !42
  %351 = trunc i8 %350 to i1
  %352 = zext i1 %351 to i32
  %353 = or i32 %352, %349
  %354 = icmp ne i32 %353, 0
  %355 = zext i1 %354 to i8
  store i8 %355, ptr %12, align 1, !tbaa !10
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #11
  br label %356

356:                                              ; preds = %348
  %357 = load ptr, ptr %36, align 8, !tbaa !5
  %358 = getelementptr inbounds %class.MyManifold, ptr %357, i32 1
  store ptr %358, ptr %36, align 8, !tbaa !5
  br label %275

359:                                              ; preds = %336, %332
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #11
  br label %360

360:                                              ; preds = %359, %297
  call void @llvm.lifetime.end.p0(i64 8, ptr %37) #11
  br label %361

361:                                              ; preds = %360, %293
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #11
  br label %363

362:                                              ; preds = %279
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #11
  call void @_ZZN3JPH13PhysicsSystem15ProcessBodyPairERNS_24ContactConstraintManager16ContactAllocatorERKNS_8BodyPairEEN30ReductionCollideShapeCollectorD2Ev(ptr noundef nonnull align 16 dereferenceable(68688) %26) #11
  call void @llvm.lifetime.end.p0(i64 68688, ptr %26) #11
  br label %425

363:                                              ; preds = %361, %292, %280
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #11
  call void @_ZZN3JPH13PhysicsSystem15ProcessBodyPairERNS_24ContactConstraintManager16ContactAllocatorERKNS_8BodyPairEEN30ReductionCollideShapeCollectorD2Ev(ptr noundef nonnull align 16 dereferenceable(68688) %26) #11
  call void @llvm.lifetime.end.p0(i64 68688, ptr %26) #11
  br label %429

364:                                              ; preds = %222, %154
  call void @llvm.lifetime.start.p0(i64 72, ptr %41) #11
  %365 = load ptr, ptr %5, align 8, !tbaa !5
  %366 = load ptr, ptr %7, align 8, !tbaa !5
  %367 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZZN3JPH13PhysicsSystem15ProcessBodyPairERNS_24ContactConstraintManager16ContactAllocatorERKNS_8BodyPairEEN33NonReductionCollideShapeCollectorC2EPS0_S3_PNS_4BodyESA_RKPv(ptr noundef nonnull align 8 dereferenceable(66) %41, ptr noundef %50, ptr noundef nonnull align 8 dereferenceable(32) %365, ptr noundef %366, ptr noundef %367, ptr noundef nonnull align 8 dereferenceable(8) %13)
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #11
  call void @_ZN3JPH17SubShapeIDCreatorC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %42) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #11
  call void @_ZN3JPH17SubShapeIDCreatorC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %43) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr %44) #11
  %368 = load i8, ptr %14, align 1, !tbaa !10, !range !41, !noundef !42
  %369 = trunc i8 %368 to i1
  br i1 %369, label %370, label %371

370:                                              ; preds = %364
  br label %372

371:                                              ; preds = %364
  br label %372

372:                                              ; preds = %371, %370
  %373 = phi ptr [ @_ZN3JPH29InternalEdgeRemovingCollector20sCollideShapeVsShapeEPKNS_5ShapeES3_NS_4Vec3ES4_RKNS_5Mat44ES7_RKNS_17SubShapeIDCreatorESA_RKNS_20CollideShapeSettingsERNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_11ShapeFilterE, %370 ], [ @_ZN3JPH17CollisionDispatch20sCollideShapeVsShapeEPKNS_5ShapeES3_NS_4Vec3ES4_RKNS_5Mat44ES7_RKNS_17SubShapeIDCreatorESA_RKNS_20CollideShapeSettingsERNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_11ShapeFilterE, %371 ]
  store ptr %373, ptr %44, align 8, !tbaa !5
  %374 = load ptr, ptr %44, align 8, !tbaa !5
  %375 = load ptr, ptr %7, align 8, !tbaa !5
  %376 = invoke noundef ptr @_ZNK3JPH4Body8GetShapeEv(ptr noundef nonnull align 16 dereferenceable(122) %375)
          to label %377 unwind label %411

377:                                              ; preds = %372
  %378 = load ptr, ptr %8, align 8, !tbaa !5
  %379 = invoke noundef ptr @_ZNK3JPH4Body8GetShapeEv(ptr noundef nonnull align 16 dereferenceable(122) %378)
          to label %380 unwind label %411

380:                                              ; preds = %377
  %381 = invoke { double, double } @_ZN3JPH4Vec310sReplicateEf(float noundef 1.000000e+00)
          to label %382 unwind label %411

382:                                              ; preds = %380
  %383 = getelementptr inbounds %"class.JPH::Vec3", ptr %45, i32 0, i32 0
  %384 = getelementptr inbounds %union.anon.13, ptr %383, i32 0, i32 0
  %385 = getelementptr inbounds { double, double }, ptr %384, i32 0, i32 0
  %386 = extractvalue { double, double } %381, 0
  store double %386, ptr %385, align 16
  %387 = getelementptr inbounds { double, double }, ptr %384, i32 0, i32 1
  %388 = extractvalue { double, double } %381, 1
  store double %388, ptr %387, align 8
  %389 = invoke { double, double } @_ZN3JPH4Vec310sReplicateEf(float noundef 1.000000e+00)
          to label %390 unwind label %411

390:                                              ; preds = %382
  %391 = getelementptr inbounds %"class.JPH::Vec3", ptr %46, i32 0, i32 0
  %392 = getelementptr inbounds %union.anon.13, ptr %391, i32 0, i32 0
  %393 = getelementptr inbounds { double, double }, ptr %392, i32 0, i32 0
  %394 = extractvalue { double, double } %389, 0
  store double %394, ptr %393, align 16
  %395 = getelementptr inbounds { double, double }, ptr %392, i32 0, i32 1
  %396 = extractvalue { double, double } %389, 1
  store double %396, ptr %395, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %47) #11
  call void @llvm.memset.p0.i64(ptr align 8 %47, i8 0, i64 16, i1 false)
  invoke void @_ZN3JPH11ShapeFilterC2Ev(ptr noundef nonnull align 8 dereferenceable(12) %47)
          to label %397 unwind label %415

397:                                              ; preds = %390
  %398 = getelementptr inbounds { double, double }, ptr %45, i32 0, i32 0
  %399 = load double, ptr %398, align 16
  %400 = getelementptr inbounds { double, double }, ptr %45, i32 0, i32 1
  %401 = load double, ptr %400, align 8
  %402 = getelementptr inbounds { double, double }, ptr %46, i32 0, i32 0
  %403 = load double, ptr %402, align 16
  %404 = getelementptr inbounds { double, double }, ptr %46, i32 0, i32 1
  %405 = load double, ptr %404, align 8
  invoke void %374(ptr noundef %376, ptr noundef %379, double %399, double %401, double %403, double %405, ptr noundef nonnull align 16 dereferenceable(64) %20, ptr noundef nonnull align 16 dereferenceable(64) %22, ptr noundef nonnull align 4 dereferenceable(8) %42, ptr noundef nonnull align 4 dereferenceable(8) %43, ptr noundef nonnull align 16 dereferenceable(37) %15, ptr noundef nonnull align 8 dereferenceable(24) %41, ptr noundef nonnull align 8 dereferenceable(12) %47)
          to label %406 unwind label %419

406:                                              ; preds = %397
  call void @_ZN3JPH11ShapeFilterD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %47) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr %47) #11
  %407 = getelementptr inbounds %class.NonReductionCollideShapeCollector, ptr %41, i32 0, i32 7
  %408 = load i8, ptr %407, align 1, !tbaa !56, !range !41, !noundef !42
  %409 = trunc i8 %408 to i1
  %410 = zext i1 %409 to i8
  store i8 %410, ptr %12, align 1, !tbaa !10
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #11
  call void @_ZN3JPH18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(66) %41) #11
  call void @llvm.lifetime.end.p0(i64 72, ptr %41) #11
  br label %425

411:                                              ; preds = %382, %380, %377, %372
  %412 = landingpad { ptr, i32 }
          cleanup
  %413 = extractvalue { ptr, i32 } %412, 0
  store ptr %413, ptr %30, align 8
  %414 = extractvalue { ptr, i32 } %412, 1
  store i32 %414, ptr %31, align 4
  br label %424

415:                                              ; preds = %390
  %416 = landingpad { ptr, i32 }
          cleanup
  %417 = extractvalue { ptr, i32 } %416, 0
  store ptr %417, ptr %30, align 8
  %418 = extractvalue { ptr, i32 } %416, 1
  store i32 %418, ptr %31, align 4
  br label %423

419:                                              ; preds = %397
  %420 = landingpad { ptr, i32 }
          cleanup
  %421 = extractvalue { ptr, i32 } %420, 0
  store ptr %421, ptr %30, align 8
  %422 = extractvalue { ptr, i32 } %420, 1
  store i32 %422, ptr %31, align 4
  call void @_ZN3JPH11ShapeFilterD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %47) #11
  br label %423

423:                                              ; preds = %419, %415
  call void @llvm.lifetime.end.p0(i64 16, ptr %47) #11
  br label %424

424:                                              ; preds = %423, %411
  call void @llvm.lifetime.end.p0(i64 8, ptr %44) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #11
  call void @_ZN3JPH18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(66) %41) #11
  call void @llvm.lifetime.end.p0(i64 72, ptr %41) #11
  br label %429

425:                                              ; preds = %406, %362
  call void @llvm.lifetime.end.p0(i64 64, ptr %22) #11
  call void @llvm.lifetime.end.p0(i64 64, ptr %20) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #11
  call void @llvm.lifetime.end.p0(i64 48, ptr %15) #11
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #11
  store i32 0, ptr %10, align 4
  br label %426

426:                                              ; preds = %425, %124
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #11
  %427 = load i32, ptr %10, align 4
  switch i32 %427, label %480 [
    i32 0, label %428
  ]

428:                                              ; preds = %426
  br label %430

429:                                              ; preds = %424, %363
  call void @llvm.lifetime.end.p0(i64 64, ptr %22) #11
  call void @llvm.lifetime.end.p0(i64 64, ptr %20) #11
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #11
  call void @llvm.lifetime.end.p0(i64 48, ptr %15) #11
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #11
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #11
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #11
  br label %484

430:                                              ; preds = %428, %113
  %431 = load i8, ptr %12, align 1, !tbaa !10, !range !41, !noundef !42
  %432 = trunc i8 %431 to i1
  br i1 %432, label %433, label %479

433:                                              ; preds = %430
  call void @llvm.lifetime.start.p0(i64 8, ptr %48) #11
  %434 = getelementptr inbounds [2 x %"class.JPH::BodyID"], ptr %48, i32 0, i32 0
  %435 = getelementptr inbounds %"class.JPH::BodyID", ptr %434, i64 2
  br label %436

436:                                              ; preds = %436, %433
  %437 = phi ptr [ %434, %433 ], [ %438, %436 ]
  call void @_ZN3JPH6BodyIDC2Ev(ptr noundef nonnull align 4 dereferenceable(4) %437)
  %438 = getelementptr inbounds %"class.JPH::BodyID", ptr %437, i64 1
  %439 = icmp eq ptr %438, %435
  br i1 %439, label %440, label %436

440:                                              ; preds = %436
  call void @llvm.lifetime.start.p0(i64 4, ptr %49) #11
  store i32 0, ptr %49, align 4, !tbaa !59
  %441 = load ptr, ptr %7, align 8, !tbaa !5
  %442 = call noundef zeroext i1 @_ZNK3JPH4Body9IsDynamicEv(ptr noundef nonnull align 16 dereferenceable(122) %441)
  br i1 %442, label %443, label %453

443:                                              ; preds = %440
  %444 = load ptr, ptr %7, align 8, !tbaa !5
  %445 = call noundef zeroext i1 @_ZNK3JPH4Body8IsActiveEv(ptr noundef nonnull align 16 dereferenceable(122) %444)
  br i1 %445, label %453, label %446

446:                                              ; preds = %443
  %447 = load ptr, ptr %7, align 8, !tbaa !5
  %448 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH4Body5GetIDEv(ptr noundef nonnull align 16 dereferenceable(122) %447)
  %449 = load i32, ptr %49, align 4, !tbaa !59
  %450 = add nsw i32 %449, 1
  store i32 %450, ptr %49, align 4, !tbaa !59
  %451 = sext i32 %449 to i64
  %452 = getelementptr inbounds [2 x %"class.JPH::BodyID"], ptr %48, i64 0, i64 %451
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %452, ptr align 4 %448, i64 4, i1 false), !tbaa.struct !60
  br label %453

453:                                              ; preds = %446, %443, %440
  %454 = load ptr, ptr %8, align 8, !tbaa !5
  %455 = call noundef zeroext i1 @_ZNK3JPH4Body9IsDynamicEv(ptr noundef nonnull align 16 dereferenceable(122) %454)
  br i1 %455, label %456, label %466

456:                                              ; preds = %453
  %457 = load ptr, ptr %8, align 8, !tbaa !5
  %458 = call noundef zeroext i1 @_ZNK3JPH4Body8IsActiveEv(ptr noundef nonnull align 16 dereferenceable(122) %457)
  br i1 %458, label %466, label %459

459:                                              ; preds = %456
  %460 = load ptr, ptr %8, align 8, !tbaa !5
  %461 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH4Body5GetIDEv(ptr noundef nonnull align 16 dereferenceable(122) %460)
  %462 = load i32, ptr %49, align 4, !tbaa !59
  %463 = add nsw i32 %462, 1
  store i32 %463, ptr %49, align 4, !tbaa !59
  %464 = sext i32 %462 to i64
  %465 = getelementptr inbounds [2 x %"class.JPH::BodyID"], ptr %48, i64 0, i64 %464
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %465, ptr align 4 %461, i64 4, i1 false), !tbaa.struct !60
  br label %466

466:                                              ; preds = %459, %456, %453
  %467 = load i32, ptr %49, align 4, !tbaa !59
  %468 = icmp sgt i32 %467, 0
  br i1 %468, label %469, label %473

469:                                              ; preds = %466
  %470 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %50, i32 0, i32 2
  %471 = getelementptr inbounds [2 x %"class.JPH::BodyID"], ptr %48, i64 0, i64 0
  %472 = load i32, ptr %49, align 4, !tbaa !59
  call void @_ZN3JPH11BodyManager14ActivateBodiesEPKNS_6BodyIDEi(ptr noundef nonnull align 8 dereferenceable(297) %470, ptr noundef %471, i32 noundef %472)
  br label %473

473:                                              ; preds = %469, %466
  %474 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %50, i32 0, i32 15
  %475 = load ptr, ptr %7, align 8, !tbaa !5
  %476 = call noundef i32 @_ZNK3JPH4Body30GetIndexInActiveBodiesInternalEv(ptr noundef nonnull align 16 dereferenceable(122) %475)
  %477 = load ptr, ptr %8, align 8, !tbaa !5
  %478 = call noundef i32 @_ZNK3JPH4Body30GetIndexInActiveBodiesInternalEv(ptr noundef nonnull align 16 dereferenceable(122) %477)
  call void @_ZN3JPH13IslandBuilder10LinkBodiesEjj(ptr noundef nonnull align 8 dereferenceable(112) %474, i32 noundef %476, i32 noundef %478)
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %48) #11
  br label %479

479:                                              ; preds = %473, %430
  store i32 0, ptr %10, align 4
  br label %480

480:                                              ; preds = %479, %426
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #11
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #11
  br label %481

481:                                              ; preds = %480, %77
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #11
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #11
  %482 = load i32, ptr %10, align 4
  switch i32 %482, label %489 [
    i32 0, label %483
    i32 1, label %483
  ]

483:                                              ; preds = %481, %481
  ret void

484:                                              ; preds = %429
  %485 = load ptr, ptr %30, align 8
  %486 = load i32, ptr %31, align 4
  %487 = insertvalue { ptr, i32 } poison, ptr %485, 0
  %488 = insertvalue { ptr, i32 } %487, i32 %486, 1
  resume { ptr, i32 } %488

489:                                              ; preds = %481
  unreachable
}

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i8 @_ZNK3JPH4Body13GetMotionTypeEv(ptr noundef nonnull align 16 dereferenceable(122)) #5 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)) #5 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)) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH4Body23IsCollisionCacheInvalidEv(ptr noundef nonnull align 16 dereferenceable(122)) #5 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)) #6

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)) #6

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Body23GetCenterOfMassPositionEv(ptr noundef nonnull align 16 dereferenceable(122)) #2 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)) #2 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)) #7 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)) #5 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 #10 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH17CollisionDispatch20sCollideShapeVsShapeEPKNS_5ShapeES3_NS_4Vec3ES4_RKNS_5Mat44ES7_RKNS_17SubShapeIDCreatorESA_RKNS_20CollideShapeSettingsERNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_11ShapeFilterE(ptr noundef, ptr noundef, double, double, double, double, ptr noundef nonnull align 16 dereferenceable(64), ptr noundef nonnull align 16 dereferenceable(64), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 16 dereferenceable(37), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(12)) #2 align 2

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Vec310sReplicateEf(float noundef) #7 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH11ShapeFilterC2Ev(ptr noundef nonnull align 8 dereferenceable(12)) unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef ptr @_ZN3JPH11StaticArrayIZNS_13PhysicsSystem15ProcessBodyPairERNS_24ContactConstraintManager16ContactAllocatorERKNS_8BodyPairEE10MyManifoldLj32EE3endEv(ptr noundef nonnull align 16 dereferenceable(68624)) #10 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)) #10 align 2

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

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)) #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare hidden void @_ZZN3JPH13PhysicsSystem15ProcessBodyPairERNS_24ContactConstraintManager16ContactAllocatorERKNS_8BodyPairEEN30ReductionCollideShapeCollectorD2Ev(ptr noundef nonnull align 16 dereferenceable(68688)) unnamed_addr #5 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 #10 align 2

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

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 #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 = { 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 #11 = { 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 2159698679}
!10 = !{!11, !11, i64 0}
!11 = !{!"bool", !7, i64 0}
!12 = !{!13, !11, i64 526}
!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, !30, i64 448, !32, i64 536, !35, i64 784, !37, i64 864, !38, i64 976, !18, i64 1040, !39, i64 1088, !40, i64 1120, !31, i64 1136}
!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 = !{!"_ZTSN3JPH15PhysicsSettingsE", !17, i64 0, !17, i64 4, !17, i64 8, !31, i64 12, !31, i64 16, !31, i64 20, !31, i64 24, !31, i64 28, !31, i64 32, !31, i64 36, !31, i64 40, !31, i64 44, !31, i64 48, !31, i64 52, !17, i64 56, !17, i64 60, !31, i64 64, !31, i64 68, !31, i64 72, !11, i64 76, !11, i64 77, !11, i64 78, !11, i64 79, !11, i64 80, !11, i64 81, !11, i64 82}
!31 = !{!"float", !7, i64 0}
!32 = !{!"_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, !33, i64 236, !6, i64 240}
!33 = !{!"_ZTSSt6atomicIjE", !34, i64 0}
!34 = !{!"_ZTSSt13__atomic_baseIjE", !17, i64 0}
!35 = !{!"_ZTSN3JPH17ConstraintManagerE", !6, i64 0, !36, i64 8, !18, i64 32}
!36 = !{!"_ZTSN3JPH5ArrayINS_3RefINS_10ConstraintEEENS_12STLAllocatorIS3_EEEE", !16, i64 0, !16, i64 8, !6, i64 16}
!37 = !{!"_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}
!38 = !{!"_ZTSN3JPH19LargeIslandSplitterE", !17, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !17, i64 32, !33, i64 36, !17, i64 40, !6, i64 48, !33, i64 56}
!39 = !{!"_ZTSN3JPH5ArrayIPNS_19PhysicsStepListenerENS_12STLAllocatorIS2_EEEE", !16, i64 0, !16, i64 8, !6, i64 16}
!40 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!41 = !{i8 0, i8 2}
!42 = !{}
!43 = !{!44, !46, i64 1}
!44 = !{!"_ZTSN3JPH19CollideSettingsBaseE", !45, i64 0, !46, i64 1, !31, i64 4, !31, i64 8, !40, i64 16}
!45 = !{!"_ZTSN3JPH15EActiveEdgeModeE", !7, i64 0}
!46 = !{!"_ZTSN3JPH17ECollectFacesModeE", !7, i64 0}
!47 = !{!13, !11, i64 530}
!48 = !{!44, !45, i64 0}
!49 = !{!13, !31, i64 464}
!50 = !{!51, !31, i64 32}
!51 = !{!"_ZTSN3JPH20CollideShapeSettingsE", !44, i64 0, !31, i64 32, !52, i64 36}
!52 = !{!"_ZTSN3JPH13EBackFaceModeE", !7, i64 0}
!53 = !{i64 0, i64 16, !54}
!54 = !{!7, !7, i64 0}
!55 = !{!13, !11, i64 527}
!56 = !{!57, !11, i64 65}
!57 = !{!"_ZTSZN3JPH13PhysicsSystem15ProcessBodyPairERNS_24ContactConstraintManager16ContactAllocatorERKNS_8BodyPairEE33NonReductionCollideShapeCollector", !58, i64 0, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !11, i64 64, !11, i64 65}
!58 = !{!"_ZTSN3JPH18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEE", !31, i64 8, !6, i64 16}
!59 = !{!17, !17, i64 0}
!60 = !{i64 0, i64 4, !59}


; 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> }
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::Vec4" = type { %union.anon.40 }
%union.anon.40 = type { <4 x float> }
%class.ReductionCollideShapeCollector = type { %"class.JPH::CollisionCollector.46", ptr, ptr, ptr, i8, [15 x i8], %"class.JPH::StaticArray.47" }
%"class.JPH::CollisionCollector.46" = type { ptr, float, ptr }
%"class.JPH::StaticArray.47" = type { i32, [12 x i8], [32 x %"struct.JPH::StaticArray<MyManifold, 32>::Storage"] }
%"struct.JPH::StaticArray<MyManifold, 32>::Storage" = type { [2144 x i8] }
%"class.JPH::SubShapeIDCreator" = type { %"class.JPH::SubShapeID", i32 }
%"class.JPH::SubShapeID" = type { i32 }
%"class.JPH::ShapeFilter" = type <{ ptr, %"class.JPH::BodyID", [4 x i8] }>
%"class.JPH::BodyID" = type { i32 }
%class.NonReductionCollideShapeCollector = type <{ %"class.JPH::CollisionCollector.46", ptr, ptr, ptr, ptr, ptr, i8, i8, [6 x i8] }>

@.str.24 = external hidden unnamed_addr constant [90 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: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #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)) local_unnamed_addr #3 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 #4 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH13PhysicsSystem15ProcessBodyPairERNS_24ContactConstraintManager16ContactAllocatorERKNS_8BodyPairE(ptr noundef nonnull align 16 dereferenceable(1140) %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(8) %2) local_unnamed_addr #3 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 %"class.JPH::Vec3", align 16
  %12 = alloca %"class.JPH::Mat44", 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.ReductionCollideShapeCollector, align 16
  %17 = alloca %"class.JPH::SubShapeIDCreator", align 4
  %18 = alloca %"class.JPH::SubShapeIDCreator", align 4
  %19 = alloca %"class.JPH::ShapeFilter", align 8
  %20 = alloca %class.NonReductionCollideShapeCollector, align 8
  %21 = alloca %"class.JPH::SubShapeIDCreator", align 4
  %22 = alloca %"class.JPH::SubShapeIDCreator", align 4
  %23 = alloca %"class.JPH::ShapeFilter", align 8
  %24 = alloca [2 x %"class.JPH::BodyID"], align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #10
  %25 = getelementptr inbounds i8, ptr %0, i64 16
  %26 = tail call noundef nonnull align 16 dereferenceable(122) ptr @_ZN3JPH11BodyManager7GetBodyERKNS_6BodyIDE(ptr noundef nonnull align 8 dereferenceable(297) %25, ptr noundef nonnull align 4 dereferenceable(4) %2)
  store ptr %26, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #10
  %27 = getelementptr inbounds i8, ptr %2, i64 4
  %28 = tail call noundef nonnull align 16 dereferenceable(122) ptr @_ZN3JPH11BodyManager7GetBodyERKNS_6BodyIDE(ptr noundef nonnull align 8 dereferenceable(297) %25, ptr noundef nonnull align 4 dereferenceable(4) %27)
  store ptr %28, ptr %5, align 8, !tbaa !5
  %29 = tail call noundef zeroext i1 @_ZNK3JPH4Body8IsActiveEv(ptr noundef nonnull align 16 dereferenceable(122) %26)
  br i1 %29, label %33, label %30

30:                                               ; preds = %3
  %31 = tail call noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.53, ptr noundef nonnull @.str.24, i32 noundef 968)
  br i1 %31, label %32, label %33

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

33:                                               ; preds = %32, %30, %3
  %34 = tail call noundef zeroext i1 @_ZNK3JPH4Body10IsSoftBodyEv(ptr noundef nonnull align 16 dereferenceable(122) %28)
  br i1 %34, label %35, label %38

35:                                               ; preds = %33
  %36 = tail call noundef zeroext i1 @_ZNK3JPH4Body8IsActiveEv(ptr noundef nonnull align 16 dereferenceable(122) %28)
  br i1 %36, label %244, label %37

37:                                               ; preds = %35
  tail call void @_ZN3JPH11BodyManager14ActivateBodiesEPKNS_6BodyIDEi(ptr noundef nonnull align 8 dereferenceable(297) %25, ptr noundef nonnull %27, i32 noundef 1)
  br label %244

38:                                               ; preds = %33
  %39 = tail call noundef zeroext i8 @_ZNK3JPH4Body13GetMotionTypeEv(ptr noundef nonnull align 16 dereferenceable(122) %26)
  %40 = tail call noundef zeroext i8 @_ZNK3JPH4Body13GetMotionTypeEv(ptr noundef nonnull align 16 dereferenceable(122) %28)
  %41 = icmp ult i8 %39, %40
  br i1 %41, label %48, label %42

42:                                               ; preds = %38
  %43 = tail call noundef zeroext i8 @_ZNK3JPH4Body13GetMotionTypeEv(ptr noundef nonnull align 16 dereferenceable(122) %26)
  %44 = tail call noundef zeroext i8 @_ZNK3JPH4Body13GetMotionTypeEv(ptr noundef nonnull align 16 dereferenceable(122) %28)
  %45 = icmp eq i8 %43, %44
  br i1 %45, label %46, label %49

46:                                               ; preds = %42
  %47 = tail call noundef zeroext i1 @_ZNK3JPH6BodyIDltERKS0_(ptr noundef nonnull align 4 dereferenceable(4) %27, ptr noundef nonnull align 4 dereferenceable(4) %2)
  br i1 %47, label %48, label %49

48:                                               ; preds = %46, %38
  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) #10
  br label %49

49:                                               ; preds = %48, %46, %42
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #10
  store i8 0, ptr %6, align 1, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #10
  store i8 0, ptr %7, align 1, !tbaa !10
  %50 = getelementptr inbounds i8, ptr %0, i64 526
  %51 = load i8, ptr %50, align 2, !tbaa !12, !range !41, !noundef !42
  %52 = trunc nuw i8 %51 to i1
  br i1 %52, label %53, label %63

53:                                               ; preds = %49
  %54 = load ptr, ptr %4, align 8, !tbaa !5
  %55 = call noundef zeroext i1 @_ZNK3JPH4Body23IsCollisionCacheInvalidEv(ptr noundef nonnull align 16 dereferenceable(122) %54)
  br i1 %55, label %63, label %56

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

59:                                               ; preds = %56
  %60 = getelementptr inbounds i8, ptr %0, i64 536
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN3JPH24ContactConstraintManager20GetContactsFromCacheERNS0_16ContactAllocatorERNS_4BodyES4_RbS5_(ptr noundef nonnull align 8 dereferenceable(248) %60, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 16 dereferenceable(122) %61, ptr noundef nonnull align 16 dereferenceable(122) %62, ptr noundef nonnull align 1 dereferenceable(1) %6, ptr noundef nonnull align 1 dereferenceable(1) %7)
  br label %63

63:                                               ; preds = %59, %56, %53, %49
  %64 = load i8, ptr %6, align 1, !tbaa !10, !range !41, !noundef !42
  %65 = trunc nuw i8 %64 to i1
  br i1 %65, label %209, label %66

66:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #10
  %67 = getelementptr inbounds i8, ptr %0, i64 536
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = call noundef ptr @_ZN3JPH24ContactConstraintManager11AddBodyPairERNS0_16ContactAllocatorERKNS_4BodyES5_(ptr noundef nonnull align 8 dereferenceable(248) %67, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 16 dereferenceable(122) %68, ptr noundef nonnull align 16 dereferenceable(122) %69)
  store ptr %70, ptr %8, align 8, !tbaa !5
  %.not70 = icmp eq ptr %70, null
  br i1 %.not70, label %.critedge, label %71

71:                                               ; preds = %66
  %72 = load ptr, ptr %4, align 8, !tbaa !5
  %73 = load ptr, ptr %5, align 8, !tbaa !5
  %74 = call noundef zeroext i1 @_ZNK3JPH4Body38GetEnhancedInternalEdgeRemovalWithBodyERKS0_(ptr noundef nonnull align 16 dereferenceable(122) %72, ptr noundef nonnull align 16 dereferenceable(122) %73)
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %9) #10
  call void @_ZN3JPH20CollideShapeSettingsC2Ev(ptr noundef nonnull align 16 dereferenceable(37) %9)
  %75 = getelementptr inbounds i8, ptr %9, i64 1
  store i8 0, ptr %75, align 1, !tbaa !43
  %76 = getelementptr inbounds i8, ptr %0, i64 530
  %77 = load i8, ptr %76, align 2, !tbaa !47, !range !41, !noundef !42
  %78 = trunc nuw i8 %77 to i1
  %.not = xor i1 %78, true
  %not. = or i1 %74, %.not
  %79 = zext i1 %not. to i8
  store i8 %79, ptr %9, align 16, !tbaa !48
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  %81 = call noundef zeroext i1 @_ZNK3JPH4Body8IsSensorEv(ptr noundef nonnull align 16 dereferenceable(122) %80)
  br i1 %81, label %88, label %82

82:                                               ; preds = %71
  %83 = load ptr, ptr %5, align 8, !tbaa !5
  %84 = call noundef zeroext i1 @_ZNK3JPH4Body8IsSensorEv(ptr noundef nonnull align 16 dereferenceable(122) %83)
  br i1 %84, label %88, label %85

85:                                               ; preds = %82
  %86 = getelementptr inbounds i8, ptr %0, i64 464
  %87 = load float, ptr %86, align 16, !tbaa !49
  br label %88

88:                                               ; preds = %71, %82, %85
  %89 = phi float [ %87, %85 ], [ 0.000000e+00, %82 ], [ 0.000000e+00, %71 ]
  %90 = getelementptr inbounds i8, ptr %9, i64 32
  store float %89, ptr %90, align 16, !tbaa !50
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #10
  %91 = load ptr, ptr %4, align 8, !tbaa !5
  %92 = call { double, double } @_ZNK3JPH4Body17GetLinearVelocityEv(ptr noundef nonnull align 16 dereferenceable(122) %91)
  %93 = extractvalue { double, double } %92, 0
  store double %93, ptr %10, align 16
  %94 = getelementptr inbounds i8, ptr %10, i64 8
  %95 = extractvalue { double, double } %92, 1
  store double %95, ptr %94, align 8
  %96 = load ptr, ptr %5, align 8, !tbaa !5
  %97 = call { double, double } @_ZNK3JPH4Body17GetLinearVelocityEv(ptr noundef nonnull align 16 dereferenceable(122) %96)
  %98 = extractvalue { double, double } %97, 0
  %99 = extractvalue { double, double } %97, 1
  %100 = call { double, double } @_ZNK3JPH4Vec3miES0_(ptr noundef nonnull align 16 dereferenceable(16) %10, double %98, double %99)
  %101 = extractvalue { double, double } %100, 0
  %102 = extractvalue { double, double } %100, 1
  %103 = getelementptr inbounds i8, ptr %9, i64 16
  store double %101, ptr %103, align 16
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %9, i64 24
  store double %102, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !53
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #10
  %104 = load ptr, ptr %4, align 8, !tbaa !5
  %105 = call { double, double } @_ZNK3JPH4Body23GetCenterOfMassPositionEv(ptr noundef nonnull align 16 dereferenceable(122) %104)
  %106 = extractvalue { double, double } %105, 0
  store double %106, ptr %11, align 16
  %107 = getelementptr inbounds i8, ptr %11, i64 8
  %108 = extractvalue { double, double } %105, 1
  store double %108, ptr %107, align 8
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %12) #10
  %109 = load ptr, ptr %4, align 8, !tbaa !5
  %110 = call { double, double } @_ZNK3JPH4Body11GetRotationEv(ptr noundef nonnull align 16 dereferenceable(122) %109)
  %111 = extractvalue { double, double } %110, 0
  %112 = extractvalue { double, double } %110, 1
  call void @_ZN3JPH5Mat449sRotationENS_4QuatE(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %12, double %111, double %112)
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %13) #10
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %14) #10
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %15) #10
  %113 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZNK3JPH4Body24GetCenterOfMassTransformEv(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %15, ptr noundef nonnull align 16 dereferenceable(122) %113)
  %114 = call { double, double } @_ZNK3JPH4Vec3ngEv(ptr noundef nonnull align 16 dereferenceable(16) %11)
  %115 = extractvalue { double, double } %114, 0
  %116 = extractvalue { double, double } %114, 1
  call void @_ZNK3JPH5Mat4414PostTranslatedENS_4Vec3E(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %14, ptr noundef nonnull align 16 dereferenceable(64) %15, double %115, double %116)
  call void @_ZNK3JPH5Mat447ToMat44Ev(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %13, ptr noundef nonnull align 16 dereferenceable(64) %14)
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %15) #10
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %14) #10
  %117 = getelementptr inbounds i8, ptr %0, i64 527
  %118 = load i8, ptr %117, align 1, !tbaa !54, !range !41, !noundef !42
  %119 = trunc nuw i8 %118 to i1
  br i1 %119, label %120, label %178

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

124:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 68688, ptr nonnull %16) #10
  %125 = load ptr, ptr %4, align 8, !tbaa !5
  %126 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZZN3JPH13PhysicsSystem15ProcessBodyPairERNS_24ContactConstraintManager16ContactAllocatorERKNS_8BodyPairEEN30ReductionCollideShapeCollectorC2EPS0_PKNS_4BodyESB_(ptr noundef nonnull align 16 dereferenceable(68688) %16, ptr noundef nonnull %0, ptr noundef %125, ptr noundef %126)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #10
  call void @_ZN3JPH17SubShapeIDCreatorC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %17) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #10
  call void @_ZN3JPH17SubShapeIDCreatorC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %18) #10
  %_ZN3JPH29InternalEdgeRemovingCollector20sCollideShapeVsShapeEPKNS_5ShapeES3_NS_4Vec3ES4_RKNS_5Mat44ES7_RKNS_17SubShapeIDCreatorESA_RKNS_20CollideShapeSettingsERNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_11ShapeFilterE._ZN3JPH17CollisionDispatch20sCollideShapeVsShapeEPKNS_5ShapeES3_NS_4Vec3ES4_RKNS_5Mat44ES7_RKNS_17SubShapeIDCreatorESA_RKNS_20CollideShapeSettingsERNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_11ShapeFilterE = select i1 %74, ptr @_ZN3JPH29InternalEdgeRemovingCollector20sCollideShapeVsShapeEPKNS_5ShapeES3_NS_4Vec3ES4_RKNS_5Mat44ES7_RKNS_17SubShapeIDCreatorESA_RKNS_20CollideShapeSettingsERNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_11ShapeFilterE, ptr @_ZN3JPH17CollisionDispatch20sCollideShapeVsShapeEPKNS_5ShapeES3_NS_4Vec3ES4_RKNS_5Mat44ES7_RKNS_17SubShapeIDCreatorESA_RKNS_20CollideShapeSettingsERNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_11ShapeFilterE
  %127 = load ptr, ptr %4, align 8, !tbaa !5
  %128 = invoke noundef ptr @_ZNK3JPH4Body8GetShapeEv(ptr noundef nonnull align 16 dereferenceable(122) %127)
          to label %129 unwind label %146

129:                                              ; preds = %124
  %130 = load ptr, ptr %5, align 8, !tbaa !5
  %131 = invoke noundef ptr @_ZNK3JPH4Body8GetShapeEv(ptr noundef nonnull align 16 dereferenceable(122) %130)
          to label %132 unwind label %146

132:                                              ; preds = %129
  %133 = invoke { double, double } @_ZN3JPH4Vec310sReplicateEf(float noundef 1.000000e+00)
          to label %134 unwind label %146

134:                                              ; preds = %132
  %135 = extractvalue { double, double } %133, 0
  %136 = extractvalue { double, double } %133, 1
  %137 = invoke { double, double } @_ZN3JPH4Vec310sReplicateEf(float noundef 1.000000e+00)
          to label %138 unwind label %146

138:                                              ; preds = %134
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %19) #10
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %19, i8 0, i64 16, i1 false)
  invoke void @_ZN3JPH11ShapeFilterC2Ev(ptr noundef nonnull align 8 dereferenceable(12) %19)
          to label %139 unwind label %148

139:                                              ; preds = %138
  %140 = extractvalue { double, double } %137, 1
  %141 = extractvalue { double, double } %137, 0
  invoke void %_ZN3JPH29InternalEdgeRemovingCollector20sCollideShapeVsShapeEPKNS_5ShapeES3_NS_4Vec3ES4_RKNS_5Mat44ES7_RKNS_17SubShapeIDCreatorESA_RKNS_20CollideShapeSettingsERNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_11ShapeFilterE._ZN3JPH17CollisionDispatch20sCollideShapeVsShapeEPKNS_5ShapeES3_NS_4Vec3ES4_RKNS_5Mat44ES7_RKNS_17SubShapeIDCreatorESA_RKNS_20CollideShapeSettingsERNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_11ShapeFilterE(ptr noundef %128, ptr noundef %131, double %135, double %136, double %141, double %140, ptr noundef nonnull align 16 dereferenceable(64) %12, ptr noundef nonnull align 16 dereferenceable(64) %13, ptr noundef nonnull align 4 dereferenceable(8) %17, ptr noundef nonnull align 4 dereferenceable(8) %18, ptr noundef nonnull align 16 dereferenceable(37) %9, ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 8 dereferenceable(12) %19)
          to label %142 unwind label %150, !callees !55

142:                                              ; preds = %139
  call void @_ZN3JPH11ShapeFilterD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %19) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #10
  %143 = getelementptr inbounds i8, ptr %16, i64 64
  %144 = call noundef ptr @_ZN3JPH11StaticArrayIZNS_13PhysicsSystem15ProcessBodyPairERNS_24ContactConstraintManager16ContactAllocatorERKNS_8BodyPairEE10MyManifoldLj32EE5beginEv(ptr noundef nonnull align 16 dereferenceable(68624) %143)
  %145 = call noundef ptr @_ZN3JPH11StaticArrayIZNS_13PhysicsSystem15ProcessBodyPairERNS_24ContactConstraintManager16ContactAllocatorERKNS_8BodyPairEE10MyManifoldLj32EE3endEv(ptr noundef nonnull align 16 dereferenceable(68624) %143)
  %.not6574 = icmp eq ptr %144, %145
  br i1 %.not6574, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %172, %142
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #10
  call void @_ZZN3JPH13PhysicsSystem15ProcessBodyPairERNS_24ContactConstraintManager16ContactAllocatorERKNS_8BodyPairEEN30ReductionCollideShapeCollectorD2Ev(ptr noundef nonnull align 16 dereferenceable(68688) %16) #10
  call void @llvm.lifetime.end.p0(i64 68688, ptr nonnull %16) #10
  br label %207

146:                                              ; preds = %134, %132, %129, %124
  %147 = landingpad { ptr, i32 }
          cleanup
  br label %177

148:                                              ; preds = %138
  %149 = landingpad { ptr, i32 }
          cleanup
  br label %152

150:                                              ; preds = %139
  %151 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3JPH11ShapeFilterD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %19) #10
  br label %152

152:                                              ; preds = %150, %148
  %.pn63 = phi { ptr, i32 } [ %151, %150 ], [ %149, %148 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %19) #10
  br label %177

.lr.ph:                                           ; preds = %142, %172
  %.06075 = phi ptr [ %176, %172 ], [ %144, %142 ]
  %153 = getelementptr inbounds i8, ptr %.06075, i64 16
  %154 = invoke { double, double } @_ZNK3JPH4Vec310NormalizedEv(ptr noundef nonnull align 16 dereferenceable(16) %153)
          to label %155 unwind label %163

155:                                              ; preds = %.lr.ph
  %156 = extractvalue { double, double } %154, 0
  %157 = extractvalue { double, double } %154, 1
  store double %156, ptr %153, align 16
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %.06075, i64 24
  store double %157, ptr %.sroa.5.0..sroa_idx, align 8, !tbaa !53
  %158 = getelementptr inbounds i8, ptr %.06075, i64 48
  %159 = call noundef i32 @_ZNK3JPH11StaticArrayINS_4Vec3ELj64EE4sizeEv(ptr noundef nonnull align 16 dereferenceable(1040) %158)
  %160 = icmp ugt i32 %159, 4
  br i1 %160, label %161, label %167

161:                                              ; preds = %155
  %.sroa.07.0.copyload = load double, ptr %153, align 16
  %.sroa.28.0.copyload = load double, ptr %.sroa.5.0..sroa_idx, align 8, !tbaa !53
  %162 = getelementptr inbounds i8, ptr %.06075, i64 1088
  invoke void @_ZN3JPH18PruneContactPointsENS_4Vec3ERNS_11StaticArrayIS0_Lj64EEES3_(double %.sroa.07.0.copyload, double %.sroa.28.0.copyload, ptr noundef nonnull align 16 dereferenceable(1040) %158, ptr noundef nonnull align 16 dereferenceable(1040) %162)
          to label %167 unwind label %165

163:                                              ; preds = %.lr.ph
  %164 = landingpad { ptr, i32 }
          cleanup
  br label %177

165:                                              ; preds = %167, %161
  %166 = landingpad { ptr, i32 }
          cleanup
  br label %177

167:                                              ; preds = %161, %155
  %168 = load ptr, ptr %8, align 8, !tbaa !5
  %169 = load ptr, ptr %4, align 8, !tbaa !5
  %170 = load ptr, ptr %5, align 8, !tbaa !5
  %171 = invoke noundef zeroext i1 @_ZN3JPH24ContactConstraintManager20AddContactConstraintERNS0_16ContactAllocatorEPvRNS_4BodyES5_RKNS_15ContactManifoldE(ptr noundef nonnull align 8 dereferenceable(248) %67, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef %168, ptr noundef nonnull align 16 dereferenceable(122) %169, ptr noundef nonnull align 16 dereferenceable(122) %170, ptr noundef nonnull align 16 dereferenceable(2128) %.06075)
          to label %172 unwind label %165

172:                                              ; preds = %167
  %173 = load i8, ptr %7, align 1, !tbaa !10, !range !41, !noundef !42
  %174 = zext i1 %171 to i8
  %175 = or i8 %173, %174
  store i8 %175, ptr %7, align 1, !tbaa !10
  %176 = getelementptr inbounds i8, ptr %.06075, i64 2144
  %.not65 = icmp eq ptr %176, %145
  br i1 %.not65, label %._crit_edge, label %.lr.ph

177:                                              ; preds = %163, %165, %152, %146
  %.pn66.pn = phi { ptr, i32 } [ %.pn63, %152 ], [ %147, %146 ], [ %166, %165 ], [ %164, %163 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #10
  call void @_ZZN3JPH13PhysicsSystem15ProcessBodyPairERNS_24ContactConstraintManager16ContactAllocatorERKNS_8BodyPairEEN30ReductionCollideShapeCollectorD2Ev(ptr noundef nonnull align 16 dereferenceable(68688) %16) #10
  call void @llvm.lifetime.end.p0(i64 68688, ptr nonnull %16) #10
  br label %208

178:                                              ; preds = %120, %88
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %20) #10
  %179 = load ptr, ptr %4, align 8, !tbaa !5
  %180 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZZN3JPH13PhysicsSystem15ProcessBodyPairERNS_24ContactConstraintManager16ContactAllocatorERKNS_8BodyPairEEN33NonReductionCollideShapeCollectorC2EPS0_S3_PNS_4BodyESA_RKPv(ptr noundef nonnull align 8 dereferenceable(66) %20, ptr noundef nonnull %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef %179, ptr noundef %180, ptr noundef nonnull align 8 dereferenceable(8) %8)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %21) #10
  call void @_ZN3JPH17SubShapeIDCreatorC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %21) #10
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #10
  call void @_ZN3JPH17SubShapeIDCreatorC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %22) #10
  %_ZN3JPH29InternalEdgeRemovingCollector20sCollideShapeVsShapeEPKNS_5ShapeES3_NS_4Vec3ES4_RKNS_5Mat44ES7_RKNS_17SubShapeIDCreatorESA_RKNS_20CollideShapeSettingsERNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_11ShapeFilterE._ZN3JPH17CollisionDispatch20sCollideShapeVsShapeEPKNS_5ShapeES3_NS_4Vec3ES4_RKNS_5Mat44ES7_RKNS_17SubShapeIDCreatorESA_RKNS_20CollideShapeSettingsERNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_11ShapeFilterE1 = select i1 %74, ptr @_ZN3JPH29InternalEdgeRemovingCollector20sCollideShapeVsShapeEPKNS_5ShapeES3_NS_4Vec3ES4_RKNS_5Mat44ES7_RKNS_17SubShapeIDCreatorESA_RKNS_20CollideShapeSettingsERNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_11ShapeFilterE, ptr @_ZN3JPH17CollisionDispatch20sCollideShapeVsShapeEPKNS_5ShapeES3_NS_4Vec3ES4_RKNS_5Mat44ES7_RKNS_17SubShapeIDCreatorESA_RKNS_20CollideShapeSettingsERNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_11ShapeFilterE
  %181 = load ptr, ptr %4, align 8, !tbaa !5
  %182 = invoke noundef ptr @_ZNK3JPH4Body8GetShapeEv(ptr noundef nonnull align 16 dereferenceable(122) %181)
          to label %183 unwind label %199

183:                                              ; preds = %178
  %184 = load ptr, ptr %5, align 8, !tbaa !5
  %185 = invoke noundef ptr @_ZNK3JPH4Body8GetShapeEv(ptr noundef nonnull align 16 dereferenceable(122) %184)
          to label %186 unwind label %199

186:                                              ; preds = %183
  %187 = invoke { double, double } @_ZN3JPH4Vec310sReplicateEf(float noundef 1.000000e+00)
          to label %188 unwind label %199

188:                                              ; preds = %186
  %189 = extractvalue { double, double } %187, 0
  %190 = extractvalue { double, double } %187, 1
  %191 = invoke { double, double } @_ZN3JPH4Vec310sReplicateEf(float noundef 1.000000e+00)
          to label %192 unwind label %199

192:                                              ; preds = %188
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %23) #10
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %23, i8 0, i64 16, i1 false)
  invoke void @_ZN3JPH11ShapeFilterC2Ev(ptr noundef nonnull align 8 dereferenceable(12) %23)
          to label %193 unwind label %201

193:                                              ; preds = %192
  %194 = extractvalue { double, double } %191, 1
  %195 = extractvalue { double, double } %191, 0
  invoke void %_ZN3JPH29InternalEdgeRemovingCollector20sCollideShapeVsShapeEPKNS_5ShapeES3_NS_4Vec3ES4_RKNS_5Mat44ES7_RKNS_17SubShapeIDCreatorESA_RKNS_20CollideShapeSettingsERNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_11ShapeFilterE._ZN3JPH17CollisionDispatch20sCollideShapeVsShapeEPKNS_5ShapeES3_NS_4Vec3ES4_RKNS_5Mat44ES7_RKNS_17SubShapeIDCreatorESA_RKNS_20CollideShapeSettingsERNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_11ShapeFilterE1(ptr noundef %182, ptr noundef %185, double %189, double %190, double %195, double %194, ptr noundef nonnull align 16 dereferenceable(64) %12, ptr noundef nonnull align 16 dereferenceable(64) %13, ptr noundef nonnull align 4 dereferenceable(8) %21, ptr noundef nonnull align 4 dereferenceable(8) %22, ptr noundef nonnull align 16 dereferenceable(37) %9, ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef nonnull align 8 dereferenceable(12) %23)
          to label %196 unwind label %203, !callees !55

196:                                              ; preds = %193
  call void @_ZN3JPH11ShapeFilterD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %23) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %23) #10
  %197 = getelementptr inbounds i8, ptr %20, i64 65
  %198 = load i8, ptr %197, align 1, !tbaa !56, !range !41, !noundef !42
  store i8 %198, ptr %7, align 1, !tbaa !10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #10
  call void @_ZN3JPH18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(66) %20) #10
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %20) #10
  br label %207

199:                                              ; preds = %188, %186, %183, %178
  %200 = landingpad { ptr, i32 }
          cleanup
  br label %206

201:                                              ; preds = %192
  %202 = landingpad { ptr, i32 }
          cleanup
  br label %205

203:                                              ; preds = %193
  %204 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3JPH11ShapeFilterD2Ev(ptr noundef nonnull align 8 dereferenceable(12) %23) #10
  br label %205

205:                                              ; preds = %203, %201
  %.pn = phi { ptr, i32 } [ %204, %203 ], [ %202, %201 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %23) #10
  br label %206

206:                                              ; preds = %205, %199
  %.pn.pn = phi { ptr, i32 } [ %.pn, %205 ], [ %200, %199 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %21) #10
  call void @_ZN3JPH18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(66) %20) #10
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %20) #10
  br label %208

207:                                              ; preds = %196, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %13) #10
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %12) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #10
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %9) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #10
  br label %209

208:                                              ; preds = %206, %177
  %.pn66.pn.pn = phi { ptr, i32 } [ %.pn66.pn, %177 ], [ %.pn.pn, %206 ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %13) #10
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %12) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #10
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %9) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #10
  resume { ptr, i32 } %.pn66.pn.pn

209:                                              ; preds = %207, %63
  %210 = load i8, ptr %7, align 1, !tbaa !10, !range !41, !noundef !42
  %211 = trunc nuw i8 %210 to i1
  br i1 %211, label %212, label %243

212:                                              ; preds = %209
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %24) #10
  call void @_ZN3JPH6BodyIDC2Ev(ptr noundef nonnull align 4 dereferenceable(4) %24)
  %.ptr.1 = getelementptr inbounds i8, ptr %24, i64 4
  call void @_ZN3JPH6BodyIDC2Ev(ptr noundef nonnull align 4 dereferenceable(4) %.ptr.1)
  %213 = load ptr, ptr %4, align 8, !tbaa !5
  %214 = call noundef zeroext i1 @_ZNK3JPH4Body9IsDynamicEv(ptr noundef nonnull align 16 dereferenceable(122) %213)
  br i1 %214, label %215, label %222

215:                                              ; preds = %212
  %216 = load ptr, ptr %4, align 8, !tbaa !5
  %217 = call noundef zeroext i1 @_ZNK3JPH4Body8IsActiveEv(ptr noundef nonnull align 16 dereferenceable(122) %216)
  br i1 %217, label %222, label %218

218:                                              ; preds = %215
  %219 = load ptr, ptr %4, align 8, !tbaa !5
  %220 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH4Body5GetIDEv(ptr noundef nonnull align 16 dereferenceable(122) %219)
  %221 = load i32, ptr %220, align 4, !tbaa !59
  store i32 %221, ptr %24, align 4, !tbaa !59
  br label %222

222:                                              ; preds = %218, %215, %212
  %223 = phi i1 [ false, %215 ], [ true, %218 ], [ false, %212 ]
  %.0 = phi i32 [ 0, %215 ], [ 1, %218 ], [ 0, %212 ]
  %224 = load ptr, ptr %5, align 8, !tbaa !5
  %225 = call noundef zeroext i1 @_ZNK3JPH4Body9IsDynamicEv(ptr noundef nonnull align 16 dereferenceable(122) %224)
  br i1 %225, label %226, label %235

226:                                              ; preds = %222
  %227 = load ptr, ptr %5, align 8, !tbaa !5
  %228 = call noundef zeroext i1 @_ZNK3JPH4Body8IsActiveEv(ptr noundef nonnull align 16 dereferenceable(122) %227)
  br i1 %228, label %235, label %.thread

.thread:                                          ; preds = %226
  %229 = load ptr, ptr %5, align 8, !tbaa !5
  %230 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH4Body5GetIDEv(ptr noundef nonnull align 16 dereferenceable(122) %229)
  %231 = add nuw nsw i32 %.0, 1
  %232 = zext nneg i32 %.0 to i64
  %233 = getelementptr inbounds [2 x %"class.JPH::BodyID"], ptr %24, i64 0, i64 %232
  %234 = load i32, ptr %230, align 4, !tbaa !59
  store i32 %234, ptr %233, align 4, !tbaa !59
  br label %236

235:                                              ; preds = %226, %222
  br i1 %223, label %236, label %237

236:                                              ; preds = %.thread, %235
  %.173 = phi i32 [ %231, %.thread ], [ 1, %235 ]
  call void @_ZN3JPH11BodyManager14ActivateBodiesEPKNS_6BodyIDEi(ptr noundef nonnull align 8 dereferenceable(297) %25, ptr noundef nonnull %24, i32 noundef %.173)
  br label %237

237:                                              ; preds = %236, %235
  %238 = getelementptr inbounds i8, ptr %0, i64 864
  %239 = load ptr, ptr %4, align 8, !tbaa !5
  %240 = call noundef i32 @_ZNK3JPH4Body30GetIndexInActiveBodiesInternalEv(ptr noundef nonnull align 16 dereferenceable(122) %239)
  %241 = load ptr, ptr %5, align 8, !tbaa !5
  %242 = call noundef i32 @_ZNK3JPH4Body30GetIndexInActiveBodiesInternalEv(ptr noundef nonnull align 16 dereferenceable(122) %241)
  call void @_ZN3JPH13IslandBuilder10LinkBodiesEjj(ptr noundef nonnull align 8 dereferenceable(112) %238, i32 noundef %240, i32 noundef %242)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %24) #10
  br label %243

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

243:                                              ; preds = %209, %237, %.critedge
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #10
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #10
  br label %244

244:                                              ; preds = %35, %37, %243
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #10
  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 #4 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 #4 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i8 @_ZNK3JPH4Body13GetMotionTypeEv(ptr noundef nonnull align 16 dereferenceable(122)) local_unnamed_addr #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)) local_unnamed_addr #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)) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH4Body23IsCollisionCacheInvalidEv(ptr noundef nonnull align 16 dereferenceable(122)) local_unnamed_addr #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)) local_unnamed_addr #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)) local_unnamed_addr #5

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Body17GetLinearVelocityEv(ptr noundef nonnull align 16 dereferenceable(122)) local_unnamed_addr #2 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 #6 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4Body23GetCenterOfMassPositionEv(ptr noundef nonnull align 16 dereferenceable(122)) local_unnamed_addr #2 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 #2 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 #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)) 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 #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 #9 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH29InternalEdgeRemovingCollector20sCollideShapeVsShapeEPKNS_5ShapeES3_NS_4Vec3ES4_RKNS_5Mat44ES7_RKNS_17SubShapeIDCreatorESA_RKNS_20CollideShapeSettingsERNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_11ShapeFilterE(ptr noundef, ptr noundef, double, double, double, double, ptr noundef nonnull align 16 dereferenceable(64), ptr noundef nonnull align 16 dereferenceable(64), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 16 dereferenceable(37), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(12)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH17CollisionDispatch20sCollideShapeVsShapeEPKNS_5ShapeES3_NS_4Vec3ES4_RKNS_5Mat44ES7_RKNS_17SubShapeIDCreatorESA_RKNS_20CollideShapeSettingsERNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_11ShapeFilterE(ptr noundef, ptr noundef, double, double, double, double, ptr noundef nonnull align 16 dereferenceable(64), ptr noundef nonnull align 16 dereferenceable(64), ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8), 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: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZNK3JPH4Body8GetShapeEv(ptr noundef nonnull align 16 dereferenceable(122)) local_unnamed_addr #2 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Vec310sReplicateEf(float noundef) local_unnamed_addr #6 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH11ShapeFilterC2Ev(ptr noundef nonnull align 8 dereferenceable(12)) unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH11ShapeFilterD2Ev(ptr noundef nonnull align 8 dereferenceable(12)) unnamed_addr #9 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 #9 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 #9 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 #9 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 #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)) local_unnamed_addr #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 #9 align 2

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

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { 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 = { 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 2159698679}
!10 = !{!11, !11, i64 0}
!11 = !{!"bool", !7, i64 0}
!12 = !{!13, !11, i64 526}
!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, !30, i64 448, !32, i64 536, !35, i64 784, !37, i64 864, !38, i64 976, !18, i64 1040, !39, i64 1088, !40, i64 1120, !31, i64 1136}
!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 = !{!"_ZTSN3JPH15PhysicsSettingsE", !17, i64 0, !17, i64 4, !17, i64 8, !31, i64 12, !31, i64 16, !31, i64 20, !31, i64 24, !31, i64 28, !31, i64 32, !31, i64 36, !31, i64 40, !31, i64 44, !31, i64 48, !31, i64 52, !17, i64 56, !17, i64 60, !31, i64 64, !31, i64 68, !31, i64 72, !11, i64 76, !11, i64 77, !11, i64 78, !11, i64 79, !11, i64 80, !11, i64 81, !11, i64 82}
!31 = !{!"float", !7, i64 0}
!32 = !{!"_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, !33, i64 236, !6, i64 240}
!33 = !{!"_ZTSSt6atomicIjE", !34, i64 0}
!34 = !{!"_ZTSSt13__atomic_baseIjE", !17, i64 0}
!35 = !{!"_ZTSN3JPH17ConstraintManagerE", !6, i64 0, !36, i64 8, !18, i64 32}
!36 = !{!"_ZTSN3JPH5ArrayINS_3RefINS_10ConstraintEEENS_12STLAllocatorIS3_EEEE", !16, i64 0, !16, i64 8, !6, i64 16}
!37 = !{!"_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}
!38 = !{!"_ZTSN3JPH19LargeIslandSplitterE", !17, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !17, i64 32, !33, i64 36, !17, i64 40, !6, i64 48, !33, i64 56}
!39 = !{!"_ZTSN3JPH5ArrayIPNS_19PhysicsStepListenerENS_12STLAllocatorIS2_EEEE", !16, i64 0, !16, i64 8, !6, i64 16}
!40 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!41 = !{i8 0, i8 2}
!42 = !{}
!43 = !{!44, !46, i64 1}
!44 = !{!"_ZTSN3JPH19CollideSettingsBaseE", !45, i64 0, !46, i64 1, !31, i64 4, !31, i64 8, !40, i64 16}
!45 = !{!"_ZTSN3JPH15EActiveEdgeModeE", !7, i64 0}
!46 = !{!"_ZTSN3JPH17ECollectFacesModeE", !7, i64 0}
!47 = !{!13, !11, i64 530}
!48 = !{!44, !45, i64 0}
!49 = !{!13, !31, i64 464}
!50 = !{!51, !31, i64 32}
!51 = !{!"_ZTSN3JPH20CollideShapeSettingsE", !44, i64 0, !31, i64 32, !52, i64 36}
!52 = !{!"_ZTSN3JPH13EBackFaceModeE", !7, i64 0}
!53 = !{!7, !7, i64 0}
!54 = !{!13, !11, i64 527}
!55 = !{ptr @_ZN3JPH17CollisionDispatch20sCollideShapeVsShapeEPKNS_5ShapeES3_NS_4Vec3ES4_RKNS_5Mat44ES7_RKNS_17SubShapeIDCreatorESA_RKNS_20CollideShapeSettingsERNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_11ShapeFilterE, ptr @_ZN3JPH29InternalEdgeRemovingCollector20sCollideShapeVsShapeEPKNS_5ShapeES3_NS_4Vec3ES4_RKNS_5Mat44ES7_RKNS_17SubShapeIDCreatorESA_RKNS_20CollideShapeSettingsERNS_18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEERKNS_11ShapeFilterE}
!56 = !{!57, !11, i64 65}
!57 = !{!"_ZTSZN3JPH13PhysicsSystem15ProcessBodyPairERNS_24ContactConstraintManager16ContactAllocatorERKNS_8BodyPairEE33NonReductionCollideShapeCollector", !58, i64 0, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !11, i64 64, !11, i64 65}
!58 = !{!"_ZTSN3JPH18CollisionCollectorINS_18CollideShapeResultENS_36CollisionCollectorTraitsCollideShapeEEE", !31, i64 8, !6, i64 16}
!59 = !{!17, !17, i64 0}


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