; LLVM IR from jrouwe/JoltPhysics :: Samples/Tests/Tools/LoadSnapshotTest.ll (ZN16LoadSnapshotTest10InitializeEv)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::basic_ifstream" = type { %"class.std::basic_istream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon }
%union.anon = type { i32 }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.JPH::StreamInWrapper" = type { %"class.JPH::StreamIn", ptr }
%"class.JPH::StreamIn" = type { ptr }
%"class.JPH::Result" = type <{ %union.anon.4, i8, [7 x i8] }>
%union.anon.4 = 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.5 }
%"struct.std::__cxx11::basic_string<char, std::char_traits<char>, JPH::STLAllocator<char>>::_Alloc_hider" = type { ptr }
%union.anon.5 = type { i64, [8 x i8] }
%"class.JPH::Ref" = type { ptr }
%"class.JPH::Quat" = type { %"class.JPH::Vec4" }
%"class.JPH::Vec4" = type { %union.anon.6 }
%union.anon.6 = type { <4 x float> }
%"class.JPH::Vec3" = type { %union.anon.7 }
%union.anon.7 = type { <4 x float> }
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }
%"class.JPH::BodyCreationSettings" = type { %"class.JPH::Vec3", %"class.JPH::Quat", %"class.JPH::Vec3", %"class.JPH::Vec3", i64, i16, %"class.JPH::CollisionGroup", i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, float, float, float, float, float, float, float, i32, i32, i8, float, %"class.JPH::MassProperties", %"class.JPH::RefConst.16", %"class.JPH::RefConst.17" }
%"class.JPH::CollisionGroup" = type { %"class.JPH::RefConst", i32, i32 }
%"class.JPH::RefConst" = type { ptr }
%"class.JPH::MassProperties" = type { float, %"class.JPH::Mat44" }
%"class.JPH::RefConst.16" = type { ptr }
%"class.JPH::RefConst.17" = type { ptr }
%class.Test = type { ptr, ptr, ptr, ptr, ptr, ptr, i8, %"class.std::unordered_map" }
%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }

@__const._ZN16LoadSnapshotTest10InitializeEv.file_name = external hidden unnamed_addr constant [13 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [20 x i8], align 1
@_ZN16LoadSnapshotTest7sUpAxisE = external dso_local global i32, align 4
@_ZN16LoadSnapshotTest15sOverrideLayersE = external dso_local global 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
define dso_local void @_ZN16LoadSnapshotTest10InitializeEv(ptr noundef nonnull align 8 dereferenceable(112) %0) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca [13 x i8], align 1
  %4 = alloca %"class.std::basic_ifstream", align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.JPH::StreamInWrapper", align 8
  %8 = alloca %"class.JPH::Result", align 8
  %9 = alloca %"class.JPH::Ref", align 8
  %10 = alloca %"class.JPH::Quat", align 16
  %11 = alloca %"class.JPH::Quat", align 16
  %12 = alloca %"class.JPH::Vec3", align 16
  %13 = alloca %"class.JPH::Quat", align 16
  %14 = alloca %"class.JPH::Vec3", align 16
  %15 = alloca %"class.JPH::Quat", align 16
  %16 = alloca i8, align 1
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca %"class.JPH::Vec3", align 16
  %27 = alloca %"class.JPH::Mat44", align 16
  %28 = alloca %"class.JPH::Quat", align 16
  %29 = alloca %"class.JPH::Vec3", align 16
  %30 = alloca %"class.JPH::Quat", align 16
  %31 = alloca %"class.JPH::Quat", align 16
  store ptr %0, ptr %2, align 8, !tbaa !5
  %32 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 13, ptr %3) #10
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %3, ptr align 1 @__const._ZN16LoadSnapshotTest10InitializeEv.file_name, i64 13, i1 false)
  call void @llvm.lifetime.start.p0(i64 520, ptr %4) #10
  %33 = getelementptr inbounds [13 x i8], ptr %3, i64 0, i64 0
  %34 = call noundef i32 @_ZStorSt13_Ios_OpenmodeS_(i32 noundef 8, i32 noundef 4)
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256) %4, ptr noundef %33, i32 noundef %34)
  %35 = invoke noundef zeroext i1 @_ZNSt14basic_ifstreamIcSt11char_traitsIcEE7is_openEv(ptr noundef nonnull align 8 dereferenceable(256) %4)
          to label %36 unwind label %39

36:                                               ; preds = %1
  br i1 %35, label %43, label %37

37:                                               ; preds = %36
  invoke void (ptr, ...) @_Z10FatalErrorPKcz(ptr noundef @.str.1) #11
          to label %38 unwind label %39

38:                                               ; preds = %37
  unreachable

39:                                               ; preds = %37, %1
  %40 = landingpad { ptr, i32 }
          cleanup
  %41 = extractvalue { ptr, i32 } %40, 0
  store ptr %41, ptr %5, align 8
  %42 = extractvalue { ptr, i32 } %40, 1
  store i32 %42, ptr %6, align 4
  br label %308

43:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #10
  invoke void @_ZN3JPH15StreamInWrapperC2ERSi(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %4)
          to label %44 unwind label %53

44:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 40, ptr %8) #10
  invoke void @_ZN3JPH12PhysicsScene23sRestoreFromBinaryStateERNS_8StreamInE(ptr dead_on_unwind writable sret(%"class.JPH::Result") align 8 %8, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %45 unwind label %57

45:                                               ; preds = %44
  %46 = invoke noundef zeroext i1 @_ZNK3JPH6ResultINS_3RefINS_12PhysicsSceneEEEE8HasErrorEv(ptr noundef nonnull align 8 dereferenceable(33) %8)
          to label %47 unwind label %61

47:                                               ; preds = %45
  br i1 %46, label %48, label %65

48:                                               ; preds = %47
  %49 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK3JPH6ResultINS_3RefINS_12PhysicsSceneEEEE8GetErrorB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(33) %8)
          to label %50 unwind label %61

50:                                               ; preds = %48
  %51 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcEN3JPH12STLAllocatorIcEEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %49) #10
  invoke void (ptr, ...) @_Z10FatalErrorPKcz(ptr noundef %51) #11
          to label %52 unwind label %61

52:                                               ; preds = %50
  unreachable

53:                                               ; preds = %43
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %5, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %6, align 4
  br label %307

57:                                               ; preds = %44
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %5, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %6, align 4
  br label %306

61:                                               ; preds = %50, %48, %45
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %5, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %6, align 4
  br label %305

65:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #10
  %66 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3JPH6ResultINS_3RefINS_12PhysicsSceneEEEE3GetEv(ptr noundef nonnull align 8 dereferenceable(33) %8)
          to label %67 unwind label %70

67:                                               ; preds = %65
  invoke void @_ZN3JPH3RefINS_12PhysicsSceneEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %66)
          to label %68 unwind label %70

68:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #10
  %69 = load i32, ptr @_ZN16LoadSnapshotTest7sUpAxisE, align 4, !tbaa !9
  switch i32 %69, label %126 [
    i32 0, label %74
    i32 2, label %100
  ]

70:                                               ; preds = %67, %65
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %5, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %6, align 4
  br label %304

74:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #10
  %75 = invoke { double, double } @_ZN3JPH4Vec36sAxisZEv()
          to label %76 unwind label %96

76:                                               ; preds = %74
  %77 = getelementptr inbounds %"class.JPH::Vec3", ptr %12, i32 0, i32 0
  %78 = getelementptr inbounds %union.anon.7, ptr %77, i32 0, i32 0
  %79 = getelementptr inbounds { double, double }, ptr %78, i32 0, i32 0
  %80 = extractvalue { double, double } %75, 0
  store double %80, ptr %79, align 16
  %81 = getelementptr inbounds { double, double }, ptr %78, i32 0, i32 1
  %82 = extractvalue { double, double } %75, 1
  store double %82, ptr %81, align 8
  %83 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 0
  %84 = load double, ptr %83, align 16
  %85 = getelementptr inbounds { double, double }, ptr %12, i32 0, i32 1
  %86 = load double, ptr %85, align 8
  %87 = invoke { double, double } @_ZN3JPH4Quat9sRotationENS_4Vec3Ef(double %84, double %86, float noundef 0x3FF921FB60000000)
          to label %88 unwind label %96

88:                                               ; preds = %76
  %89 = getelementptr inbounds %"class.JPH::Quat", ptr %11, i32 0, i32 0
  %90 = getelementptr inbounds %"class.JPH::Vec4", ptr %89, i32 0, i32 0
  %91 = getelementptr inbounds %union.anon.6, ptr %90, i32 0, i32 0
  %92 = getelementptr inbounds { double, double }, ptr %91, i32 0, i32 0
  %93 = extractvalue { double, double } %87, 0
  store double %93, ptr %92, align 16
  %94 = getelementptr inbounds { double, double }, ptr %91, i32 0, i32 1
  %95 = extractvalue { double, double } %87, 1
  store double %95, ptr %94, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %10, ptr align 16 %11, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #10
  br label %140

96:                                               ; preds = %76, %74
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %5, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #10
  br label %303

100:                                              ; preds = %68
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #10
  %101 = invoke { double, double } @_ZN3JPH4Vec36sAxisXEv()
          to label %102 unwind label %122

102:                                              ; preds = %100
  %103 = getelementptr inbounds %"class.JPH::Vec3", ptr %14, i32 0, i32 0
  %104 = getelementptr inbounds %union.anon.7, ptr %103, i32 0, i32 0
  %105 = getelementptr inbounds { double, double }, ptr %104, i32 0, i32 0
  %106 = extractvalue { double, double } %101, 0
  store double %106, ptr %105, align 16
  %107 = getelementptr inbounds { double, double }, ptr %104, i32 0, i32 1
  %108 = extractvalue { double, double } %101, 1
  store double %108, ptr %107, align 8
  %109 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 0
  %110 = load double, ptr %109, align 16
  %111 = getelementptr inbounds { double, double }, ptr %14, i32 0, i32 1
  %112 = load double, ptr %111, align 8
  %113 = invoke { double, double } @_ZN3JPH4Quat9sRotationENS_4Vec3Ef(double %110, double %112, float noundef 0xBFF921FB60000000)
          to label %114 unwind label %122

114:                                              ; preds = %102
  %115 = getelementptr inbounds %"class.JPH::Quat", ptr %13, i32 0, i32 0
  %116 = getelementptr inbounds %"class.JPH::Vec4", ptr %115, i32 0, i32 0
  %117 = getelementptr inbounds %union.anon.6, ptr %116, i32 0, i32 0
  %118 = getelementptr inbounds { double, double }, ptr %117, i32 0, i32 0
  %119 = extractvalue { double, double } %113, 0
  store double %119, ptr %118, align 16
  %120 = getelementptr inbounds { double, double }, ptr %117, i32 0, i32 1
  %121 = extractvalue { double, double } %113, 1
  store double %121, ptr %120, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %10, ptr align 16 %13, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #10
  br label %140

122:                                              ; preds = %102, %100
  %123 = landingpad { ptr, i32 }
          cleanup
  %124 = extractvalue { ptr, i32 } %123, 0
  store ptr %124, ptr %5, align 8
  %125 = extractvalue { ptr, i32 } %123, 1
  store i32 %125, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #10
  br label %303

126:                                              ; preds = %68
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #10
  %127 = invoke { double, double } @_ZN3JPH4Quat9sIdentityEv()
          to label %128 unwind label %136

128:                                              ; preds = %126
  %129 = getelementptr inbounds %"class.JPH::Quat", ptr %15, i32 0, i32 0
  %130 = getelementptr inbounds %"class.JPH::Vec4", ptr %129, i32 0, i32 0
  %131 = getelementptr inbounds %union.anon.6, ptr %130, i32 0, i32 0
  %132 = getelementptr inbounds { double, double }, ptr %131, i32 0, i32 0
  %133 = extractvalue { double, double } %127, 0
  store double %133, ptr %132, align 16
  %134 = getelementptr inbounds { double, double }, ptr %131, i32 0, i32 1
  %135 = extractvalue { double, double } %127, 1
  store double %135, ptr %134, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %10, ptr align 16 %15, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #10
  br label %140

136:                                              ; preds = %126
  %137 = landingpad { ptr, i32 }
          cleanup
  %138 = extractvalue { ptr, i32 } %137, 0
  store ptr %138, ptr %5, align 8
  %139 = extractvalue { ptr, i32 } %137, 1
  store i32 %139, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #10
  br label %303

140:                                              ; preds = %128, %114, %88
  call void @llvm.lifetime.start.p0(i64 1, ptr %16) #10
  %141 = load i8, ptr @_ZN16LoadSnapshotTest15sOverrideLayersE, align 1, !tbaa !13, !range !15, !noundef !16
  %142 = trunc i8 %141 to i1
  %143 = zext i1 %142 to i8
  store i8 %143, ptr %16, align 1, !tbaa !13
  %144 = load i8, ptr %16, align 1, !tbaa !13, !range !15, !noundef !16
  %145 = trunc i8 %144 to i1
  br i1 %145, label %193, label %146

146:                                              ; preds = %140
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #10
  %147 = invoke noundef ptr @_ZNK3JPH3RefINS_12PhysicsSceneEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %148 unwind label %162

148:                                              ; preds = %146
  %149 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH12PhysicsScene9GetBodiesEv(ptr noundef nonnull align 8 dereferenceable(80) %147)
          to label %150 unwind label %162

150:                                              ; preds = %148
  store ptr %149, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #10
  %151 = load ptr, ptr %17, align 8, !tbaa !5
  %152 = invoke noundef ptr @_ZN3JPH5ArrayINS_20BodyCreationSettingsENS_12STLAllocatorIS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %151)
          to label %153 unwind label %166

153:                                              ; preds = %150
  store ptr %152, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #10
  %154 = load ptr, ptr %17, align 8, !tbaa !5
  %155 = invoke noundef ptr @_ZN3JPH5ArrayINS_20BodyCreationSettingsENS_12STLAllocatorIS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %154)
          to label %156 unwind label %170

156:                                              ; preds = %153
  store ptr %155, ptr %19, align 8, !tbaa !5
  br label %157

