; LLVM IR from jrouwe/JoltPhysics :: Samples/Tests/Shapes (MutableCompoundShapeTest)

; 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.std::__cxx11::basic_string.42" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon.46 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon.46 = type { i64, [8 x i8] }
%"class.JPH::BodyID" = type { i32 }
%"class.JPH::BodyLockWrite" = type { %"class.JPH::BodyLockBase" }
%"class.JPH::BodyLockBase" = type { ptr, ptr, ptr }
%"class.std::__cxx11::basic_stringstream" = type { %"class.std::basic_iostream.base", %"class.std::__cxx11::basic_stringbuf", %"class.std::basic_ios" }
%"class.std::basic_iostream.base" = type { %"class.std::basic_istream.base", %"class.std::basic_ostream.base" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string.42" }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.JPH::StreamOutWrapper" = type { %"class.JPH::StreamOut", ptr }
%"class.JPH::StreamOut" = type { ptr }
%"class.JPH::StreamInWrapper" = type { %"class.JPH::StreamIn", ptr }
%"class.JPH::StreamIn" = type { ptr }
%"class.JPH::Result" = type <{ %union.anon.9, i8, [7 x i8] }>
%union.anon.9 = 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.12 }
%"struct.std::__cxx11::basic_string<char, std::char_traits<char>, JPH::STLAllocator<char>>::_Alloc_hider" = type { ptr }
%union.anon.12 = type { i64, [8 x i8] }
%"class.JPH::Array.47" = type { i64, i64, ptr }
%"class.JPH::STLAllocator.48" = type { i8 }
%class.MutableCompoundShapeTest = type <{ %class.Test, %"class.JPH::Array", %"class.JPH::RefConst", i32, [4 x i8] }>
%class.Test = type { ptr, ptr, ptr, ptr, ptr, ptr, i8, %"class.std::unordered_map" }
%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.JPH::Array" = type { i64, i64, ptr }
%"class.JPH::RefConst" = 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: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3JPH6ResultINS_3RefINS_5ShapeEEEE3GetEv(ptr noundef nonnull align 8 dereferenceable(33)) #1 align 2

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK3JPH13CompoundShape15GetNumSubShapesEv(ptr noundef nonnull align 16 dereferenceable(108)) #1 align 2

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string.42") align 8, ptr noundef nonnull align 8 dereferenceable(128)) #1 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN24MutableCompoundShapeTest12RestoreStateERN3JPH13StateRecorderE(ptr noundef nonnull align 8 dereferenceable(148) %0, ptr noundef nonnull align 8 dereferenceable(18) %1) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %"class.JPH::BodyID", align 4
  %9 = alloca %"class.JPH::BodyLockWrite", align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca %"class.std::__cxx11::basic_string.42", align 8
  %14 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %15 = alloca %"class.JPH::StreamOutWrapper", align 8
  %16 = alloca %"class.std::__cxx11::basic_string.42", align 8
  %17 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %18 = alloca %"class.JPH::StreamInWrapper", align 8
  %19 = alloca %"class.JPH::Result", align 8
  %20 = alloca ptr, align 8
  %21 = alloca %"class.JPH::Array.47", align 8
  %22 = alloca %"class.JPH::STLAllocator.48", align 1
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %23 = load ptr, ptr %3, align 8
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = getelementptr inbounds %class.MutableCompoundShapeTest, ptr %23, i32 0, i32 3
  call void @_ZN3JPH8StreamIn4ReadIiTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull align 4 dereferenceable(4) %25)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %26 = getelementptr inbounds %class.MutableCompoundShapeTest, ptr %23, i32 0, i32 1
  store ptr %26, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = call noundef ptr @_ZN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %27)
  store ptr %28, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = call noundef ptr @_ZN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %29)
  store ptr %30, ptr %7, align 8, !tbaa !5
  br label %31

31:                                               ; preds = %160, %2
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  %33 = load ptr, ptr %7, align 8, !tbaa !5
  %34 = icmp ne ptr %32, %33
  br i1 %34, label %36, label %35

35:                                               ; preds = %31
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  br label %164

36:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #7
  %37 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %8, ptr align 4 %37, i64 4, i1 false), !tbaa.struct !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #7
  %38 = getelementptr inbounds %class.Test, ptr %23, i32 0, i32 2
  %39 = load ptr, ptr %38, align 8, !tbaa !12
  %40 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3JPH13PhysicsSystem20GetBodyLockInterfaceEv(ptr noundef nonnull align 16 dereferenceable(1172) %39)
  call void @_ZN3JPH13BodyLockWriteCI2NS_12BodyLockBaseILb1ENS_4BodyEEEERKNS_17BodyLockInterfaceERKNS_6BodyIDE(ptr noundef nonnull align 8 dereferenceable(24) %9, ptr noundef nonnull align 8 dereferenceable(16) %40, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %41 = invoke noundef zeroext i1 @_ZNK3JPH12BodyLockBaseILb1ENS_4BodyEE9SucceededEv(ptr noundef nonnull align 8 dereferenceable(24) %9)
          to label %42 unwind label %62

42:                                               ; preds = %36
  br i1 %41, label %43, label %159

43:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %44 = invoke noundef nonnull align 16 dereferenceable(122) ptr @_ZNK3JPH12BodyLockBaseILb1ENS_4BodyEE7GetBodyEv(ptr noundef nonnull align 8 dereferenceable(24) %9)
          to label %45 unwind label %66

45:                                               ; preds = %43
  store ptr %44, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #7
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  %47 = invoke noundef zeroext i1 @_ZNK3JPH13StateRecorder12IsValidatingEv(ptr noundef nonnull align 8 dereferenceable(18) %46)
          to label %48 unwind label %70

48:                                               ; preds = %45
  br i1 %47, label %49, label %93

49:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 392, ptr %14) #7
  invoke void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %14)
          to label %50 unwind label %74

50:                                               ; preds = %49
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #7
  %51 = getelementptr inbounds i8, ptr %14, i64 16
  invoke void @_ZN3JPH16StreamOutWrapperC2ERSo(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 8 dereferenceable(8) %51)
          to label %52 unwind label %78

52:                                               ; preds = %50
  %53 = load ptr, ptr %12, align 8, !tbaa !5
  %54 = invoke noundef ptr @_ZNK3JPH4Body8GetShapeEv(ptr noundef nonnull align 16 dereferenceable(122) %53)
          to label %55 unwind label %82

55:                                               ; preds = %52
  %56 = load ptr, ptr %54, align 8, !tbaa !21
  %57 = getelementptr inbounds ptr, ptr %56, i64 24
  %58 = load ptr, ptr %57, align 8
  invoke void %58(ptr noundef nonnull align 8 dereferenceable(26) %54, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %59 unwind label %82

59:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #7
  invoke void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string.42") align 8 %16, ptr noundef nonnull align 8 dereferenceable(128) %14)
          to label %60 unwind label %86

60:                                               ; preds = %59
  %61 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull align 8 dereferenceable(32) %16) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #7
  call void @_ZN3JPH9StreamOutD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %15) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #7
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %14) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr %14) #7
  br label %93

62:                                               ; preds = %36
  %63 = landingpad { ptr, i32 }
          cleanup
  %64 = extractvalue { ptr, i32 } %63, 0
  store ptr %64, ptr %10, align 8
  %65 = extractvalue { ptr, i32 } %63, 1
  store i32 %65, ptr %11, align 4
  br label %163

66:                                               ; preds = %43
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %10, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %11, align 4
  br label %158

70:                                               ; preds = %93, %45
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %10, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %11, align 4
  br label %157

74:                                               ; preds = %49
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %10, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %11, align 4
  br label %92

78:                                               ; preds = %50
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %10, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %11, align 4
  br label %91

82:                                               ; preds = %55, %52
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %10, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %11, align 4
  br label %90

86:                                               ; preds = %59
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %10, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #7
  br label %90

90:                                               ; preds = %86, %82
  call void @_ZN3JPH9StreamOutD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %15) #7
  br label %91

91:                                               ; preds = %90, %78
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #7
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %14) #7
  br label %92

92:                                               ; preds = %91, %74
  call void @llvm.lifetime.end.p0(i64 392, ptr %14) #7
  br label %157

