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

; 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::UnorderedMap.80" = type { %"class.JPH::HashTable.base.82", [4 x i8] }
%"class.JPH::HashTable.base.82" = type <{ ptr, ptr, i32, i32, i32 }>
%"class.JPH::BodyID" = type { i32 }
%"class.JPH::Array.28" = type { i64, i64, ptr }
%"class.JPH::BodyLockRead" = type { %"class.JPH::BodyLockBase" }
%"class.JPH::BodyLockBase" = type { ptr, ptr, ptr }
%"class.JPH::BodyCreationSettings" = type { %"class.JPH::Vec3", %"class.JPH::Quat", %"class.JPH::Vec3", %"class.JPH::Vec3", i64, i16, %"class.JPH::CollisionGroup", i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, float, float, float, float, float, float, float, i32, i32, i8, float, %"class.JPH::MassProperties", %"class.JPH::RefConst.13", %"class.JPH::RefConst.14" }
%"class.JPH::Quat" = type { %"class.JPH::Vec4" }
%"class.JPH::Vec4" = type { %union.anon.12 }
%union.anon.12 = type { <4 x float> }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::CollisionGroup" = type { %"class.JPH::RefConst", i32, i32 }
%"class.JPH::RefConst" = type { ptr }
%"class.JPH::MassProperties" = type { float, %"class.JPH::Mat44" }
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::RefConst.13" = type { ptr }
%"class.JPH::RefConst.14" = type { ptr }
%"class.JPH::SoftBodyCreationSettings" = type <{ %"class.JPH::RefConst.16", [8 x i8], %"class.JPH::Vec3", %"class.JPH::Quat", i64, i16, [6 x i8], %"class.JPH::CollisionGroup", i32, float, float, float, float, float, float, i8, i8, i8, i8 }>
%"class.JPH::RefConst.16" = type { ptr }
%"class.JPH::Array.32" = type { i64, i64, ptr }
%"class.JPH::HashTable<JPH::BodyID, std::pair<JPH::BodyID, unsigned int>, JPH::UnorderedMapDetail<JPH::BodyID, unsigned int>, JPH::Hash<JPH::BodyID>, std::equal_to<JPH::BodyID>>::const_iterator" = type { %"class.JPH::HashTable<JPH::BodyID, std::pair<JPH::BodyID, unsigned int>, JPH::UnorderedMapDetail<JPH::BodyID, unsigned int>, JPH::Hash<JPH::BodyID>, std::equal_to<JPH::BodyID>>::IteratorBase.base", [4 x i8] }
%"class.JPH::HashTable<JPH::BodyID, std::pair<JPH::BodyID, unsigned int>, JPH::UnorderedMapDetail<JPH::BodyID, unsigned int>, JPH::Hash<JPH::BodyID>, std::equal_to<JPH::BodyID>>::IteratorBase.base" = type <{ ptr, i32 }>
%"class.JPH::HashTable<JPH::BodyID, std::pair<JPH::BodyID, unsigned int>, JPH::UnorderedMapDetail<JPH::BodyID, unsigned int>, JPH::Hash<JPH::BodyID>, std::equal_to<JPH::BodyID>>::iterator" = type { %"class.JPH::HashTable<JPH::BodyID, std::pair<JPH::BodyID, unsigned int>, JPH::UnorderedMapDetail<JPH::BodyID, unsigned int>, JPH::Hash<JPH::BodyID>, std::equal_to<JPH::BodyID>>::IteratorBase.base.86", [4 x i8] }
%"class.JPH::HashTable<JPH::BodyID, std::pair<JPH::BodyID, unsigned int>, JPH::UnorderedMapDetail<JPH::BodyID, unsigned int>, JPH::Hash<JPH::BodyID>, std::equal_to<JPH::BodyID>>::IteratorBase.base.86" = type <{ ptr, i32 }>
%"struct.JPH::AssertLastParam" = type { i8 }
%"class.JPH::Ref.75" = type { ptr }
%"class.JPH::PhysicsScene" = type { %"class.JPH::RefTarget", %"class.JPH::Array", %"class.JPH::Array.6", %"class.JPH::Array.9" }
%"class.JPH::RefTarget" = type { %"struct.std::atomic" }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i32 }
%"class.JPH::Array" = type { i64, i64, ptr }
%"class.JPH::Array.6" = type { i64, i64, ptr }
%"class.JPH::Array.9" = type { i64, i64, ptr }
%"struct.std::pair" = type { %"class.JPH::BodyID", i32 }
%"class.JPH::Ref.84" = type { ptr }

@.str.2 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [82 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: mustprogress uwtable
declare dso_local void @_ZN3JPH12PhysicsScene7AddBodyERKNS_20BodyCreationSettingsE(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 16 dereferenceable(256)) #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH12PhysicsScene11AddSoftBodyERKNS_24SoftBodyCreationSettingsE(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 16 dereferenceable(111)) #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 i64 @_ZNK3JPH5ArrayINS_20BodyCreationSettingsENS_12STLAllocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 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)) #3 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH12PhysicsScene17FromPhysicsSystemEPKNS_13PhysicsSystemE(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr noundef %1) #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.JPH::UnorderedMap.80", align 8
  %6 = alloca %"class.JPH::BodyID", align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.JPH::Array.28", align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca %"class.JPH::BodyLockRead", align 8
  %16 = alloca ptr, align 8
  %17 = alloca %"class.JPH::BodyCreationSettings", align 16
  %18 = alloca %"class.JPH::SoftBodyCreationSettings", align 16
  %19 = alloca %"class.JPH::Array.32", align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca %"class.JPH::HashTable<JPH::BodyID, std::pair<JPH::BodyID, unsigned int>, JPH::UnorderedMapDetail<JPH::BodyID, unsigned int>, JPH::Hash<JPH::BodyID>, std::equal_to<JPH::BodyID>>::const_iterator", align 8
  %26 = alloca %"class.JPH::HashTable<JPH::BodyID, std::pair<JPH::BodyID, unsigned int>, JPH::UnorderedMapDetail<JPH::BodyID, unsigned int>, JPH::Hash<JPH::BodyID>, std::equal_to<JPH::BodyID>>::iterator", align 8
  %27 = alloca %"class.JPH::HashTable<JPH::BodyID, std::pair<JPH::BodyID, unsigned int>, JPH::UnorderedMapDetail<JPH::BodyID, unsigned int>, JPH::Hash<JPH::BodyID>, std::equal_to<JPH::BodyID>>::const_iterator", align 8
  %28 = alloca %"class.JPH::HashTable<JPH::BodyID, std::pair<JPH::BodyID, unsigned int>, JPH::UnorderedMapDetail<JPH::BodyID, unsigned int>, JPH::Hash<JPH::BodyID>, std::equal_to<JPH::BodyID>>::iterator", align 8
  %29 = alloca %"class.JPH::HashTable<JPH::BodyID, std::pair<JPH::BodyID, unsigned int>, JPH::UnorderedMapDetail<JPH::BodyID, unsigned int>, JPH::Hash<JPH::BodyID>, std::equal_to<JPH::BodyID>>::const_iterator", align 8
  %30 = alloca %"class.JPH::HashTable<JPH::BodyID, std::pair<JPH::BodyID, unsigned int>, JPH::UnorderedMapDetail<JPH::BodyID, unsigned int>, JPH::Hash<JPH::BodyID>, std::equal_to<JPH::BodyID>>::iterator", align 8
  %31 = alloca %"class.JPH::HashTable<JPH::BodyID, std::pair<JPH::BodyID, unsigned int>, JPH::UnorderedMapDetail<JPH::BodyID, unsigned int>, JPH::Hash<JPH::BodyID>, std::equal_to<JPH::BodyID>>::const_iterator", align 8
  %32 = alloca %"class.JPH::HashTable<JPH::BodyID, std::pair<JPH::BodyID, unsigned int>, JPH::UnorderedMapDetail<JPH::BodyID, unsigned int>, JPH::Hash<JPH::BodyID>, std::equal_to<JPH::BodyID>>::iterator", align 8
  %33 = alloca %"struct.JPH::AssertLastParam", align 1
  %34 = alloca %"class.JPH::Ref.75", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %35 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr %5) #6
  call void @_ZN3JPH12UnorderedMapINS_6BodyIDEjNS_4HashIS1_EESt8equal_toIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(28) %5) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  invoke void @_ZN3JPH6BodyIDC2Ev(ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %36 unwind label %55

36:                                               ; preds = %2
  %37 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3JPH12UnorderedMapINS_6BodyIDEjNS_4HashIS1_EESt8equal_toIS1_EEixERKS1_(ptr noundef nonnull align 8 dereferenceable(28) %5, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %38 unwind label %55

38:                                               ; preds = %36
  store i32 -1, ptr %37, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #6
  call void @_ZN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZNK3JPH13PhysicsSystem9GetBodiesERNS_5ArrayINS_6BodyIDENS_12STLAllocatorIS2_EEEE(ptr noundef nonnull align 16 dereferenceable(1172) %39, ptr noundef nonnull align 8 dereferenceable(24) %9)
          to label %40 unwind label %59

40:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3JPH13PhysicsSystem20GetBodyLockInterfaceEv(ptr noundef nonnull align 16 dereferenceable(1172) %41)
          to label %43 unwind label %63

43:                                               ; preds = %40
  store ptr %42, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  store ptr %9, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  %44 = load ptr, ptr %11, align 8, !tbaa !5
  %45 = invoke noundef ptr @_ZN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %44)
          to label %46 unwind label %67

46:                                               ; preds = %43
  store ptr %45, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %47 = load ptr, ptr %11, align 8, !tbaa !5
  %48 = invoke noundef ptr @_ZN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %47)
          to label %49 unwind label %71

