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

; 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, i8, [7 x i8] }>
%union.anon = 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.0 }
%"struct.std::__cxx11::basic_string<char, std::char_traits<char>, JPH::STLAllocator<char>>::_Alloc_hider" = type { ptr }
%union.anon.0 = type { i64, [8 x i8] }
%"class.JPH::Ref" = type { ptr }
%"struct.JPH::AssertLastParam" = type { i8 }
%"class.JPH::Array" = type { i64, i64, ptr }
%"class.JPH::RefConst" = type { ptr }
%"class.JPH::Result.20" = type <{ %union.anon.21, i8, [7 x i8] }>
%union.anon.21 = type { %"class.std::__cxx11::basic_string" }
%"class.std::basic_string_view" = type { i64, ptr }

@.str.4 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [22 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH5Shape20sRestoreWithChildrenERNS_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) #1 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 %"class.JPH::Result", align 8
  %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::Result", align 8
  %16 = alloca %"struct.JPH::AssertLastParam", align 1
  %17 = alloca i32, align 4
  %18 = alloca %"class.JPH::Array", align 8
  %19 = alloca i64, align 8
  %20 = alloca i1, align 1
  %21 = alloca %"class.JPH::RefConst", align 8
  %22 = alloca %"class.JPH::Result.20", align 8
  %23 = alloca %"class.std::basic_string_view", align 8
  %24 = alloca ptr, 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
  call void @llvm.lifetime.start.p0(i64 40, ptr %9) #5
  call void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(33) %9)
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN3JPH8StreamIn4ReadIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %26 unwind label %42

26:                                               ; preds = %4
  %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 3
  %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 %42

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

33:                                               ; preds = %32
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  %35 = load ptr, ptr %34, align 8, !tbaa !9
  %36 = getelementptr inbounds ptr, ptr %35, i64 4
  %37 = load ptr, ptr %36, align 8
  %38 = invoke noundef zeroext i1 %37(ptr noundef nonnull align 8 dereferenceable(8) %34)
          to label %39 unwind label %42

39:                                               ; preds = %33
  br i1 %38, label %40, label %46

40:                                               ; preds = %39, %32
  invoke void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEE8SetErrorEPKc(ptr noundef nonnull align 8 dereferenceable(33) %9, ptr noundef @.str.4)
          to label %41 unwind label %42

41:                                               ; preds = %40
  call void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEEC2EOS4_(ptr noundef nonnull align 8 dereferenceable(33) %0, ptr noundef nonnull align 8 dereferenceable(33) %9) #5
  store i32 1, ptr %13, align 4
  br label %252

42:                                               ; preds = %103, %100, %94, %87, %77, %73, %68, %61, %40, %33, %26, %4
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %11, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %12, align 4
  br label %253

46:                                               ; preds = %39
  %47 = load i32, ptr %10, align 4, !tbaa !11
  %48 = icmp eq i32 %47, -1
  br i1 %48, label %49, label %61

49:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  invoke void @_ZN3JPH3RefINS_5ShapeEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef null)
          to label %50 unwind label %52

50:                                               ; preds = %49
  invoke void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEE3SetEOS3_(ptr noundef nonnull align 8 dereferenceable(33) %9, ptr noundef nonnull align 8 dereferenceable(8) %14)
          to label %51 unwind label %56

51:                                               ; preds = %50
  call void @_ZN3JPH3RefINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEEC2EOS4_(ptr noundef nonnull align 8 dereferenceable(33) %0, ptr noundef nonnull align 8 dereferenceable(33) %9) #5
  store i32 1, ptr %13, align 4
  br label %252

52:                                               ; preds = %49
  %53 = landingpad { ptr, i32 }
          cleanup
  %54 = extractvalue { ptr, i32 } %53, 0
  store ptr %54, ptr %11, align 8
  %55 = extractvalue { ptr, i32 } %53, 1
  store i32 %55, ptr %12, align 4
  br label %60

56:                                               ; preds = %50
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %11, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %12, align 4
  call void @_ZN3JPH3RefINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  br label %60

60:                                               ; preds = %56, %52
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %253

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

66:                                               ; preds = %61
  %67 = icmp ult i64 %63, %65
  br i1 %67, label %68, label %75

68:                                               ; preds = %66
  %69 = load ptr, ptr %7, align 8, !tbaa !5
  %70 = load i32, ptr %10, align 4, !tbaa !11
  %71 = zext i32 %70 to i64
  %72 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH5ArrayINS_3RefINS_5ShapeEEENS_12STLAllocatorIS3_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %69, i64 noundef %71)
          to label %73 unwind label %42

73:                                               ; preds = %68
  invoke void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEE3SetERKS3_(ptr noundef nonnull align 8 dereferenceable(33) %9, ptr noundef nonnull align 8 dereferenceable(8) %72)
          to label %74 unwind label %42

74:                                               ; preds = %73
  call void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEEC2EOS4_(ptr noundef nonnull align 8 dereferenceable(33) %0, ptr noundef nonnull align 8 dereferenceable(33) %9) #5
  store i32 1, ptr %13, align 4
  br label %252

75:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 40, ptr %15) #5
  %76 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN3JPH5Shape23sRestoreFromBinaryStateERNS_8StreamInE(ptr dead_on_unwind writable sret(%"class.JPH::Result") align 8 %15, ptr noundef nonnull align 8 dereferenceable(8) %76)
          to label %77 unwind label %82

77:                                               ; preds = %75
  %78 = call noundef nonnull align 8 dereferenceable(33) ptr @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(33) %9, ptr noundef nonnull align 8 dereferenceable(33) %15) #5
  call void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %15) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #5
  %79 = invoke noundef zeroext i1 @_ZNK3JPH6ResultINS_3RefINS_5ShapeEEEE8HasErrorEv(ptr noundef nonnull align 8 dereferenceable(33) %9)
          to label %80 unwind label %42

80:                                               ; preds = %77
  br i1 %79, label %81, label %86

81:                                               ; preds = %80
  call void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEEC2EOS4_(ptr noundef nonnull align 8 dereferenceable(33) %0, ptr noundef nonnull align 8 dereferenceable(33) %9) #5
  store i32 1, ptr %13, align 4
  br label %252

82:                                               ; preds = %75
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %11, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #5
  br label %253

86:                                               ; preds = %80
  br label %87

87:                                               ; preds = %86
  %88 = load ptr, ptr %7, align 8, !tbaa !5
  %89 = invoke noundef i64 @_ZNK3JPH5ArrayINS_3RefINS_5ShapeEEENS_12STLAllocatorIS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %88)
          to label %90 unwind label %42

90:                                               ; preds = %87
  %91 = load i32, ptr %10, align 4, !tbaa !11
  %92 = zext i32 %91 to i64
  %93 = icmp eq i64 %89, %92
  br i1 %93, label %98, label %94

94:                                               ; preds = %90
  %95 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef @.str.5, ptr noundef @.str.6, i32 noundef 178)
          to label %96 unwind label %42

96:                                               ; preds = %94
  br i1 %95, label %97, label %98

97:                                               ; preds = %96
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #5, !srcloc !13
  br label %98

98:                                               ; preds = %97, %96, %90
  br label %99

99:                                               ; preds = %98
  br label %100

100:                                              ; preds = %99
  %101 = load ptr, ptr %7, align 8, !tbaa !5
  %102 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3JPH6ResultINS_3RefINS_5ShapeEEEE3GetEv(ptr noundef nonnull align 8 dereferenceable(33) %9)
          to label %103 unwind label %42

103:                                              ; preds = %100
  invoke void @_ZN3JPH5ArrayINS_3RefINS_5ShapeEEENS_12STLAllocatorIS3_EEE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %101, ptr noundef nonnull align 8 dereferenceable(8) %102)
          to label %104 unwind label %42

104:                                              ; preds = %103
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %105 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZN3JPH8StreamIn4ReadIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8) %105, ptr noundef nonnull align 4 dereferenceable(4) %17)
          to label %106 unwind label %122

106:                                              ; preds = %104
  %107 = load ptr, ptr %6, align 8, !tbaa !5
  %108 = load ptr, ptr %107, align 8, !tbaa !9
  %109 = getelementptr inbounds ptr, ptr %108, i64 3
  %110 = load ptr, ptr %109, align 8
  %111 = invoke noundef zeroext i1 %110(ptr noundef nonnull align 8 dereferenceable(8) %107)
          to label %112 unwind label %122

112:                                              ; preds = %106
  br i1 %111, label %120, label %113

113:                                              ; preds = %112
  %114 = load ptr, ptr %6, align 8, !tbaa !5
  %115 = load ptr, ptr %114, align 8, !tbaa !9
  %116 = getelementptr inbounds ptr, ptr %115, i64 4
  %117 = load ptr, ptr %116, align 8
  %118 = invoke noundef zeroext i1 %117(ptr noundef nonnull align 8 dereferenceable(8) %114)
          to label %119 unwind label %122

119:                                              ; preds = %113
  br i1 %118, label %120, label %126

120:                                              ; preds = %119, %112
  invoke void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEE8SetErrorEPKc(ptr noundef nonnull align 8 dereferenceable(33) %9, ptr noundef @.str.7)
          to label %121 unwind label %122

121:                                              ; preds = %120
  call void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEEC2EOS4_(ptr noundef nonnull align 8 dereferenceable(33) %0, ptr noundef nonnull align 8 dereferenceable(33) %9) #5
  store i32 1, ptr %13, align 4
  br label %250

122:                                              ; preds = %120, %113, %106, %104
  %123 = landingpad { ptr, i32 }
          cleanup
  %124 = extractvalue { ptr, i32 } %123, 0
  store ptr %124, ptr %11, align 8
  %125 = extractvalue { ptr, i32 } %123, 1
  store i32 %125, ptr %12, align 4
  br label %251

126:                                              ; preds = %119
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #5
  call void @_ZN3JPH5ArrayINS_8RefConstINS_5ShapeEEENS_12STLAllocatorIS3_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #5
  %127 = load i32, ptr %17, align 4, !tbaa !11
  %128 = zext i32 %127 to i64
  invoke void @_ZN3JPH5ArrayINS_8RefConstINS_5ShapeEEENS_12STLAllocatorIS3_EEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %18, i64 noundef %128)
          to label %129 unwind label %136