93:                                               ; preds = %60, %48
  %94 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZN3JPH8StreamIn4ReadIcSt11char_traitsIcESaIcEEEvRNSt7__cxx1112basic_stringIT_T0_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %94, ptr noundef nonnull align 8 dereferenceable(32) %13)
          to label %95 unwind label %70

95:                                               ; preds = %93
  call void @llvm.lifetime.start.p0(i64 392, ptr %17) #7
  %96 = invoke noundef i32 @_ZStorSt13_Ios_OpenmodeS_(i32 noundef 16, i32 noundef 8)
          to label %97 unwind label %124

97:                                               ; preds = %95
  invoke void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(128) %17, ptr noundef nonnull align 8 dereferenceable(32) %13, i32 noundef %96)
          to label %98 unwind label %124

98:                                               ; preds = %97
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #7
  invoke void @_ZN3JPH15StreamInWrapperC2ERSi(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(16) %17)
          to label %99 unwind label %128

99:                                               ; preds = %98
  call void @llvm.lifetime.start.p0(i64 40, ptr %19) #7
  invoke void @_ZN3JPH5Shape23sRestoreFromBinaryStateERNS_8StreamInE(ptr dead_on_unwind writable sret(%"class.JPH::Result") align 8 %19, ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %100 unwind label %132

100:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %101 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3JPH6ResultINS_3RefINS_5ShapeEEEE3GetEv(ptr noundef nonnull align 8 dereferenceable(33) %19)
          to label %102 unwind label %136

102:                                              ; preds = %100
  %103 = invoke noundef ptr @_ZN3JPH10StaticCastINS_20MutableCompoundShapeENS_5ShapeETnNSt9enable_ifIXoosr3stdE12is_base_of_vIT_T0_Esr3stdE12is_base_of_vIS5_S4_EEbE4typeELb1EEEPS4_RKNS_3RefIS5_EE(ptr noundef nonnull align 8 dereferenceable(8) %101)
          to label %104 unwind label %136

104:                                              ; preds = %102
  store ptr %103, ptr %20, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %21) #7
  %105 = load ptr, ptr %20, align 8, !tbaa !5
  %106 = invoke noundef i32 @_ZNK3JPH13CompoundShape15GetNumSubShapesEv(ptr noundef nonnull align 16 dereferenceable(108) %105)
          to label %107 unwind label %140

107:                                              ; preds = %104
  %108 = zext i32 %106 to i64
  %109 = getelementptr inbounds %class.MutableCompoundShapeTest, ptr %23, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #7
  invoke void @_ZN3JPH5ArrayINS_8RefConstINS_5ShapeEEENS_12STLAllocatorIS3_EEEC2EmRKS3_RKS5_(ptr noundef nonnull align 8 dereferenceable(24) %21, i64 noundef %108, ptr noundef nonnull align 8 dereferenceable(8) %109, ptr noundef nonnull align 1 dereferenceable(1) %22)
          to label %110 unwind label %144

110:                                              ; preds = %107
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #7
  %111 = load ptr, ptr %20, align 8, !tbaa !5
  %112 = invoke noundef ptr @_ZN3JPH5ArrayINS_8RefConstINS_5ShapeEEENS_12STLAllocatorIS3_EEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %21)
          to label %113 unwind label %148

113:                                              ; preds = %110
  %114 = invoke noundef i64 @_ZNK3JPH5ArrayINS_8RefConstINS_5ShapeEEENS_12STLAllocatorIS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %21)
          to label %115 unwind label %148

115:                                              ; preds = %113
  %116 = trunc i64 %114 to i32
  invoke void @_ZN3JPH13CompoundShape20RestoreSubShapeStateEPKNS_8RefConstINS_5ShapeEEEj(ptr noundef nonnull align 16 dereferenceable(108) %111, ptr noundef %112, i32 noundef %116)
          to label %117 unwind label %148

117:                                              ; preds = %115
  %118 = getelementptr inbounds %class.Test, ptr %23, i32 0, i32 2
  %119 = load ptr, ptr %118, align 8, !tbaa !12
  %120 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH13PhysicsSystem22GetBodyInterfaceNoLockEv(ptr noundef nonnull align 16 dereferenceable(1172) %119)
          to label %121 unwind label %148

