; 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"

%"class.JPH::Array.3" = type { i64, i64, ptr }
%"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::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 }
%"class.JPH::Vec3" = type { %union.anon.13 }
%union.anon.13 = type { <4 x float> }

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN3JPH13PhysicsSystem12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 16 dereferenceable(1140) %0, ptr noundef nonnull align 8 dereferenceable(17) %1) #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i8, align 1
  %7 = alloca i32, align 4
  %8 = alloca %"class.JPH::Array.3", align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %15 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #7
  store i8 15, ptr %6, align 1, !tbaa !9
  %16 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN3JPH8StreamIn4ReadINS_19EStateRecorderStateETnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS4_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 1 dereferenceable(1) %6)
  %17 = load i8, ptr %6, align 1, !tbaa !9
  %18 = zext i8 %17 to i32
  %19 = and i32 %18, 1
  %20 = icmp ne i32 %19, 0
  br i1 %20, label %21, label %26

21:                                               ; preds = %2
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %15, i32 0, i32 21
  call void @_ZN3JPH8StreamIn4ReadIfTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8) %22, ptr noundef nonnull align 4 dereferenceable(4) %23)
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %15, i32 0, i32 20
  call void @_ZN3JPH8StreamIn4ReadERNS_4Vec3E(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull align 16 dereferenceable(16) %25)
  br label %26

26:                                               ; preds = %21, %2
  %27 = load i8, ptr %6, align 1, !tbaa !9
  %28 = zext i8 %27 to i32
  %29 = and i32 %28, 2
  %30 = icmp ne i32 %29, 0
  br i1 %30, label %31, label %110

31:                                               ; preds = %26
  %32 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %15, i32 0, i32 2
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = call noundef zeroext i1 @_ZN3JPH11BodyManager12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 8 dereferenceable(297) %32, ptr noundef nonnull align 8 dereferenceable(17) %33)
  br i1 %34, label %36, label %35

35:                                               ; preds = %31
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %133

36:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #7
  call void @_ZN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %37 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %15, i32 0, i32 2
  %38 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH11BodyManager9GetBodiesEv(ptr noundef nonnull align 8 dereferenceable(297) %37)
          to label %39 unwind label %51

39:                                               ; preds = %36
  store ptr %38, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %40 = load ptr, ptr %9, align 8, !tbaa !5
  %41 = invoke noundef ptr @_ZN3JPH5ArrayIPNS_4BodyENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %40)
          to label %42 unwind label %55

42:                                               ; preds = %39
  store ptr %41, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %43 = load ptr, ptr %9, align 8, !tbaa !5
  %44 = invoke noundef ptr @_ZN3JPH5ArrayIPNS_4BodyENS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %43)
          to label %45 unwind label %59

45:                                               ; preds = %42
  store ptr %44, ptr %13, align 8, !tbaa !5
  br label %46

46:                                               ; preds = %83, %45
  %47 = load ptr, ptr %12, align 8, !tbaa !5
  %48 = load ptr, ptr %13, align 8, !tbaa !5
  %49 = icmp ne ptr %47, %48
  br i1 %49, label %63, label %50

50:                                               ; preds = %46
  store i32 2, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %89

51:                                               ; preds = %36
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %10, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %11, align 4
  br label %88

55:                                               ; preds = %39
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %10, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %11, align 4
  br label %87

59:                                               ; preds = %42
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %10, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %11, align 4
  br label %86

63:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %64 = load ptr, ptr %12, align 8, !tbaa !5
  %65 = load ptr, ptr %64, align 8, !tbaa !5
  store ptr %65, ptr %14, align 8, !tbaa !5
  %66 = load ptr, ptr %14, align 8, !tbaa !5
  %67 = invoke noundef zeroext i1 @_ZN3JPH11BodyManager19sIsValidBodyPointerEPKNS_4BodyE(ptr noundef %66)
          to label %68 unwind label %78

68:                                               ; preds = %63
  br i1 %67, label %69, label %82

69:                                               ; preds = %68
  %70 = load ptr, ptr %14, align 8, !tbaa !5
  %71 = invoke noundef zeroext i1 @_ZNK3JPH4Body14IsInBroadPhaseEv(ptr noundef nonnull align 16 dereferenceable(122) %70)
          to label %72 unwind label %78