49:                                               ; preds = %46
  store ptr %48, ptr %13, align 8, !tbaa !5
  br label %50

50:                                               ; preds = %136, %49
  %51 = load ptr, ptr %12, align 8, !tbaa !5
  %52 = load ptr, ptr %13, align 8, !tbaa !5
  %53 = icmp ne ptr %51, %52
  br i1 %53, label %75, label %54

54:                                               ; preds = %50
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %143

55:                                               ; preds = %36, %2
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %7, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %274

59:                                               ; preds = %38
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %7, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %8, align 4
  br label %273

63:                                               ; preds = %40
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %7, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %8, align 4
  br label %272

67:                                               ; preds = %43
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %7, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %8, align 4
  br label %142

71:                                               ; preds = %46
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %7, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %8, align 4
  br label %141

75:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %76 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %76, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %15) #6
  %77 = load ptr, ptr %10, align 8, !tbaa !5
  %78 = load ptr, ptr %14, align 8, !tbaa !5
  invoke void @_ZN3JPH12BodyLockReadCI2NS_12BodyLockBaseILb0EKNS_4BodyEEEERKNS_17BodyLockInterfaceERKNS_6BodyIDE(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr noundef nonnull align 8 dereferenceable(16) %77, ptr noundef nonnull align 4 dereferenceable(4) %78)
          to label %79 unwind label %99

79:                                               ; preds = %75
  %80 = invoke noundef zeroext i1 @_ZNK3JPH12BodyLockBaseILb0EKNS_4BodyEE9SucceededEv(ptr noundef nonnull align 8 dereferenceable(24) %15)
          to label %81 unwind label %103

81:                                               ; preds = %79
  br i1 %80, label %82, label %135

82:                                               ; preds = %81
  %83 = getelementptr inbounds %"class.JPH::PhysicsScene", ptr %35, i32 0, i32 1
  %84 = invoke noundef i64 @_ZNK3JPH5ArrayINS_20BodyCreationSettingsENS_12STLAllocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %83)
          to label %85 unwind label %103

85:                                               ; preds = %82
  %86 = trunc i64 %84 to i32
  %87 = load ptr, ptr %14, align 8, !tbaa !5
  %88 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3JPH12UnorderedMapINS_6BodyIDEjNS_4HashIS1_EESt8equal_toIS1_EEixERKS1_(ptr noundef nonnull align 8 dereferenceable(28) %5, ptr noundef nonnull align 4 dereferenceable(4) %87)
          to label %89 unwind label %103

89:                                               ; preds = %85
  store i32 %86, ptr %88, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #6
  %90 = invoke noundef nonnull align 16 dereferenceable(122) ptr @_ZNK3JPH12BodyLockBaseILb0EKNS_4BodyEE7GetBodyEv(ptr noundef nonnull align 8 dereferenceable(24) %15)
          to label %91 unwind label %107

91:                                               ; preds = %89
  store ptr %90, ptr %16, align 8, !tbaa !5
  %92 = load ptr, ptr %16, align 8, !tbaa !5
  %93 = invoke noundef zeroext i1 @_ZNK3JPH4Body11IsRigidBodyEv(ptr noundef nonnull align 16 dereferenceable(122) %92)
          to label %94 unwind label %107

94:                                               ; preds = %91
  br i1 %93, label %95, label %120

95:                                               ; preds = %94
  call void @llvm.lifetime.start.p0(i64 256, ptr %17) #6
  %96 = load ptr, ptr %16, align 8, !tbaa !5
  invoke void @_ZNK3JPH4Body23GetBodyCreationSettingsEv(ptr dead_on_unwind writable sret(%"class.JPH::BodyCreationSettings") align 16 %17, ptr noundef nonnull align 16 dereferenceable(122) %96)
          to label %97 unwind label %111

97:                                               ; preds = %95
  invoke void @_ZN3JPH12PhysicsScene7AddBodyERKNS_20BodyCreationSettingsE(ptr noundef nonnull align 8 dereferenceable(80) %35, ptr noundef nonnull align 16 dereferenceable(256) %17)
          to label %98 unwind label %115

98:                                               ; preds = %97
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %17) #6
  call void @llvm.lifetime.end.p0(i64 256, ptr %17) #6
  br label %133

99:                                               ; preds = %75
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %7, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %8, align 4
  br label %140

103:                                              ; preds = %85, %82, %79
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %7, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %8, align 4
  br label %139

107:                                              ; preds = %91, %89
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %7, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %8, align 4
  br label %134

111:                                              ; preds = %95
  %112 = landingpad { ptr, i32 }
          cleanup
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %7, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %8, align 4
  br label %119

115:                                              ; preds = %97
  %116 = landingpad { ptr, i32 }
          cleanup
  %117 = extractvalue { ptr, i32 } %116, 0
  store ptr %117, ptr %7, align 8
  %118 = extractvalue { ptr, i32 } %116, 1
  store i32 %118, ptr %8, align 4
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %17) #6
  br label %119

119:                                              ; preds = %115, %111
  call void @llvm.lifetime.end.p0(i64 256, ptr %17) #6
  br label %134

120:                                              ; preds = %94
  call void @llvm.lifetime.start.p0(i64 112, ptr %18) #6
  %121 = load ptr, ptr %16, align 8, !tbaa !5
  invoke void @_ZNK3JPH4Body27GetSoftBodyCreationSettingsEv(ptr dead_on_unwind writable sret(%"class.JPH::SoftBodyCreationSettings") align 16 %18, ptr noundef nonnull align 16 dereferenceable(122) %121)
          to label %122 unwind label %124

122:                                              ; preds = %120
  invoke void @_ZN3JPH12PhysicsScene11AddSoftBodyERKNS_24SoftBodyCreationSettingsE(ptr noundef nonnull align 8 dereferenceable(80) %35, ptr noundef nonnull align 16 dereferenceable(111) %18)
          to label %123 unwind label %128

123:                                              ; preds = %122
  call void @_ZN3JPH24SoftBodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(111) %18) #6
  call void @llvm.lifetime.end.p0(i64 112, ptr %18) #6
  br label %133

124:                                              ; preds = %120
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %7, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %8, align 4
  br label %132

128:                                              ; preds = %122
  %129 = landingpad { ptr, i32 }
          cleanup
  %130 = extractvalue { ptr, i32 } %129, 0
  store ptr %130, ptr %7, align 8
  %131 = extractvalue { ptr, i32 } %129, 1
  store i32 %131, ptr %8, align 4
  call void @_ZN3JPH24SoftBodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(111) %18) #6
  br label %132

132:                                              ; preds = %128, %124
  call void @llvm.lifetime.end.p0(i64 112, ptr %18) #6
  br label %134

133:                                              ; preds = %123, %98
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %135

134:                                              ; preds = %132, %119, %107
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  br label %139

135:                                              ; preds = %133, %81
  call void @_ZN3JPH12BodyLockBaseILb0EKNS_4BodyEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %136

136:                                              ; preds = %135
  %137 = load ptr, ptr %12, align 8, !tbaa !5
  %138 = getelementptr inbounds %"class.JPH::BodyID", ptr %137, i32 1
  store ptr %138, ptr %12, align 8, !tbaa !5
  br label %50

139:                                              ; preds = %134, %103
  call void @_ZN3JPH12BodyLockBaseILb0EKNS_4BodyEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #6
  br label %140