121:                                              ; preds = %117
  %122 = load ptr, ptr %20, align 8, !tbaa !5
  invoke void @_ZNK3JPH13BodyInterface8SetShapeERKNS_6BodyIDEPKNS_5ShapeEbNS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24) %120, ptr noundef nonnull align 4 dereferenceable(4) %8, ptr noundef %122, i1 noundef zeroext false, i32 noundef 1)
          to label %123 unwind label %148

123:                                              ; preds = %121
  call void @_ZN3JPH5ArrayINS_8RefConstINS_5ShapeEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %19) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %19) #7
  call void @_ZN3JPH8StreamInD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #7
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %17) #7
  call void @llvm.lifetime.end.p0(i64 392, ptr %17) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %159

124:                                              ; preds = %97, %95
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %10, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %11, align 4
  br label %156

128:                                              ; preds = %98
  %129 = landingpad { ptr, i32 }
          cleanup
  %130 = extractvalue { ptr, i32 } %129, 0
  store ptr %130, ptr %10, align 8
  %131 = extractvalue { ptr, i32 } %129, 1
  store i32 %131, ptr %11, align 4
  br label %155

132:                                              ; preds = %99
  %133 = landingpad { ptr, i32 }
          cleanup
  %134 = extractvalue { ptr, i32 } %133, 0
  store ptr %134, ptr %10, align 8
  %135 = extractvalue { ptr, i32 } %133, 1
  store i32 %135, ptr %11, align 4
  br label %154

136:                                              ; preds = %102, %100
  %137 = landingpad { ptr, i32 }
          cleanup
  %138 = extractvalue { ptr, i32 } %137, 0
  store ptr %138, ptr %10, align 8
  %139 = extractvalue { ptr, i32 } %137, 1
  store i32 %139, ptr %11, align 4
  br label %153

140:                                              ; preds = %104
  %141 = landingpad { ptr, i32 }
          cleanup
  %142 = extractvalue { ptr, i32 } %141, 0
  store ptr %142, ptr %10, align 8
  %143 = extractvalue { ptr, i32 } %141, 1
  store i32 %143, ptr %11, align 4
  br label %152

144:                                              ; preds = %107
  %145 = landingpad { ptr, i32 }
          cleanup
  %146 = extractvalue { ptr, i32 } %145, 0
  store ptr %146, ptr %10, align 8
  %147 = extractvalue { ptr, i32 } %145, 1
  store i32 %147, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #7
  br label %152

148:                                              ; preds = %121, %117, %115, %113, %110
  %149 = landingpad { ptr, i32 }
          cleanup
  %150 = extractvalue { ptr, i32 } %149, 0
  store ptr %150, ptr %10, align 8
  %151 = extractvalue { ptr, i32 } %149, 1
  store i32 %151, ptr %11, align 4
  call void @_ZN3JPH5ArrayINS_8RefConstINS_5ShapeEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %21) #7
  br label %152

152:                                              ; preds = %148, %144, %140
  call void @llvm.lifetime.end.p0(i64 24, ptr %21) #7
  br label %153

153:                                              ; preds = %152, %136
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %19) #7
  br label %154

154:                                              ; preds = %153, %132
  call void @llvm.lifetime.end.p0(i64 40, ptr %19) #7
  call void @_ZN3JPH8StreamInD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #7
  br label %155

155:                                              ; preds = %154, %128
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #7
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %17) #7
  br label %156

156:                                              ; preds = %155, %124
  call void @llvm.lifetime.end.p0(i64 392, ptr %17) #7
  br label %157

157:                                              ; preds = %156, %92, %70
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #7
  br label %158

158:                                              ; preds = %157, %66
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  br label %163

159:                                              ; preds = %123, %42
  call void @_ZN3JPH12BodyLockBaseILb1ENS_4BodyEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  br label %160

160:                                              ; preds = %159
  %161 = load ptr, ptr %6, align 8, !tbaa !5
  %162 = getelementptr inbounds %"class.JPH::BodyID", ptr %161, i32 1
  store ptr %162, ptr %6, align 8, !tbaa !5
  br label %31

163:                                              ; preds = %158, %62
  call void @_ZN3JPH12BodyLockBaseILb1ENS_4BodyEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  br label %165

164:                                              ; preds = %35
  ret void