72:                                               ; preds = %69
  br i1 %71, label %73, label %82

73:                                               ; preds = %72
  %74 = load ptr, ptr %14, align 8, !tbaa !5
  %75 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH4Body5GetIDEv(ptr noundef nonnull align 16 dereferenceable(122) %74)
          to label %76 unwind label %78

76:                                               ; preds = %73
  invoke void @_ZN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 4 dereferenceable(4) %75)
          to label %77 unwind label %78

77:                                               ; preds = %76
  br label %82

78:                                               ; preds = %76, %73, %69, %63
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %10, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %86

82:                                               ; preds = %77, %72, %68
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %83

83:                                               ; preds = %82
  %84 = load ptr, ptr %12, align 8, !tbaa !5
  %85 = getelementptr inbounds ptr, ptr %84, i32 1
  store ptr %85, ptr %12, align 8, !tbaa !5
  br label %46

86:                                               ; preds = %78, %59
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %87

87:                                               ; preds = %86, %55
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %88

88:                                               ; preds = %87, %51
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %109

89:                                               ; preds = %50
  %90 = invoke noundef zeroext i1 @_ZNK3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %91 unwind label %104

91:                                               ; preds = %89
  br i1 %90, label %108, label %92

92:                                               ; preds = %91
  %93 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %15, i32 0, i32 9
  %94 = load ptr, ptr %93, align 16, !tbaa !11
  %95 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef 0)
          to label %96 unwind label %104

96:                                               ; preds = %92
  %97 = invoke noundef i64 @_ZNK3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %98 unwind label %104

98:                                               ; preds = %96
  %99 = trunc i64 %97 to i32
  %100 = load ptr, ptr %94, align 8, !tbaa !41
  %101 = getelementptr inbounds ptr, ptr %100, i64 19
  %102 = load ptr, ptr %101, align 8
  invoke void %102(ptr noundef nonnull align 8 dereferenceable(16) %94, ptr noundef %95, i32 noundef %99, i1 noundef zeroext true)
          to label %103 unwind label %104

103:                                              ; preds = %98
  br label %108

104:                                              ; preds = %98, %96, %92, %89
  %105 = landingpad { ptr, i32 }
          cleanup
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %10, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %11, align 4
  br label %109

108:                                              ; preds = %103, %91
  call void @_ZN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #7
  br label %110

109:                                              ; preds = %104, %88
  call void @_ZN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #7
  br label %135

110:                                              ; preds = %108, %26
  %111 = load i8, ptr %6, align 1, !tbaa !9
  %112 = zext i8 %111 to i32
  %113 = and i32 %112, 4
  %114 = icmp ne i32 %113, 0
  br i1 %114, label %115, label %121

115:                                              ; preds = %110
  %116 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %15, i32 0, i32 13
  %117 = load ptr, ptr %5, align 8, !tbaa !5
  %118 = call noundef zeroext i1 @_ZN3JPH24ContactConstraintManager12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 8 dereferenceable(248) %116, ptr noundef nonnull align 8 dereferenceable(17) %117)
  br i1 %118, label %120, label %119

119:                                              ; preds = %115
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %133

120:                                              ; preds = %115
  br label %121

121:                                              ; preds = %120, %110
  %122 = load i8, ptr %6, align 1, !tbaa !9
  %123 = zext i8 %122 to i32
  %124 = and i32 %123, 8
  %125 = icmp ne i32 %124, 0
  br i1 %125, label %126, label %132

126:                                              ; preds = %121
  %127 = getelementptr inbounds %"class.JPH::PhysicsSystem", ptr %15, i32 0, i32 14
  %128 = load ptr, ptr %5, align 8, !tbaa !5
  %129 = call noundef zeroext i1 @_ZN3JPH17ConstraintManager12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 8 dereferenceable(80) %127, ptr noundef nonnull align 8 dereferenceable(17) %128)
  br i1 %129, label %131, label %130

130:                                              ; preds = %126
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %133

131:                                              ; preds = %126
  br label %132

132:                                              ; preds = %131, %121
  store i1 true, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %133

133:                                              ; preds = %132, %130, %119, %35
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #7
  %134 = load i1, ptr %3, align 1
  ret i1 %134

