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

; 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::Result.54" = type <{ %union.anon.55, i8, [7 x i8] }>
%union.anon.55 = type { %"class.std::__cxx11::basic_string" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char, std::char_traits<char>, JPH::STLAllocator<char>>::_Alloc_hider", i64, %union.anon.21 }
%"struct.std::__cxx11::basic_string<char, std::char_traits<char>, JPH::STLAllocator<char>>::_Alloc_hider" = type { ptr }
%union.anon.21 = type { i64, [8 x i8] }
%"class.JPH::Ref.56" = type { ptr }
%"class.JPH::Array.58" = type { i64, i64, ptr }
%"class.JPH::Array.61" = type { i64, i64, ptr }
%"class.JPH::Array.64" = type { i64, i64, ptr }
%"class.JPH::Array.67" = type { i64, i64, ptr }
%"class.JPH::Result.70" = type <{ %union.anon.71, i8, [15 x i8] }>
%union.anon.71 = type { %"class.JPH::BodyCreationSettings" }
%"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.std::basic_string_view" = type { i64, ptr }
%"class.JPH::Result.73" = type <{ %union.anon.74, i8, [7 x i8] }>
%union.anon.74 = type { %"class.std::__cxx11::basic_string" }
%"class.JPH::Result.77" = type <{ %union.anon.78, i8, [15 x i8] }>
%union.anon.78 = type { %"class.std::__cxx11::basic_string", [80 x i8] }
%"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 }
%"class.JPH::PhysicsScene::ConnectedConstraint" = type { %"class.JPH::RefConst.15", i32, i32 }
%"class.JPH::RefConst.15" = 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 }

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH12PhysicsScene23sRestoreFromBinaryStateERNS_8StreamInE(ptr dead_on_unwind noalias writable sret(%"class.JPH::Result.54") align 8 %0, ptr noundef nonnull align 8 dereferenceable(8) %1) #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i1, align 1
  %6 = alloca %"class.JPH::Ref.56", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.JPH::Array.58", align 8
  %10 = alloca %"class.JPH::Array.61", align 8
  %11 = alloca %"class.JPH::Array.64", align 8
  %12 = alloca %"class.JPH::Array.67", align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca %"class.JPH::Result.70", align 16
  %20 = alloca %"class.std::basic_string_view", 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::Result.73", align 8
  %26 = alloca %"class.std::basic_string_view", align 8
  %27 = alloca ptr, align 8
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca ptr, align 8
  %31 = alloca %"class.JPH::Result.77", align 16
  %32 = alloca %"class.std::basic_string_view", align 8
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  store i1 false, ptr %5, align 1
  call void @_ZN3JPH6ResultINS_3RefINS_12PhysicsSceneEEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(33) %0)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #8
  %33 = invoke noundef ptr @_ZN3JPH12PhysicsScenenwEm(i64 noundef 80)
          to label %34 unwind label %61

34:                                               ; preds = %2
  call void @llvm.memset.p0.i64(ptr align 8 %33, i8 0, i64 80, i1 false)
  call void @_ZN3JPH12PhysicsSceneC2Ev(ptr noundef nonnull align 8 dereferenceable(80) %33) #8
  invoke void @_ZN3JPH3RefINS_12PhysicsSceneEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef %33)
          to label %35 unwind label %61

35:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #8
  call void @_ZN3JPH5ArrayINS_3RefINS_5ShapeEEENS_12STLAllocatorIS3_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #8
  call void @_ZN3JPH5ArrayINS_3RefINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #8
  call void @_ZN3JPH5ArrayINS_3RefINS_11GroupFilterEEENS_12STLAllocatorIS3_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #8
  call void @_ZN3JPH5ArrayINS_3RefINS_22SoftBodySharedSettingsEEENS_12STLAllocatorIS3_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #8
  invoke void @_ZN3JPH5ArrayINS_3RefINS_5ShapeEEENS_12STLAllocatorIS3_EEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef 1024)
          to label %36 unwind label %65

36:                                               ; preds = %35
  invoke void @_ZN3JPH5ArrayINS_3RefINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef 128)
          to label %37 unwind label %65

37:                                               ; preds = %36
  invoke void @_ZN3JPH5ArrayINS_3RefINS_11GroupFilterEEENS_12STLAllocatorIS3_EEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef 128)
          to label %38 unwind label %65

38:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  store i32 0, ptr %13, align 4, !tbaa !9
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZN3JPH8StreamIn4ReadIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8) %39, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %40 unwind label %69

40:                                               ; preds = %38
  %41 = invoke noundef ptr @_ZNK3JPH3RefINS_12PhysicsSceneEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %42 unwind label %69

42:                                               ; preds = %40
  %43 = getelementptr inbounds %"class.JPH::PhysicsScene", ptr %41, i32 0, i32 1
  %44 = load i32, ptr %13, align 4, !tbaa !9
  %45 = zext i32 %44 to i64
  invoke void @_ZN3JPH5ArrayINS_20BodyCreationSettingsENS_12STLAllocatorIS1_EEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %43, i64 noundef %45)
          to label %46 unwind label %69

46:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #8
  %47 = invoke noundef ptr @_ZNK3JPH3RefINS_12PhysicsSceneEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %48 unwind label %73

48:                                               ; preds = %46
  %49 = getelementptr inbounds %"class.JPH::PhysicsScene", ptr %47, i32 0, i32 1
  store ptr %49, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #8
  %50 = load ptr, ptr %14, align 8, !tbaa !5
  %51 = invoke noundef ptr @_ZN3JPH5ArrayINS_20BodyCreationSettingsENS_12STLAllocatorIS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %50)
          to label %52 unwind label %77

52:                                               ; preds = %48
  store ptr %51, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %53 = load ptr, ptr %14, align 8, !tbaa !5
  %54 = invoke noundef ptr @_ZN3JPH5ArrayINS_20BodyCreationSettingsENS_12STLAllocatorIS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %53)
          to label %55 unwind label %81

55:                                               ; preds = %52
  store ptr %54, ptr %16, align 8, !tbaa !5
  br label %56

56:                                               ; preds = %124, %55
  %57 = load ptr, ptr %15, align 8, !tbaa !5
  %58 = load ptr, ptr %16, align 8, !tbaa !5
  %59 = icmp ne ptr %57, %58
  br i1 %59, label %85, label %60

60:                                               ; preds = %56
  store i32 2, ptr %17, align 4
  br label %129

61:                                               ; preds = %34, %2
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %7, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %8, align 4
  br label %319

65:                                               ; preds = %37, %36, %35
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %7, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %8, align 4
  br label %318

69:                                               ; preds = %313, %233, %231, %229, %138, %136, %134, %42, %40, %38
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %7, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %8, align 4
  br label %317

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

77:                                               ; preds = %48
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %7, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %8, align 4
  br label %132

81:                                               ; preds = %52
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %7, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %8, align 4
  br label %131

85:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  %86 = load ptr, ptr %15, align 8, !tbaa !5
  store ptr %86, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 272, ptr %19) #8
  %87 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZN3JPH20BodyCreationSettings20sRestoreWithChildrenERNS_8StreamInERNS_5ArrayINS_3RefINS_5ShapeEEENS_12STLAllocatorIS6_EEEERNS3_INS4_INS_15PhysicsMaterialEEENS7_ISC_EEEERNS3_INS4_INS_11GroupFilterEEENS7_ISH_EEEE(ptr dead_on_unwind writable sret(%"class.JPH::Result.70") align 16 %19, ptr noundef nonnull align 8 dereferenceable(8) %87, ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %11)
          to label %88 unwind label %100