165:                                              ; preds = %163
  %166 = load ptr, ptr %10, align 8
  %167 = load i32, ptr %11, align 4
  %168 = insertvalue { ptr, i32 } poison, ptr %166, 0
  %169 = insertvalue { ptr, i32 } %168, i32 %167, 1
  resume { ptr, i32 } %169
}

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZStorSt13_Ios_OpenmodeS_(i32 noundef, i32 noundef) #3

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) unnamed_addr #1 align 2

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

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

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

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

declare void @_ZN3JPH13CompoundShape20RestoreSubShapeStateEPKNS_8RefConstINS_5ShapeEEEj(ptr noundef nonnull align 16 dereferenceable(108), ptr noundef, i32 noundef) unnamed_addr #6

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

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

declare void @_ZNK3JPH13BodyInterface8SetShapeERKNS_6BodyIDEPKNS_5ShapeEbNS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef, i1 noundef zeroext, i32 noundef) #6

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{i64 0, i64 4, !10}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !6, i64 16}
!13 = !{!"_ZTS4Test", !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !14, i64 48, !15, i64 56}
!14 = !{!"bool", !7, i64 0}
!15 = !{!"_ZTSSt13unordered_mapIN3JPH6BodyIDENSt7__cxx1112basic_stringIcSt11char_traitsIcENS0_12STLAllocatorIcEEEESt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_S8_EEE", !16, i64 0}
!16 = !{!"_ZTSSt10_HashtableIN3JPH6BodyIDESt4pairIKS1_NSt7__cxx1112basic_stringIcSt11char_traitsIcENS0_12STLAllocatorIcEEEEESaISB_ENSt8__detail10_Select1stESt8equal_toIS1_ESt4hashIS1_ENSD_18_Mod_range_hashingENSD_20_Default_ranged_hashENSD_20_Prime_rehash_policyENSD_17_Hashtable_traitsILb1ELb0ELb1EEEE", !6, i64 0, !17, i64 8, !18, i64 16, !17, i64 24, !19, i64 32, !6, i64 48}
!17 = !{!"long", !7, i64 0}
!18 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!19 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !20, i64 0, !17, i64 8}
!20 = !{!"float", !7, i64 0}
!21 = !{!22, !22, i64 0}
!22 = !{!"vtable pointer", !8, i64 0}


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

%"class.std::__cxx11::basic_string.42" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon.46 }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon.46 = type { i64, [8 x i8] }
%"class.JPH::BodyID" = type { i32 }
%"class.JPH::BodyLockWrite" = type { %"class.JPH::BodyLockBase" }
%"class.JPH::BodyLockBase" = type { ptr, ptr, ptr }
%"class.std::__cxx11::basic_stringstream" = type { %"class.std::basic_iostream.base", %"class.std::__cxx11::basic_stringbuf", %"class.std::basic_ios" }
%"class.std::basic_iostream.base" = type { %"class.std::basic_istream.base", %"class.std::basic_ostream.base" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string.42" }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.JPH::StreamOutWrapper" = type { %"class.JPH::StreamOut", ptr }
%"class.JPH::StreamOut" = type { ptr }
%"class.JPH::StreamInWrapper" = type { %"class.JPH::StreamIn", ptr }
%"class.JPH::StreamIn" = type { ptr }
%"class.JPH::Result" = type <{ %union.anon.9, i8, [7 x i8] }>
%union.anon.9 = 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.12 }
%"struct.std::__cxx11::basic_string<char, std::char_traits<char>, JPH::STLAllocator<char>>::_Alloc_hider" = type { ptr }
%union.anon.12 = type { i64, [8 x i8] }
%"class.JPH::Array.47" = type { i64, i64, ptr }
%"class.JPH::STLAllocator.48" = type { 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: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3JPH6ResultINS_3RefINS_5ShapeEEEE3GetEv(ptr noundef nonnull align 8 dereferenceable(33)) local_unnamed_addr #1 align 2

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK3JPH13CompoundShape15GetNumSubShapesEv(ptr noundef nonnull align 16 dereferenceable(108)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string.42") align 8, ptr noundef nonnull align 8 dereferenceable(128)) local_unnamed_addr #1 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN24MutableCompoundShapeTest12RestoreStateERN3JPH13StateRecorderE(ptr noundef nonnull align 8 dereferenceable(148) %0, ptr noundef nonnull align 8 dereferenceable(18) %1) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.JPH::BodyID", align 4
  %4 = alloca %"class.JPH::BodyLockWrite", align 8
  %5 = alloca %"class.std::__cxx11::basic_string.42", align 8
  %6 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %7 = alloca %"class.JPH::StreamOutWrapper", align 8
  %8 = alloca %"class.std::__cxx11::basic_string.42", align 8
  %9 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %10 = alloca %"class.JPH::StreamInWrapper", align 8
  %11 = alloca %"class.JPH::Result", align 8
  %12 = alloca %"class.JPH::Array.47", align 8
  %13 = alloca %"class.JPH::STLAllocator.48", align 1
  %14 = getelementptr inbounds i8, ptr %0, i64 144
  tail call void @_ZN3JPH8StreamIn4ReadIiTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %14)
  %15 = getelementptr inbounds i8, ptr %0, i64 112
  %16 = tail call noundef ptr @_ZN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %15)
  %17 = tail call noundef ptr @_ZN3JPH5ArrayINS_6BodyIDENS_12STLAllocatorIS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %15)
  %.not33 = icmp eq ptr %16, %17
  br i1 %.not33, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %2
  %18 = getelementptr inbounds i8, ptr %0, i64 16
  %19 = getelementptr inbounds i8, ptr %6, i64 16
  %20 = getelementptr inbounds i8, ptr %0, i64 136
  br label %21