135:                                              ; preds = %109
  %136 = load ptr, ptr %10, align 8
  %137 = load i32, ptr %11, align 4
  %138 = insertvalue { ptr, i32 } poison, ptr %136, 0
  %139 = insertvalue { ptr, i32 } %138, i32 %137, 1
  resume { ptr, i32 } %139
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH8StreamIn4ReadINS_19EStateRecorderStateETnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS4_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(1)) #4 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH8StreamIn4ReadERNS_4Vec3E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 16 dereferenceable(16)) #5 align 2

declare noundef zeroext i1 @_ZN3JPH11BodyManager12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 8 dereferenceable(297), ptr noundef nonnull align 8 dereferenceable(17)) #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH11BodyManager9GetBodiesEv(ptr noundef nonnull align 8 dereferenceable(297)) #2 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN3JPH5ArrayIPNS_4BodyENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN3JPH5ArrayIPNS_4BodyENS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH11BodyManager19sIsValidBodyPointerEPKNS_4BodyE(ptr noundef) #1 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) #3 align 2

declare noundef zeroext i1 @_ZN3JPH24ContactConstraintManager12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef nonnull align 8 dereferenceable(17)) #6

declare noundef zeroext i1 @_ZN3JPH17ConstraintManager12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(17)) #6

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #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 = { mustprogress uwtable "min-legal-vector-width"="128" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"_ZTSN3JPH19EStateRecorderStateE", !7, i64 0}
!11 = !{!12, !6, i64 432}
!12 = !{!"_ZTSN3JPH13PhysicsSystemE", !6, i64 0, !6, i64 8, !13, 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, !17, i64 1040, !39, i64 1088, !40, i64 1120, !31, i64 1136}
!13 = !{!"_ZTSN3JPH11BodyManagerE", !14, i64 0, !16, i64 24, !15, i64 32, !17, i64 40, !21, i64 88, !22, i64 104, !17, i64 128, !7, i64 176, !7, i64 192, !16, i64 200, !17, i64 208, !23, i64 256, !6, i64 280, !6, i64 288, !24, i64 296}
!14 = !{!"_ZTSN3JPH5ArrayIPNS_4BodyENS_12STLAllocatorIS2_EEEE", !15, i64 0, !15, i64 8, !6, i64 16}
!15 = !{!"long", !7, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = !{!"_ZTSN3JPH5MutexE", !18, i64 0, !20, i64 40}
!18 = !{!"_ZTSSt5mutex", !19, i64 0}
!19 = !{!"_ZTSSt12__mutex_base", !7, i64 0}
!20 = !{!"_ZTSNSt6thread2idE", !15, i64 0}
!21 = !{!"_ZTSN3JPH10MutexArrayINS_11SharedMutexEEE", !6, i64 0, !16, i64 8}
!22 = !{!"_ZTSN3JPH5ArrayIhNS_12STLAllocatorIhEEEE", !15, i64 0, !15, i64 8, !6, i64 16}
!23 = !{!"_ZTSN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEEE", !15, i64 0, !15, i64 8, !6, i64 16}
!24 = !{!"bool", !7, i64 0}
!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", !16, i64 0, !16, i64 4, !16, 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, !16, i64 56, !16, i64 60, !31, i64 64, !31, i64 68, !31, i64 72, !24, i64 76, !24, i64 77, !24, i64 78, !24, i64 79, !24, i64 80, !24, i64 81, !24, i64 82}
!31 = !{!"float", !7, i64 0}
!32 = !{!"_ZTSN3JPH24ContactConstraintManagerE", !7, i64 8, !16, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !16, i64 232, !33, i64 236, !6, i64 240}
!33 = !{!"_ZTSSt6atomicIjE", !34, i64 0}
!34 = !{!"_ZTSSt13__atomic_baseIjE", !16, i64 0}
!35 = !{!"_ZTSN3JPH17ConstraintManagerE", !6, i64 0, !36, i64 8, !17, i64 32}
!36 = !{!"_ZTSN3JPH5ArrayINS_3RefINS_10ConstraintEEENS_12STLAllocatorIS3_EEEE", !15, i64 0, !15, 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, !16, i64 88, !16, i64 92, !16, i64 96, !16, i64 100, !16, i64 104, !16, i64 108}
!38 = !{!"_ZTSN3JPH19LargeIslandSplitterE", !16, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !16, i64 32, !33, i64 36, !16, i64 40, !6, i64 48, !33, i64 56}
!39 = !{!"_ZTSN3JPH5ArrayIPNS_19PhysicsStepListenerENS_12STLAllocatorIS2_EEEE", !15, i64 0, !15, i64 8, !6, i64 16}
!40 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!41 = !{!42, !42, i64 0}
!42 = !{!"vtable pointer", !8, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.JPH::Array.3" = type { i64, i64, ptr }

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN3JPH13PhysicsSystem12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 16 dereferenceable(1140) %0, ptr noundef nonnull align 8 dereferenceable(17) %1) local_unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i8, align 1
  %4 = alloca %"class.JPH::Array.3", align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #7
  store i8 15, ptr %3, align 1, !tbaa !5
  call void @_ZN3JPH8StreamIn4ReadINS_19EStateRecorderStateETnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS4_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 1 dereferenceable(1) %3)
  %5 = load i8, ptr %3, align 1, !tbaa !5
  %6 = and i8 %5, 1
  %.not = icmp eq i8 %6, 0
  br i1 %.not, label %10, label %7