140:                                              ; preds = %139, %99
  call void @llvm.lifetime.end.p0(i64 24, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %141

141:                                              ; preds = %140, %71
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  br label %142

142:                                              ; preds = %141, %67
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %272

143:                                              ; preds = %54
  call void @llvm.lifetime.start.p0(i64 24, ptr %19) #6
  %144 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZNK3JPH13PhysicsSystem14GetConstraintsEv(ptr dead_on_unwind writable sret(%"class.JPH::Array.32") align 8 %19, ptr noundef nonnull align 16 dereferenceable(1172) %144)
          to label %145 unwind label %157

145:                                              ; preds = %143
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  store ptr %19, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #6
  %146 = load ptr, ptr %20, align 8, !tbaa !5
  %147 = invoke noundef ptr @_ZN3JPH5ArrayINS_3RefINS_10ConstraintEEENS_12STLAllocatorIS3_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %146)
          to label %148 unwind label %161

148:                                              ; preds = %145
  store ptr %147, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #6
  %149 = load ptr, ptr %20, align 8, !tbaa !5
  %150 = invoke noundef ptr @_ZN3JPH5ArrayINS_3RefINS_10ConstraintEEENS_12STLAllocatorIS3_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %149)
          to label %151 unwind label %165

151:                                              ; preds = %148
  store ptr %150, ptr %22, align 8, !tbaa !5
  br label %152

152:                                              ; preds = %264, %151
  %153 = load ptr, ptr %21, align 8, !tbaa !5
  %154 = load ptr, ptr %22, align 8, !tbaa !5
  %155 = icmp ne ptr %153, %154
  br i1 %155, label %169, label %156

156:                                              ; preds = %152
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  br label %270

157:                                              ; preds = %143
  %158 = landingpad { ptr, i32 }
          cleanup
  %159 = extractvalue { ptr, i32 } %158, 0
  store ptr %159, ptr %7, align 8
  %160 = extractvalue { ptr, i32 } %158, 1
  store i32 %160, ptr %8, align 4
  br label %271

161:                                              ; preds = %145
  %162 = landingpad { ptr, i32 }
          cleanup
  %163 = extractvalue { ptr, i32 } %162, 0
  store ptr %163, ptr %7, align 8
  %164 = extractvalue { ptr, i32 } %162, 1
  store i32 %164, ptr %8, align 4
  br label %269

165:                                              ; preds = %148
  %166 = landingpad { ptr, i32 }
          cleanup
  %167 = extractvalue { ptr, i32 } %166, 0
  store ptr %167, ptr %7, align 8
  %168 = extractvalue { ptr, i32 } %166, 1
  store i32 %168, ptr %8, align 4
  br label %268

169:                                              ; preds = %152
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #6
  %170 = load ptr, ptr %21, align 8, !tbaa !5
  %171 = invoke noundef ptr @_ZNK3JPH3RefINS_10ConstraintEEcvPS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %170)
          to label %172 unwind label %212

172:                                              ; preds = %169
  store ptr %171, ptr %23, align 8, !tbaa !5
  %173 = load ptr, ptr %23, align 8, !tbaa !5
  %174 = load ptr, ptr %173, align 8, !tbaa !11
  %175 = getelementptr inbounds ptr, ptr %174, i64 2
  %176 = load ptr, ptr %175, align 8
  %177 = invoke noundef i32 %176(ptr noundef nonnull align 8 dereferenceable(32) %173)
          to label %178 unwind label %212

178:                                              ; preds = %172
  %179 = icmp eq i32 %177, 1
  br i1 %179, label %180, label %263

180:                                              ; preds = %178
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #6
  %181 = load ptr, ptr %23, align 8, !tbaa !5
  store ptr %181, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #6
  %182 = load ptr, ptr %24, align 8, !tbaa !5
  %183 = invoke noundef ptr @_ZNK3JPH17TwoBodyConstraint8GetBody1Ev(ptr noundef nonnull align 8 dereferenceable(48) %182)
          to label %184 unwind label %216

184:                                              ; preds = %180
  %185 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH4Body5GetIDEv(ptr noundef nonnull align 16 dereferenceable(122) %183)
          to label %186 unwind label %216

186:                                              ; preds = %184
  invoke void @_ZN3JPH12UnorderedMapINS_6BodyIDEjNS_4HashIS1_EESt8equal_toIS1_EE4findERKS1_(ptr dead_on_unwind writable sret(%"class.JPH::HashTable<JPH::BodyID, std::pair<JPH::BodyID, unsigned int>, JPH::UnorderedMapDetail<JPH::BodyID, unsigned int>, JPH::Hash<JPH::BodyID>, std::equal_to<JPH::BodyID>>::iterator") align 8 %26, ptr noundef nonnull align 8 dereferenceable(28) %5, ptr noundef nonnull align 4 dereferenceable(4) %185)
          to label %187 unwind label %216

187:                                              ; preds = %186
  invoke void @_ZN3JPH9HashTableINS_6BodyIDESt4pairIS1_jENS_18UnorderedMapDetailIS1_jEENS_4HashIS1_EESt8equal_toIS1_EE14const_iteratorC2ERKNSA_8iteratorE(ptr noundef nonnull align 8 dereferenceable(12) %25, ptr noundef nonnull align 8 dereferenceable(12) %26)
          to label %188 unwind label %216

188:                                              ; preds = %187
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %27) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %28) #6
  %189 = load ptr, ptr %24, align 8, !tbaa !5
  %190 = invoke noundef ptr @_ZNK3JPH17TwoBodyConstraint8GetBody2Ev(ptr noundef nonnull align 8 dereferenceable(48) %189)
          to label %191 unwind label %220

191:                                              ; preds = %188
  %192 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH4Body5GetIDEv(ptr noundef nonnull align 16 dereferenceable(122) %190)
          to label %193 unwind label %220

193:                                              ; preds = %191
  invoke void @_ZN3JPH12UnorderedMapINS_6BodyIDEjNS_4HashIS1_EESt8equal_toIS1_EE4findERKS1_(ptr dead_on_unwind writable sret(%"class.JPH::HashTable<JPH::BodyID, std::pair<JPH::BodyID, unsigned int>, JPH::UnorderedMapDetail<JPH::BodyID, unsigned int>, JPH::Hash<JPH::BodyID>, std::equal_to<JPH::BodyID>>::iterator") align 8 %28, ptr noundef nonnull align 8 dereferenceable(28) %5, ptr noundef nonnull align 4 dereferenceable(4) %192)
          to label %194 unwind label %220

194:                                              ; preds = %193
  invoke void @_ZN3JPH9HashTableINS_6BodyIDESt4pairIS1_jENS_18UnorderedMapDetailIS1_jEENS_4HashIS1_EESt8equal_toIS1_EE14const_iteratorC2ERKNSA_8iteratorE(ptr noundef nonnull align 8 dereferenceable(12) %27, ptr noundef nonnull align 8 dereferenceable(12) %28)
          to label %195 unwind label %220

195:                                              ; preds = %194
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #6
  br label %196

196:                                              ; preds = %195
  call void @llvm.lifetime.start.p0(i64 16, ptr %29) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %30) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %31) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %32) #6
  invoke void @_ZN3JPH9HashTableINS_6BodyIDESt4pairIS1_jENS_18UnorderedMapDetailIS1_jEENS_4HashIS1_EESt8equal_toIS1_EE3endEv(ptr dead_on_unwind writable sret(%"class.JPH::HashTable<JPH::BodyID, std::pair<JPH::BodyID, unsigned int>, JPH::UnorderedMapDetail<JPH::BodyID, unsigned int>, JPH::Hash<JPH::BodyID>, std::equal_to<JPH::BodyID>>::iterator") align 8 %30, ptr noundef nonnull align 8 dereferenceable(28) %5)
          to label %197 unwind label %224

197:                                              ; preds = %196
  invoke void @_ZN3JPH9HashTableINS_6BodyIDESt4pairIS1_jENS_18UnorderedMapDetailIS1_jEENS_4HashIS1_EESt8equal_toIS1_EE14const_iteratorC2ERKNSA_8iteratorE(ptr noundef nonnull align 8 dereferenceable(12) %29, ptr noundef nonnull align 8 dereferenceable(12) %30)
          to label %198 unwind label %224

198:                                              ; preds = %197
  %199 = invoke noundef zeroext i1 @_ZNK3JPH9HashTableINS_6BodyIDESt4pairIS1_jENS_18UnorderedMapDetailIS1_jEENS_4HashIS1_EESt8equal_toIS1_EE12IteratorBaseIKSA_NSA_14const_iteratorEEneERKSD_(ptr noundef nonnull align 8 dereferenceable(12) %25, ptr noundef nonnull align 8 dereferenceable(12) %29)
          to label %200 unwind label %224

200:                                              ; preds = %198
  br i1 %199, label %201, label %206

