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

; 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" = type <{ %union.anon.130, i8, [7 x i8] }>
%union.anon.130 = 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.133 }
%"struct.std::__cxx11::basic_string<char, std::char_traits<char>, JPH::STLAllocator<char>>::_Alloc_hider" = type { ptr }
%union.anon.133 = type { i64, [8 x i8] }
%"class.JPH::Ref" = type { ptr }
%"class.JPH::Result.137" = type <{ %union.anon.138, i8, [7 x i8] }>
%union.anon.138 = type { %"class.std::__cxx11::basic_string" }
%"class.std::basic_string_view" = type { i64, ptr }
%"class.JPH::SoftBodySharedSettings" = type { %"class.JPH::RefTarget", %"class.JPH::Array", %"class.JPH::Array.38", %"class.JPH::Array.41", %"class.JPH::Array.44", %"class.JPH::Array.47", %"class.JPH::Array.50", %"class.JPH::Array.53", %"class.JPH::Array.56", %"class.JPH::Array.59", float, %"class.JPH::Array.62", %"class.JPH::Array.65", %"class.JPH::Array.68" }
%"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.38" = type { i64, i64, ptr }
%"class.JPH::Array.41" = type { i64, i64, ptr }
%"class.JPH::Array.44" = type { i64, i64, ptr }
%"class.JPH::Array.47" = type { i64, i64, ptr }
%"class.JPH::Array.50" = type { i64, i64, ptr }
%"class.JPH::Array.53" = type { i64, i64, ptr }
%"class.JPH::Array.56" = type { i64, i64, ptr }
%"class.JPH::Array.59" = type { i64, i64, ptr }
%"class.JPH::Array.62" = type { i64, i64, ptr }
%"class.JPH::Array.65" = type { i64, i64, ptr }
%"class.JPH::Array.68" = type { i64, i64, ptr }

@.str.19 = external hidden unnamed_addr constant [27 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH22SoftBodySharedSettingsdlEPv(ptr noundef) #3 align 2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH22SoftBodySharedSettings21sRestoreWithMaterialsERNS_8StreamInERNS_5ArrayINS_3RefIS0_EENS_12STLAllocatorIS5_EEEERNS3_INS4_INS_15PhysicsMaterialEEENS6_ISB_EEEE(ptr dead_on_unwind noalias writable sret(%"class.JPH::Result") align 8 %0, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 1 %3) #5 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i1, align 1
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %"class.JPH::Ref", align 8
  %15 = alloca %"class.JPH::Ref", align 8
  %16 = alloca %"class.JPH::Result.137", align 8
  %17 = alloca %"class.std::basic_string_view", align 8
  store ptr %0, ptr %5, align 8
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  store i1 false, ptr %9, align 1
  call void @_ZN3JPH6ResultINS_3RefINS_22SoftBodySharedSettingsEEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(33) %0)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  %18 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN3JPH8StreamIn4ReadIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %19 unwind label %35

19:                                               ; preds = %4
  %20 = load ptr, ptr %6, align 8, !tbaa !5
  %21 = load ptr, ptr %20, align 8, !tbaa !9
  %22 = getelementptr inbounds ptr, ptr %21, i64 3
  %23 = load ptr, ptr %22, align 8
  %24 = invoke noundef zeroext i1 %23(ptr noundef nonnull align 8 dereferenceable(8) %20)
          to label %25 unwind label %35

25:                                               ; preds = %19
  br i1 %24, label %33, label %26

26:                                               ; preds = %25
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = load ptr, ptr %27, align 8, !tbaa !9
  %29 = getelementptr inbounds ptr, ptr %28, i64 4
  %30 = load ptr, ptr %29, align 8
  %31 = invoke noundef zeroext i1 %30(ptr noundef nonnull align 8 dereferenceable(8) %27)
          to label %32 unwind label %35

32:                                               ; preds = %26
  br i1 %31, label %33, label %39

33:                                               ; preds = %32, %25
  invoke void @_ZN3JPH6ResultINS_3RefINS_22SoftBodySharedSettingsEEEE8SetErrorEPKc(ptr noundef nonnull align 8 dereferenceable(33) %0, ptr noundef @.str.19)
          to label %34 unwind label %35

34:                                               ; preds = %33
  store i1 true, ptr %9, align 1
  store i32 1, ptr %13, align 4
  br label %131