7:                                                ; preds = %2
  %8 = getelementptr inbounds i8, ptr %0, i64 1136
  call void @_ZN3JPH8StreamIn4ReadIfTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %9 = getelementptr inbounds i8, ptr %0, i64 1120
  call void @_ZN3JPH8StreamIn4ReadERNS_4Vec3E(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 16 dereferenceable(16) %9)
  %.pre = load i8, ptr %3, align 1, !tbaa !5
  br label %10

10:                                               ; preds = %7, %2
  %11 = phi i8 [ %.pre, %7 ], [ %5, %2 ]
  %12 = and i8 %11, 2
  %.not21 = icmp eq i8 %12, 0
  br i1 %.not21, label %45, label %13

13:                                               ; preds = %10
  %14 = getelementptr inbounds i8, ptr %0, i64 16
  %15 = call noundef zeroext i1 @_ZN3JPH11BodyManager12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 8 dereferenceable(297) %14, ptr noundef nonnull align 8 dereferenceable(17) %1)
  br i1 %15, label %16, label %58

16:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #7
  call void @_ZN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  %17 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH11BodyManager9GetBodiesEv(ptr noundef nonnull align 8 dereferenceable(297) %14)
  %18 = call noundef ptr @_ZN3JPH5ArrayIPNS_4BodyENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %17)
  %19 = call noundef ptr @_ZN3JPH5ArrayIPNS_4BodyENS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %17)
  %.not2226 = icmp eq ptr %18, %19
  br i1 %.not2226, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %29, %16
  %20 = call noundef zeroext i1 @_ZNK3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  br i1 %20, label %43, label %31

.lr.ph:                                           ; preds = %16, %29
  %.01827 = phi ptr [ %30, %29 ], [ %18, %16 ]
  %21 = load ptr, ptr %.01827, align 8, !tbaa !9
  %22 = call noundef zeroext i1 @_ZN3JPH11BodyManager19sIsValidBodyPointerEPKNS_4BodyE(ptr noundef %21)
  br i1 %22, label %23, label %29

23:                                               ; preds = %.lr.ph
  %24 = call noundef zeroext i1 @_ZNK3JPH4Body14IsInBroadPhaseEv(ptr noundef nonnull align 16 dereferenceable(122) %21)
  br i1 %24, label %25, label %29

25:                                               ; preds = %23
  %26 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH4Body5GetIDEv(ptr noundef nonnull align 16 dereferenceable(122) %21)
  invoke void @_ZN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 4 dereferenceable(4) %26)
          to label %29 unwind label %27

27:                                               ; preds = %25
  %28 = landingpad { ptr, i32 }
          cleanup
  br label %44

29:                                               ; preds = %25, %23, %.lr.ph
  %30 = getelementptr inbounds i8, ptr %.01827, i64 8
  %.not22 = icmp eq ptr %30, %19
  br i1 %.not22, label %._crit_edge, label %.lr.ph