201:                                              ; preds = %200
  invoke void @_ZN3JPH9HashTableINS_6BodyIDESt4pairIS1_jENS_18UnorderedMapDetailIS1_jEENS_4HashIS1_EESt8equal_toIS1_EE3endEv(ptr dead_on_unwind writable sret(%"class.JPH::HashTable<JPH::BodyID, std::pair<JPH::BodyID, unsigned int>, JPH::UnorderedMapDetail<JPH::BodyID, unsigned int>, JPH::Hash<JPH::BodyID>, std::equal_to<JPH::BodyID>>::iterator") align 8 %32, ptr noundef nonnull align 8 dereferenceable(28) %5)
          to label %202 unwind label %228

202:                                              ; preds = %201
  invoke void @_ZN3JPH9HashTableINS_6BodyIDESt4pairIS1_jENS_18UnorderedMapDetailIS1_jEENS_4HashIS1_EESt8equal_toIS1_EE14const_iteratorC2ERKNSA_8iteratorE(ptr noundef nonnull align 8 dereferenceable(12) %31, ptr noundef nonnull align 8 dereferenceable(12) %32)
          to label %203 unwind label %228

203:                                              ; preds = %202
  %204 = invoke noundef zeroext i1 @_ZNK3JPH9HashTableINS_6BodyIDESt4pairIS1_jENS_18UnorderedMapDetailIS1_jEENS_4HashIS1_EESt8equal_toIS1_EE12IteratorBaseIKSA_NSA_14const_iteratorEEneERKSD_(ptr noundef nonnull align 8 dereferenceable(12) %27, ptr noundef nonnull align 8 dereferenceable(12) %31)
          to label %205 unwind label %228

205:                                              ; preds = %203
  br i1 %204, label %209, label %206

206:                                              ; preds = %205, %200
  %207 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.2, ptr noundef @.str.3, i32 noundef 253)
          to label %208 unwind label %228

208:                                              ; preds = %206
  br label %209

209:                                              ; preds = %208, %205
  %210 = phi i1 [ false, %205 ], [ %207, %208 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %31) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #6
  br i1 %210, label %211, label %233

211:                                              ; preds = %209
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #6, !srcloc !13
  br label %233

212:                                              ; preds = %172, %169
  %213 = landingpad { ptr, i32 }
          cleanup
  %214 = extractvalue { ptr, i32 } %213, 0
  store ptr %214, ptr %7, align 8
  %215 = extractvalue { ptr, i32 } %213, 1
  store i32 %215, ptr %8, align 4
  br label %267

216:                                              ; preds = %187, %186, %184, %180
  %217 = landingpad { ptr, i32 }
          cleanup
  %218 = extractvalue { ptr, i32 } %217, 0
  store ptr %218, ptr %7, align 8
  %219 = extractvalue { ptr, i32 } %217, 1
  store i32 %219, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #6
  br label %262

220:                                              ; preds = %194, %193, %191, %188
  %221 = landingpad { ptr, i32 }
          cleanup
  %222 = extractvalue { ptr, i32 } %221, 0
  store ptr %222, ptr %7, align 8
  %223 = extractvalue { ptr, i32 } %221, 1
  store i32 %223, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %28) #6
  br label %261

224:                                              ; preds = %198, %197, %196
  %225 = landingpad { ptr, i32 }
          cleanup
  %226 = extractvalue { ptr, i32 } %225, 0
  store ptr %226, ptr %7, align 8
  %227 = extractvalue { ptr, i32 } %225, 1
  store i32 %227, ptr %8, align 4
  br label %232

228:                                              ; preds = %206, %203, %202, %201
  %229 = landingpad { ptr, i32 }
          cleanup
  %230 = extractvalue { ptr, i32 } %229, 0
  store ptr %230, ptr %7, align 8
  %231 = extractvalue { ptr, i32 } %229, 1
  store i32 %231, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %31) #6
  br label %232

232:                                              ; preds = %228, %224
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #6
  br label %261

233:                                              ; preds = %211, %209
  br label %234

234:                                              ; preds = %233
  br label %235

235:                                              ; preds = %234
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #6
  %236 = load ptr, ptr %23, align 8, !tbaa !5
  %237 = load ptr, ptr %236, align 8, !tbaa !11
  %238 = getelementptr inbounds ptr, ptr %237, i64 15
  %239 = load ptr, ptr %238, align 8
  invoke void %239(ptr dead_on_unwind writable sret(%"class.JPH::Ref.75") align 8 %34, ptr noundef nonnull align 8 dereferenceable(32) %236)
          to label %240 unwind label %252

240:                                              ; preds = %235
  %241 = invoke noundef ptr @_ZN3JPH10StaticCastINS_25TwoBodyConstraintSettingsENS_18ConstraintSettingsETnNSt9enable_ifIXoosr3stdE12is_base_of_vIT_T0_Esr3stdE12is_base_of_vIS5_S4_EEbE4typeELb1EEEPS4_RKNS_3RefIS5_EE(ptr noundef nonnull align 8 dereferenceable(8) %34)
          to label %242 unwind label %256

242:                                              ; preds = %240
  %243 = invoke noundef ptr @_ZNK3JPH9HashTableINS_6BodyIDESt4pairIS1_jENS_18UnorderedMapDetailIS1_jEENS_4HashIS1_EESt8equal_toIS1_EE12IteratorBaseIKSA_NSA_14const_iteratorEEptEv(ptr noundef nonnull align 8 dereferenceable(12) %25)
          to label %244 unwind label %256

244:                                              ; preds = %242
  %245 = getelementptr inbounds %"struct.std::pair", ptr %243, i32 0, i32 1
  %246 = load i32, ptr %245, align 4, !tbaa !14
  %247 = invoke noundef ptr @_ZNK3JPH9HashTableINS_6BodyIDESt4pairIS1_jENS_18UnorderedMapDetailIS1_jEENS_4HashIS1_EESt8equal_toIS1_EE12IteratorBaseIKSA_NSA_14const_iteratorEEptEv(ptr noundef nonnull align 8 dereferenceable(12) %27)
          to label %248 unwind label %256

248:                                              ; preds = %244
  %249 = getelementptr inbounds %"struct.std::pair", ptr %247, i32 0, i32 1
  %250 = load i32, ptr %249, align 4, !tbaa !14
  invoke void @_ZN3JPH12PhysicsScene13AddConstraintEPKNS_25TwoBodyConstraintSettingsEjj(ptr noundef nonnull align 8 dereferenceable(80) %35, ptr noundef %241, i32 noundef %246, i32 noundef %250)
          to label %251 unwind label %256

251:                                              ; preds = %248
  call void @_ZN3JPH3RefINS_18ConstraintSettingsEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %34) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  br label %263

252:                                              ; preds = %235
  %253 = landingpad { ptr, i32 }
          cleanup
  %254 = extractvalue { ptr, i32 } %253, 0
  store ptr %254, ptr %7, align 8
  %255 = extractvalue { ptr, i32 } %253, 1
  store i32 %255, ptr %8, align 4
  br label %260

256:                                              ; preds = %248, %244, %242, %240
  %257 = landingpad { ptr, i32 }
          cleanup
  %258 = extractvalue { ptr, i32 } %257, 0
  store ptr %258, ptr %7, align 8
  %259 = extractvalue { ptr, i32 } %257, 1
  store i32 %259, ptr %8, align 4
  call void @_ZN3JPH3RefINS_18ConstraintSettingsEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %34) #6
  br label %260

260:                                              ; preds = %256, %252
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #6
  br label %261

261:                                              ; preds = %260, %232, %220
  call void @llvm.lifetime.end.p0(i64 16, ptr %27) #6
  br label %262

262:                                              ; preds = %261, %216
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #6
  br label %267

263:                                              ; preds = %251, %178
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  br label %264

264:                                              ; preds = %263
  %265 = load ptr, ptr %21, align 8, !tbaa !5
  %266 = getelementptr inbounds %"class.JPH::Ref.84", ptr %265, i32 1
  store ptr %266, ptr %21, align 8, !tbaa !5
  br label %152

267:                                              ; preds = %262, %212
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #6
  br label %268

268:                                              ; preds = %267, %165
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #6
  br label %269

269:                                              ; preds = %268, %161
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @_ZN3JPH5ArrayINS_3RefINS_10ConstraintEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #6
  br label %271

270:                                              ; preds = %156
  call void @_ZN3JPH5ArrayINS_3RefINS_10ConstraintEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %19) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @_ZN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #6
  call void @_ZN3JPH9HashTableINS_6BodyIDESt4pairIS1_jENS_18UnorderedMapDetailIS1_jEENS_4HashIS1_EESt8equal_toIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(28) %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #6
  ret void

271:                                              ; preds = %269, %157
  call void @llvm.lifetime.end.p0(i64 24, ptr %19) #6
  br label %272

272:                                              ; preds = %271, %142, %63
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %273

273:                                              ; preds = %272, %59
  call void @_ZN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #6
  br label %274