35:                                               ; preds = %66, %61, %54, %33, %26, %19, %4
  %36 = landingpad { ptr, i32 }
          cleanup
  %37 = extractvalue { ptr, i32 } %36, 0
  store ptr %37, ptr %11, align 8
  %38 = extractvalue { ptr, i32 } %36, 1
  store i32 %38, ptr %12, align 4
  br label %133

39:                                               ; preds = %32
  %40 = load i32, ptr %10, align 4, !tbaa !11
  %41 = icmp eq i32 %40, -1
  br i1 %41, label %42, label %54

42:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  invoke void @_ZN3JPH3RefINS_22SoftBodySharedSettingsEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef null)
          to label %43 unwind label %45

43:                                               ; preds = %42
  invoke void @_ZN3JPH6ResultINS_3RefINS_22SoftBodySharedSettingsEEEE3SetEOS3_(ptr noundef nonnull align 8 dereferenceable(33) %0, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %44 unwind label %49

44:                                               ; preds = %43
  call void @_ZN3JPH3RefINS_22SoftBodySharedSettingsEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  store i1 true, ptr %9, align 1
  store i32 1, ptr %13, align 4
  br label %131

45:                                               ; preds = %42
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %11, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %12, align 4
  br label %53

49:                                               ; preds = %43
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %11, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %12, align 4
  call void @_ZN3JPH3RefINS_22SoftBodySharedSettingsEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #7
  br label %53

53:                                               ; preds = %49, %45
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %133

54:                                               ; preds = %39
  %55 = load i32, ptr %10, align 4, !tbaa !11
  %56 = zext i32 %55 to i64
  %57 = load ptr, ptr %7, align 8, !tbaa !5
  %58 = invoke noundef i64 @_ZNK3JPH5ArrayINS_3RefINS_22SoftBodySharedSettingsEEENS_12STLAllocatorIS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %57)
          to label %59 unwind label %35

59:                                               ; preds = %54
  %60 = icmp ult i64 %56, %58
  br i1 %60, label %61, label %68

61:                                               ; preds = %59
  %62 = load ptr, ptr %7, align 8, !tbaa !5
  %63 = load i32, ptr %10, align 4, !tbaa !11
  %64 = zext i32 %63 to i64
  %65 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH5ArrayINS_3RefINS_22SoftBodySharedSettingsEEENS_12STLAllocatorIS3_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %62, i64 noundef %64)
          to label %66 unwind label %35

66:                                               ; preds = %61
  invoke void @_ZN3JPH6ResultINS_3RefINS_22SoftBodySharedSettingsEEEE3SetERKS3_(ptr noundef nonnull align 8 dereferenceable(33) %0, ptr noundef nonnull align 8 dereferenceable(8) %65)
          to label %67 unwind label %35

67:                                               ; preds = %66
  store i1 true, ptr %9, align 1
  store i32 1, ptr %13, align 4
  br label %131

68:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %69 = invoke noundef ptr @_ZN3JPH22SoftBodySharedSettingsnwEm(i64 noundef 304)
          to label %70 unwind label %91

70:                                               ; preds = %68
  invoke void @_ZN3JPH22SoftBodySharedSettingsC2Ev(ptr noundef nonnull align 8 dereferenceable(304) %69)
          to label %71 unwind label %95

71:                                               ; preds = %70
  invoke void @_ZN3JPH3RefINS_22SoftBodySharedSettingsEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef %69)
          to label %72 unwind label %91

72:                                               ; preds = %71
  %73 = invoke noundef ptr @_ZNK3JPH3RefINS_22SoftBodySharedSettingsEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %74 unwind label %99

74:                                               ; preds = %72
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN3JPH22SoftBodySharedSettings18RestoreBinaryStateERNS_8StreamInE(ptr noundef nonnull align 8 dereferenceable(304) %73, ptr noundef nonnull align 8 dereferenceable(8) %75)
          to label %76 unwind label %99

76:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 40, ptr %16) #7
  %77 = load ptr, ptr %6, align 8, !tbaa !5
  %78 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_ZN3JPH11StreamUtils18RestoreObjectArrayINS_5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS5_EEEES4_EENS_6ResultIT_EERNS_8StreamInERNS2_INS_3RefIT0_EENS6_ISG_EEEE(ptr dead_on_unwind writable sret(%"class.JPH::Result.137") align 8 %16, ptr noundef nonnull align 8 dereferenceable(8) %77, ptr noundef nonnull align 1 %78)
          to label %79 unwind label %103