129:                                              ; preds = %126
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  store i64 0, ptr %19, align 8, !tbaa !14
  br label %130

130:                                              ; preds = %167, %129
  %131 = load i64, ptr %19, align 8, !tbaa !14
  %132 = load i32, ptr %17, align 4, !tbaa !11
  %133 = zext i32 %132 to i64
  %134 = icmp ult i64 %131, %133
  br i1 %134, label %140, label %135

135:                                              ; preds = %130
  store i32 4, ptr %13, align 4
  br label %180

136:                                              ; preds = %191, %189, %187, %185, %183, %126
  %137 = landingpad { ptr, i32 }
          cleanup
  %138 = extractvalue { ptr, i32 } %137, 0
  store ptr %138, ptr %11, align 8
  %139 = extractvalue { ptr, i32 } %137, 1
  store i32 %139, ptr %12, align 4
  br label %249

140:                                              ; preds = %130
  store i1 false, ptr %20, align 1
  %141 = load ptr, ptr %6, align 8, !tbaa !5
  %142 = load ptr, ptr %7, align 8, !tbaa !5
  %143 = load ptr, ptr %8, align 8, !tbaa !5
  invoke void @_ZN3JPH5Shape20sRestoreWithChildrenERNS_8StreamInERNS_5ArrayINS_3RefIS0_EENS_12STLAllocatorIS5_EEEERNS3_INS4_INS_15PhysicsMaterialEEENS6_ISB_EEEE(ptr dead_on_unwind writable sret(%"class.JPH::Result") align 8 %0, ptr noundef nonnull align 8 dereferenceable(8) %141, ptr noundef nonnull align 8 dereferenceable(24) %142, ptr noundef nonnull align 1 %143)
          to label %144 unwind label %148

144:                                              ; preds = %140
  %145 = invoke noundef zeroext i1 @_ZNK3JPH6ResultINS_3RefINS_5ShapeEEEE8HasErrorEv(ptr noundef nonnull align 8 dereferenceable(33) %0)
          to label %146 unwind label %152

146:                                              ; preds = %144
  br i1 %145, label %147, label %156

147:                                              ; preds = %146
  store i1 true, ptr %20, align 1
  store i32 1, ptr %13, align 4
  br label %161

148:                                              ; preds = %140
  %149 = landingpad { ptr, i32 }
          cleanup
  %150 = extractvalue { ptr, i32 } %149, 0
  store ptr %150, ptr %11, align 8
  %151 = extractvalue { ptr, i32 } %149, 1
  store i32 %151, ptr %12, align 4
  br label %182

152:                                              ; preds = %144
  %153 = landingpad { ptr, i32 }
          cleanup
  %154 = extractvalue { ptr, i32 } %153, 0
  store ptr %154, ptr %11, align 8
  %155 = extractvalue { ptr, i32 } %153, 1
  store i32 %155, ptr %12, align 4
  br label %179

156:                                              ; preds = %146
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  %157 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3JPH6ResultINS_3RefINS_5ShapeEEEE3GetEv(ptr noundef nonnull align 8 dereferenceable(33) %0)
          to label %158 unwind label %170

158:                                              ; preds = %156
  invoke void @_ZN3JPH8RefConstINS_5ShapeEEC2ERKNS_3RefIS1_EE(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %157)
          to label %159 unwind label %170

159:                                              ; preds = %158
  invoke void @_ZN3JPH5ArrayINS_8RefConstINS_5ShapeEEENS_12STLAllocatorIS3_EEE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %18, ptr noundef nonnull align 8 dereferenceable(8) %21)
          to label %160 unwind label %174

160:                                              ; preds = %159
  call void @_ZN3JPH8RefConstINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  store i32 0, ptr %13, align 4
  br label %161

161:                                              ; preds = %160, %147
  %162 = load i1, ptr %20, align 1
  br i1 %162, label %164, label %163

163:                                              ; preds = %161
  call void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %0) #5
  br label %164

164:                                              ; preds = %163, %161
  %165 = load i32, ptr %13, align 4
  switch i32 %165, label %180 [
    i32 0, label %166
  ]

166:                                              ; preds = %164
  br label %167

167:                                              ; preds = %166
  %168 = load i64, ptr %19, align 8, !tbaa !14
  %169 = add i64 %168, 1
  store i64 %169, ptr %19, align 8, !tbaa !14
  br label %130, !llvm.loop !16

170:                                              ; preds = %158, %156
  %171 = landingpad { ptr, i32 }
          cleanup
  %172 = extractvalue { ptr, i32 } %171, 0
  store ptr %172, ptr %11, align 8
  %173 = extractvalue { ptr, i32 } %171, 1
  store i32 %173, ptr %12, align 4
  br label %178

174:                                              ; preds = %159
  %175 = landingpad { ptr, i32 }
          cleanup
  %176 = extractvalue { ptr, i32 } %175, 0
  store ptr %176, ptr %11, align 8
  %177 = extractvalue { ptr, i32 } %175, 1
  store i32 %177, ptr %12, align 4
  call void @_ZN3JPH8RefConstINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %21) #5
  br label %178

178:                                              ; preds = %174, %170
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  br label %179

179:                                              ; preds = %178, %152
  call void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %0) #5
  br label %182