31:                                               ; preds = %._crit_edge
  %32 = getelementptr inbounds i8, ptr %0, i64 432
  %33 = load ptr, ptr %32, align 16, !tbaa !11
  %34 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef 0)
          to label %35 unwind label %41

35:                                               ; preds = %31
  %36 = call noundef i64 @_ZNK3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  %37 = trunc i64 %36 to i32
  %38 = load ptr, ptr %33, align 8, !tbaa !41
  %39 = getelementptr inbounds i8, ptr %38, i64 152
  %40 = load ptr, ptr %39, align 8
  invoke void %40(ptr noundef nonnull align 8 dereferenceable(16) %33, ptr noundef nonnull %34, i32 noundef %37, i1 noundef zeroext true)
          to label %43 unwind label %41

41:                                               ; preds = %35, %31
  %42 = landingpad { ptr, i32 }
          cleanup
  br label %44

43:                                               ; preds = %35, %._crit_edge
  call void @_ZN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  %.pre28 = load i8, ptr %3, align 1, !tbaa !5
  br label %45

44:                                               ; preds = %41, %27
  %.pn = phi { ptr, i32 } [ %28, %27 ], [ %42, %41 ]
  call void @_ZN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #7
  resume { ptr, i32 } %.pn

45:                                               ; preds = %43, %10
  %46 = phi i8 [ %.pre28, %43 ], [ %11, %10 ]
  %47 = and i8 %46, 4
  %.not23 = icmp eq i8 %47, 0
  br i1 %.not23, label %51, label %48

48:                                               ; preds = %45
  %49 = getelementptr inbounds i8, ptr %0, i64 536
  %50 = call noundef zeroext i1 @_ZN3JPH24ContactConstraintManager12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 8 dereferenceable(248) %49, ptr noundef nonnull align 8 dereferenceable(17) %1)
  br i1 %50, label %._crit_edge29, label %58

._crit_edge29:                                    ; preds = %48
  %.pre30 = load i8, ptr %3, align 1, !tbaa !5
  br label %51

51:                                               ; preds = %._crit_edge29, %45
  %52 = phi i8 [ %.pre30, %._crit_edge29 ], [ %46, %45 ]
  %53 = and i8 %52, 8
  %.not24 = icmp eq i8 %53, 0
  br i1 %.not24, label %57, label %54

54:                                               ; preds = %51
  %55 = getelementptr inbounds i8, ptr %0, i64 784
  %56 = call noundef zeroext i1 @_ZN3JPH17ConstraintManager12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 8 dereferenceable(80) %55, ptr noundef nonnull align 8 dereferenceable(17) %1)
  br i1 %56, label %57, label %58

57:                                               ; preds = %54, %51
  br label %58

58:                                               ; preds = %54, %48, %13, %57
  %.0 = phi i1 [ true, %57 ], [ false, %13 ], [ false, %48 ], [ false, %54 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #7
  ret i1 %.0
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH8StreamIn4ReadINS_19EStateRecorderStateETnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS4_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH8StreamIn4ReadIfTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4 align 2

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

declare noundef zeroext i1 @_ZN3JPH11BodyManager12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 8 dereferenceable(297), ptr noundef nonnull align 8 dereferenceable(17)) local_unnamed_addr #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH11BodyManager9GetBodiesEv(ptr noundef nonnull align 8 dereferenceable(297)) local_unnamed_addr #2 align 2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN3JPH11BodyManager19sIsValidBodyPointerEPKNS_4BodyE(ptr noundef) local_unnamed_addr #1 align 2

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3 align 2

declare noundef zeroext i1 @_ZN3JPH24ContactConstraintManager12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 8 dereferenceable(248), ptr noundef nonnull align 8 dereferenceable(17)) local_unnamed_addr #6