274:                                              ; preds = %273, %55
  call void @_ZN3JPH9HashTableINS_6BodyIDESt4pairIS1_jENS_18UnorderedMapDetailIS1_jEENS_4HashIS1_EESt8equal_toIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(28) %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %5) #6
  br label %275

275:                                              ; preds = %274
  %276 = load ptr, ptr %7, align 8
  %277 = load i32, ptr %8, align 4
  %278 = insertvalue { ptr, i32 } poison, ptr %276, 0
  %279 = insertvalue { ptr, i32 } %278, i32 %277, 1
  resume { ptr, i32 } %279
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3JPH13PhysicsSystem9GetBodiesERNS_5ArrayINS_6BodyIDENS_12STLAllocatorIS2_EEEE(ptr noundef nonnull align 16 dereferenceable(1172), ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

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

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

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

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

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

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

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

declare void @_ZNK3JPH4Body23GetBodyCreationSettingsEv(ptr dead_on_unwind writable sret(%"class.JPH::BodyCreationSettings") align 16, ptr noundef nonnull align 16 dereferenceable(122)) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256)) unnamed_addr #3 align 2

declare void @_ZNK3JPH4Body27GetSoftBodyCreationSettingsEv(ptr dead_on_unwind writable sret(%"class.JPH::SoftBodyCreationSettings") align 16, ptr noundef nonnull align 16 dereferenceable(122)) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH24SoftBodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(111)) unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3JPH13PhysicsSystem14GetConstraintsEv(ptr dead_on_unwind noalias writable sret(%"class.JPH::Array.32") align 8, ptr noundef nonnull align 16 dereferenceable(1172)) #1 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH12UnorderedMapINS_6BodyIDEjNS_4HashIS1_EESt8equal_toIS1_EE4findERKS1_(ptr dead_on_unwind noalias writable sret(%"class.JPH::HashTable<JPH::BodyID, std::pair<JPH::BodyID, unsigned int>, JPH::UnorderedMapDetail<JPH::BodyID, unsigned int>, JPH::Hash<JPH::BodyID>, std::equal_to<JPH::BodyID>>::iterator") align 8, ptr noundef nonnull align 8 dereferenceable(28), ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH9HashTableINS_6BodyIDESt4pairIS1_jENS_18UnorderedMapDetailIS1_jEENS_4HashIS1_EESt8equal_toIS1_EE12IteratorBaseIKSA_NSA_14const_iteratorEEneERKSD_(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(12)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH9HashTableINS_6BodyIDESt4pairIS1_jENS_18UnorderedMapDetailIS1_jEENS_4HashIS1_EESt8equal_toIS1_EE3endEv(ptr dead_on_unwind noalias writable sret(%"class.JPH::HashTable<JPH::BodyID, std::pair<JPH::BodyID, unsigned int>, JPH::UnorderedMapDetail<JPH::BodyID, unsigned int>, JPH::Hash<JPH::BodyID>, std::equal_to<JPH::BodyID>>::iterator") align 8, ptr noundef nonnull align 8 dereferenceable(28)) #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK3JPH9HashTableINS_6BodyIDESt4pairIS1_jENS_18UnorderedMapDetailIS1_jEENS_4HashIS1_EESt8equal_toIS1_EE12IteratorBaseIKSA_NSA_14const_iteratorEEptEv(ptr noundef nonnull align 8 dereferenceable(12)) #1 align 2

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress 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 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"vtable pointer", !8, i64 0}
!13 = !{i64 2159439872}
!14 = !{!15, !10, i64 4}
!15 = !{!"_ZTSSt4pairIN3JPH6BodyIDEjE", !16, i64 0, !10, i64 4}
!16 = !{!"_ZTSN3JPH6BodyIDE", !10, 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::UnorderedMap.80" = type { %"class.JPH::HashTable.base.82", [4 x i8] }
%"class.JPH::HashTable.base.82" = type <{ ptr, ptr, i32, i32, i32 }>
%"class.JPH::BodyID" = type { i32 }
%"class.JPH::Array.28" = type { i64, i64, ptr }
%"class.JPH::BodyLockRead" = type { %"class.JPH::BodyLockBase" }
%"class.JPH::BodyLockBase" = type { ptr, ptr, ptr }
%"class.JPH::BodyCreationSettings" = type { %"class.JPH::Vec3", %"class.JPH::Quat", %"class.JPH::Vec3", %"class.JPH::Vec3", i64, i16, %"class.JPH::CollisionGroup", i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, float, float, float, float, float, float, float, i32, i32, i8, float, %"class.JPH::MassProperties", %"class.JPH::RefConst.13", %"class.JPH::RefConst.14" }
%"class.JPH::Quat" = type { %"class.JPH::Vec4" }
%"class.JPH::Vec4" = type { %union.anon.12 }
%union.anon.12 = type { <4 x float> }
%"class.JPH::Vec3" = type { %union.anon }
%union.anon = type { <4 x float> }
%"class.JPH::CollisionGroup" = type { %"class.JPH::RefConst", i32, i32 }
%"class.JPH::RefConst" = type { ptr }
%"class.JPH::MassProperties" = type { float, %"class.JPH::Mat44" }
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::RefConst.13" = type { ptr }
%"class.JPH::RefConst.14" = type { ptr }
%"class.JPH::SoftBodyCreationSettings" = type <{ %"class.JPH::RefConst.16", [8 x i8], %"class.JPH::Vec3", %"class.JPH::Quat", i64, i16, [6 x i8], %"class.JPH::CollisionGroup", i32, float, float, float, float, float, float, i8, i8, i8, i8 }>
%"class.JPH::RefConst.16" = type { ptr }
%"class.JPH::Array.32" = type { i64, i64, ptr }
%"class.JPH::HashTable<JPH::BodyID, std::pair<JPH::BodyID, unsigned int>, JPH::UnorderedMapDetail<JPH::BodyID, unsigned int>, JPH::Hash<JPH::BodyID>, std::equal_to<JPH::BodyID>>::const_iterator" = type { %"class.JPH::HashTable<JPH::BodyID, std::pair<JPH::BodyID, unsigned int>, JPH::UnorderedMapDetail<JPH::BodyID, unsigned int>, JPH::Hash<JPH::BodyID>, std::equal_to<JPH::BodyID>>::IteratorBase.base", [4 x i8] }
%"class.JPH::HashTable<JPH::BodyID, std::pair<JPH::BodyID, unsigned int>, JPH::UnorderedMapDetail<JPH::BodyID, unsigned int>, JPH::Hash<JPH::BodyID>, std::equal_to<JPH::BodyID>>::IteratorBase.base" = type <{ ptr, i32 }>
%"class.JPH::HashTable<JPH::BodyID, std::pair<JPH::BodyID, unsigned int>, JPH::UnorderedMapDetail<JPH::BodyID, unsigned int>, JPH::Hash<JPH::BodyID>, std::equal_to<JPH::BodyID>>::iterator" = type { %"class.JPH::HashTable<JPH::BodyID, std::pair<JPH::BodyID, unsigned int>, JPH::UnorderedMapDetail<JPH::BodyID, unsigned int>, JPH::Hash<JPH::BodyID>, std::equal_to<JPH::BodyID>>::IteratorBase.base.86", [4 x i8] }
%"class.JPH::HashTable<JPH::BodyID, std::pair<JPH::BodyID, unsigned int>, JPH::UnorderedMapDetail<JPH::BodyID, unsigned int>, JPH::Hash<JPH::BodyID>, std::equal_to<JPH::BodyID>>::IteratorBase.base.86" = type <{ ptr, i32 }>
%"class.JPH::Ref.75" = type { ptr }

@.str.2 = external hidden unnamed_addr constant [57 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [82 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 uwtable
declare dso_local void @_ZN3JPH12PhysicsScene7AddBodyERKNS_20BodyCreationSettingsE(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 16 dereferenceable(256)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH12PhysicsScene11AddSoftBodyERKNS_24SoftBodyCreationSettingsE(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef nonnull align 16 dereferenceable(111)) 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 i64 @_ZNK3JPH5ArrayINS_20BodyCreationSettingsENS_12STLAllocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN3JPH10StaticCastINS_25TwoBodyConstraintSettingsENS_18ConstraintSettingsETnNSt9enable_ifIXoosr3stdE12is_base_of_vIT_T0_Esr3stdE12is_base_of_vIS5_S4_EEbE4typeELb1EEEPS4_RKNS_3RefIS5_EE(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH12PhysicsScene17FromPhysicsSystemEPKNS_13PhysicsSystemE(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr noundef %1) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.JPH::UnorderedMap.80", align 8
  %4 = alloca %"class.JPH::BodyID", align 4
  %5 = alloca %"class.JPH::Array.28", align 8
  %6 = alloca %"class.JPH::BodyLockRead", align 8
  %7 = alloca %"class.JPH::BodyCreationSettings", align 16
  %8 = alloca %"class.JPH::SoftBodyCreationSettings", align 16
  %9 = alloca %"class.JPH::Array.32", align 8
  %10 = alloca %"class.JPH::HashTable<JPH::BodyID, std::pair<JPH::BodyID, unsigned int>, JPH::UnorderedMapDetail<JPH::BodyID, unsigned int>, JPH::Hash<JPH::BodyID>, std::equal_to<JPH::BodyID>>::const_iterator", align 8
  %11 = alloca %"class.JPH::HashTable<JPH::BodyID, std::pair<JPH::BodyID, unsigned int>, JPH::UnorderedMapDetail<JPH::BodyID, unsigned int>, JPH::Hash<JPH::BodyID>, std::equal_to<JPH::BodyID>>::iterator", align 8
  %12 = alloca %"class.JPH::HashTable<JPH::BodyID, std::pair<JPH::BodyID, unsigned int>, JPH::UnorderedMapDetail<JPH::BodyID, unsigned int>, JPH::Hash<JPH::BodyID>, std::equal_to<JPH::BodyID>>::const_iterator", align 8
  %13 = alloca %"class.JPH::HashTable<JPH::BodyID, std::pair<JPH::BodyID, unsigned int>, JPH::UnorderedMapDetail<JPH::BodyID, unsigned int>, JPH::Hash<JPH::BodyID>, std::equal_to<JPH::BodyID>>::iterator", align 8
  %14 = alloca %"class.JPH::HashTable<JPH::BodyID, std::pair<JPH::BodyID, unsigned int>, JPH::UnorderedMapDetail<JPH::BodyID, unsigned int>, JPH::Hash<JPH::BodyID>, std::equal_to<JPH::BodyID>>::const_iterator", align 8
  %15 = alloca %"class.JPH::HashTable<JPH::BodyID, std::pair<JPH::BodyID, unsigned int>, JPH::UnorderedMapDetail<JPH::BodyID, unsigned int>, JPH::Hash<JPH::BodyID>, std::equal_to<JPH::BodyID>>::iterator", align 8
  %16 = alloca %"class.JPH::HashTable<JPH::BodyID, std::pair<JPH::BodyID, unsigned int>, JPH::UnorderedMapDetail<JPH::BodyID, unsigned int>, JPH::Hash<JPH::BodyID>, std::equal_to<JPH::BodyID>>::const_iterator", align 8
  %17 = alloca %"class.JPH::HashTable<JPH::BodyID, std::pair<JPH::BodyID, unsigned int>, JPH::UnorderedMapDetail<JPH::BodyID, unsigned int>, JPH::Hash<JPH::BodyID>, std::equal_to<JPH::BodyID>>::iterator", align 8
  %18 = alloca %"class.JPH::Ref.75", align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #6
  call void @_ZN3JPH12UnorderedMapINS_6BodyIDEjNS_4HashIS1_EESt8equal_toIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(28) %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  call void @_ZN3JPH6BodyIDC2Ev(ptr noundef nonnull align 4 dereferenceable(4) %4)
  %19 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3JPH12UnorderedMapINS_6BodyIDEjNS_4HashIS1_EESt8equal_toIS1_EEixERKS1_(ptr noundef nonnull align 8 dereferenceable(28) %3, ptr noundef nonnull align 4 dereferenceable(4) %4)
          to label %20 unwind label %26

20:                                               ; preds = %2
  store i32 -1, ptr %19, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #6
  call void @_ZN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  invoke void @_ZNK3JPH13PhysicsSystem9GetBodiesERNS_5ArrayINS_6BodyIDENS_12STLAllocatorIS2_EEEE(ptr noundef nonnull align 16 dereferenceable(1172) %1, ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %21 unwind label %28

21:                                               ; preds = %20
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3JPH13PhysicsSystem20GetBodyLockInterfaceEv(ptr noundef nonnull align 16 dereferenceable(1172) %1)
  %23 = call noundef ptr @_ZN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %5)
  %24 = call noundef ptr @_ZN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %5)
  %.not62 = icmp eq ptr %23, %24
  br i1 %.not62, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %21
  %25 = getelementptr inbounds i8, ptr %0, i64 8
  br label %30

._crit_edge:                                      ; preds = %63, %21
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #6
  invoke void @_ZNK3JPH13PhysicsSystem14GetConstraintsEv(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Array.32") align 8 %9, ptr noundef nonnull align 16 dereferenceable(1172) %1)
          to label %67 unwind label %70

26:                                               ; preds = %2
  %27 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  br label %136

28:                                               ; preds = %20
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %135

30:                                               ; preds = %.lr.ph, %63
  %.04263 = phi ptr [ %23, %.lr.ph ], [ %64, %63 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #6
  invoke void @_ZN3JPH12BodyLockReadCI2NS_12BodyLockBaseILb0EKNS_4BodyEEEERKNS_17BodyLockInterfaceERKNS_6BodyIDE(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 4 dereferenceable(4) %.04263)
          to label %31 unwind label %44

31:                                               ; preds = %30
  %32 = call noundef zeroext i1 @_ZNK3JPH12BodyLockBaseILb0EKNS_4BodyEE9SucceededEv(ptr noundef nonnull align 8 dereferenceable(24) %6)
  br i1 %32, label %33, label %63

33:                                               ; preds = %31
  %34 = call noundef i64 @_ZNK3JPH5ArrayINS_20BodyCreationSettingsENS_12STLAllocatorIS1_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %25)
  %35 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN3JPH12UnorderedMapINS_6BodyIDEjNS_4HashIS1_EESt8equal_toIS1_EEixERKS1_(ptr noundef nonnull align 8 dereferenceable(28) %3, ptr noundef nonnull align 4 dereferenceable(4) %.04263)
          to label %36 unwind label %46

36:                                               ; preds = %33
  %37 = trunc i64 %34 to i32
  store i32 %37, ptr %35, align 4, !tbaa !5
  %38 = invoke noundef nonnull align 16 dereferenceable(122) ptr @_ZNK3JPH12BodyLockBaseILb0EKNS_4BodyEE7GetBodyEv(ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %39 unwind label %48

39:                                               ; preds = %36
  %40 = call noundef zeroext i1 @_ZNK3JPH4Body11IsRigidBodyEv(ptr noundef nonnull align 16 dereferenceable(122) %38)
  br i1 %40, label %41, label %55

41:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %7) #6
  invoke void @_ZNK3JPH4Body23GetBodyCreationSettingsEv(ptr dead_on_unwind nonnull writable sret(%"class.JPH::BodyCreationSettings") align 16 %7, ptr noundef nonnull align 16 dereferenceable(122) %38)
          to label %42 unwind label %50

42:                                               ; preds = %41
  invoke void @_ZN3JPH12PhysicsScene7AddBodyERKNS_20BodyCreationSettingsE(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr noundef nonnull align 16 dereferenceable(256) %7)
          to label %43 unwind label %52

43:                                               ; preds = %42
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %7) #6
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %7) #6
  br label %63

44:                                               ; preds = %30
  %45 = landingpad { ptr, i32 }
          cleanup
  br label %66

46:                                               ; preds = %33
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %65

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

50:                                               ; preds = %41
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %54

52:                                               ; preds = %42
  %53 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256) %7) #6
  br label %54

54:                                               ; preds = %52, %50
  %.pn54 = phi { ptr, i32 } [ %53, %52 ], [ %51, %50 ]
  call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %7) #6
  br label %65

55:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 112, ptr nonnull %8) #6
  invoke void @_ZNK3JPH4Body27GetSoftBodyCreationSettingsEv(ptr dead_on_unwind nonnull writable sret(%"class.JPH::SoftBodyCreationSettings") align 16 %8, ptr noundef nonnull align 16 dereferenceable(122) %38)
          to label %56 unwind label %58

56:                                               ; preds = %55
  invoke void @_ZN3JPH12PhysicsScene11AddSoftBodyERKNS_24SoftBodyCreationSettingsE(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr noundef nonnull align 16 dereferenceable(111) %8)
          to label %57 unwind label %60

57:                                               ; preds = %56
  call void @_ZN3JPH24SoftBodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(111) %8) #6
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %8) #6
  br label %63

58:                                               ; preds = %55
  %59 = landingpad { ptr, i32 }
          cleanup
  br label %62

60:                                               ; preds = %56
  %61 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3JPH24SoftBodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(111) %8) #6
  br label %62

62:                                               ; preds = %60, %58
  %.pn52 = phi { ptr, i32 } [ %61, %60 ], [ %59, %58 ]
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %8) #6
  br label %65

63:                                               ; preds = %43, %57, %31
  call void @_ZN3JPH12BodyLockBaseILb0EKNS_4BodyEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  %64 = getelementptr inbounds i8, ptr %.04263, i64 4
  %.not = icmp eq ptr %64, %24
  br i1 %.not, label %._crit_edge, label %30