157:                                              ; preds = %186, %156
  %158 = load ptr, ptr %18, align 8, !tbaa !5
  %159 = load ptr, ptr %19, align 8, !tbaa !5
  %160 = icmp ne ptr %158, %159
  br i1 %160, label %174, label %161

161:                                              ; preds = %157
  store i32 3, ptr %20, align 4
  br label %189

162:                                              ; preds = %148, %146
  %163 = landingpad { ptr, i32 }
          cleanup
  %164 = extractvalue { ptr, i32 } %163, 0
  store ptr %164, ptr %5, align 8
  %165 = extractvalue { ptr, i32 } %163, 1
  store i32 %165, ptr %6, align 4
  br label %191

166:                                              ; preds = %150
  %167 = landingpad { ptr, i32 }
          cleanup
  %168 = extractvalue { ptr, i32 } %167, 0
  store ptr %168, ptr %5, align 8
  %169 = extractvalue { ptr, i32 } %167, 1
  store i32 %169, ptr %6, align 4
  br label %190

170:                                              ; preds = %153
  %171 = landingpad { ptr, i32 }
          cleanup
  %172 = extractvalue { ptr, i32 } %171, 0
  store ptr %172, ptr %5, align 8
  %173 = extractvalue { ptr, i32 } %171, 1
  store i32 %173, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #10
  br label %190

174:                                              ; preds = %157
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #10
  %175 = load ptr, ptr %18, align 8, !tbaa !5
  store ptr %175, ptr %21, align 8, !tbaa !5
  %176 = load ptr, ptr %21, align 8, !tbaa !5
  %177 = getelementptr inbounds %"class.JPH::BodyCreationSettings", ptr %176, i32 0, i32 5
  %178 = load i16, ptr %177, align 8, !tbaa !17
  %179 = zext i16 %178 to i32
  %180 = icmp sge i32 %179, 2
  br i1 %180, label %181, label %182

181:                                              ; preds = %174
  store i8 1, ptr %16, align 1, !tbaa !13
  store i32 3, ptr %20, align 4
  br label %183

182:                                              ; preds = %174
  store i32 0, ptr %20, align 4
  br label %183

183:                                              ; preds = %182, %181
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #10
  %184 = load i32, ptr %20, align 4
  switch i32 %184, label %189 [
    i32 0, label %185
  ]

185:                                              ; preds = %183
  br label %186

186:                                              ; preds = %185
  %187 = load ptr, ptr %18, align 8, !tbaa !5
  %188 = getelementptr inbounds %"class.JPH::BodyCreationSettings", ptr %187, i32 1
  store ptr %188, ptr %18, align 8, !tbaa !5
  br label %157

189:                                              ; preds = %183, %161
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #10
  br label %192

190:                                              ; preds = %170, %166
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #10
  br label %191

191:                                              ; preds = %190, %162
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #10
  br label %302

192:                                              ; preds = %189
  br label %193

193:                                              ; preds = %192, %140
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #10
  %194 = invoke noundef ptr @_ZNK3JPH3RefINS_12PhysicsSceneEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %195 unwind label %209

195:                                              ; preds = %193
  %196 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH12PhysicsScene9GetBodiesEv(ptr noundef nonnull align 8 dereferenceable(80) %194)
          to label %197 unwind label %209

197:                                              ; preds = %195
  store ptr %196, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #10
  %198 = load ptr, ptr %22, align 8, !tbaa !5
  %199 = invoke noundef ptr @_ZN3JPH5ArrayINS_20BodyCreationSettingsENS_12STLAllocatorIS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %198)
          to label %200 unwind label %213

200:                                              ; preds = %197
  store ptr %199, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #10
  %201 = load ptr, ptr %22, align 8, !tbaa !5
  %202 = invoke noundef ptr @_ZN3JPH5ArrayINS_20BodyCreationSettingsENS_12STLAllocatorIS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %201)
          to label %203 unwind label %217

203:                                              ; preds = %200
  store ptr %202, ptr %24, align 8, !tbaa !5
  br label %204

204:                                              ; preds = %276, %203
  %205 = load ptr, ptr %23, align 8, !tbaa !5
  %206 = load ptr, ptr %24, align 8, !tbaa !5
  %207 = icmp ne ptr %205, %206
  br i1 %207, label %221, label %208

208:                                              ; preds = %204
  store i32 5, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #10
  br label %291

209:                                              ; preds = %195, %193
  %210 = landingpad { ptr, i32 }
          cleanup
  %211 = extractvalue { ptr, i32 } %210, 0
  store ptr %211, ptr %5, align 8
  %212 = extractvalue { ptr, i32 } %210, 1
  store i32 %212, ptr %6, align 4
  br label %290

213:                                              ; preds = %197
  %214 = landingpad { ptr, i32 }
          cleanup
  %215 = extractvalue { ptr, i32 } %214, 0
  store ptr %215, ptr %5, align 8
  %216 = extractvalue { ptr, i32 } %214, 1
  store i32 %216, ptr %6, align 4
  br label %289

217:                                              ; preds = %200
  %218 = landingpad { ptr, i32 }
          cleanup
  %219 = extractvalue { ptr, i32 } %218, 0
  store ptr %219, ptr %5, align 8
  %220 = extractvalue { ptr, i32 } %218, 1
  store i32 %220, ptr %6, align 4
  br label %288

221:                                              ; preds = %204
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #10
  %222 = load ptr, ptr %23, align 8, !tbaa !5
  store ptr %222, ptr %25, align 8, !tbaa !5
  %223 = load i8, ptr %16, align 1, !tbaa !13, !range !15, !noundef !16
  %224 = trunc i8 %223 to i1
  br i1 %224, label %225, label %237

225:                                              ; preds = %221
  %226 = load ptr, ptr %25, align 8, !tbaa !5
  %227 = getelementptr inbounds %"class.JPH::BodyCreationSettings", ptr %226, i32 0, i32 7
  %228 = load i8, ptr %227, align 16, !tbaa !35
  %229 = icmp eq i8 %228, 0
  br i1 %229, label %230, label %233

230:                                              ; preds = %225
  %231 = load ptr, ptr %25, align 8, !tbaa !5
  %232 = getelementptr inbounds %"class.JPH::BodyCreationSettings", ptr %231, i32 0, i32 5
  store i16 0, ptr %232, align 8, !tbaa !17
  br label %236

233:                                              ; preds = %225
  %234 = load ptr, ptr %25, align 8, !tbaa !5
  %235 = getelementptr inbounds %"class.JPH::BodyCreationSettings", ptr %234, i32 0, i32 5
  store i16 1, ptr %235, align 8, !tbaa !17
  br label %236

236:                                              ; preds = %233, %230
  br label %237

237:                                              ; preds = %236, %221
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #10
  call void @llvm.lifetime.start.p0(i64 64, ptr %27) #10
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %28, ptr align 16 %10, i64 16, i1 false), !tbaa.struct !11
  %238 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 0
  %239 = load double, ptr %238, align 16
  %240 = getelementptr inbounds { double, double }, ptr %28, i32 0, i32 1
  %241 = load double, ptr %240, align 8
  invoke void @_ZN3JPH5Mat449sRotationENS_4QuatE(ptr dead_on_unwind writable sret(%"class.JPH::Mat44") align 16 %27, double %239, double %241)
          to label %242 unwind label %279