._crit_edge:                                      ; preds = %90, %2
  ret void

21:                                               ; preds = %.lr.ph, %90
  %.034 = phi ptr [ %16, %.lr.ph ], [ %91, %90 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  %22 = load i32, ptr %.034, align 4, !tbaa !5
  store i32 %22, ptr %3, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #6
  %23 = load ptr, ptr %18, align 8, !tbaa !9
  %24 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK3JPH13PhysicsSystem20GetBodyLockInterfaceEv(ptr noundef nonnull align 16 dereferenceable(1172) %23)
  call void @_ZN3JPH13BodyLockWriteCI2NS_12BodyLockBaseILb1ENS_4BodyEEEERKNS_17BodyLockInterfaceERKNS_6BodyIDE(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %25 = call noundef zeroext i1 @_ZNK3JPH12BodyLockBaseILb1ENS_4BodyEE9SucceededEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
  br i1 %25, label %26, label %90

26:                                               ; preds = %21
  %27 = invoke noundef nonnull align 16 dereferenceable(122) ptr @_ZNK3JPH12BodyLockBaseILb1ENS_4BodyEE7GetBodyEv(ptr noundef nonnull align 8 dereferenceable(24) %4)
          to label %28 unwind label %40

28:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  %29 = call noundef zeroext i1 @_ZNK3JPH13StateRecorder12IsValidatingEv(ptr noundef nonnull align 8 dereferenceable(18) %1)
  br i1 %29, label %30, label %52

30:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 392, ptr nonnull %6) #6
  invoke void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %6)
          to label %31 unwind label %44

31:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #6
  call void @_ZN3JPH16StreamOutWrapperC2ERSo(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(8) %19)
  %32 = invoke noundef ptr @_ZNK3JPH4Body8GetShapeEv(ptr noundef nonnull align 16 dereferenceable(122) %27)
          to label %33 unwind label %46

33:                                               ; preds = %31
  %34 = load ptr, ptr %32, align 8, !tbaa !19
  %35 = getelementptr inbounds i8, ptr %34, i64 192
  %36 = load ptr, ptr %35, align 8
  invoke void %36(ptr noundef nonnull align 8 dereferenceable(26) %32, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %37 unwind label %46

37:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #6
  invoke void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string.42") align 8 %8, ptr noundef nonnull align 8 dereferenceable(128) %6)
          to label %38 unwind label %48

38:                                               ; preds = %37
  %39 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #6
  call void @_ZN3JPH9StreamOutD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #6
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %6) #6
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %6) #6
  br label %52

40:                                               ; preds = %26
  %41 = landingpad { ptr, i32 }
          cleanup
  br label %89

42:                                               ; preds = %52
  %43 = landingpad { ptr, i32 }
          cleanup
  br label %88

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

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