65:                                               ; preds = %48, %54, %62, %46
  %.pn54.pn.pn = phi { ptr, i32 } [ %47, %46 ], [ %.pn54, %54 ], [ %.pn52, %62 ], [ %49, %48 ]
  call void @_ZN3JPH12BodyLockBaseILb0EKNS_4BodyEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  br label %66

66:                                               ; preds = %65, %44
  %.pn54.pn.pn.pn = phi { ptr, i32 } [ %.pn54.pn.pn, %65 ], [ %45, %44 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  br label %135

67:                                               ; preds = %._crit_edge
  %68 = call noundef ptr @_ZN3JPH5ArrayINS_3RefINS_10ConstraintEEENS_12STLAllocatorIS3_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %9)
  %69 = call noundef ptr @_ZN3JPH5ArrayINS_3RefINS_10ConstraintEEENS_12STLAllocatorIS3_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %9)
  %.not4464 = icmp eq ptr %68, %69
  br i1 %.not4464, label %._crit_edge68, label %.lr.ph67

._crit_edge68:                                    ; preds = %131, %67
  call void @_ZN3JPH5ArrayINS_3RefINS_10ConstraintEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #6
  call void @_ZN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  call void @_ZN3JPH9HashTableINS_6BodyIDESt4pairIS1_jENS_18UnorderedMapDetailIS1_jEENS_4HashIS1_EESt8equal_toIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(28) %3) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #6
  ret void

70:                                               ; preds = %._crit_edge
  %71 = landingpad { ptr, i32 }
          cleanup
  br label %134

.lr.ph67:                                         ; preds = %67, %131
  %.04365 = phi ptr [ %132, %131 ], [ %68, %67 ]
  %72 = call noundef ptr @_ZNK3JPH3RefINS_10ConstraintEEcvPS1_Ev(ptr noundef nonnull align 8 dereferenceable(8) %.04365)
  %73 = load ptr, ptr %72, align 8, !tbaa !9
  %74 = getelementptr inbounds i8, ptr %73, i64 16
  %75 = load ptr, ptr %74, align 8
  %76 = invoke noundef i32 %75(ptr noundef nonnull align 8 dereferenceable(32) %72)
          to label %77 unwind label %97

77:                                               ; preds = %.lr.ph67
  %78 = icmp eq i32 %76, 1
  br i1 %78, label %79, label %131

79:                                               ; preds = %77
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #6
  %80 = call noundef ptr @_ZNK3JPH17TwoBodyConstraint8GetBody1Ev(ptr noundef nonnull align 8 dereferenceable(48) %72)
  %81 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH4Body5GetIDEv(ptr noundef nonnull align 16 dereferenceable(122) %80)
  invoke void @_ZN3JPH12UnorderedMapINS_6BodyIDEjNS_4HashIS1_EESt8equal_toIS1_EE4findERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.JPH::HashTable<JPH::BodyID, std::pair<JPH::BodyID, unsigned int>, JPH::UnorderedMapDetail<JPH::BodyID, unsigned int>, JPH::Hash<JPH::BodyID>, std::equal_to<JPH::BodyID>>::iterator") align 8 %11, ptr noundef nonnull align 8 dereferenceable(28) %3, ptr noundef nonnull align 4 dereferenceable(4) %81)
          to label %82 unwind label %99

82:                                               ; preds = %79
  call void @_ZN3JPH9HashTableINS_6BodyIDESt4pairIS1_jENS_18UnorderedMapDetailIS1_jEENS_4HashIS1_EESt8equal_toIS1_EE14const_iteratorC2ERKNSA_8iteratorE(ptr noundef nonnull align 8 dereferenceable(12) %10, ptr noundef nonnull align 8 dereferenceable(12) %11)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #6
  %83 = call noundef ptr @_ZNK3JPH17TwoBodyConstraint8GetBody2Ev(ptr noundef nonnull align 8 dereferenceable(48) %72)
  %84 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK3JPH4Body5GetIDEv(ptr noundef nonnull align 16 dereferenceable(122) %83)
  invoke void @_ZN3JPH12UnorderedMapINS_6BodyIDEjNS_4HashIS1_EESt8equal_toIS1_EE4findERKS1_(ptr dead_on_unwind nonnull writable sret(%"class.JPH::HashTable<JPH::BodyID, std::pair<JPH::BodyID, unsigned int>, JPH::UnorderedMapDetail<JPH::BodyID, unsigned int>, JPH::Hash<JPH::BodyID>, std::equal_to<JPH::BodyID>>::iterator") align 8 %13, ptr noundef nonnull align 8 dereferenceable(28) %3, ptr noundef nonnull align 4 dereferenceable(4) %84)
          to label %85 unwind label %101

85:                                               ; preds = %82
  call void @_ZN3JPH9HashTableINS_6BodyIDESt4pairIS1_jENS_18UnorderedMapDetailIS1_jEENS_4HashIS1_EESt8equal_toIS1_EE14const_iteratorC2ERKNSA_8iteratorE(ptr noundef nonnull align 8 dereferenceable(12) %12, ptr noundef nonnull align 8 dereferenceable(12) %13)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %17) #6
  invoke void @_ZN3JPH9HashTableINS_6BodyIDESt4pairIS1_jENS_18UnorderedMapDetailIS1_jEENS_4HashIS1_EESt8equal_toIS1_EE3endEv(ptr dead_on_unwind nonnull writable sret(%"class.JPH::HashTable<JPH::BodyID, std::pair<JPH::BodyID, unsigned int>, JPH::UnorderedMapDetail<JPH::BodyID, unsigned int>, JPH::Hash<JPH::BodyID>, std::equal_to<JPH::BodyID>>::iterator") align 8 %15, ptr noundef nonnull align 8 dereferenceable(28) %3)
          to label %86 unwind label %103

86:                                               ; preds = %85
  call void @_ZN3JPH9HashTableINS_6BodyIDESt4pairIS1_jENS_18UnorderedMapDetailIS1_jEENS_4HashIS1_EESt8equal_toIS1_EE14const_iteratorC2ERKNSA_8iteratorE(ptr noundef nonnull align 8 dereferenceable(12) %14, ptr noundef nonnull align 8 dereferenceable(12) %15)
  %87 = invoke noundef zeroext i1 @_ZNK3JPH9HashTableINS_6BodyIDESt4pairIS1_jENS_18UnorderedMapDetailIS1_jEENS_4HashIS1_EESt8equal_toIS1_EE12IteratorBaseIKSA_NSA_14const_iteratorEEneERKSD_(ptr noundef nonnull align 8 dereferenceable(12) %10, ptr noundef nonnull align 8 dereferenceable(12) %14)
          to label %88 unwind label %103

88:                                               ; preds = %86
  br i1 %87, label %89, label %93

89:                                               ; preds = %88
  invoke void @_ZN3JPH9HashTableINS_6BodyIDESt4pairIS1_jENS_18UnorderedMapDetailIS1_jEENS_4HashIS1_EESt8equal_toIS1_EE3endEv(ptr dead_on_unwind nonnull writable sret(%"class.JPH::HashTable<JPH::BodyID, std::pair<JPH::BodyID, unsigned int>, JPH::UnorderedMapDetail<JPH::BodyID, unsigned int>, JPH::Hash<JPH::BodyID>, std::equal_to<JPH::BodyID>>::iterator") align 8 %17, ptr noundef nonnull align 8 dereferenceable(28) %3)
          to label %90 unwind label %105

90:                                               ; preds = %89
  call void @_ZN3JPH9HashTableINS_6BodyIDESt4pairIS1_jENS_18UnorderedMapDetailIS1_jEENS_4HashIS1_EESt8equal_toIS1_EE14const_iteratorC2ERKNSA_8iteratorE(ptr noundef nonnull align 8 dereferenceable(12) %16, ptr noundef nonnull align 8 dereferenceable(12) %17)
  %91 = invoke noundef zeroext i1 @_ZNK3JPH9HashTableINS_6BodyIDESt4pairIS1_jENS_18UnorderedMapDetailIS1_jEENS_4HashIS1_EESt8equal_toIS1_EE12IteratorBaseIKSA_NSA_14const_iteratorEEneERKSD_(ptr noundef nonnull align 8 dereferenceable(12) %12, ptr noundef nonnull align 8 dereferenceable(12) %16)
          to label %92 unwind label %105

92:                                               ; preds = %90
  br i1 %91, label %.critedge, label %93

93:                                               ; preds = %92, %88
  %94 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, i32 noundef 253)
          to label %95 unwind label %105

95:                                               ; preds = %93
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #6
  br i1 %94, label %96, label %108