242:                                              ; preds = %237
  %243 = load ptr, ptr %25, align 8, !tbaa !5
  %244 = getelementptr inbounds %"class.JPH::BodyCreationSettings", ptr %243, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %29, ptr align 16 %244, i64 16, i1 false), !tbaa.struct !11
  %245 = getelementptr inbounds { double, double }, ptr %29, i32 0, i32 0
  %246 = load double, ptr %245, align 16
  %247 = getelementptr inbounds { double, double }, ptr %29, i32 0, i32 1
  %248 = load double, ptr %247, align 8
  %249 = invoke { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %27, double %246, double %248)
          to label %250 unwind label %279

250:                                              ; preds = %242
  %251 = getelementptr inbounds %"class.JPH::Vec3", ptr %26, i32 0, i32 0
  %252 = getelementptr inbounds %union.anon.7, ptr %251, i32 0, i32 0
  %253 = getelementptr inbounds { double, double }, ptr %252, i32 0, i32 0
  %254 = extractvalue { double, double } %249, 0
  store double %254, ptr %253, align 16
  %255 = getelementptr inbounds { double, double }, ptr %252, i32 0, i32 1
  %256 = extractvalue { double, double } %249, 1
  store double %256, ptr %255, align 8
  %257 = load ptr, ptr %25, align 8, !tbaa !5
  %258 = getelementptr inbounds %"class.JPH::BodyCreationSettings", ptr %257, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %258, ptr align 16 %26, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 64, ptr %27) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #10
  call void @llvm.lifetime.start.p0(i64 16, ptr %30) #10
  %259 = load ptr, ptr %25, align 8, !tbaa !5
  %260 = getelementptr inbounds %"class.JPH::BodyCreationSettings", ptr %259, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %31, ptr align 16 %260, i64 16, i1 false), !tbaa.struct !11
  %261 = getelementptr inbounds { double, double }, ptr %31, i32 0, i32 0
  %262 = load double, ptr %261, align 16
  %263 = getelementptr inbounds { double, double }, ptr %31, i32 0, i32 1
  %264 = load double, ptr %263, align 8
  %265 = invoke { double, double } @_ZNK3JPH4QuatmlES0_(ptr noundef nonnull align 16 dereferenceable(16) %10, double %262, double %264)
          to label %266 unwind label %283

266:                                              ; preds = %250
  %267 = getelementptr inbounds %"class.JPH::Quat", ptr %30, i32 0, i32 0
  %268 = getelementptr inbounds %"class.JPH::Vec4", ptr %267, i32 0, i32 0
  %269 = getelementptr inbounds %union.anon.6, ptr %268, i32 0, i32 0
  %270 = getelementptr inbounds { double, double }, ptr %269, i32 0, i32 0
  %271 = extractvalue { double, double } %265, 0
  store double %271, ptr %270, align 16
  %272 = getelementptr inbounds { double, double }, ptr %269, i32 0, i32 1
  %273 = extractvalue { double, double } %265, 1
  store double %273, ptr %272, align 8
  %274 = load ptr, ptr %25, align 8, !tbaa !5
  %275 = getelementptr inbounds %"class.JPH::BodyCreationSettings", ptr %274, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 16 %275, ptr align 16 %30, i64 16, i1 false), !tbaa.struct !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #10
  br label %276

276:                                              ; preds = %266
  %277 = load ptr, ptr %23, align 8, !tbaa !5
  %278 = getelementptr inbounds %"class.JPH::BodyCreationSettings", ptr %277, i32 1
  store ptr %278, ptr %23, align 8, !tbaa !5
  br label %204

279:                                              ; preds = %242, %237
  %280 = landingpad { ptr, i32 }
          cleanup
  %281 = extractvalue { ptr, i32 } %280, 0
  store ptr %281, ptr %5, align 8
  %282 = extractvalue { ptr, i32 } %280, 1
  store i32 %282, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 64, ptr %27) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #10
  br label %287

283:                                              ; preds = %250
  %284 = landingpad { ptr, i32 }
          cleanup
  %285 = extractvalue { ptr, i32 } %284, 0
  store ptr %285, ptr %5, align 8
  %286 = extractvalue { ptr, i32 } %284, 1
  store i32 %286, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #10
  br label %287

287:                                              ; preds = %283, %279
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #10
  br label %288

288:                                              ; preds = %287, %217
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #10
  br label %289

289:                                              ; preds = %288, %213
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #10
  br label %290

290:                                              ; preds = %289, %209
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #10
  br label %302

291:                                              ; preds = %208
  %292 = invoke noundef ptr @_ZNK3JPH3RefINS_12PhysicsSceneEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %293 unwind label %298

293:                                              ; preds = %291
  %294 = getelementptr inbounds %class.Test, ptr %32, i32 0, i32 2
  %295 = load ptr, ptr %294, align 8, !tbaa !36
  %296 = invoke noundef zeroext i1 @_ZNK3JPH12PhysicsScene12CreateBodiesEPNS_13PhysicsSystemE(ptr noundef nonnull align 8 dereferenceable(80) %292, ptr noundef %295)
          to label %297 unwind label %298

297:                                              ; preds = %293
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #10
  call void @_ZN3JPH3RefINS_12PhysicsSceneEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #10
  call void @_ZN3JPH6ResultINS_3RefINS_12PhysicsSceneEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %8) #10
  call void @llvm.lifetime.end.p0(i64 40, ptr %8) #10
  call void @_ZN3JPH8StreamInD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #10
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %4) #10
  call void @llvm.lifetime.end.p0(i64 520, ptr %4) #10
  call void @llvm.lifetime.end.p0(i64 13, ptr %3) #10
  ret void

298:                                              ; preds = %293, %291
  %299 = landingpad { ptr, i32 }
          cleanup
  %300 = extractvalue { ptr, i32 } %299, 0
  store ptr %300, ptr %5, align 8
  %301 = extractvalue { ptr, i32 } %299, 1
  store i32 %301, ptr %6, align 4
  br label %302

302:                                              ; preds = %298, %290, %191
  call void @llvm.lifetime.end.p0(i64 1, ptr %16) #10
  br label %303

303:                                              ; preds = %302, %136, %122, %96
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #10
  call void @_ZN3JPH3RefINS_12PhysicsSceneEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #10
  br label %304

304:                                              ; preds = %303, %70
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #10
  br label %305

305:                                              ; preds = %304, %61
  call void @_ZN3JPH6ResultINS_3RefINS_12PhysicsSceneEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %8) #10
  br label %306

306:                                              ; preds = %305, %57
  call void @llvm.lifetime.end.p0(i64 40, ptr %8) #10
  call void @_ZN3JPH8StreamInD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #10
  br label %307

307:                                              ; preds = %306, %53
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #10
  br label %308

308:                                              ; preds = %307, %39
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %4) #10
  call void @llvm.lifetime.end.p0(i64 520, ptr %4) #10
  call void @llvm.lifetime.end.p0(i64 13, ptr %3) #10
  br label %309