48:                                               ; preds = %37
  %49 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #6
  br label %50

50:                                               ; preds = %48, %46
  %.pn = phi { ptr, i32 } [ %49, %48 ], [ %47, %46 ]
  call void @_ZN3JPH9StreamOutD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #6
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %6) #6
  br label %51

51:                                               ; preds = %50, %44
  %.pn.pn = phi { ptr, i32 } [ %.pn, %50 ], [ %45, %44 ]
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %6) #6
  br label %88

52:                                               ; preds = %38, %28
  invoke void @_ZN3JPH8StreamIn4ReadIcSt11char_traitsIcESaIcEEEvRNSt7__cxx1112basic_stringIT_T0_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %53 unwind label %42

53:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 392, ptr nonnull %9) #6
  %54 = call noundef i32 @_ZStorSt13_Ios_OpenmodeS_(i32 noundef 16, i32 noundef 8)
  invoke void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(128) %9, ptr noundef nonnull align 8 dereferenceable(32) %5, i32 noundef %54)
          to label %55 unwind label %72

55:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #6
  call void @_ZN3JPH15StreamInWrapperC2ERSi(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %9)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %11) #6
  invoke void @_ZN3JPH5Shape23sRestoreFromBinaryStateERNS_8StreamInE(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Result") align 8 %11, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %56 unwind label %74

56:                                               ; preds = %55
  %57 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3JPH6ResultINS_3RefINS_5ShapeEEEE3GetEv(ptr noundef nonnull align 8 dereferenceable(33) %11)
          to label %58 unwind label %76

58:                                               ; preds = %56
  %59 = invoke noundef ptr @_ZN3JPH10StaticCastINS_20MutableCompoundShapeENS_5ShapeETnNSt9enable_ifIXoosr3stdE12is_base_of_vIT_T0_Esr3stdE12is_base_of_vIS5_S4_EEbE4typeELb1EEEPS4_RKNS_3RefIS5_EE(ptr noundef nonnull align 8 dereferenceable(8) %57)
          to label %60 unwind label %76

60:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #6
  %61 = invoke noundef i32 @_ZNK3JPH13CompoundShape15GetNumSubShapesEv(ptr noundef nonnull align 16 dereferenceable(108) %59)
          to label %62 unwind label %78

62:                                               ; preds = %60
  %63 = zext i32 %61 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #6
  invoke void @_ZN3JPH5ArrayINS_8RefConstINS_5ShapeEEENS_12STLAllocatorIS3_EEEC2EmRKS3_RKS5_(ptr noundef nonnull align 8 dereferenceable(24) %12, i64 noundef %63, ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %64 unwind label %80

64:                                               ; preds = %62
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #6
  %65 = call noundef ptr @_ZN3JPH5ArrayINS_8RefConstINS_5ShapeEEENS_12STLAllocatorIS3_EEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %12)
  %66 = call noundef i64 @_ZNK3JPH5ArrayINS_8RefConstINS_5ShapeEEENS_12STLAllocatorIS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %12)
  %67 = trunc i64 %66 to i32
  invoke void @_ZN3JPH13CompoundShape20RestoreSubShapeStateEPKNS_8RefConstINS_5ShapeEEEj(ptr noundef nonnull align 16 dereferenceable(108) %59, ptr noundef %65, i32 noundef %67)
          to label %68 unwind label %82

68:                                               ; preds = %64
  %69 = load ptr, ptr %18, align 8, !tbaa !9
  %70 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH13PhysicsSystem22GetBodyInterfaceNoLockEv(ptr noundef nonnull align 16 dereferenceable(1172) %69)
  invoke void @_ZNK3JPH13BodyInterface8SetShapeERKNS_6BodyIDEPKNS_5ShapeEbNS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24) %70, ptr noundef nonnull align 4 dereferenceable(4) %3, ptr noundef nonnull %59, i1 noundef zeroext false, i32 noundef 1)
          to label %71 unwind label %82

71:                                               ; preds = %68
  call void @_ZN3JPH5ArrayINS_8RefConstINS_5ShapeEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #6
  call void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %11) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %11) #6
  call void @_ZN3JPH8StreamInD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #6
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %9) #6
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %9) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  br label %90