88:                                               ; preds = %85
  %89 = invoke noundef zeroext i1 @_ZNK3JPH6ResultINS_20BodyCreationSettingsEE8HasErrorEv(ptr noundef nonnull align 16 dereferenceable(257) %19)
          to label %90 unwind label %104

90:                                               ; preds = %88
  br i1 %89, label %91, label %112

91:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #8
  %92 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK3JPH6ResultINS_20BodyCreationSettingsEE8GetErrorB5cxx11Ev(ptr noundef nonnull align 16 dereferenceable(257) %19)
          to label %93 unwind label %108

93:                                               ; preds = %91
  %94 = call { i64, ptr } @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcEN3JPH12STLAllocatorIcEEEcvSt17basic_string_viewIcS2_EEv(ptr noundef nonnull align 8 dereferenceable(32) %92) #8
  %95 = getelementptr inbounds { i64, ptr }, ptr %20, i32 0, i32 0
  %96 = extractvalue { i64, ptr } %94, 0
  store i64 %96, ptr %95, align 8
  %97 = getelementptr inbounds { i64, ptr }, ptr %20, i32 0, i32 1
  %98 = extractvalue { i64, ptr } %94, 1
  store ptr %98, ptr %97, align 8
  invoke void @_ZN3JPH6ResultINS_3RefINS_12PhysicsSceneEEEE8SetErrorERKSt17basic_string_viewIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(33) %0, ptr noundef nonnull align 8 dereferenceable(16) %20)
          to label %99 unwind label %108

99:                                               ; preds = %93
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #8
  store i1 true, ptr %5, align 1
  store i32 1, ptr %17, align 4
  br label %118

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

104:                                              ; preds = %114, %112, %88
  %105 = landingpad { ptr, i32 }
          cleanup
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %7, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %8, align 4
  br label %127

108:                                              ; preds = %93, %91
  %109 = landingpad { ptr, i32 }
          cleanup
  %110 = extractvalue { ptr, i32 } %109, 0
  store ptr %110, ptr %7, align 8
  %111 = extractvalue { ptr, i32 } %109, 1
  store i32 %111, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #8
  br label %127

112:                                              ; preds = %90
  %113 = invoke noundef nonnull align 16 dereferenceable(256) ptr @_ZNK3JPH6ResultINS_20BodyCreationSettingsEE3GetEv(ptr noundef nonnull align 16 dereferenceable(257) %19)
          to label %114 unwind label %104

114:                                              ; preds = %112
  %115 = load ptr, ptr %18, align 8, !tbaa !5
  %116 = invoke noundef nonnull align 16 dereferenceable(256) ptr @_ZN3JPH20BodyCreationSettingsaSERKS0_(ptr noundef nonnull align 16 dereferenceable(256) %115, ptr noundef nonnull align 16 dereferenceable(256) %113)
          to label %117 unwind label %104

117:                                              ; preds = %114
  store i32 0, ptr %17, align 4
  br label %118

118:                                              ; preds = %117, %99
  call void @_ZN3JPH6ResultINS_20BodyCreationSettingsEED2Ev(ptr noundef nonnull align 16 dereferenceable(257) %19) #8
  call void @llvm.lifetime.end.p0(i64 272, ptr %19) #8
  %119 = load i32, ptr %17, align 4
  switch i32 %119, label %121 [
    i32 0, label %120
  ]

120:                                              ; preds = %118
  store i32 0, ptr %17, align 4
  br label %121

121:                                              ; preds = %120, %118
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  %122 = load i32, ptr %17, align 4
  switch i32 %122, label %129 [
    i32 0, label %123
  ]

123:                                              ; preds = %121
  br label %124

124:                                              ; preds = %123
  %125 = load ptr, ptr %15, align 8, !tbaa !5
  %126 = getelementptr inbounds %"class.JPH::BodyCreationSettings", ptr %125, i32 1
  store ptr %126, ptr %15, align 8, !tbaa !5
  br label %56

127:                                              ; preds = %108, %104
  call void @_ZN3JPH6ResultINS_20BodyCreationSettingsEED2Ev(ptr noundef nonnull align 16 dereferenceable(257) %19) #8
  br label %128

128:                                              ; preds = %127, %100
  call void @llvm.lifetime.end.p0(i64 272, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  br label %131

129:                                              ; preds = %121, %60
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  %130 = load i32, ptr %17, align 4
  switch i32 %130, label %315 [
    i32 2, label %134
  ]

131:                                              ; preds = %128, %81
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  br label %132

132:                                              ; preds = %131, %77
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #8
  br label %133

133:                                              ; preds = %132, %73
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #8
  br label %317

134:                                              ; preds = %129
  store i32 0, ptr %13, align 4, !tbaa !9
  %135 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZN3JPH8StreamIn4ReadIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8) %135, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %136 unwind label %69

136:                                              ; preds = %134
  %137 = invoke noundef ptr @_ZNK3JPH3RefINS_12PhysicsSceneEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %138 unwind label %69

138:                                              ; preds = %136
  %139 = getelementptr inbounds %"class.JPH::PhysicsScene", ptr %137, i32 0, i32 2
  %140 = load i32, ptr %13, align 4, !tbaa !9
  %141 = zext i32 %140 to i64
  invoke void @_ZN3JPH5ArrayINS_12PhysicsScene19ConnectedConstraintENS_12STLAllocatorIS2_EEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %139, i64 noundef %141)
          to label %142 unwind label %69

142:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  %143 = invoke noundef ptr @_ZNK3JPH3RefINS_12PhysicsSceneEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %144 unwind label %157

144:                                              ; preds = %142
  %145 = getelementptr inbounds %"class.JPH::PhysicsScene", ptr %143, i32 0, i32 2
  store ptr %145, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  %146 = load ptr, ptr %21, align 8, !tbaa !5
  %147 = invoke noundef ptr @_ZN3JPH5ArrayINS_12PhysicsScene19ConnectedConstraintENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %146)
          to label %148 unwind label %161

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

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

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

156:                                              ; preds = %152
  store i32 4, ptr %17, align 4
  br label %224

157:                                              ; preds = %142
  %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 %228

161:                                              ; preds = %144
  %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 %227

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 %226

169:                                              ; preds = %152
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #8
  %170 = load ptr, ptr %22, align 8, !tbaa !5
  store ptr %170, ptr %24, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 40, ptr %25) #8
  %171 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZN3JPH18ConstraintSettings23sRestoreFromBinaryStateERNS_8StreamInE(ptr dead_on_unwind writable sret(%"class.JPH::Result.73") align 8 %25, ptr noundef nonnull align 8 dereferenceable(8) %171)
          to label %172 unwind label %184

172:                                              ; preds = %169
  %173 = invoke noundef zeroext i1 @_ZNK3JPH6ResultINS_3RefINS_18ConstraintSettingsEEEE8HasErrorEv(ptr noundef nonnull align 8 dereferenceable(33) %25)
          to label %174 unwind label %188

174:                                              ; preds = %172
  br i1 %173, label %175, label %196

175:                                              ; preds = %174
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #8
  %176 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK3JPH6ResultINS_3RefINS_18ConstraintSettingsEEEE8GetErrorB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(33) %25)
          to label %177 unwind label %192