309:                                              ; preds = %308
  %310 = load ptr, ptr %5, align 8
  %311 = load i32, ptr %6, align 4
  %312 = insertvalue { ptr, i32 } poison, ptr %310, 0
  %313 = insertvalue { ptr, i32 } %312, i32 %311, 1
  resume { ptr, i32 } %313
}

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef zeroext i1 @_ZNSt14basic_ifstreamIcSt11char_traitsIcEE7is_openEv(ptr noundef nonnull align 8 dereferenceable(256)) #4 align 2

; Function Attrs: noreturn
declare void @_Z10FatalErrorPKcz(ptr noundef, ...) #5

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

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

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

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

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

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Quat9sRotationENS_4Vec3Ef(double, double, float noundef) #8 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Vec36sAxisZEv() #8 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Vec36sAxisXEv() #8 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Quat9sIdentityEv() #8 align 2

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

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

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN3JPH5Mat449sRotationENS_4QuatE(ptr dead_on_unwind noalias writable sret(%"class.JPH::Mat44") align 16, double, double) #8 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64), double, double) #9 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4QuatmlES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) #8 align 2

declare noundef zeroext i1 @_ZNK3JPH12PhysicsScene12CreateBodiesEPNS_13PhysicsSystemE(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef) #6

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256)) unnamed_addr #4 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { noreturn "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 #8 = { 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 #9 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="128" "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 #10 = { nounwind }
attributes #11 = { noreturn }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{i64 0, i64 16, !12}
!12 = !{!7, !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{i8 0, i8 2}
!16 = !{}
!17 = !{!18, !23, i64 72}
!18 = !{!"_ZTSN3JPH20BodyCreationSettingsE", !19, i64 0, !20, i64 16, !19, i64 32, !19, i64 48, !22, i64 64, !23, i64 72, !24, i64 80, !26, i64 96, !27, i64 97, !14, i64 98, !14, i64 99, !14, i64 100, !14, i64 101, !14, i64 102, !28, i64 103, !14, i64 104, !14, i64 105, !29, i64 108, !29, i64 112, !29, i64 116, !29, i64 120, !29, i64 124, !29, i64 128, !29, i64 132, !10, i64 136, !10, i64 140, !30, i64 144, !29, i64 148, !31, i64 160, !33, i64 240, !34, i64 248}
!19 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!20 = !{!"_ZTSN3JPH4QuatE", !21, i64 0}
!21 = !{!"_ZTSN3JPH4Vec4E", !7, i64 0}
!22 = !{!"long", !7, i64 0}
!23 = !{!"short", !7, i64 0}
!24 = !{!"_ZTSN3JPH14CollisionGroupE", !25, i64 0, !10, i64 8, !10, i64 12}
!25 = !{!"_ZTSN3JPH8RefConstINS_11GroupFilterEEE", !6, i64 0}
!26 = !{!"_ZTSN3JPH11EMotionTypeE", !7, i64 0}
!27 = !{!"_ZTSN3JPH12EAllowedDOFsE", !7, i64 0}
!28 = !{!"_ZTSN3JPH14EMotionQualityE", !7, i64 0}
!29 = !{!"float", !7, i64 0}
!30 = !{!"_ZTSN3JPH23EOverrideMassPropertiesE", !7, i64 0}
!31 = !{!"_ZTSN3JPH14MassPropertiesE", !29, i64 0, !32, i64 16}
!32 = !{!"_ZTSN3JPH5Mat44E", !7, i64 0}
!33 = !{!"_ZTSN3JPH8RefConstINS_13ShapeSettingsEEE", !6, i64 0}
!34 = !{!"_ZTSN3JPH8RefConstINS_5ShapeEEE", !6, i64 0}
!35 = !{!18, !26, i64 96}
!36 = !{!37, !6, i64 16}
!37 = !{!"_ZTS4Test", !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !14, i64 48, !38, i64 56}
!38 = !{!"_ZTSSt13unordered_mapIN3JPH6BodyIDENSt7__cxx1112basic_stringIcSt11char_traitsIcENS0_12STLAllocatorIcEEEESt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_S8_EEE", !39, i64 0}
!39 = !{!"_ZTSSt10_HashtableIN3JPH6BodyIDESt4pairIKS1_NSt7__cxx1112basic_stringIcSt11char_traitsIcENS0_12STLAllocatorIcEEEEESaISB_ENSt8__detail10_Select1stESt8equal_toIS1_ESt4hashIS1_ENSD_18_Mod_range_hashingENSD_20_Default_ranged_hashENSD_20_Prime_rehash_policyENSD_17_Hashtable_traitsILb1ELb0ELb1EEEE", !6, i64 0, !22, i64 8, !40, i64 16, !22, i64 24, !41, i64 32, !6, i64 48}
!40 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!41 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !29, i64 0, !22, i64 8}


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

%"class.std::basic_ifstream" = type { %"class.std::basic_istream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon }
%union.anon = type { i32 }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.JPH::StreamInWrapper" = type { %"class.JPH::StreamIn", ptr }
%"class.JPH::StreamIn" = type { ptr }
%"class.JPH::Result" = type <{ %union.anon.4, i8, [7 x i8] }>
%union.anon.4 = 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.5 }
%"struct.std::__cxx11::basic_string<char, std::char_traits<char>, JPH::STLAllocator<char>>::_Alloc_hider" = type { ptr }
%union.anon.5 = type { i64, [8 x i8] }
%"class.JPH::Ref" = type { ptr }
%"class.JPH::Quat" = type { %"class.JPH::Vec4" }
%"class.JPH::Vec4" = type { %union.anon.6 }
%union.anon.6 = type { <4 x float> }
%"class.JPH::Mat44" = type { [4 x %"class.JPH::Vec4"] }

@__const._ZN16LoadSnapshotTest10InitializeEv.file_name = external hidden unnamed_addr constant [13 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [20 x i8], align 1
@_ZN16LoadSnapshotTest7sUpAxisE = external dso_local local_unnamed_addr global i32, align 4
@_ZN16LoadSnapshotTest15sOverrideLayersE = external dso_local local_unnamed_addr global 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
define dso_local void @_ZN16LoadSnapshotTest10InitializeEv(ptr nocapture noundef nonnull readonly align 8 dereferenceable(112) %0) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca [13 x i8], align 1
  %3 = alloca %"class.std::basic_ifstream", align 8
  %4 = alloca %"class.JPH::StreamInWrapper", align 8
  %5 = alloca %"class.JPH::Result", align 8
  %6 = alloca %"class.JPH::Ref", align 8
  %7 = alloca %"class.JPH::Quat", align 16
  %8 = alloca %"class.JPH::Mat44", align 16
  call void @llvm.lifetime.start.p0(i64 13, ptr nonnull %2) #10
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(13) %2, ptr noundef nonnull align 1 dereferenceable(13) @__const._ZN16LoadSnapshotTest10InitializeEv.file_name, i64 13, i1 false)
  call void @llvm.lifetime.start.p0(i64 520, ptr nonnull %3) #10
  %9 = tail call noundef i32 @_ZStorSt13_Ios_OpenmodeS_(i32 noundef 8, i32 noundef 4)
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode(ptr noundef nonnull align 8 dereferenceable(256) %3, ptr noundef nonnull %2, i32 noundef %9)
  %10 = call noundef zeroext i1 @_ZNSt14basic_ifstreamIcSt11char_traitsIcEE7is_openEv(ptr noundef nonnull align 8 dereferenceable(256) %3)
  br i1 %10, label %15, label %11