79:                                               ; preds = %76
  %80 = invoke noundef zeroext i1 @_ZNK3JPH6ResultINS_5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS4_EEEEE8HasErrorEv(ptr noundef nonnull align 8 dereferenceable(33) %16)
          to label %81 unwind label %107

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

82:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #7
  %83 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK3JPH6ResultINS_5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS4_EEEEE8GetErrorB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(33) %16)
          to label %84 unwind label %111

84:                                               ; preds = %82
  %85 = call { i64, ptr } @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcEN3JPH12STLAllocatorIcEEEcvSt17basic_string_viewIcS2_EEv(ptr noundef nonnull align 8 dereferenceable(32) %83) #7
  %86 = getelementptr inbounds { i64, ptr }, ptr %17, i32 0, i32 0
  %87 = extractvalue { i64, ptr } %85, 0
  store i64 %87, ptr %86, align 8
  %88 = getelementptr inbounds { i64, ptr }, ptr %17, i32 0, i32 1
  %89 = extractvalue { i64, ptr } %85, 1
  store ptr %89, ptr %88, align 8
  invoke void @_ZN3JPH6ResultINS_3RefINS_22SoftBodySharedSettingsEEEE8SetErrorERKSt17basic_string_viewIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(33) %0, ptr noundef nonnull align 8 dereferenceable(16) %17)
          to label %90 unwind label %111

90:                                               ; preds = %84
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #7
  store i1 true, ptr %9, align 1
  store i32 1, ptr %13, align 4
  br label %126

91:                                               ; preds = %71, %68
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %11, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %12, align 4
  br label %130

95:                                               ; preds = %70
  %96 = landingpad { ptr, i32 }
          cleanup
  %97 = extractvalue { ptr, i32 } %96, 0
  store ptr %97, ptr %11, align 8
  %98 = extractvalue { ptr, i32 } %96, 1
  store i32 %98, ptr %12, align 4
  call void @_ZN3JPH22SoftBodySharedSettingsdlEPv(ptr noundef %69) #7
  br label %130

99:                                               ; preds = %74, %72
  %100 = landingpad { ptr, i32 }
          cleanup
  %101 = extractvalue { ptr, i32 } %100, 0
  store ptr %101, ptr %11, align 8
  %102 = extractvalue { ptr, i32 } %100, 1
  store i32 %102, ptr %12, align 4
  br label %129

103:                                              ; preds = %76
  %104 = landingpad { ptr, i32 }
          cleanup
  %105 = extractvalue { ptr, i32 } %104, 0
  store ptr %105, ptr %11, align 8
  %106 = extractvalue { ptr, i32 } %104, 1
  store i32 %106, ptr %12, align 4
  br label %128

107:                                              ; preds = %124, %122, %119, %117, %115, %79
  %108 = landingpad { ptr, i32 }
          cleanup
  %109 = extractvalue { ptr, i32 } %108, 0
  store ptr %109, ptr %11, align 8
  %110 = extractvalue { ptr, i32 } %108, 1
  store i32 %110, ptr %12, align 4
  br label %127

111:                                              ; preds = %84, %82
  %112 = landingpad { ptr, i32 }
          cleanup
  %113 = extractvalue { ptr, i32 } %112, 0
  store ptr %113, ptr %11, align 8
  %114 = extractvalue { ptr, i32 } %112, 1
  store i32 %114, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #7
  br label %127

115:                                              ; preds = %81
  %116 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3JPH6ResultINS_5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS4_EEEEE3GetEv(ptr noundef nonnull align 8 dereferenceable(33) %16)
          to label %117 unwind label %107

117:                                              ; preds = %115
  %118 = invoke noundef ptr @_ZNK3JPH3RefINS_22SoftBodySharedSettingsEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %119 unwind label %107

119:                                              ; preds = %117
  %120 = getelementptr inbounds %"class.JPH::SoftBodySharedSettings", ptr %118, i32 0, i32 9
  %121 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEEaSERKS6_(ptr noundef nonnull align 8 dereferenceable(24) %120, ptr noundef nonnull align 8 dereferenceable(24) %116)
          to label %122 unwind label %107