96:                                               ; preds = %95
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #6, !srcloc !11
  br label %108

97:                                               ; preds = %.lr.ph67
  %98 = landingpad { ptr, i32 }
          cleanup
  br label %133

99:                                               ; preds = %79
  %100 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #6
  br label %130

101:                                              ; preds = %82
  %102 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #6
  br label %129

103:                                              ; preds = %86, %85
  %104 = landingpad { ptr, i32 }
          cleanup
  br label %107

105:                                              ; preds = %93, %90, %89
  %106 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #6
  br label %107

107:                                              ; preds = %105, %103
  %.pn = phi { ptr, i32 } [ %106, %105 ], [ %104, %103 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #6
  br label %129

.critedge:                                        ; preds = %92
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #6
  br label %108

108:                                              ; preds = %.critedge, %96, %95
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %18) #6
  %109 = load ptr, ptr %72, align 8, !tbaa !9
  %110 = getelementptr inbounds i8, ptr %109, i64 120
  %111 = load ptr, ptr %110, align 8
  invoke void %111(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Ref.75") align 8 %18, ptr noundef nonnull align 8 dereferenceable(32) %72)
          to label %112 unwind label %124

112:                                              ; preds = %108
  %113 = invoke noundef ptr @_ZN3JPH10StaticCastINS_25TwoBodyConstraintSettingsENS_18ConstraintSettingsETnNSt9enable_ifIXoosr3stdE12is_base_of_vIT_T0_Esr3stdE12is_base_of_vIS5_S4_EEbE4typeELb1EEEPS4_RKNS_3RefIS5_EE(ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %114 unwind label %126

114:                                              ; preds = %112
  %115 = invoke noundef ptr @_ZNK3JPH9HashTableINS_6BodyIDESt4pairIS1_jENS_18UnorderedMapDetailIS1_jEENS_4HashIS1_EESt8equal_toIS1_EE12IteratorBaseIKSA_NSA_14const_iteratorEEptEv(ptr noundef nonnull align 8 dereferenceable(12) %10)
          to label %116 unwind label %126

116:                                              ; preds = %114
  %117 = getelementptr inbounds i8, ptr %115, i64 4
  %118 = load i32, ptr %117, align 4, !tbaa !12
  %119 = invoke noundef ptr @_ZNK3JPH9HashTableINS_6BodyIDESt4pairIS1_jENS_18UnorderedMapDetailIS1_jEENS_4HashIS1_EESt8equal_toIS1_EE12IteratorBaseIKSA_NSA_14const_iteratorEEptEv(ptr noundef nonnull align 8 dereferenceable(12) %12)
          to label %120 unwind label %126

120:                                              ; preds = %116
  %121 = getelementptr inbounds i8, ptr %119, i64 4
  %122 = load i32, ptr %121, align 4, !tbaa !12
  invoke void @_ZN3JPH12PhysicsScene13AddConstraintEPKNS_25TwoBodyConstraintSettingsEjj(ptr noundef nonnull align 8 dereferenceable(80) %0, ptr noundef %113, i32 noundef %118, i32 noundef %122)
          to label %123 unwind label %126

123:                                              ; preds = %120
  call void @_ZN3JPH3RefINS_18ConstraintSettingsEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #6
  br label %131

124:                                              ; preds = %108
  %125 = landingpad { ptr, i32 }
          cleanup
  br label %128

126:                                              ; preds = %120, %116, %114, %112
  %127 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3JPH3RefINS_18ConstraintSettingsEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %18) #6
  br label %128

128:                                              ; preds = %126, %124
  %.pn46 = phi { ptr, i32 } [ %127, %126 ], [ %125, %124 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %18) #6
  br label %129

129:                                              ; preds = %128, %107, %101
  %.pn46.pn = phi { ptr, i32 } [ %.pn46, %128 ], [ %.pn, %107 ], [ %102, %101 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #6
  br label %130

130:                                              ; preds = %129, %99
  %.pn46.pn.pn = phi { ptr, i32 } [ %.pn46.pn, %129 ], [ %100, %99 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #6
  br label %133

131:                                              ; preds = %123, %77
  %132 = getelementptr inbounds i8, ptr %.04365, i64 8
  %.not44 = icmp eq ptr %132, %69
  br i1 %.not44, label %._crit_edge68, label %.lr.ph67

133:                                              ; preds = %130, %97
  %.pn46.pn.pn.pn = phi { ptr, i32 } [ %.pn46.pn.pn, %130 ], [ %98, %97 ]
  call void @_ZN3JPH5ArrayINS_3RefINS_10ConstraintEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  br label %134

134:                                              ; preds = %133, %70
  %.pn46.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn46.pn.pn.pn, %133 ], [ %71, %70 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #6
  br label %135

135:                                              ; preds = %66, %134, %28
  %.pn54.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %29, %28 ], [ %.pn54.pn.pn.pn, %66 ], [ %.pn46.pn.pn.pn.pn, %134 ]
  call void @_ZN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  br label %136

136:                                              ; preds = %135, %26
  %.pn54.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn54.pn.pn.pn.pn.pn, %135 ], [ %27, %26 ]
  call void @_ZN3JPH9HashTableINS_6BodyIDESt4pairIS1_jENS_18UnorderedMapDetailIS1_jEENS_4HashIS1_EESt8equal_toIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(28) %3) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #6
  resume { ptr, i32 } %.pn54.pn.pn.pn.pn.pn.pn
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3JPH13PhysicsSystem9GetBodiesERNS_5ArrayINS_6BodyIDENS_12STLAllocatorIS2_EEEE(ptr noundef nonnull align 16 dereferenceable(1172), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(122) ptr @_ZNK3JPH12BodyLockBaseILb0EKNS_4BodyEE7GetBodyEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4 align 2

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

declare void @_ZNK3JPH4Body23GetBodyCreationSettingsEv(ptr dead_on_unwind writable sret(%"class.JPH::BodyCreationSettings") align 16, ptr noundef nonnull align 16 dereferenceable(122)) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH20BodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(256)) unnamed_addr #3 align 2

declare void @_ZNK3JPH4Body27GetSoftBodyCreationSettingsEv(ptr dead_on_unwind writable sret(%"class.JPH::SoftBodyCreationSettings") align 16, ptr noundef nonnull align 16 dereferenceable(122)) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH24SoftBodyCreationSettingsD2Ev(ptr noundef nonnull align 16 dereferenceable(111)) unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK3JPH13PhysicsSystem14GetConstraintsEv(ptr dead_on_unwind noalias writable sret(%"class.JPH::Array.32") align 8, ptr noundef nonnull align 16 dereferenceable(1172)) local_unnamed_addr #1 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH12UnorderedMapINS_6BodyIDEjNS_4HashIS1_EESt8equal_toIS1_EE4findERKS1_(ptr dead_on_unwind noalias writable sret(%"class.JPH::HashTable<JPH::BodyID, std::pair<JPH::BodyID, unsigned int>, JPH::UnorderedMapDetail<JPH::BodyID, unsigned int>, JPH::Hash<JPH::BodyID>, std::equal_to<JPH::BodyID>>::iterator") align 8, ptr noundef nonnull align 8 dereferenceable(28), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK3JPH9HashTableINS_6BodyIDESt4pairIS1_jENS_18UnorderedMapDetailIS1_jEENS_4HashIS1_EESt8equal_toIS1_EE12IteratorBaseIKSA_NSA_14const_iteratorEEneERKSD_(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(12)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH9HashTableINS_6BodyIDESt4pairIS1_jENS_18UnorderedMapDetailIS1_jEENS_4HashIS1_EESt8equal_toIS1_EE3endEv(ptr dead_on_unwind noalias writable sret(%"class.JPH::HashTable<JPH::BodyID, std::pair<JPH::BodyID, unsigned int>, JPH::UnorderedMapDetail<JPH::BodyID, unsigned int>, JPH::Hash<JPH::BodyID>, std::equal_to<JPH::BodyID>>::iterator") align 8, ptr noundef nonnull align 8 dereferenceable(28)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZNK3JPH9HashTableINS_6BodyIDESt4pairIS1_jENS_18UnorderedMapDetailIS1_jEENS_4HashIS1_EESt8equal_toIS1_EE12IteratorBaseIKSA_NSA_14const_iteratorEEptEv(ptr noundef nonnull align 8 dereferenceable(12)) local_unnamed_addr #1 align 2

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

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress 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 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"vtable pointer", !8, i64 0}
!11 = !{i64 2159439872}
!12 = !{!13, !6, i64 4}
!13 = !{!"_ZTSSt4pairIN3JPH6BodyIDEjE", !14, i64 0, !6, i64 4}
!14 = !{!"_ZTSN3JPH6BodyIDE", !6, i64 0}


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