72:                                               ; preds = %53
  %73 = landingpad { ptr, i32 }
          cleanup
  br label %87

74:                                               ; preds = %55
  %75 = landingpad { ptr, i32 }
          cleanup
  br label %86

76:                                               ; preds = %58, %56
  %77 = landingpad { ptr, i32 }
          cleanup
  br label %85

78:                                               ; preds = %60
  %79 = landingpad { ptr, i32 }
          cleanup
  br label %84

80:                                               ; preds = %62
  %81 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #6
  br label %84

82:                                               ; preds = %68, %64
  %83 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3JPH5ArrayINS_8RefConstINS_5ShapeEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %12) #6
  br label %84

84:                                               ; preds = %82, %80, %78
  %.pn26 = phi { ptr, i32 } [ %83, %82 ], [ %81, %80 ], [ %79, %78 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #6
  br label %85

85:                                               ; preds = %84, %76
  %.pn26.pn = phi { ptr, i32 } [ %.pn26, %84 ], [ %77, %76 ]
  call void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %11) #6
  br label %86

86:                                               ; preds = %85, %74
  %.pn26.pn.pn = phi { ptr, i32 } [ %.pn26.pn, %85 ], [ %75, %74 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %11) #6
  call void @_ZN3JPH8StreamInD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #6
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %9) #6
  br label %87

87:                                               ; preds = %86, %72
  %.pn26.pn.pn.pn = phi { ptr, i32 } [ %.pn26.pn.pn, %86 ], [ %73, %72 ]
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %9) #6
  br label %88

88:                                               ; preds = %87, %51, %42
  %.pn26.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn26.pn.pn.pn, %87 ], [ %43, %42 ], [ %.pn.pn, %51 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  br label %89

89:                                               ; preds = %88, %40
  %.pn26.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn26.pn.pn.pn.pn, %88 ], [ %41, %40 ]
  call void @_ZN3JPH12BodyLockBaseILb1ENS_4BodyEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  resume { ptr, i32 } %.pn26.pn.pn.pn.pn.pn

90:                                               ; preds = %71, %21
  call void @_ZN3JPH12BodyLockBaseILb1ENS_4BodyEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  %91 = getelementptr inbounds i8, ptr %.034, i64 4
  %.not = icmp eq ptr %91, %17
  br i1 %.not, label %._crit_edge, label %21
}

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZStorSt13_Ios_OpenmodeS_(i32 noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) unnamed_addr #1 align 2

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

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

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

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

declare void @_ZN3JPH13CompoundShape20RestoreSubShapeStateEPKNS_8RefConstINS_5ShapeEEEj(ptr noundef nonnull align 16 dereferenceable(108), ptr noundef, i32 noundef) unnamed_addr #5

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

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

declare void @_ZNK3JPH13BodyInterface8SetShapeERKNS_6BodyIDEPKNS_5ShapeEbNS_11EActivationE(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef, i1 noundef zeroext, i32 noundef) local_unnamed_addr #5

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 16}
!10 = !{!"_ZTS4Test", !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !12, i64 48, !13, i64 56}
!11 = !{!"any pointer", !7, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!"_ZTSSt13unordered_mapIN3JPH6BodyIDENSt7__cxx1112basic_stringIcSt11char_traitsIcENS0_12STLAllocatorIcEEEESt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_S8_EEE", !14, i64 0}
!14 = !{!"_ZTSSt10_HashtableIN3JPH6BodyIDESt4pairIKS1_NSt7__cxx1112basic_stringIcSt11char_traitsIcENS0_12STLAllocatorIcEEEEESaISB_ENSt8__detail10_Select1stESt8equal_toIS1_ESt4hashIS1_ENSD_18_Mod_range_hashingENSD_20_Default_ranged_hashENSD_20_Prime_rehash_policyENSD_17_Hashtable_traitsILb1ELb0ELb1EEEE", !11, i64 0, !15, i64 8, !16, i64 16, !15, i64 24, !17, i64 32, !11, i64 48}
!15 = !{!"long", !7, i64 0}
!16 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !11, i64 0}
!17 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !18, i64 0, !15, i64 8}
!18 = !{!"float", !7, i64 0}
!19 = !{!20, !20, i64 0}
!20 = !{!"vtable pointer", !8, i64 0}


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