122:                                              ; preds = %119
  %123 = load ptr, ptr %7, align 8, !tbaa !5
  invoke void @_ZN3JPH5ArrayINS_3RefINS_22SoftBodySharedSettingsEEENS_12STLAllocatorIS3_EEE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %123, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %124 unwind label %107

124:                                              ; preds = %122
  invoke void @_ZN3JPH6ResultINS_3RefINS_22SoftBodySharedSettingsEEEE3SetERKS3_(ptr noundef nonnull align 8 dereferenceable(33) %0, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %125 unwind label %107

125:                                              ; preds = %124
  store i1 true, ptr %9, align 1
  store i32 1, ptr %13, align 4
  br label %126

126:                                              ; preds = %125, %90
  call void @_ZN3JPH6ResultINS_5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS4_EEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %16) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %16) #7
  call void @_ZN3JPH3RefINS_22SoftBodySharedSettingsEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %131

127:                                              ; preds = %111, %107
  call void @_ZN3JPH6ResultINS_5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS4_EEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %16) #7
  br label %128

128:                                              ; preds = %127, %103
  call void @llvm.lifetime.end.p0(i64 40, ptr %16) #7
  br label %129

129:                                              ; preds = %128, %99
  call void @_ZN3JPH3RefINS_22SoftBodySharedSettingsEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %15) #7
  br label %130

130:                                              ; preds = %129, %95, %91
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  br label %133

131:                                              ; preds = %126, %67, %44, %34
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  %132 = load i1, ptr %9, align 1
  br i1 %132, label %135, label %134

133:                                              ; preds = %130, %53, %35
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  call void @_ZN3JPH6ResultINS_3RefINS_22SoftBodySharedSettingsEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %0) #7
  br label %136

134:                                              ; preds = %131
  call void @_ZN3JPH6ResultINS_3RefINS_22SoftBodySharedSettingsEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %0) #7
  br label %135

135:                                              ; preds = %134, %131
  ret void

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH11StreamUtils18RestoreObjectArrayINS_5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS5_EEEES4_EENS_6ResultIT_EERNS_8StreamInERNS2_INS_3RefIT0_EENS6_ISG_EEEE(ptr dead_on_unwind noalias writable sret(%"class.JPH::Result.137") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1) #5

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

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

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

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

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"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" = type <{ %union.anon.130, i8, [7 x i8] }>
%union.anon.130 = 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.133 }
%"struct.std::__cxx11::basic_string<char, std::char_traits<char>, JPH::STLAllocator<char>>::_Alloc_hider" = type { ptr }
%union.anon.133 = type { i64, [8 x i8] }
%"class.JPH::Ref" = type { ptr }
%"class.JPH::Result.137" = type <{ %union.anon.138, i8, [7 x i8] }>
%union.anon.138 = type { %"class.std::__cxx11::basic_string" }
%"class.std::basic_string_view" = type { i64, ptr }

@.str.19 = external hidden unnamed_addr constant [27 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

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

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

; Function Attrs: alwaysinline mustprogress nounwind uwtable
declare dso_local void @_ZN3JPH22SoftBodySharedSettingsdlEPv(ptr noundef) local_unnamed_addr #3 align 2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH22SoftBodySharedSettings21sRestoreWithMaterialsERNS_8StreamInERNS_5ArrayINS_3RefIS0_EENS_12STLAllocatorIS5_EEEERNS3_INS4_INS_15PhysicsMaterialEEENS6_ISB_EEEE(ptr dead_on_unwind noalias nonnull writable sret(%"class.JPH::Result") align 8 %0, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 1 %3) local_unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca i32, align 4
  %6 = alloca %"class.JPH::Ref", align 8
  %7 = alloca %"class.JPH::Ref", align 8
  %8 = alloca %"class.JPH::Result.137", align 8
  %9 = alloca %"class.std::basic_string_view", align 8
  tail call void @_ZN3JPH6ResultINS_3RefINS_22SoftBodySharedSettingsEEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(33) %0)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #7
  invoke void @_ZN3JPH8StreamIn4ReadIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %5)
          to label %10 unwind label %23