180:                                              ; preds = %164, %135
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  %181 = load i32, ptr %13, align 4
  switch i32 %181, label %248 [
    i32 4, label %183
  ]

182:                                              ; preds = %179, %148
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  br label %249

183:                                              ; preds = %180
  %184 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3JPH6ResultINS_3RefINS_5ShapeEEEE3GetEv(ptr noundef nonnull align 8 dereferenceable(33) %9)
          to label %185 unwind label %136

185:                                              ; preds = %183
  %186 = invoke noundef ptr @_ZNK3JPH3RefINS_5ShapeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %184)
          to label %187 unwind label %136

187:                                              ; preds = %185
  %188 = invoke noundef ptr @_ZN3JPH5ArrayINS_8RefConstINS_5ShapeEEENS_12STLAllocatorIS3_EEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %18)
          to label %189 unwind label %136

189:                                              ; preds = %187
  %190 = invoke noundef i64 @_ZNK3JPH5ArrayINS_8RefConstINS_5ShapeEEENS_12STLAllocatorIS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %18)
          to label %191 unwind label %136

191:                                              ; preds = %189
  %192 = trunc i64 %190 to i32
  %193 = load ptr, ptr %186, align 8, !tbaa !9
  %194 = getelementptr inbounds ptr, ptr %193, i64 28
  %195 = load ptr, ptr %194, align 8
  invoke void %195(ptr noundef nonnull align 8 dereferenceable(26) %186, ptr noundef %188, i32 noundef %192)
          to label %196 unwind label %136

196:                                              ; preds = %191
  call void @llvm.lifetime.start.p0(i64 40, ptr %22) #5
  %197 = load ptr, ptr %6, align 8, !tbaa !5
  %198 = 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.20") align 8 %22, ptr noundef nonnull align 8 dereferenceable(8) %197, ptr noundef nonnull align 1 %198)
          to label %199 unwind label %211

199:                                              ; preds = %196
  %200 = invoke noundef zeroext i1 @_ZNK3JPH6ResultINS_5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS4_EEEEE8HasErrorEv(ptr noundef nonnull align 8 dereferenceable(33) %22)
          to label %201 unwind label %215

201:                                              ; preds = %199
  br i1 %200, label %202, label %223

202:                                              ; preds = %201
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #5
  %203 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK3JPH6ResultINS_5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS4_EEEEE8GetErrorB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(33) %22)
          to label %204 unwind label %219

204:                                              ; preds = %202
  %205 = call { i64, ptr } @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcEN3JPH12STLAllocatorIcEEEcvSt17basic_string_viewIcS2_EEv(ptr noundef nonnull align 8 dereferenceable(32) %203) #5
  %206 = getelementptr inbounds { i64, ptr }, ptr %23, i32 0, i32 0
  %207 = extractvalue { i64, ptr } %205, 0
  store i64 %207, ptr %206, align 8
  %208 = getelementptr inbounds { i64, ptr }, ptr %23, i32 0, i32 1
  %209 = extractvalue { i64, ptr } %205, 1
  store ptr %209, ptr %208, align 8
  invoke void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEE8SetErrorERKSt17basic_string_viewIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(33) %9, ptr noundef nonnull align 8 dereferenceable(16) %23)
          to label %210 unwind label %219

210:                                              ; preds = %204
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #5
  call void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEEC2EOS4_(ptr noundef nonnull align 8 dereferenceable(33) %0, ptr noundef nonnull align 8 dereferenceable(33) %9) #5
  store i32 1, ptr %13, align 4
  br label %245

211:                                              ; preds = %196
  %212 = landingpad { ptr, i32 }
          cleanup
  %213 = extractvalue { ptr, i32 } %212, 0
  store ptr %213, ptr %11, align 8
  %214 = extractvalue { ptr, i32 } %212, 1
  store i32 %214, ptr %12, align 4
  br label %247

215:                                              ; preds = %199
  %216 = landingpad { ptr, i32 }
          cleanup
  %217 = extractvalue { ptr, i32 } %216, 0
  store ptr %217, ptr %11, align 8
  %218 = extractvalue { ptr, i32 } %216, 1
  store i32 %218, ptr %12, align 4
  br label %246

219:                                              ; preds = %204, %202
  %220 = landingpad { ptr, i32 }
          cleanup
  %221 = extractvalue { ptr, i32 } %220, 0
  store ptr %221, ptr %11, align 8
  %222 = extractvalue { ptr, i32 } %220, 1
  store i32 %222, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #5
  br label %246

223:                                              ; preds = %201
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #5
  %224 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3JPH6ResultINS_5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS4_EEEEE3GetEv(ptr noundef nonnull align 8 dereferenceable(33) %22)
          to label %225 unwind label %241

225:                                              ; preds = %223
  store ptr %224, ptr %24, align 8, !tbaa !5
  %226 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3JPH6ResultINS_3RefINS_5ShapeEEEE3GetEv(ptr noundef nonnull align 8 dereferenceable(33) %9)
          to label %227 unwind label %241

227:                                              ; preds = %225
  %228 = invoke noundef ptr @_ZNK3JPH3RefINS_5ShapeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %226)
          to label %229 unwind label %241