declare noundef zeroext i1 @_ZN3JPH17ConstraintManager12RestoreStateERNS_13StateRecorderE(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 8 dereferenceable(17)) local_unnamed_addr #6

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #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 = { mustprogress uwtable "min-legal-vector-width"="128" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"_ZTSN3JPH19EStateRecorderStateE", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !10, i64 432}
!12 = !{!"_ZTSN3JPH13PhysicsSystemE", !10, i64 0, !10, i64 8, !13, i64 16, !25, i64 320, !27, i64 336, !28, i64 352, !28, i64 376, !29, i64 400, !29, i64 416, !10, i64 432, !10, i64 440, !30, i64 448, !32, i64 536, !35, i64 784, !37, i64 864, !38, i64 976, !17, i64 1040, !39, i64 1088, !40, i64 1120, !31, i64 1136}
!13 = !{!"_ZTSN3JPH11BodyManagerE", !14, i64 0, !16, i64 24, !15, i64 32, !17, i64 40, !21, i64 88, !22, i64 104, !17, i64 128, !7, i64 176, !7, i64 192, !16, i64 200, !17, i64 208, !23, i64 256, !10, i64 280, !10, i64 288, !24, i64 296}
!14 = !{!"_ZTSN3JPH5ArrayIPNS_4BodyENS_12STLAllocatorIS2_EEEE", !15, i64 0, !15, i64 8, !10, i64 16}
!15 = !{!"long", !7, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = !{!"_ZTSN3JPH5MutexE", !18, i64 0, !20, i64 40}
!18 = !{!"_ZTSSt5mutex", !19, i64 0}
!19 = !{!"_ZTSSt12__mutex_base", !7, i64 0}
!20 = !{!"_ZTSNSt6thread2idE", !15, i64 0}
!21 = !{!"_ZTSN3JPH10MutexArrayINS_11SharedMutexEEE", !10, i64 0, !16, i64 8}
!22 = !{!"_ZTSN3JPH5ArrayIhNS_12STLAllocatorIhEEEE", !15, i64 0, !15, i64 8, !10, i64 16}
!23 = !{!"_ZTSN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEEE", !15, i64 0, !15, i64 8, !10, i64 16}
!24 = !{!"bool", !7, i64 0}
!25 = !{!"_ZTSN3JPH23BodyLockInterfaceNoLockE", !26, i64 0}
!26 = !{!"_ZTSN3JPH17BodyLockInterfaceE", !10, i64 8}
!27 = !{!"_ZTSN3JPH24BodyLockInterfaceLockingE", !26, i64 0}
!28 = !{!"_ZTSN3JPH13BodyInterfaceE", !10, i64 0, !10, i64 8, !10, i64 16}
!29 = !{!"_ZTSN3JPH16NarrowPhaseQueryE", !10, i64 0, !10, i64 8}
!30 = !{!"_ZTSN3JPH15PhysicsSettingsE", !16, i64 0, !16, i64 4, !16, 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, !16, i64 56, !16, i64 60, !31, i64 64, !31, i64 68, !31, i64 72, !24, i64 76, !24, i64 77, !24, i64 78, !24, i64 79, !24, i64 80, !24, i64 81, !24, i64 82}
!31 = !{!"float", !7, i64 0}
!32 = !{!"_ZTSN3JPH24ContactConstraintManagerE", !7, i64 8, !16, i64 184, !10, i64 192, !10, i64 200, !10, i64 208, !10, i64 216, !10, i64 224, !16, i64 232, !33, i64 236, !10, i64 240}
!33 = !{!"_ZTSSt6atomicIjE", !34, i64 0}
!34 = !{!"_ZTSSt13__atomic_baseIjE", !16, i64 0}
!35 = !{!"_ZTSN3JPH17ConstraintManagerE", !10, i64 0, !36, i64 8, !17, i64 32}
!36 = !{!"_ZTSN3JPH5ArrayINS_3RefINS_10ConstraintEEENS_12STLAllocatorIS3_EEEE", !15, i64 0, !15, i64 8, !10, i64 16}
!37 = !{!"_ZTSN3JPH13IslandBuilderE", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !16, i64 88, !16, i64 92, !16, i64 96, !16, i64 100, !16, i64 104, !16, i64 108}
!38 = !{!"_ZTSN3JPH19LargeIslandSplitterE", !16, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !16, i64 32, !33, i64 36, !16, i64 40, !10, i64 48, !33, i64 56}
!39 = !{!"_ZTSN3JPH5ArrayIPNS_19PhysicsStepListenerENS_12STLAllocatorIS2_EEEE", !15, i64 0, !15, i64 8, !10, i64 16}
!40 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!41 = !{!42, !42, i64 0}
!42 = !{!"vtable pointer", !8, i64 0}


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