11:                                               ; preds = %1
  invoke void (ptr, ...) @_Z10FatalErrorPKcz(ptr noundef nonnull @.str.1) #11
          to label %12 unwind label %13

12:                                               ; preds = %11
  unreachable

13:                                               ; preds = %11
  %14 = landingpad { ptr, i32 }
          cleanup
  br label %120

15:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #10
  call void @_ZN3JPH15StreamInWrapperC2ERSi(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(16) %3)
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %5) #10
  invoke void @_ZN3JPH12PhysicsScene23sRestoreFromBinaryStateERNS_8StreamInE(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Result") align 8 %5, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %16 unwind label %23

16:                                               ; preds = %15
  %17 = call noundef zeroext i1 @_ZNK3JPH6ResultINS_3RefINS_12PhysicsSceneEEEE8HasErrorEv(ptr noundef nonnull align 8 dereferenceable(33) %5)
  br i1 %17, label %18, label %27

18:                                               ; preds = %16
  %19 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK3JPH6ResultINS_3RefINS_12PhysicsSceneEEEE8GetErrorB5cxx11Ev(ptr noundef nonnull align 8 dereferenceable(33) %5)
          to label %20 unwind label %25

20:                                               ; preds = %18
  %21 = call noundef ptr @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcEN3JPH12STLAllocatorIcEEE5c_strEv(ptr noundef nonnull align 8 dereferenceable(32) %19) #10
  invoke void (ptr, ...) @_Z10FatalErrorPKcz(ptr noundef %21) #11
          to label %22 unwind label %25

22:                                               ; preds = %20
  unreachable

23:                                               ; preds = %15
  %24 = landingpad { ptr, i32 }
          cleanup
  br label %119

25:                                               ; preds = %20, %18
  %26 = landingpad { ptr, i32 }
          cleanup
  br label %118

27:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #10
  %28 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK3JPH6ResultINS_3RefINS_12PhysicsSceneEEEE3GetEv(ptr noundef nonnull align 8 dereferenceable(33) %5)
          to label %29 unwind label %32

29:                                               ; preds = %27
  invoke void @_ZN3JPH3RefINS_12PhysicsSceneEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %28)
          to label %30 unwind label %32

30:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #10
  %31 = load i32, ptr @_ZN16LoadSnapshotTest7sUpAxisE, align 4, !tbaa !5
  switch i32 %31, label %54 [
    i32 0, label %34
    i32 2, label %44
  ]

32:                                               ; preds = %29, %27
  %33 = landingpad { ptr, i32 }
          cleanup
  br label %117

34:                                               ; preds = %30
  %35 = invoke { double, double } @_ZN3JPH4Vec36sAxisZEv()
          to label %36 unwind label %42

36:                                               ; preds = %34
  %37 = extractvalue { double, double } %35, 0
  %38 = extractvalue { double, double } %35, 1
  %39 = invoke { double, double } @_ZN3JPH4Quat9sRotationENS_4Vec3Ef(double %37, double %38, float noundef 0x3FF921FB60000000)
          to label %40 unwind label %42

40:                                               ; preds = %36
  %41 = extractvalue { double, double } %39, 0
  store double %41, ptr %7, align 16
  br label %60

42:                                               ; preds = %36, %34
  %43 = landingpad { ptr, i32 }
          cleanup
  br label %116

44:                                               ; preds = %30
  %45 = invoke { double, double } @_ZN3JPH4Vec36sAxisXEv()
          to label %46 unwind label %52

46:                                               ; preds = %44
  %47 = extractvalue { double, double } %45, 0
  %48 = extractvalue { double, double } %45, 1
  %49 = invoke { double, double } @_ZN3JPH4Quat9sRotationENS_4Vec3Ef(double %47, double %48, float noundef 0xBFF921FB60000000)
          to label %50 unwind label %52

50:                                               ; preds = %46
  %51 = extractvalue { double, double } %49, 0
  store double %51, ptr %7, align 16
  br label %60

52:                                               ; preds = %46, %44
  %53 = landingpad { ptr, i32 }
          cleanup
  br label %116

54:                                               ; preds = %30
  %55 = invoke { double, double } @_ZN3JPH4Quat9sIdentityEv()
          to label %56 unwind label %58

56:                                               ; preds = %54
  %57 = extractvalue { double, double } %55, 0
  store double %57, ptr %7, align 16
  br label %60

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

60:                                               ; preds = %56, %50, %40
  %.pn = phi { double, double } [ %55, %56 ], [ %49, %50 ], [ %39, %40 ]
  %.sink77 = extractvalue { double, double } %.pn, 1
  %.sroa.530.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 8
  store double %.sink77, ptr %.sroa.530.0..sroa_idx, align 8, !tbaa !9
  %61 = load i8, ptr @_ZN16LoadSnapshotTest15sOverrideLayersE, align 1, !tbaa !10, !range !12, !noundef !13
  %62 = trunc nuw i8 %61 to i1
  br i1 %62, label %.loopexit, label %63

63:                                               ; preds = %60
  %64 = call noundef ptr @_ZNK3JPH3RefINS_12PhysicsSceneEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %65 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH12PhysicsScene9GetBodiesEv(ptr noundef nonnull align 8 dereferenceable(80) %64)
  %66 = call noundef ptr @_ZN3JPH5ArrayINS_20BodyCreationSettingsENS_12STLAllocatorIS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %65)
  %67 = call noundef ptr @_ZN3JPH5ArrayINS_20BodyCreationSettingsENS_12STLAllocatorIS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %65)
  %.not65 = icmp eq ptr %66, %67
  br i1 %.not65, label %.loopexit, label %.lr.ph

68:                                               ; preds = %.lr.ph
  %69 = getelementptr inbounds i8, ptr %.05366, i64 256
  %.not = icmp eq ptr %69, %67
  br i1 %.not, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %63, %68
  %.05366 = phi ptr [ %69, %68 ], [ %66, %63 ]
  %70 = getelementptr inbounds i8, ptr %.05366, i64 72
  %71 = load i16, ptr %70, align 8, !tbaa !14
  %72 = icmp ult i16 %71, 2
  br i1 %72, label %68, label %.loopexit

.loopexit:                                        ; preds = %68, %.lr.ph, %63, %60
  %.352 = phi i8 [ %61, %60 ], [ %61, %63 ], [ %61, %68 ], [ 1, %.lr.ph ]
  %73 = call noundef ptr @_ZNK3JPH3RefINS_12PhysicsSceneEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %74 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN3JPH12PhysicsScene9GetBodiesEv(ptr noundef nonnull align 8 dereferenceable(80) %73)
  %75 = call noundef ptr @_ZN3JPH5ArrayINS_20BodyCreationSettingsENS_12STLAllocatorIS1_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %74)
  %76 = call noundef ptr @_ZN3JPH5ArrayINS_20BodyCreationSettingsENS_12STLAllocatorIS1_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %74)
  %.not5669 = icmp eq ptr %75, %76
  br i1 %.not5669, label %._crit_edge, label %.lr.ph71

.lr.ph71:                                         ; preds = %.loopexit
  %77 = trunc nuw i8 %.352 to i1
  %.sroa.25.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 8
  br i1 %77, label %.lr.ph71.split.us, label %.lr.ph71.split

.lr.ph71.split.us:                                ; preds = %.lr.ph71, %89
  %.05570.us = phi ptr [ %92, %89 ], [ %75, %.lr.ph71 ]
  %78 = getelementptr inbounds i8, ptr %.05570.us, i64 96
  %79 = load i8, ptr %78, align 16, !tbaa !33
  %80 = icmp ne i8 %79, 0
  %spec.select = zext i1 %80 to i16
  %81 = getelementptr inbounds i8, ptr %.05570.us, i64 72
  store i16 %spec.select, ptr %81, align 8
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %8) #10
  %.sroa.04.0.copyload.us = load double, ptr %7, align 16
  %.sroa.25.0.copyload.us = load double, ptr %.sroa.25.0..sroa_idx, align 8, !tbaa !9
  invoke void @_ZN3JPH5Mat449sRotationENS_4QuatE(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %8, double %.sroa.04.0.copyload.us, double %.sroa.25.0.copyload.us)
          to label %82 unwind label %.split.us

82:                                               ; preds = %.lr.ph71.split.us
  %.sroa.02.0.copyload.us = load double, ptr %.05570.us, align 16
  %.sroa.23.0..sroa_idx.us = getelementptr inbounds i8, ptr %.05570.us, i64 8
  %.sroa.23.0.copyload.us = load double, ptr %.sroa.23.0..sroa_idx.us, align 8, !tbaa !9
  %83 = invoke { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %8, double %.sroa.02.0.copyload.us, double %.sroa.23.0.copyload.us)
          to label %84 unwind label %.split.us

84:                                               ; preds = %82
  %85 = extractvalue { double, double } %83, 0
  %86 = extractvalue { double, double } %83, 1
  store double %85, ptr %.05570.us, align 16
  store double %86, ptr %.sroa.23.0..sroa_idx.us, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #10
  %87 = getelementptr inbounds i8, ptr %.05570.us, i64 16
  %.sroa.0.0.copyload.us = load double, ptr %87, align 16
  %.sroa.2.0..sroa_idx.us = getelementptr inbounds i8, ptr %.05570.us, i64 24
  %.sroa.2.0.copyload.us = load double, ptr %.sroa.2.0..sroa_idx.us, align 8, !tbaa !9
  %88 = invoke { double, double } @_ZNK3JPH4QuatmlES0_(ptr noundef nonnull align 16 dereferenceable(16) %7, double %.sroa.0.0.copyload.us, double %.sroa.2.0.copyload.us)
          to label %89 unwind label %.split73.us

89:                                               ; preds = %84
  %90 = extractvalue { double, double } %88, 0
  %91 = extractvalue { double, double } %88, 1
  store double %90, ptr %87, align 16
  store double %91, ptr %.sroa.2.0..sroa_idx.us, align 8, !tbaa !9
  %92 = getelementptr inbounds i8, ptr %.05570.us, i64 256
  %.not56.us = icmp eq ptr %92, %76
  br i1 %.not56.us, label %._crit_edge, label %.lr.ph71.split.us

.split.us:                                        ; preds = %82, %.lr.ph71.split.us
  %93 = landingpad { ptr, i32 }
          cleanup
  br label %111

.split73.us:                                      ; preds = %84
  %94 = landingpad { ptr, i32 }
          cleanup
  br label %116

._crit_edge:                                      ; preds = %106, %89, %.loopexit
  %95 = call noundef ptr @_ZNK3JPH3RefINS_12PhysicsSceneEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6)
  %96 = getelementptr inbounds i8, ptr %0, i64 16
  %97 = load ptr, ptr %96, align 8, !tbaa !34
  %98 = invoke noundef zeroext i1 @_ZNK3JPH12PhysicsScene12CreateBodiesEPNS_13PhysicsSystemE(ptr noundef nonnull align 8 dereferenceable(80) %95, ptr noundef %97)
          to label %113 unwind label %114

.lr.ph71.split:                                   ; preds = %.lr.ph71, %106
  %.05570 = phi ptr [ %109, %106 ], [ %75, %.lr.ph71 ]
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %8) #10
  %.sroa.04.0.copyload = load double, ptr %7, align 16
  %.sroa.25.0.copyload = load double, ptr %.sroa.25.0..sroa_idx, align 8, !tbaa !9
  invoke void @_ZN3JPH5Mat449sRotationENS_4QuatE(ptr dead_on_unwind nonnull writable sret(%"class.JPH::Mat44") align 16 %8, double %.sroa.04.0.copyload, double %.sroa.25.0.copyload)
          to label %99 unwind label %.split

99:                                               ; preds = %.lr.ph71.split
  %.sroa.02.0.copyload = load double, ptr %.05570, align 16
  %.sroa.23.0..sroa_idx = getelementptr inbounds i8, ptr %.05570, i64 8
  %.sroa.23.0.copyload = load double, ptr %.sroa.23.0..sroa_idx, align 8, !tbaa !9
  %100 = invoke { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64) %8, double %.sroa.02.0.copyload, double %.sroa.23.0.copyload)
          to label %101 unwind label %.split

101:                                              ; preds = %99
  %102 = extractvalue { double, double } %100, 0
  %103 = extractvalue { double, double } %100, 1
  store double %102, ptr %.05570, align 16
  store double %103, ptr %.sroa.23.0..sroa_idx, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #10
  %104 = getelementptr inbounds i8, ptr %.05570, i64 16
  %.sroa.0.0.copyload = load double, ptr %104, align 16
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %.05570, i64 24
  %.sroa.2.0.copyload = load double, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !9
  %105 = invoke { double, double } @_ZNK3JPH4QuatmlES0_(ptr noundef nonnull align 16 dereferenceable(16) %7, double %.sroa.0.0.copyload, double %.sroa.2.0.copyload)
          to label %106 unwind label %.split73

106:                                              ; preds = %101
  %107 = extractvalue { double, double } %105, 0
  %108 = extractvalue { double, double } %105, 1
  store double %107, ptr %104, align 16
  store double %108, ptr %.sroa.2.0..sroa_idx, align 8, !tbaa !9
  %109 = getelementptr inbounds i8, ptr %.05570, i64 256
  %.not56 = icmp eq ptr %109, %76
  br i1 %.not56, label %._crit_edge, label %.lr.ph71.split

.split:                                           ; preds = %99, %.lr.ph71.split
  %110 = landingpad { ptr, i32 }
          cleanup
  br label %111

111:                                              ; preds = %.split.us, %.split
  %.us-phi = phi { ptr, i32 } [ %110, %.split ], [ %93, %.split.us ]
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %8) #10
  br label %116

.split73:                                         ; preds = %101
  %112 = landingpad { ptr, i32 }
          cleanup
  br label %116

113:                                              ; preds = %._crit_edge
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #10
  call void @_ZN3JPH3RefINS_12PhysicsSceneEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #10
  call void @_ZN3JPH6ResultINS_3RefINS_12PhysicsSceneEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %5) #10
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #10
  call void @_ZN3JPH8StreamInD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #10
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %3) #10
  call void @llvm.lifetime.end.p0(i64 520, ptr nonnull %3) #10
  call void @llvm.lifetime.end.p0(i64 13, ptr nonnull %2) #10
  ret void