229:                                              ; preds = %227
  %230 = load ptr, ptr %24, align 8, !tbaa !5
  %231 = invoke noundef ptr @_ZNK3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %230)
          to label %232 unwind label %241

232:                                              ; preds = %229
  %233 = load ptr, ptr %24, align 8, !tbaa !5
  %234 = invoke noundef i64 @_ZNK3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %233)
          to label %235 unwind label %241

235:                                              ; preds = %232
  %236 = trunc i64 %234 to i32
  %237 = load ptr, ptr %228, align 8, !tbaa !9
  %238 = getelementptr inbounds ptr, ptr %237, i64 26
  %239 = load ptr, ptr %238, align 8
  invoke void %239(ptr noundef nonnull align 8 dereferenceable(26) %228, ptr noundef %231, i32 noundef %236)
          to label %240 unwind label %241

240:                                              ; preds = %235
  call void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEEC2EOS4_(ptr noundef nonnull align 8 dereferenceable(33) %0, ptr noundef nonnull align 8 dereferenceable(33) %9) #5
  store i32 1, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  br label %245

241:                                              ; preds = %235, %232, %229, %227, %225, %223
  %242 = landingpad { ptr, i32 }
          cleanup
  %243 = extractvalue { ptr, i32 } %242, 0
  store ptr %243, ptr %11, align 8
  %244 = extractvalue { ptr, i32 } %242, 1
  store i32 %244, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #5
  br label %246

245:                                              ; preds = %240, %210
  call void @_ZN3JPH6ResultINS_5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS4_EEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %22) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %22) #5
  br label %248

246:                                              ; preds = %241, %219, %215
  call void @_ZN3JPH6ResultINS_5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS4_EEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %22) #5
  br label %247

247:                                              ; preds = %246, %211
  call void @llvm.lifetime.end.p0(i64 40, ptr %22) #5
  br label %249

248:                                              ; preds = %245, %180
  call void @_ZN3JPH5ArrayINS_8RefConstINS_5ShapeEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #5
  br label %250

249:                                              ; preds = %247, %182, %136
  call void @_ZN3JPH5ArrayINS_8RefConstINS_5ShapeEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #5
  br label %251

250:                                              ; preds = %248, %121
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %252

251:                                              ; preds = %249, %122
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %253

252:                                              ; preds = %250, %81, %74, %51, %41
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %9) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %9) #5
  ret void

253:                                              ; preds = %251, %82, %60, %42
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %9) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr %9) #5
  br label %254

254:                                              ; preds = %253
  %255 = load ptr, ptr %11, align 8
  %256 = load i32, ptr %12, align 4
  %257 = insertvalue { ptr, i32 } poison, ptr %255, 0
  %258 = insertvalue { ptr, i32 } %257, i32 %256, 1
  resume { ptr, i32 } %258
}

; 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)) #1 align 2

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

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

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

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

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

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

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

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

; 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: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayINS_8RefConstINS_5ShapeEEENS_12STLAllocatorIS3_EEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN3JPH5ArrayINS_8RefConstINS_5ShapeEEENS_12STLAllocatorIS3_EEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24)) #4 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.20") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1) #1

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #4 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 #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 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 = { 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}
!13 = !{i64 2157942471}
!14 = !{!15, !15, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}


; 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, i8, [7 x i8] }>
%union.anon = 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.0 }
%"struct.std::__cxx11::basic_string<char, std::char_traits<char>, JPH::STLAllocator<char>>::_Alloc_hider" = type { ptr }
%union.anon.0 = type { i64, [8 x i8] }
%"class.JPH::Ref" = type { ptr }
%"class.JPH::Array" = type { i64, i64, ptr }
%"class.JPH::RefConst" = type { ptr }
%"class.JPH::Result.20" = type <{ %union.anon.21, i8, [7 x i8] }>
%union.anon.21 = type { %"class.std::__cxx11::basic_string" }
%"class.std::basic_string_view" = type { i64, ptr }

@.str.4 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [30 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [22 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3JPH5Shape20sRestoreWithChildrenERNS_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) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.JPH::Result", align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.JPH::Ref", align 8
  %8 = alloca %"class.JPH::Result", align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.JPH::Array", align 8
  %11 = alloca %"class.JPH::RefConst", align 8
  %12 = alloca %"class.JPH::Result.20", align 8
  %13 = alloca %"class.std::basic_string_view", align 8
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %5) #5
  call void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(33) %5)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  invoke void @_ZN3JPH8StreamIn4ReadIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %14 unwind label %28

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

19:                                               ; preds = %14
  br i1 %18, label %26, label %20

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

25:                                               ; preds = %20
  br i1 %24, label %26, label %30

26:                                               ; preds = %25, %19
  invoke void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEE8SetErrorEPKc(ptr noundef nonnull align 8 dereferenceable(33) %5, ptr noundef nonnull @.str.4)
          to label %27 unwind label %28

27:                                               ; preds = %26
  call void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEEC2EOS4_(ptr noundef nonnull align 8 dereferenceable(33) %0, ptr noundef nonnull align 8 dereferenceable(33) %5) #5
  br label %149

28:                                               ; preds = %65, %63, %59, %45, %41, %26, %20, %14, %4
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %150