177:                                              ; preds = %175
  %178 = call { i64, ptr } @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcEN3JPH12STLAllocatorIcEEEcvSt17basic_string_viewIcS2_EEv(ptr noundef nonnull align 8 dereferenceable(32) %176) #8
  %179 = getelementptr inbounds { i64, ptr }, ptr %26, i32 0, i32 0
  %180 = extractvalue { i64, ptr } %178, 0
  store i64 %180, ptr %179, align 8
  %181 = getelementptr inbounds { i64, ptr }, ptr %26, i32 0, i32 1
  %182 = extractvalue { i64, ptr } %178, 1
  store ptr %182, ptr %181, align 8
  invoke void @_ZN3JPH6ResultINS_3RefINS_12PhysicsSceneEEEE8SetErrorERKSt17basic_string_viewIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(33) %0, ptr noundef nonnull align 8 dereferenceable(16) %26)
          to label %183 unwind label %192

183:                                              ; preds = %177
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #8
  store i1 true, ptr %5, align 1
  store i32 1, ptr %17, align 4
  br label %213

184:                                              ; preds = %169
  %185 = landingpad { ptr, i32 }
          cleanup
  %186 = extractvalue { ptr, i32 } %185, 0
  store ptr %186, ptr %7, align 8
  %187 = extractvalue { ptr, i32 } %185, 1
  store i32 %187, ptr %8, align 4
  br label %223

188:                                              ; preds = %208, %204, %200, %198, %196, %172
  %189 = landingpad { ptr, i32 }
          cleanup
  %190 = extractvalue { ptr, i32 } %189, 0
  store ptr %190, ptr %7, align 8
  %191 = extractvalue { ptr, i32 } %189, 1
  store i32 %191, ptr %8, align 4
  br label %222

192:                                              ; preds = %177, %175
  %193 = landingpad { ptr, i32 }
          cleanup
  %194 = extractvalue { ptr, i32 } %193, 0
  store ptr %194, ptr %7, align 8
  %195 = extractvalue { ptr, i32 } %193, 1
  store i32 %195, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #8
  br label %222

196:                                              ; preds = %174
  %197 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3JPH6ResultINS_3RefINS_18ConstraintSettingsEEEE3GetEv(ptr noundef nonnull align 8 dereferenceable(33) %25)
          to label %198 unwind label %188

198:                                              ; preds = %196
  %199 = 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) %197)
          to label %200 unwind label %188

200:                                              ; preds = %198
  %201 = load ptr, ptr %24, align 8, !tbaa !5
  %202 = getelementptr inbounds %"class.JPH::PhysicsScene::ConnectedConstraint", ptr %201, i32 0, i32 0
  %203 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH8RefConstINS_25TwoBodyConstraintSettingsEEaSEPKS1_(ptr noundef nonnull align 8 dereferenceable(8) %202, ptr noundef %199)
          to label %204 unwind label %188

204:                                              ; preds = %200
  %205 = load ptr, ptr %4, align 8, !tbaa !5
  %206 = load ptr, ptr %24, align 8, !tbaa !5
  %207 = getelementptr inbounds %"class.JPH::PhysicsScene::ConnectedConstraint", ptr %206, i32 0, i32 1
  invoke void @_ZN3JPH8StreamIn4ReadIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8) %205, ptr noundef nonnull align 4 dereferenceable(4) %207)
          to label %208 unwind label %188

208:                                              ; preds = %204
  %209 = load ptr, ptr %4, align 8, !tbaa !5
  %210 = load ptr, ptr %24, align 8, !tbaa !5
  %211 = getelementptr inbounds %"class.JPH::PhysicsScene::ConnectedConstraint", ptr %210, i32 0, i32 2
  invoke void @_ZN3JPH8StreamIn4ReadIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8) %209, ptr noundef nonnull align 4 dereferenceable(4) %211)
          to label %212 unwind label %188

212:                                              ; preds = %208
  store i32 0, ptr %17, align 4
  br label %213

213:                                              ; preds = %212, %183
  call void @_ZN3JPH6ResultINS_3RefINS_18ConstraintSettingsEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %25) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr %25) #8
  %214 = load i32, ptr %17, align 4
  switch i32 %214, label %216 [
    i32 0, label %215
  ]

215:                                              ; preds = %213
  store i32 0, ptr %17, align 4
  br label %216

216:                                              ; preds = %215, %213
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  %217 = load i32, ptr %17, align 4
  switch i32 %217, label %224 [
    i32 0, label %218
  ]

218:                                              ; preds = %216
  br label %219

219:                                              ; preds = %218
  %220 = load ptr, ptr %22, align 8, !tbaa !5
  %221 = getelementptr inbounds %"class.JPH::PhysicsScene::ConnectedConstraint", ptr %220, i32 1
  store ptr %221, ptr %22, align 8, !tbaa !5
  br label %152

222:                                              ; preds = %192, %188
  call void @_ZN3JPH6ResultINS_3RefINS_18ConstraintSettingsEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %25) #8
  br label %223

223:                                              ; preds = %222, %184
  call void @llvm.lifetime.end.p0(i64 40, ptr %25) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #8
  br label %226

224:                                              ; preds = %216, %156
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  %225 = load i32, ptr %17, align 4
  switch i32 %225, label %315 [
    i32 4, label %229
  ]

226:                                              ; preds = %223, %165
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #8
  br label %227

227:                                              ; preds = %226, %161
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  br label %228

228:                                              ; preds = %227, %157
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  br label %317

229:                                              ; preds = %224
  store i32 0, ptr %13, align 4, !tbaa !9
  %230 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZN3JPH8StreamIn4ReadIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8) %230, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %231 unwind label %69

231:                                              ; preds = %229
  %232 = invoke noundef ptr @_ZNK3JPH3RefINS_12PhysicsSceneEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %233 unwind label %69

233:                                              ; preds = %231
  %234 = getelementptr inbounds %"class.JPH::PhysicsScene", ptr %232, i32 0, i32 3
  %235 = load i32, ptr %13, align 4, !tbaa !9
  %236 = zext i32 %235 to i64
  invoke void @_ZN3JPH5ArrayINS_24SoftBodyCreationSettingsENS_12STLAllocatorIS1_EEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %234, i64 noundef %236)
          to label %237 unwind label %69

237:                                              ; preds = %233
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #8
  %238 = invoke noundef ptr @_ZNK3JPH3RefINS_12PhysicsSceneEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %239 unwind label %252

239:                                              ; preds = %237
  %240 = getelementptr inbounds %"class.JPH::PhysicsScene", ptr %238, i32 0, i32 3
  store ptr %240, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #8
  %241 = load ptr, ptr %27, align 8, !tbaa !5
  %242 = invoke noundef ptr @_ZN3JPH5ArrayINS_24SoftBodyCreationSettingsENS_12STLAllocatorIS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %241)
          to label %243 unwind label %256

243:                                              ; preds = %239
  store ptr %242, ptr %28, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #8
  %244 = load ptr, ptr %27, align 8, !tbaa !5
  %245 = invoke noundef ptr @_ZN3JPH5ArrayINS_24SoftBodyCreationSettingsENS_12STLAllocatorIS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %244)
          to label %246 unwind label %260

246:                                              ; preds = %243
  store ptr %245, ptr %29, align 8, !tbaa !5
  br label %247

247:                                              ; preds = %303, %246
  %248 = load ptr, ptr %28, align 8, !tbaa !5
  %249 = load ptr, ptr %29, align 8, !tbaa !5
  %250 = icmp ne ptr %248, %249
  br i1 %250, label %264, label %251

251:                                              ; preds = %247
  store i32 6, ptr %17, align 4
  br label %308

252:                                              ; preds = %237
  %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 %312

256:                                              ; preds = %239
  %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
  br label %311