114:                                              ; preds = %._crit_edge
  %115 = landingpad { ptr, i32 }
          cleanup
  br label %116

116:                                              ; preds = %.split73, %.split73.us, %114, %111, %58, %52, %42
  %.pn.pn.pn = phi { ptr, i32 } [ %59, %58 ], [ %53, %52 ], [ %43, %42 ], [ %115, %114 ], [ %.us-phi, %111 ], [ %112, %.split73 ], [ %94, %.split73.us ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #10
  call void @_ZN3JPH3RefINS_12PhysicsSceneEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #10
  br label %117

117:                                              ; preds = %116, %32
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %116 ], [ %33, %32 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #10
  br label %118

118:                                              ; preds = %117, %25
  %.pn61 = phi { ptr, i32 } [ %26, %25 ], [ %.pn.pn.pn.pn, %117 ]
  call void @_ZN3JPH6ResultINS_3RefINS_12PhysicsSceneEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(33) %5) #10
  br label %119

119:                                              ; preds = %118, %23
  %.pn61.pn = phi { ptr, i32 } [ %.pn61, %118 ], [ %24, %23 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #10
  call void @_ZN3JPH8StreamInD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #10
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #10
  br label %120

120:                                              ; preds = %119, %13
  %.pn61.pn.pn = phi { ptr, i32 } [ %.pn61.pn, %119 ], [ %14, %13 ]
  call void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256) %3) #10
  call void @llvm.lifetime.end.p0(i64 520, ptr nonnull %3) #10
  call void @llvm.lifetime.end.p0(i64 13, ptr nonnull %2) #10
  resume { ptr, i32 } %.pn61.pn.pn
}

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare noundef zeroext i1 @_ZNSt14basic_ifstreamIcSt11char_traitsIcEE7is_openEv(ptr noundef nonnull align 8 dereferenceable(256)) local_unnamed_addr #4 align 2

; Function Attrs: noreturn
declare void @_Z10FatalErrorPKcz(ptr noundef, ...) local_unnamed_addr #5

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

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

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

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

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

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Quat9sRotationENS_4Vec3Ef(double, double, float noundef) local_unnamed_addr #8 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Vec36sAxisZEv() local_unnamed_addr #8 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Vec36sAxisXEv() local_unnamed_addr #8 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZN3JPH4Quat9sIdentityEv() local_unnamed_addr #8 align 2

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

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

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

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

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local void @_ZN3JPH5Mat449sRotationENS_4QuatE(ptr dead_on_unwind noalias writable sret(%"class.JPH::Mat44") align 16, double, double) local_unnamed_addr #8 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH5Mat44mlENS_4Vec3E(ptr noundef nonnull align 16 dereferenceable(64), double, double) local_unnamed_addr #9 align 2

; Function Attrs: alwaysinline mustprogress uwtable
declare dso_local { double, double } @_ZNK3JPH4QuatmlES0_(ptr noundef nonnull align 16 dereferenceable(16), double, double) local_unnamed_addr #8 align 2

declare noundef zeroext i1 @_ZNK3JPH12PhysicsScene12CreateBodiesEPNS_13PhysicsSystemE(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef) local_unnamed_addr #6

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(256)) unnamed_addr #4 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 nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = { noreturn "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { 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 #8 = { 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 #9 = { alwaysinline mustprogress uwtable "min-legal-vector-width"="128" "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 #10 = { nounwind }
attributes #11 = { noreturn }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"bool", !7, i64 0}
!12 = !{i8 0, i8 2}
!13 = !{}
!14 = !{!15, !20, i64 72}
!15 = !{!"_ZTSN3JPH20BodyCreationSettingsE", !16, i64 0, !17, i64 16, !16, i64 32, !16, i64 48, !19, i64 64, !20, i64 72, !21, i64 80, !24, i64 96, !25, i64 97, !11, i64 98, !11, i64 99, !11, i64 100, !11, i64 101, !11, i64 102, !26, i64 103, !11, i64 104, !11, i64 105, !27, i64 108, !27, i64 112, !27, i64 116, !27, i64 120, !27, i64 124, !27, i64 128, !27, i64 132, !6, i64 136, !6, i64 140, !28, i64 144, !27, i64 148, !29, i64 160, !31, i64 240, !32, i64 248}
!16 = !{!"_ZTSN3JPH4Vec3E", !7, i64 0}
!17 = !{!"_ZTSN3JPH4QuatE", !18, i64 0}
!18 = !{!"_ZTSN3JPH4Vec4E", !7, i64 0}
!19 = !{!"long", !7, i64 0}
!20 = !{!"short", !7, i64 0}
!21 = !{!"_ZTSN3JPH14CollisionGroupE", !22, i64 0, !6, i64 8, !6, i64 12}
!22 = !{!"_ZTSN3JPH8RefConstINS_11GroupFilterEEE", !23, i64 0}
!23 = !{!"any pointer", !7, i64 0}
!24 = !{!"_ZTSN3JPH11EMotionTypeE", !7, i64 0}
!25 = !{!"_ZTSN3JPH12EAllowedDOFsE", !7, i64 0}
!26 = !{!"_ZTSN3JPH14EMotionQualityE", !7, i64 0}
!27 = !{!"float", !7, i64 0}
!28 = !{!"_ZTSN3JPH23EOverrideMassPropertiesE", !7, i64 0}
!29 = !{!"_ZTSN3JPH14MassPropertiesE", !27, i64 0, !30, i64 16}
!30 = !{!"_ZTSN3JPH5Mat44E", !7, i64 0}
!31 = !{!"_ZTSN3JPH8RefConstINS_13ShapeSettingsEEE", !23, i64 0}
!32 = !{!"_ZTSN3JPH8RefConstINS_5ShapeEEE", !23, i64 0}
!33 = !{!15, !24, i64 96}
!34 = !{!35, !23, i64 16}
!35 = !{!"_ZTS4Test", !23, i64 8, !23, i64 16, !23, i64 24, !23, i64 32, !23, i64 40, !11, i64 48, !36, i64 56}
!36 = !{!"_ZTSSt13unordered_mapIN3JPH6BodyIDENSt7__cxx1112basic_stringIcSt11char_traitsIcENS0_12STLAllocatorIcEEEESt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_S8_EEE", !37, i64 0}
!37 = !{!"_ZTSSt10_HashtableIN3JPH6BodyIDESt4pairIKS1_NSt7__cxx1112basic_stringIcSt11char_traitsIcENS0_12STLAllocatorIcEEEEESaISB_ENSt8__detail10_Select1stESt8equal_toIS1_ESt4hashIS1_ENSD_18_Mod_range_hashingENSD_20_Default_ranged_hashENSD_20_Prime_rehash_policyENSD_17_Hashtable_traitsILb1ELb0ELb1EEEE", !23, i64 0, !19, i64 8, !38, i64 16, !19, i64 24, !39, i64 32, !23, i64 48}
!38 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !23, i64 0}
!39 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !27, i64 0, !19, i64 8}


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