10:                                               ; preds = %4
  %11 = load ptr, ptr %1, align 8, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %11, i64 24
  %13 = load ptr, ptr %12, align 8
  %14 = invoke noundef zeroext i1 %13(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %15 unwind label %23

15:                                               ; preds = %10
  br i1 %14, label %22, label %16

16:                                               ; preds = %15
  %17 = load ptr, ptr %1, align 8, !tbaa !5
  %18 = getelementptr inbounds i8, ptr %17, i64 32
  %19 = load ptr, ptr %18, align 8
  %20 = invoke noundef zeroext i1 %19(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %21 unwind label %23

21:                                               ; preds = %16
  br i1 %20, label %22, label %25

22:                                               ; preds = %21, %15
  invoke void @_ZN3JPH6ResultINS_3RefINS_22SoftBodySharedSettingsEEEE8SetErrorEPKc(ptr noundef nonnull align 8 dereferenceable(33) %0, ptr noundef nonnull @.str.19)
          to label %83 unwind label %23

23:                                               ; preds = %40, %36, %22, %16, %10, %4
  %24 = landingpad { ptr, i32 }
          cleanup
  br label %84

25:                                               ; preds = %21
  %26 = load i32, ptr %5, align 4, !tbaa !8
  %27 = icmp eq i32 %26, -1
  br i1 %27, label %28, label %32

28:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  invoke void @_ZN3JPH3RefINS_22SoftBodySharedSettingsEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef null)
          to label %29 unwind label %30

29:                                               ; preds = %28
  call void @_ZN3JPH6ResultINS_3RefINS_22SoftBodySharedSettingsEEEE3SetEOS3_(ptr noundef nonnull align 8 dereferenceable(33) %0, ptr noundef nonnull align 8 dereferenceable(8) %6)
  call void @_ZN3JPH3RefINS_22SoftBodySharedSettingsEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  br label %83

30:                                               ; preds = %28
  %31 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  br label %84

32:                                               ; preds = %25
  %33 = zext i32 %26 to i64
  %34 = call noundef i64 @_ZNK3JPH5ArrayINS_3RefINS_22SoftBodySharedSettingsEEENS_12STLAllocatorIS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %35 = icmp ugt i64 %34, %33
  br i1 %35, label %36, label %41

36:                                               ; preds = %32
  %37 = load i32, ptr %5, align 4, !tbaa !8
  %38 = zext i32 %37 to i64
  %39 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH5ArrayINS_3RefINS_22SoftBodySharedSettingsEEENS_12STLAllocatorIS3_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %38)
          to label %40 unwind label %23

40:                                               ; preds = %36
  invoke void @_ZN3JPH6ResultINS_3RefINS_22SoftBodySharedSettingsEEEE3SetERKS3_(ptr noundef nonnull align 8 dereferenceable(33) %0, ptr noundef nonnull align 8 dereferenceable(8) %39)
          to label %83 unwind label %23

41:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %42 = invoke noundef ptr @_ZN3JPH22SoftBodySharedSettingsnwEm(i64 noundef 304)
          to label %43 unwind label %58

43:                                               ; preds = %41
  invoke void @_ZN3JPH22SoftBodySharedSettingsC2Ev(ptr noundef nonnull align 8 dereferenceable(304) %42)
          to label %44 unwind label %60

44:                                               ; preds = %43
  invoke void @_ZN3JPH3RefINS_22SoftBodySharedSettingsEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull %42)
          to label %45 unwind label %58

45:                                               ; preds = %44
  %46 = call noundef ptr @_ZNK3JPH3RefINS_22SoftBodySharedSettingsEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
  invoke void @_ZN3JPH22SoftBodySharedSettings18RestoreBinaryStateERNS_8StreamInE(ptr noundef nonnull align 8 dereferenceable(304) %46, ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %47 unwind label %62

47:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %8) #7
  invoke void @_ZN3JPH11StreamUtils18RestoreObjectArrayINS_5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS5_EEEES4_EENS_6ResultIT_EERNS_8StreamInERNS2_INS_3RefIT0_EENS6_ISG_EEEE(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Result.137") align 8 %8, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 1 %3)
          to label %48 unwind label %64

48:                                               ; preds = %47
  %49 = call noundef zeroext i1 @_ZNK3JPH6ResultINS_5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS4_EEEEE8HasErrorEv(ptr noundef nonnull align 8 dereferenceable(33) %8)
  br i1 %49, label %50, label %70

50:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #7
  %51 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK3JPH6ResultINS_5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS4_EEEEE8GetErrorB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(33) %8)
          to label %52 unwind label %68