30:                                               ; preds = %25
  %31 = load i32, ptr %6, align 4, !tbaa !8
  %32 = icmp eq i32 %31, -1
  br i1 %32, label %33, label %37

33:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  invoke void @_ZN3JPH3RefINS_5ShapeEEC2EPS1_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef null)
          to label %34 unwind label %35

34:                                               ; preds = %33
  call void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEE3SetEOS3_(ptr noundef nonnull align 8 dereferenceable(33) %5, ptr noundef nonnull align 8 dereferenceable(8) %7)
  call void @_ZN3JPH3RefINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  call void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEEC2EOS4_(ptr noundef nonnull align 8 dereferenceable(33) %0, ptr noundef nonnull align 8 dereferenceable(33) %5) #5
  br label %149

35:                                               ; preds = %33
  %36 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  br label %150

37:                                               ; preds = %30
  %38 = zext i32 %31 to i64
  %39 = call noundef i64 @_ZNK3JPH5ArrayINS_3RefINS_5ShapeEEENS_12STLAllocatorIS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %40 = icmp ugt i64 %39, %38
  br i1 %40, label %41, label %47

41:                                               ; preds = %37
  %42 = load i32, ptr %6, align 4, !tbaa !8
  %43 = zext i32 %42 to i64
  %44 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN3JPH5ArrayINS_3RefINS_5ShapeEEENS_12STLAllocatorIS3_EEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %43)
          to label %45 unwind label %28

45:                                               ; preds = %41
  invoke void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEE3SetERKS3_(ptr noundef nonnull align 8 dereferenceable(33) %5, ptr noundef nonnull align 8 dereferenceable(8) %44)
          to label %46 unwind label %28

46:                                               ; preds = %45
  call void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEEC2EOS4_(ptr noundef nonnull align 8 dereferenceable(33) %0, ptr noundef nonnull align 8 dereferenceable(33) %5) #5
  br label %149

47:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %8) #5
  invoke void @_ZN3JPH5Shape23sRestoreFromBinaryStateERNS_8StreamInE(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Result") align 8 %8, ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %48 unwind label %52

48:                                               ; preds = %47
  %49 = call noundef nonnull align 8 dereferenceable(33) ptr @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(33) %5, ptr noundef nonnull align 8 dereferenceable(33) %8) #5
  call void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %8) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #5
  %50 = call noundef zeroext i1 @_ZNK3JPH6ResultINS_3RefINS_5ShapeEEEE8HasErrorEv(ptr noundef nonnull align 8 dereferenceable(33) %5)
  br i1 %50, label %51, label %54

51:                                               ; preds = %48
  call void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEEC2EOS4_(ptr noundef nonnull align 8 dereferenceable(33) %0, ptr noundef nonnull align 8 dereferenceable(33) %5) #5
  br label %149

52:                                               ; preds = %47
  %53 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #5
  br label %150

54:                                               ; preds = %48
  %55 = call noundef i64 @_ZNK3JPH5ArrayINS_3RefINS_5ShapeEEENS_12STLAllocatorIS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2)
  %56 = load i32, ptr %6, align 4, !tbaa !8
  %57 = zext i32 %56 to i64
  %58 = icmp eq i64 %55, %57
  br i1 %58, label %63, label %59

59:                                               ; preds = %54
  %60 = invoke noundef zeroext i1 @_ZN3JPH23AssertFailedParamHelperEPKcS1_jNS_15AssertLastParamE(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.6, i32 noundef 178)
          to label %61 unwind label %28

61:                                               ; preds = %59
  br i1 %60, label %62, label %63

62:                                               ; preds = %61
  call void asm sideeffect "int $$0x3", "~{dirflag},~{fpsr},~{flags}"() #5, !srcloc !11
  br label %63

63:                                               ; preds = %62, %61, %54
  %64 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3JPH6ResultINS_3RefINS_5ShapeEEEE3GetEv(ptr noundef nonnull align 8 dereferenceable(33) %5)
          to label %65 unwind label %28

65:                                               ; preds = %63
  invoke void @_ZN3JPH5ArrayINS_3RefINS_5ShapeEEENS_12STLAllocatorIS3_EEE9push_backERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(8) %64)
          to label %66 unwind label %28

66:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #5
  invoke void @_ZN3JPH8StreamIn4ReadIjTnNSt9enable_ifIXsr3stdE23is_trivially_copyable_vIT_EEbE4typeELb1EEEvRS3_(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %67 unwind label %81

67:                                               ; preds = %66
  %68 = load ptr, ptr %1, align 8, !tbaa !5
  %69 = getelementptr inbounds i8, ptr %68, i64 24
  %70 = load ptr, ptr %69, align 8
  %71 = invoke noundef zeroext i1 %70(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %72 unwind label %81

72:                                               ; preds = %67
  br i1 %71, label %79, label %73

73:                                               ; preds = %72
  %74 = load ptr, ptr %1, align 8, !tbaa !5
  %75 = getelementptr inbounds i8, ptr %74, i64 32
  %76 = load ptr, ptr %75, align 8
  %77 = invoke noundef zeroext i1 %76(ptr noundef nonnull align 8 dereferenceable(8) %1)
          to label %78 unwind label %81

78:                                               ; preds = %73
  br i1 %77, label %79, label %83

79:                                               ; preds = %78, %72
  invoke void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEE8SetErrorEPKc(ptr noundef nonnull align 8 dereferenceable(33) %5, ptr noundef nonnull @.str.7)
          to label %80 unwind label %81

80:                                               ; preds = %79
  call void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEEC2EOS4_(ptr noundef nonnull align 8 dereferenceable(33) %0, ptr noundef nonnull align 8 dereferenceable(33) %5) #5
  br label %147

81:                                               ; preds = %79, %73, %67, %66
  %82 = landingpad { ptr, i32 }
          cleanup
  br label %148

83:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %10) #5
  call void @_ZN3JPH5ArrayINS_8RefConstINS_5ShapeEEENS_12STLAllocatorIS3_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  %84 = load i32, ptr %9, align 4, !tbaa !8
  %85 = zext i32 %84 to i64
  invoke void @_ZN3JPH5ArrayINS_8RefConstINS_5ShapeEEENS_12STLAllocatorIS3_EEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %85)
          to label %.preheader unwind label %87

.preheader:                                       ; preds = %83
  %86 = load i32, ptr %9, align 4, !tbaa !8
  %.not49.not = icmp eq i32 %86, 0
  br i1 %.not49.not, label %.critedge48, label %.lr.ph

87:                                               ; preds = %106, %.critedge48, %83
  %88 = landingpad { ptr, i32 }
          cleanup
  br label %146

.lr.ph:                                           ; preds = %.preheader, %.critedge
  %.02650 = phi i64 [ %97, %.critedge ], [ 0, %.preheader ]
  invoke void @_ZN3JPH5Shape20sRestoreWithChildrenERNS_8StreamInERNS_5ArrayINS_3RefIS0_EENS_12STLAllocatorIS5_EEEERNS3_INS4_INS_15PhysicsMaterialEEENS6_ISB_EEEE(ptr dead_on_unwind 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)
          to label %89 unwind label %91

89:                                               ; preds = %.lr.ph
  %90 = call noundef zeroext i1 @_ZNK3JPH6ResultINS_3RefINS_5ShapeEEEE8HasErrorEv(ptr noundef nonnull align 8 dereferenceable(33) %0)
  br i1 %90, label %.critedge47, label %93

91:                                               ; preds = %.lr.ph
  %92 = landingpad { ptr, i32 }
          cleanup
  br label %146

93:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #5
  %94 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3JPH6ResultINS_3RefINS_5ShapeEEEE3GetEv(ptr noundef nonnull align 8 dereferenceable(33) %0)
          to label %95 unwind label %100

95:                                               ; preds = %93
  invoke void @_ZN3JPH8RefConstINS_5ShapeEEC2ERKNS_3RefIS1_EE(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %94)
          to label %96 unwind label %100

96:                                               ; preds = %95
  invoke void @_ZN3JPH5ArrayINS_8RefConstINS_5ShapeEEENS_12STLAllocatorIS3_EEE9push_backEOS3_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %.critedge unwind label %102

.critedge:                                        ; preds = %96
  call void @_ZN3JPH8RefConstINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  call void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %0) #5
  %97 = add nuw nsw i64 %.02650, 1
  %98 = load i32, ptr %9, align 4, !tbaa !8
  %99 = zext i32 %98 to i64
  %.not = icmp ult i64 %97, %99
  br i1 %.not, label %.lr.ph, label %.critedge48, !llvm.loop !12

100:                                              ; preds = %95, %93
  %101 = landingpad { ptr, i32 }
          cleanup
  br label %104

102:                                              ; preds = %96
  %103 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3JPH8RefConstINS_5ShapeEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #5
  br label %104

104:                                              ; preds = %102, %100
  %.pn = phi { ptr, i32 } [ %103, %102 ], [ %101, %100 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  call void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %0) #5
  br label %146

.critedge48:                                      ; preds = %.critedge, %.preheader
  %105 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3JPH6ResultINS_3RefINS_5ShapeEEEE3GetEv(ptr noundef nonnull align 8 dereferenceable(33) %5)
          to label %106 unwind label %87

106:                                              ; preds = %.critedge48
  %107 = call noundef ptr @_ZNK3JPH3RefINS_5ShapeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %105)
  %108 = call noundef ptr @_ZN3JPH5ArrayINS_8RefConstINS_5ShapeEEENS_12STLAllocatorIS3_EEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %10)
  %109 = call noundef i64 @_ZNK3JPH5ArrayINS_8RefConstINS_5ShapeEEENS_12STLAllocatorIS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %10)
  %110 = trunc i64 %109 to i32
  %111 = load ptr, ptr %107, align 8, !tbaa !5
  %112 = getelementptr inbounds i8, ptr %111, i64 224
  %113 = load ptr, ptr %112, align 8
  invoke void %113(ptr noundef nonnull align 8 dereferenceable(26) %107, ptr noundef %108, i32 noundef %110)
          to label %114 unwind label %87

114:                                              ; preds = %106
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %12) #5
  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.20") align 8 %12, ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef nonnull align 1 %3)
          to label %115 unwind label %125

115:                                              ; preds = %114
  %116 = call noundef zeroext i1 @_ZNK3JPH6ResultINS_5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS4_EEEEE8HasErrorEv(ptr noundef nonnull align 8 dereferenceable(33) %12)
  br i1 %116, label %117, label %129

117:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #5
  %118 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK3JPH6ResultINS_5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS4_EEEEE8GetErrorB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(33) %12)
          to label %119 unwind label %127

119:                                              ; preds = %117
  %120 = call { i64, ptr } @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcEN3JPH12STLAllocatorIcEEEcvSt17basic_string_viewIcS2_EEv(ptr noundef nonnull align 8 dereferenceable(32) %118) #5
  %121 = extractvalue { i64, ptr } %120, 0
  store i64 %121, ptr %13, align 8
  %122 = getelementptr inbounds i8, ptr %13, i64 8
  %123 = extractvalue { i64, ptr } %120, 1
  store ptr %123, ptr %122, align 8
  invoke void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEE8SetErrorERKSt17basic_string_viewIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(33) %5, ptr noundef nonnull align 8 dereferenceable(16) %13)
          to label %124 unwind label %127

124:                                              ; preds = %119
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #5
  br label %143

125:                                              ; preds = %114
  %126 = landingpad { ptr, i32 }
          cleanup
  br label %145

127:                                              ; preds = %119, %117
  %128 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #5
  br label %144

129:                                              ; preds = %115
  %130 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK3JPH6ResultINS_5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS4_EEEEE3GetEv(ptr noundef nonnull align 8 dereferenceable(33) %12)
          to label %131 unwind label %141

131:                                              ; preds = %129
  %132 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3JPH6ResultINS_3RefINS_5ShapeEEEE3GetEv(ptr noundef nonnull align 8 dereferenceable(33) %5)
          to label %133 unwind label %141

133:                                              ; preds = %131
  %134 = call noundef ptr @_ZNK3JPH3RefINS_5ShapeEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %132)
  %135 = call noundef ptr @_ZNK3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %130)
  %136 = call noundef i64 @_ZNK3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %130)
  %137 = trunc i64 %136 to i32
  %138 = load ptr, ptr %134, align 8, !tbaa !5
  %139 = getelementptr inbounds i8, ptr %138, i64 208
  %140 = load ptr, ptr %139, align 8
  invoke void %140(ptr noundef nonnull align 8 dereferenceable(26) %134, ptr noundef %135, i32 noundef %137)
          to label %143 unwind label %141

141:                                              ; preds = %133, %131, %129
  %142 = landingpad { ptr, i32 }
          cleanup
  br label %144

143:                                              ; preds = %133, %124
  call void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEEC2EOS4_(ptr noundef nonnull align 8 dereferenceable(33) %0, ptr noundef nonnull align 8 dereferenceable(33) %5) #5
  call void @_ZN3JPH6ResultINS_5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS4_EEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %12) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %12) #5
  br label %.critedge47

144:                                              ; preds = %141, %127
  %.pn39 = phi { ptr, i32 } [ %128, %127 ], [ %142, %141 ]
  call void @_ZN3JPH6ResultINS_5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS4_EEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %12) #5
  br label %145

145:                                              ; preds = %144, %125
  %.pn39.pn = phi { ptr, i32 } [ %.pn39, %144 ], [ %126, %125 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %12) #5
  br label %146

.critedge47:                                      ; preds = %89, %143
  call void @_ZN3JPH5ArrayINS_8RefConstINS_5ShapeEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #5
  br label %147

146:                                              ; preds = %91, %104, %145, %87
  %.pn39.pn.pn = phi { ptr, i32 } [ %.pn39.pn, %145 ], [ %88, %87 ], [ %.pn, %104 ], [ %92, %91 ]
  call void @_ZN3JPH5ArrayINS_8RefConstINS_5ShapeEEENS_12STLAllocatorIS3_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %10) #5
  br label %148

147:                                              ; preds = %.critedge47, %80
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #5
  br label %149

148:                                              ; preds = %146, %81
  %.pn43 = phi { ptr, i32 } [ %82, %81 ], [ %.pn39.pn.pn, %146 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #5
  br label %150

149:                                              ; preds = %147, %51, %46, %34, %27
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  call void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %5) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #5
  ret void

150:                                              ; preds = %148, %52, %35, %28
  %.pn45 = phi { ptr, i32 } [ %29, %28 ], [ %36, %35 ], [ %.pn43, %148 ], [ %53, %52 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  call void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %5) #5
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #5
  resume { ptr, i32 } %.pn45
}

; 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 #1 align 2

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

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

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

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

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

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

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

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

; 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: inlinehint mustprogress uwtable
declare dso_local void @_ZN3JPH5ArrayINS_8RefConstINS_5ShapeEEENS_12STLAllocatorIS3_EEE7reserveEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

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

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

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

; 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 #4 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.20") align 8, ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1) local_unnamed_addr #1

; 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 #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3JPH6ResultINS_3RefINS_5ShapeEEEE8SetErrorERKSt17basic_string_viewIcSt11char_traitsIcEE(ptr noundef nonnull align 8 dereferenceable(33), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 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 #1 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 #2 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 #1 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK3JPH5ArrayINS_8RefConstINS_15PhysicsMaterialEEENS_12STLAllocatorIS3_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4 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 #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 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 = { 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}
!11 = !{i64 2157942471}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}


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