260:                                              ; preds = %243
  %261 = landingpad { ptr, i32 }
          cleanup
  %262 = extractvalue { ptr, i32 } %261, 0
  store ptr %262, ptr %7, align 8
  %263 = extractvalue { ptr, i32 } %261, 1
  store i32 %263, ptr %8, align 4
  br label %310

264:                                              ; preds = %247
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #8
  %265 = load ptr, ptr %28, align 8, !tbaa !5
  store ptr %265, ptr %30, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 128, ptr %31) #8
  %266 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZN3JPH24SoftBodyCreationSettings20sRestoreWithChildrenERNS_8StreamInERNS_5ArrayINS_3RefINS_22SoftBodySharedSettingsEEENS_12STLAllocatorIS6_EEEERNS3_INS4_INS_15PhysicsMaterialEEENS7_ISC_EEEERNS3_INS4_INS_11GroupFilterEEENS7_ISH_EEEE(ptr dead_on_unwind writable sret(%"class.JPH::Result.77") align 16 %31, ptr noundef nonnull align 8 dereferenceable(8) %266, ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %11)
          to label %267 unwind label %279

267:                                              ; preds = %264
  %268 = invoke noundef zeroext i1 @_ZNK3JPH6ResultINS_24SoftBodyCreationSettingsEE8HasErrorEv(ptr noundef nonnull align 16 dereferenceable(113) %31)
          to label %269 unwind label %283

269:                                              ; preds = %267
  br i1 %268, label %270, label %291

270:                                              ; preds = %269
  call void @llvm.lifetime.start.p0(i64 16, ptr %32) #8
  %271 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK3JPH6ResultINS_24SoftBodyCreationSettingsEE8GetErrorB5cxx11Ev(ptr noundef nonnull align 16 dereferenceable(113) %31)
          to label %272 unwind label %287

272:                                              ; preds = %270
  %273 = call { i64, ptr } @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcEN3JPH12STLAllocatorIcEEEcvSt17basic_string_viewIcS2_EEv(ptr noundef nonnull align 8 dereferenceable(32) %271) #8
  %274 = getelementptr inbounds { i64, ptr }, ptr %32, i32 0, i32 0
  %275 = extractvalue { i64, ptr } %273, 0
  store i64 %275, ptr %274, align 8
  %276 = getelementptr inbounds { i64, ptr }, ptr %32, i32 0, i32 1
  %277 = extractvalue { i64, ptr } %273, 1
  store ptr %277, ptr %276, align 8
  invoke void @_ZN3JPH6ResultINS_3RefINS_12PhysicsSceneEEEE8SetErrorERKSt17basic_string_viewIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(33) %0, ptr noundef nonnull align 8 dereferenceable(16) %32)
          to label %278 unwind label %287

278:                                              ; preds = %272
  call void @llvm.lifetime.end.p0(i64 16, ptr %32) #8
  store i1 true, ptr %5, align 1
  store i32 1, ptr %17, align 4
  br label %297

279:                                              ; preds = %264
  %280 = landingpad { ptr, i32 }
          cleanup
  %281 = extractvalue { ptr, i32 } %280, 0
  store ptr %281, ptr %7, align 8
  %282 = extractvalue { ptr, i32 } %280, 1
  store i32 %282, ptr %8, align 4
  br label %307

283:                                              ; preds = %293, %291, %267
  %284 = landingpad { ptr, i32 }
          cleanup
  %285 = extractvalue { ptr, i32 } %284, 0
  store ptr %285, ptr %7, align 8
  %286 = extractvalue { ptr, i32 } %284, 1
  store i32 %286, ptr %8, align 4
  br label %306

287:                                              ; preds = %272, %270
  %288 = landingpad { ptr, i32 }
          cleanup
  %289 = extractvalue { ptr, i32 } %288, 0
  store ptr %289, ptr %7, align 8
  %290 = extractvalue { ptr, i32 } %288, 1
  store i32 %290, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %32) #8
  br label %306

291:                                              ; preds = %269
  %292 = invoke noundef nonnull align 16 dereferenceable(111) ptr @_ZNK3JPH6ResultINS_24SoftBodyCreationSettingsEE3GetEv(ptr noundef nonnull align 16 dereferenceable(113) %31)
          to label %293 unwind label %283

293:                                              ; preds = %291
  %294 = load ptr, ptr %30, align 8, !tbaa !5
  %295 = invoke noundef nonnull align 16 dereferenceable(111) ptr @_ZN3JPH24SoftBodyCreationSettingsaSERKS0_(ptr noundef nonnull align 16 dereferenceable(111) %294, ptr noundef nonnull align 16 dereferenceable(111) %292)
          to label %296 unwind label %283

296:                                              ; preds = %293
  store i32 0, ptr %17, align 4
  br label %297

297:                                              ; preds = %296, %278
  call void @_ZN3JPH6ResultINS_24SoftBodyCreationSettingsEED2Ev(ptr noundef nonnull align 16 dereferenceable(113) %31) #8
  call void @llvm.lifetime.end.p0(i64 128, ptr %31) #8
  %298 = load i32, ptr %17, align 4
  switch i32 %298, label %300 [
    i32 0, label %299
  ]

299:                                              ; preds = %297
  store i32 0, ptr %17, align 4
  br label %300

300:                                              ; preds = %299, %297
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  %301 = load i32, ptr %17, align 4
  switch i32 %301, label %308 [
    i32 0, label %302
  ]

302:                                              ; preds = %300
  br label %303

303:                                              ; preds = %302
  %304 = load ptr, ptr %28, align 8, !tbaa !5
  %305 = getelementptr inbounds %"class.JPH::SoftBodyCreationSettings", ptr %304, i32 1
  store ptr %305, ptr %28, align 8, !tbaa !5
  br label %247

306:                                              ; preds = %287, %283
  call void @_ZN3JPH6ResultINS_24SoftBodyCreationSettingsEED2Ev(ptr noundef nonnull align 16 dereferenceable(113) %31) #8
  br label %307

307:                                              ; preds = %306, %279
  call void @llvm.lifetime.end.p0(i64 128, ptr %31) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #8
  br label %310

308:                                              ; preds = %300, %251
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  %309 = load i32, ptr %17, align 4
  switch i32 %309, label %315 [
    i32 6, label %313
  ]

310:                                              ; preds = %307, %260
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #8
  br label %311

311:                                              ; preds = %310, %256
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #8
  br label %312

312:                                              ; preds = %311, %252
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #8
  br label %317

313:                                              ; preds = %308
  invoke void @_ZN3JPH6ResultINS_3RefINS_12PhysicsSceneEEEE3SetERKS3_(ptr noundef nonnull align 8 dereferenceable(33) %0, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %314 unwind label %69

314:                                              ; preds = %313
  store i1 true, ptr %5, align 1
  store i32 1, ptr %17, align 4
  br label %315

315:                                              ; preds = %314, %308, %224, %129
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @_ZN3JPH5ArrayINS_3RefINS_22SoftBodySharedSettingsEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #8
  call void @_ZN3JPH5ArrayINS_3RefINS_11GroupFilterEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #8
  call void @_ZN3JPH5ArrayINS_3RefINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #8
  call void @_ZN3JPH5ArrayINS_3RefINS_5ShapeEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #8
  call void @_ZN3JPH3RefINS_12PhysicsSceneEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  %316 = load i1, ptr %5, align 1
  br i1 %316, label %321, label %320

317:                                              ; preds = %312, %228, %133, %69
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  br label %318

318:                                              ; preds = %317, %65
  call void @_ZN3JPH5ArrayINS_3RefINS_22SoftBodySharedSettingsEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #8
  call void @_ZN3JPH5ArrayINS_3RefINS_11GroupFilterEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #8
  call void @_ZN3JPH5ArrayINS_3RefINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #8
  call void @_ZN3JPH5ArrayINS_3RefINS_5ShapeEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #8
  call void @_ZN3JPH3RefINS_12PhysicsSceneEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  br label %319

319:                                              ; preds = %318, %61
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  call void @_ZN3JPH6ResultINS_3RefINS_12PhysicsSceneEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %0) #8
  br label %322

320:                                              ; preds = %315
  call void @_ZN3JPH6ResultINS_3RefINS_12PhysicsSceneEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %0) #8
  br label %321

321:                                              ; preds = %320, %315
  ret void

322:                                              ; preds = %319
  %323 = load ptr, ptr %7, align 8
  %324 = load i32, ptr %8, align 4
  %325 = insertvalue { ptr, i32 } poison, ptr %323, 0
  %326 = insertvalue { ptr, i32 } %325, i32 %324, 1
  resume { ptr, i32 } %326
}

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef ptr @_ZN3JPH12PhysicsScenenwEm(i64 noundef) #4 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

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

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

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

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

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

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

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

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

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

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

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

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

declare void @_ZN3JPH20BodyCreationSettings20sRestoreWithChildrenERNS_8StreamInERNS_5ArrayINS_3RefINS_5ShapeEEENS_12STLAllocatorIS6_EEEERNS3_INS4_INS_15PhysicsMaterialEEENS7_ISC_EEEERNS3_INS4_INS_11GroupFilterEEENS7_ISH_EEEE(ptr dead_on_unwind writable sret(%"class.JPH::Result.70") align 16, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #7

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNK3JPH6ResultINS_20BodyCreationSettingsEE8GetErrorB5cxx11Ev(ptr noundef nonnull align 16 dereferenceable(257)) #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { i64, ptr } @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcEN3JPH12STLAllocatorIcEEEcvSt17basic_string_viewIcS2_EEv(ptr noundef nonnull align 8 dereferenceable(32)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(256) ptr @_ZNK3JPH6ResultINS_20BodyCreationSettingsEE3GetEv(ptr noundef nonnull align 16 dereferenceable(257)) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(256) ptr @_ZN3JPH20BodyCreationSettingsaSERKS0_(ptr noundef nonnull align 16 dereferenceable(256), ptr noundef nonnull align 16 dereferenceable(256)) #6 align 2

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

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

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

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

declare void @_ZN3JPH18ConstraintSettings23sRestoreFromBinaryStateERNS_8StreamInE(ptr dead_on_unwind writable sret(%"class.JPH::Result.73") align 8, ptr noundef nonnull align 8 dereferenceable(8)) #7

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNK3JPH6ResultINS_3RefINS_18ConstraintSettingsEEEE8GetErrorB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(33)) #2 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)) #6

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3JPH6ResultINS_3RefINS_18ConstraintSettingsEEEE3GetEv(ptr noundef nonnull align 8 dereferenceable(33)) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH8RefConstINS_25TwoBodyConstraintSettingsEEaSEPKS1_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #6 align 2

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

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

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

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

declare void @_ZN3JPH24SoftBodyCreationSettings20sRestoreWithChildrenERNS_8StreamInERNS_5ArrayINS_3RefINS_22SoftBodySharedSettingsEEENS_12STLAllocatorIS6_EEEERNS3_INS4_INS_15PhysicsMaterialEEENS7_ISC_EEEERNS3_INS4_INS_11GroupFilterEEENS7_ISH_EEEE(ptr dead_on_unwind writable sret(%"class.JPH::Result.77") align 16, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #7

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNK3JPH6ResultINS_24SoftBodyCreationSettingsEE8GetErrorB5cxx11Ev(ptr noundef nonnull align 16 dereferenceable(113)) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(111) ptr @_ZNK3JPH6ResultINS_24SoftBodyCreationSettingsEE3GetEv(ptr noundef nonnull align 16 dereferenceable(113)) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(111) ptr @_ZN3JPH24SoftBodyCreationSettingsaSERKS0_(ptr noundef nonnull align 16 dereferenceable(111), ptr noundef nonnull align 16 dereferenceable(111)) #6 align 2

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

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

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

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

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

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, 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::Result.54" = type <{ %union.anon.55, i8, [7 x i8] }>
%union.anon.55 = type { %"class.std::__cxx11::basic_string" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char, std::char_traits<char>, JPH::STLAllocator<char>>::_Alloc_hider", i64, %union.anon.21 }
%"struct.std::__cxx11::basic_string<char, std::char_traits<char>, JPH::STLAllocator<char>>::_Alloc_hider" = type { ptr }
%union.anon.21 = type { i64, [8 x i8] }
%"class.JPH::Ref.56" = type { ptr }
%"class.JPH::Array.58" = type { i64, i64, ptr }
%"class.JPH::Array.61" = type { i64, i64, ptr }
%"class.JPH::Array.64" = type { i64, i64, ptr }
%"class.JPH::Array.67" = type { i64, i64, ptr }
%"class.JPH::Result.70" = type <{ %union.anon.71, i8, [15 x i8] }>
%union.anon.71 = type { %"class.JPH::BodyCreationSettings" }
%"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.std::basic_string_view" = type { i64, ptr }
%"class.JPH::Result.73" = type <{ %union.anon.74, i8, [7 x i8] }>
%union.anon.74 = type { %"class.std::__cxx11::basic_string" }
%"class.JPH::Result.77" = type <{ %union.anon.78, i8, [15 x i8] }>
%union.anon.78 = type { %"class.std::__cxx11::basic_string", [80 x i8] }

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH12PhysicsScene23sRestoreFromBinaryStateERNS_8StreamInE(ptr dead_on_unwind noalias nonnull writable sret(%"class.JPH::Result.54") align 8 %0, ptr noundef nonnull align 8 dereferenceable(8) %1) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.JPH::Ref.56", align 8
  %4 = alloca %"class.JPH::Array.58", align 8
  %5 = alloca %"class.JPH::Array.61", align 8
  %6 = alloca %"class.JPH::Array.64", align 8
  %7 = alloca %"class.JPH::Array.67", align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.JPH::Result.70", align 16
  %10 = alloca %"class.std::basic_string_view", align 8
  %11 = alloca %"class.JPH::Result.73", align 8
  %12 = alloca %"class.std::basic_string_view", align 8
  %13 = alloca %"class.JPH::Result.77", align 16
  %14 = alloca %"class.std::basic_string_view", align 8
  tail call void @_ZN3JPH6ResultINS_3RefINS_12PhysicsSceneEEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(33) %0)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #8
  %15 = invoke noundef ptr @_ZN3JPH12PhysicsScenenwEm(i64 noundef 80)
          to label %16 unwind label %31

16:                                               ; preds = %2
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %15, i8 0, i64 80, i1 false)
  tail call void @_ZN3JPH12PhysicsSceneC2Ev(ptr noundef nonnull align 8 dereferenceable(80) %15) #8
  invoke void @_ZN3JPH3RefINS_12PhysicsSceneEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull %15)
          to label %17 unwind label %31

17:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #8
  call void @_ZN3JPH5ArrayINS_3RefINS_5ShapeEEENS_12STLAllocatorIS3_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #8
  call void @_ZN3JPH5ArrayINS_3RefINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #8
  call void @_ZN3JPH5ArrayINS_3RefINS_11GroupFilterEEENS_12STLAllocatorIS3_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #8
  call void @_ZN3JPH5ArrayINS_3RefINS_22SoftBodySharedSettingsEEENS_12STLAllocatorIS3_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  invoke void @_ZN3JPH5ArrayINS_3RefINS_5ShapeEEENS_12STLAllocatorIS3_EEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef 1024)
          to label %18 unwind label %33

18:                                               ; preds = %17
  invoke void @_ZN3JPH5ArrayINS_3RefINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef 128)
          to label %19 unwind label %33

19:                                               ; preds = %18
  invoke void @_ZN3JPH5ArrayINS_3RefINS_11GroupFilterEEENS_12STLAllocatorIS3_EEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef 128)
          to label %20 unwind label %33

20:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #8
  store i32 0, ptr %8, align 4, !tbaa !5
  invoke void @_ZN3JPH8StreamIn4ReadIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %21 unwind label %35

21:                                               ; preds = %20
  %22 = call noundef ptr @_ZNK3JPH3RefINS_12PhysicsSceneEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
  %23 = getelementptr inbounds i8, ptr %22, i64 8
  %24 = load i32, ptr %8, align 4, !tbaa !5
  %25 = zext i32 %24 to i64
  invoke void @_ZN3JPH5ArrayINS_20BodyCreationSettingsENS_12STLAllocatorIS1_EEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %25)
          to label %26 unwind label %35

26:                                               ; preds = %21
  %27 = call noundef ptr @_ZNK3JPH3RefINS_12PhysicsSceneEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
  %28 = getelementptr inbounds i8, ptr %27, i64 8
  %29 = call noundef ptr @_ZN3JPH5ArrayINS_20BodyCreationSettingsENS_12STLAllocatorIS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %28)
  %30 = call noundef ptr @_ZN3JPH5ArrayINS_20BodyCreationSettingsENS_12STLAllocatorIS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %28)
  %.not106 = icmp eq ptr %29, %30
  br i1 %.not106, label %._crit_edge, label %.lr.ph

31:                                               ; preds = %16, %2
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %137

33:                                               ; preds = %19, %18, %17
  %34 = landingpad { ptr, i32 }
          cleanup
  br label %136

35:                                               ; preds = %._crit_edge117, %101, %._crit_edge112, %61, %._crit_edge, %21, %20
  %36 = landingpad { ptr, i32 }
          cleanup
  br label %135

.lr.ph:                                           ; preds = %26, %56
  %.071107 = phi ptr [ %57, %56 ], [ %29, %26 ]
  call void @llvm.lifetime.start.p0(i64 272, ptr nonnull %9) #8
  invoke void @_ZN3JPH20BodyCreationSettings20sRestoreWithChildrenERNS_8StreamInERNS_5ArrayINS_3RefINS_5ShapeEEENS_12STLAllocatorIS6_EEEERNS3_INS4_INS_15PhysicsMaterialEEENS7_ISC_EEEERNS3_INS4_INS_11GroupFilterEEENS7_ISH_EEEE(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Result.70") align 16 %9, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %37 unwind label %46

37:                                               ; preds = %.lr.ph
  %38 = call noundef zeroext i1 @_ZNK3JPH6ResultINS_20BodyCreationSettingsEE8HasErrorEv(ptr noundef nonnull align 16 dereferenceable(257) %9)
  br i1 %38, label %39, label %52

39:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #8
  %40 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK3JPH6ResultINS_20BodyCreationSettingsEE8GetErrorB5cxx11Ev(ptr noundef nonnull align 16 dereferenceable(257) %9)
          to label %41 unwind label %50

41:                                               ; preds = %39
  %42 = call { i64, ptr } @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcEN3JPH12STLAllocatorIcEEEcvSt17basic_string_viewIcS2_EEv(ptr noundef nonnull align 8 dereferenceable(32) %40) #8
  %43 = extractvalue { i64, ptr } %42, 0
  store i64 %43, ptr %10, align 8
  %44 = getelementptr inbounds i8, ptr %10, i64 8
  %45 = extractvalue { i64, ptr } %42, 1
  store ptr %45, ptr %44, align 8
  invoke void @_ZN3JPH6ResultINS_3RefINS_12PhysicsSceneEEEE8SetErrorERKSt17basic_string_viewIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(33) %0, ptr noundef nonnull align 8 dereferenceable(16) %10)
          to label %60 unwind label %50

46:                                               ; preds = %.lr.ph
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %59

48:                                               ; preds = %54, %52
  %49 = landingpad { ptr, i32 }
          cleanup
  br label %58

50:                                               ; preds = %41, %39
  %51 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #8
  br label %58

52:                                               ; preds = %37
  %53 = invoke noundef nonnull align 16 dereferenceable(256) ptr @_ZNK3JPH6ResultINS_20BodyCreationSettingsEE3GetEv(ptr noundef nonnull align 16 dereferenceable(257) %9)
          to label %54 unwind label %48

54:                                               ; preds = %52
  %55 = invoke noundef nonnull align 16 dereferenceable(256) ptr @_ZN3JPH20BodyCreationSettingsaSERKS0_(ptr noundef nonnull align 16 dereferenceable(256) %.071107, ptr noundef nonnull align 16 dereferenceable(256) %53)
          to label %56 unwind label %48

56:                                               ; preds = %54
  call void @_ZN3JPH6ResultINS_20BodyCreationSettingsEED2Ev(ptr noundef nonnull align 16 dereferenceable(257) %9) #8
  call void @llvm.lifetime.end.p0(i64 272, ptr nonnull %9) #8
  %57 = getelementptr inbounds i8, ptr %.071107, i64 256
  %.not = icmp eq ptr %57, %30
  br i1 %.not, label %._crit_edge, label %.lr.ph

58:                                               ; preds = %50, %48
  %.pn = phi { ptr, i32 } [ %51, %50 ], [ %49, %48 ]
  call void @_ZN3JPH6ResultINS_20BodyCreationSettingsEED2Ev(ptr noundef nonnull align 16 dereferenceable(257) %9) #8
  br label %59

59:                                               ; preds = %58, %46
  %.pn.pn = phi { ptr, i32 } [ %.pn, %58 ], [ %47, %46 ]
  call void @llvm.lifetime.end.p0(i64 272, ptr nonnull %9) #8
  br label %135

60:                                               ; preds = %41
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #8
  call void @_ZN3JPH6ResultINS_20BodyCreationSettingsEED2Ev(ptr noundef nonnull align 16 dereferenceable(257) %9) #8
  call void @llvm.lifetime.end.p0(i64 272, ptr nonnull %9) #8
  br label %138

._crit_edge:                                      ; preds = %56, %26
  store i32 0, ptr %8, align 4, !tbaa !5
  invoke void @_ZN3JPH8StreamIn4ReadIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %61 unwind label %35

61:                                               ; preds = %._crit_edge
  %62 = call noundef ptr @_ZNK3JPH3RefINS_12PhysicsSceneEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
  %63 = getelementptr inbounds i8, ptr %62, i64 32
  %64 = load i32, ptr %8, align 4, !tbaa !5
  %65 = zext i32 %64 to i64
  invoke void @_ZN3JPH5ArrayINS_12PhysicsScene19ConnectedConstraintENS_12STLAllocatorIS2_EEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %63, i64 noundef %65)
          to label %66 unwind label %35

66:                                               ; preds = %61
  %67 = call noundef ptr @_ZNK3JPH3RefINS_12PhysicsSceneEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
  %68 = getelementptr inbounds i8, ptr %67, i64 32
  %69 = call noundef ptr @_ZN3JPH5ArrayINS_12PhysicsScene19ConnectedConstraintENS_12STLAllocatorIS2_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %68)
  %70 = call noundef ptr @_ZN3JPH5ArrayINS_12PhysicsScene19ConnectedConstraintENS_12STLAllocatorIS2_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %68)
  %.not81108 = icmp eq ptr %69, %70
  br i1 %.not81108, label %._crit_edge112, label %.lr.ph111

.lr.ph111:                                        ; preds = %66, %96
  %.078109 = phi ptr [ %97, %96 ], [ %69, %66 ]
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %11) #8
  invoke void @_ZN3JPH18ConstraintSettings23sRestoreFromBinaryStateERNS_8StreamInE(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Result.73") align 8 %11, ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %71 unwind label %80

71:                                               ; preds = %.lr.ph111
  %72 = call noundef zeroext i1 @_ZNK3JPH6ResultINS_3RefINS_18ConstraintSettingsEEEE8HasErrorEv(ptr noundef nonnull align 8 dereferenceable(33) %11)
  br i1 %72, label %73, label %86

73:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #8
  %74 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK3JPH6ResultINS_3RefINS_18ConstraintSettingsEEEE8GetErrorB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(33) %11)
          to label %75 unwind label %84

75:                                               ; preds = %73
  %76 = call { i64, ptr } @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcEN3JPH12STLAllocatorIcEEEcvSt17basic_string_viewIcS2_EEv(ptr noundef nonnull align 8 dereferenceable(32) %74) #8
  %77 = extractvalue { i64, ptr } %76, 0
  store i64 %77, ptr %12, align 8
  %78 = getelementptr inbounds i8, ptr %12, i64 8
  %79 = extractvalue { i64, ptr } %76, 1
  store ptr %79, ptr %78, align 8
  invoke void @_ZN3JPH6ResultINS_3RefINS_12PhysicsSceneEEEE8SetErrorERKSt17basic_string_viewIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(33) %0, ptr noundef nonnull align 8 dereferenceable(16) %12)
          to label %100 unwind label %84

80:                                               ; preds = %.lr.ph111
  %81 = landingpad { ptr, i32 }
          cleanup
  br label %99

82:                                               ; preds = %94, %92, %90, %88, %86
  %83 = landingpad { ptr, i32 }
          cleanup
  br label %98

84:                                               ; preds = %75, %73
  %85 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #8
  br label %98

86:                                               ; preds = %71
  %87 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3JPH6ResultINS_3RefINS_18ConstraintSettingsEEEE3GetEv(ptr noundef nonnull align 8 dereferenceable(33) %11)
          to label %88 unwind label %82

88:                                               ; preds = %86
  %89 = 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) %87)
          to label %90 unwind label %82

90:                                               ; preds = %88
  %91 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH8RefConstINS_25TwoBodyConstraintSettingsEEaSEPKS1_(ptr noundef nonnull align 8 dereferenceable(8) %.078109, ptr noundef %89)
          to label %92 unwind label %82

92:                                               ; preds = %90
  %93 = getelementptr inbounds i8, ptr %.078109, i64 8
  invoke void @_ZN3JPH8StreamIn4ReadIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %93)
          to label %94 unwind label %82

94:                                               ; preds = %92
  %95 = getelementptr inbounds i8, ptr %.078109, i64 12
  invoke void @_ZN3JPH8StreamIn4ReadIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %95)
          to label %96 unwind label %82

96:                                               ; preds = %94
  call void @_ZN3JPH6ResultINS_3RefINS_18ConstraintSettingsEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %11) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %11) #8
  %97 = getelementptr inbounds i8, ptr %.078109, i64 16
  %.not81 = icmp eq ptr %97, %70
  br i1 %.not81, label %._crit_edge112, label %.lr.ph111

98:                                               ; preds = %84, %82
  %.pn82 = phi { ptr, i32 } [ %85, %84 ], [ %83, %82 ]
  call void @_ZN3JPH6ResultINS_3RefINS_18ConstraintSettingsEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %11) #8
  br label %99

99:                                               ; preds = %98, %80
  %.pn82.pn = phi { ptr, i32 } [ %.pn82, %98 ], [ %81, %80 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %11) #8
  br label %135

100:                                              ; preds = %75
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #8
  call void @_ZN3JPH6ResultINS_3RefINS_18ConstraintSettingsEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %11) #8
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %11) #8
  br label %138

._crit_edge112:                                   ; preds = %96, %66
  store i32 0, ptr %8, align 4, !tbaa !5
  invoke void @_ZN3JPH8StreamIn4ReadIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %101 unwind label %35

101:                                              ; preds = %._crit_edge112
  %102 = call noundef ptr @_ZNK3JPH3RefINS_12PhysicsSceneEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
  %103 = getelementptr inbounds i8, ptr %102, i64 56
  %104 = load i32, ptr %8, align 4, !tbaa !5
  %105 = zext i32 %104 to i64
  invoke void @_ZN3JPH5ArrayINS_24SoftBodyCreationSettingsENS_12STLAllocatorIS1_EEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %103, i64 noundef %105)
          to label %106 unwind label %35

106:                                              ; preds = %101
  %107 = call noundef ptr @_ZNK3JPH3RefINS_12PhysicsSceneEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
  %108 = getelementptr inbounds i8, ptr %107, i64 56
  %109 = call noundef ptr @_ZN3JPH5ArrayINS_24SoftBodyCreationSettingsENS_12STLAllocatorIS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %108)
  %110 = call noundef ptr @_ZN3JPH5ArrayINS_24SoftBodyCreationSettingsENS_12STLAllocatorIS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %108)
  %.not85113 = icmp eq ptr %109, %110
  br i1 %.not85113, label %._crit_edge117, label %.lr.ph116

.lr.ph116:                                        ; preds = %106, %130
  %.061114 = phi ptr [ %131, %130 ], [ %109, %106 ]
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %13) #8
  invoke void @_ZN3JPH24SoftBodyCreationSettings20sRestoreWithChildrenERNS_8StreamInERNS_5ArrayINS_3RefINS_22SoftBodySharedSettingsEEENS_12STLAllocatorIS6_EEEERNS3_INS4_INS_15PhysicsMaterialEEENS7_ISC_EEEERNS3_INS4_INS_11GroupFilterEEENS7_ISH_EEEE(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Result.77") align 16 %13, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %6)
          to label %111 unwind label %120

111:                                              ; preds = %.lr.ph116
  %112 = call noundef zeroext i1 @_ZNK3JPH6ResultINS_24SoftBodyCreationSettingsEE8HasErrorEv(ptr noundef nonnull align 16 dereferenceable(113) %13)
  br i1 %112, label %113, label %126

113:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #8
  %114 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK3JPH6ResultINS_24SoftBodyCreationSettingsEE8GetErrorB5cxx11Ev(ptr noundef nonnull align 16 dereferenceable(113) %13)
          to label %115 unwind label %124

115:                                              ; preds = %113
  %116 = call { i64, ptr } @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcEN3JPH12STLAllocatorIcEEEcvSt17basic_string_viewIcS2_EEv(ptr noundef nonnull align 8 dereferenceable(32) %114) #8
  %117 = extractvalue { i64, ptr } %116, 0
  store i64 %117, ptr %14, align 8
  %118 = getelementptr inbounds i8, ptr %14, i64 8
  %119 = extractvalue { i64, ptr } %116, 1
  store ptr %119, ptr %118, align 8
  invoke void @_ZN3JPH6ResultINS_3RefINS_12PhysicsSceneEEEE8SetErrorERKSt17basic_string_viewIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(33) %0, ptr noundef nonnull align 8 dereferenceable(16) %14)
          to label %134 unwind label %124

120:                                              ; preds = %.lr.ph116
  %121 = landingpad { ptr, i32 }
          cleanup
  br label %133

122:                                              ; preds = %128, %126
  %123 = landingpad { ptr, i32 }
          cleanup
  br label %132

124:                                              ; preds = %115, %113
  %125 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #8
  br label %132

126:                                              ; preds = %111
  %127 = invoke noundef nonnull align 16 dereferenceable(111) ptr @_ZNK3JPH6ResultINS_24SoftBodyCreationSettingsEE3GetEv(ptr noundef nonnull align 16 dereferenceable(113) %13)
          to label %128 unwind label %122

128:                                              ; preds = %126
  %129 = invoke noundef nonnull align 16 dereferenceable(111) ptr @_ZN3JPH24SoftBodyCreationSettingsaSERKS0_(ptr noundef nonnull align 16 dereferenceable(111) %.061114, ptr noundef nonnull align 16 dereferenceable(111) %127)
          to label %130 unwind label %122

130:                                              ; preds = %128
  call void @_ZN3JPH6ResultINS_24SoftBodyCreationSettingsEED2Ev(ptr noundef nonnull align 16 dereferenceable(113) %13) #8
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %13) #8
  %131 = getelementptr inbounds i8, ptr %.061114, i64 112
  %.not85 = icmp eq ptr %131, %110
  br i1 %.not85, label %._crit_edge117, label %.lr.ph116

132:                                              ; preds = %124, %122
  %.pn86 = phi { ptr, i32 } [ %125, %124 ], [ %123, %122 ]
  call void @_ZN3JPH6ResultINS_24SoftBodyCreationSettingsEED2Ev(ptr noundef nonnull align 16 dereferenceable(113) %13) #8
  br label %133

133:                                              ; preds = %132, %120
  %.pn86.pn = phi { ptr, i32 } [ %.pn86, %132 ], [ %121, %120 ]
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %13) #8
  br label %135

134:                                              ; preds = %115
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #8
  call void @_ZN3JPH6ResultINS_24SoftBodyCreationSettingsEED2Ev(ptr noundef nonnull align 16 dereferenceable(113) %13) #8
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %13) #8
  br label %138

._crit_edge117:                                   ; preds = %130, %106
  invoke void @_ZN3JPH6ResultINS_3RefINS_12PhysicsSceneEEEE3SetERKS3_(ptr noundef nonnull align 8 dereferenceable(33) %0, ptr noundef nonnull align 8 dereferenceable(8) %3)
          to label %138 unwind label %35

135:                                              ; preds = %133, %99, %59, %35
  %.pn89 = phi { ptr, i32 } [ %36, %35 ], [ %.pn86.pn, %133 ], [ %.pn82.pn, %99 ], [ %.pn.pn, %59 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  br label %136

136:                                              ; preds = %135, %33
  %.pn89.pn = phi { ptr, i32 } [ %.pn89, %135 ], [ %34, %33 ]
  call void @_ZN3JPH5ArrayINS_3RefINS_22SoftBodySharedSettingsEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #8
  call void @_ZN3JPH5ArrayINS_3RefINS_11GroupFilterEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #8
  call void @_ZN3JPH5ArrayINS_3RefINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #8
  call void @_ZN3JPH5ArrayINS_3RefINS_5ShapeEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #8
  call void @_ZN3JPH3RefINS_12PhysicsSceneEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #8
  br label %137

137:                                              ; preds = %136, %31
  %.pn89.pn.pn = phi { ptr, i32 } [ %.pn89.pn, %136 ], [ %32, %31 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  call void @_ZN3JPH6ResultINS_3RefINS_12PhysicsSceneEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %0) #8
  resume { ptr, i32 } %.pn89.pn.pn

138:                                              ; preds = %._crit_edge117, %60, %100, %134
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #8
  call void @_ZN3JPH5ArrayINS_3RefINS_22SoftBodySharedSettingsEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #8
  call void @_ZN3JPH5ArrayINS_3RefINS_11GroupFilterEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #8
  call void @_ZN3JPH5ArrayINS_3RefINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #8
  call void @_ZN3JPH5ArrayINS_3RefINS_5ShapeEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #8
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #8
  call void @_ZN3JPH3RefINS_12PhysicsSceneEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  ret void
}

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local noundef ptr @_ZN3JPH12PhysicsScenenwEm(i64 noundef) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

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

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

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

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

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

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

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

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

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

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

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

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

declare void @_ZN3JPH20BodyCreationSettings20sRestoreWithChildrenERNS_8StreamInERNS_5ArrayINS_3RefINS_5ShapeEEENS_12STLAllocatorIS6_EEEERNS3_INS4_INS_15PhysicsMaterialEEENS7_ISC_EEEERNS3_INS4_INS_11GroupFilterEEENS7_ISH_EEEE(ptr dead_on_unwind writable sret(%"class.JPH::Result.70") align 16, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #7

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNK3JPH6ResultINS_20BodyCreationSettingsEE8GetErrorB5cxx11Ev(ptr noundef nonnull align 16 dereferenceable(257)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { i64, ptr } @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcEN3JPH12STLAllocatorIcEEEcvSt17basic_string_viewIcS2_EEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(256) ptr @_ZNK3JPH6ResultINS_20BodyCreationSettingsEE3GetEv(ptr noundef nonnull align 16 dereferenceable(257)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(256) ptr @_ZN3JPH20BodyCreationSettingsaSERKS0_(ptr noundef nonnull align 16 dereferenceable(256), ptr noundef nonnull align 16 dereferenceable(256)) local_unnamed_addr #6 align 2

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

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

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

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

declare void @_ZN3JPH18ConstraintSettings23sRestoreFromBinaryStateERNS_8StreamInE(ptr dead_on_unwind writable sret(%"class.JPH::Result.73") align 8, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #7

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNK3JPH6ResultINS_3RefINS_18ConstraintSettingsEEEE8GetErrorB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(33)) local_unnamed_addr #2 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 #6

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH8RefConstINS_25TwoBodyConstraintSettingsEEaSEPKS1_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #6 align 2

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

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

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

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

declare void @_ZN3JPH24SoftBodyCreationSettings20sRestoreWithChildrenERNS_8StreamInERNS_5ArrayINS_3RefINS_22SoftBodySharedSettingsEEENS_12STLAllocatorIS6_EEEERNS3_INS4_INS_15PhysicsMaterialEEENS7_ISC_EEEERNS3_INS4_INS_11GroupFilterEEENS7_ISH_EEEE(ptr dead_on_unwind writable sret(%"class.JPH::Result.77") align 16, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #7

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNK3JPH6ResultINS_24SoftBodyCreationSettingsEE8GetErrorB5cxx11Ev(ptr noundef nonnull align 16 dereferenceable(113)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(111) ptr @_ZNK3JPH6ResultINS_24SoftBodyCreationSettingsEE3GetEv(ptr noundef nonnull align 16 dereferenceable(113)) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 16 dereferenceable(111) ptr @_ZN3JPH24SoftBodyCreationSettingsaSERKS0_(ptr noundef nonnull align 16 dereferenceable(111), ptr noundef nonnull align 16 dereferenceable(111)) local_unnamed_addr #6 align 2

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

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

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

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

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

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}


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