52:                                               ; preds = %50
  %53 = call { i64, ptr } @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcEN3JPH12STLAllocatorIcEEEcvSt17basic_string_viewIcS2_EEv(ptr noundef nonnull align 8 dereferenceable(32) %51) #7
  %54 = extractvalue { i64, ptr } %53, 0
  store i64 %54, ptr %9, align 8
  %55 = getelementptr inbounds i8, ptr %9, i64 8
  %56 = extractvalue { i64, ptr } %53, 1
  store ptr %56, ptr %55, align 8
  invoke void @_ZN3JPH6ResultINS_3RefINS_22SoftBodySharedSettingsEEEE8SetErrorERKSt17basic_string_viewIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(33) %0, ptr noundef nonnull align 8 dereferenceable(16) %9)
          to label %57 unwind label %68

57:                                               ; preds = %52
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #7
  br label %78

58:                                               ; preds = %44, %41
  %59 = landingpad { ptr, i32 }
          cleanup
  br label %82

60:                                               ; preds = %43
  %61 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3JPH22SoftBodySharedSettingsdlEPv(ptr noundef %42) #7
  br label %82

62:                                               ; preds = %45
  %63 = landingpad { ptr, i32 }
          cleanup
  br label %81

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

66:                                               ; preds = %77, %76, %72, %70
  %67 = landingpad { ptr, i32 }
          cleanup
  br label %79

68:                                               ; preds = %52, %50
  %69 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #7
  br label %79

70:                                               ; preds = %48
  %71 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3JPH6ResultINS_5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS4_EEEEE3GetEv(ptr noundef nonnull align 8 dereferenceable(33) %8)
          to label %72 unwind label %66

72:                                               ; preds = %70
  %73 = call noundef ptr @_ZNK3JPH3RefINS_22SoftBodySharedSettingsEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7)
  %74 = getelementptr inbounds i8, ptr %73, i64 200
  %75 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEEaSERKS6_(ptr noundef nonnull align 8 dereferenceable(24) %74, ptr noundef nonnull align 8 dereferenceable(24) %71)
          to label %76 unwind label %66

76:                                               ; preds = %72
  invoke void @_ZN3JPH5ArrayINS_3RefINS_22SoftBodySharedSettingsEEENS_12STLAllocatorIS3_EEE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %77 unwind label %66

77:                                               ; preds = %76
  invoke void @_ZN3JPH6ResultINS_3RefINS_22SoftBodySharedSettingsEEEE3SetERKS3_(ptr noundef nonnull align 8 dereferenceable(33) %0, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %78 unwind label %66

78:                                               ; preds = %77, %57
  call void @_ZN3JPH6ResultINS_5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS4_EEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %8) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #7
  call void @_ZN3JPH3RefINS_22SoftBodySharedSettingsEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  br label %83

79:                                               ; preds = %68, %66
  %.pn = phi { ptr, i32 } [ %69, %68 ], [ %67, %66 ]
  call void @_ZN3JPH6ResultINS_5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS4_EEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %8) #7
  br label %80

80:                                               ; preds = %79, %64
  %.pn.pn = phi { ptr, i32 } [ %.pn, %79 ], [ %65, %64 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #7
  br label %81

81:                                               ; preds = %80, %62
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %80 ], [ %63, %62 ]
  call void @_ZN3JPH3RefINS_22SoftBodySharedSettingsEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  br label %82

82:                                               ; preds = %81, %60, %58
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %81 ], [ %59, %58 ], [ %61, %60 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  br label %84

83:                                               ; preds = %40, %22, %78, %29
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  ret void

84:                                               ; preds = %82, %30, %23
  %.pn23 = phi { ptr, i32 } [ %24, %23 ], [ %31, %30 ], [ %.pn.pn.pn.pn, %82 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #7
  call void @_ZN3JPH6ResultINS_3RefINS_22SoftBodySharedSettingsEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %0) #7
  resume { ptr, i32 } %.pn23
}

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH11StreamUtils18RestoreObjectArrayINS_5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS5_EEEES4_EENS_6ResultIT_EERNS_8StreamInERNS2_INS_3RefIT0_EENS6_ISG_EEEE(ptr dead_on_unwind noalias writable sret(%"class.JPH::Result.137") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1) local_unnamed_addr #5

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

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

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

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

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

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

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

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


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass