; LLVM IR from Razakhel/RaZ :: src/RaZ/XR/XrSystem.ll (ZN3Raz8XrSystem28recoverEnvironmentBlendModesEv)

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

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator.35" = type { i8 }
%"class.std::initializer_list.39" = type { ptr, i64 }
%"class.__gnu_cxx::__normal_iterator.38" = type { ptr }
%"class.Raz::XrSystem" = type <{ %"class.Raz::System", %"class.Raz::XrContext", %"class.Raz::XrSession", %"class.std::vector.25", i32, [4 x i8], %"class.std::vector.30", i32, i32, %"class.std::vector.25", i32, [4 x i8] }>
%"class.Raz::System" = type { ptr, %"class.std::vector", %"class.Raz::Bitset" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<Raz::Entity *, std::allocator<Raz::Entity *>>::_Vector_impl" }
%"struct.std::_Vector_base<Raz::Entity *, std::allocator<Raz::Entity *>>::_Vector_impl" = type { %"struct.std::_Vector_base<Raz::Entity *, std::allocator<Raz::Entity *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Raz::Entity *, std::allocator<Raz::Entity *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.Raz::Bitset" = type { %"class.std::vector.0" }
%"class.std::vector.0" = type { %"struct.std::_Bvector_base" }
%"struct.std::_Bvector_base" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl" = type { %"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" }
%"struct.std::_Bvector_base<std::allocator<bool>>::_Bvector_impl_data" = type { %"struct.std::_Bit_iterator", %"struct.std::_Bit_iterator", ptr }
%"struct.std::_Bit_iterator" = type { %"struct.std::_Bit_iterator_base.base", [4 x i8] }
%"struct.std::_Bit_iterator_base.base" = type <{ ptr, i32 }>
%"class.Raz::XrContext" = type { %"class.std::vector.4", %"class.std::vector.9", %"class.std::vector.4", %"class.std::vector.9", ptr, ptr, i64 }
%"class.std::vector.4" = type { %"struct.std::_Vector_base.5" }
%"struct.std::_Vector_base.5" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__cxx11::basic_string<char>, std::allocator<std::__cxx11::basic_string<char>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.9" = type { %"struct.std::_Vector_base.10" }
%"struct.std::_Vector_base.10" = type { %"struct.std::_Vector_base<const char *, std::allocator<const char *>>::_Vector_impl" }
%"struct.std::_Vector_base<const char *, std::allocator<const char *>>::_Vector_impl" = type { %"struct.std::_Vector_base<const char *, std::allocator<const char *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<const char *, std::allocator<const char *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.Raz::XrSession" = type { ptr, ptr, i32, i8, ptr, %"class.std::vector.14", %"class.std::vector.14", %"class.std::unordered_map" }
%"class.std::vector.14" = type { %"struct.std::_Vector_base.15" }
%"struct.std::_Vector_base.15" = type { %"struct.std::_Vector_base<XrSwapchain_T *, std::allocator<XrSwapchain_T *>>::_Vector_impl" }
%"struct.std::_Vector_base<XrSwapchain_T *, std::allocator<XrSwapchain_T *>>::_Vector_impl" = type { %"struct.std::_Vector_base<XrSwapchain_T *, std::allocator<XrSwapchain_T *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<XrSwapchain_T *, std::allocator<XrSwapchain_T *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.std::vector.30" = type { %"struct.std::_Vector_base.31" }
%"struct.std::_Vector_base.31" = type { %"struct.std::_Vector_base<XrViewConfigurationView, std::allocator<XrViewConfigurationView>>::_Vector_impl" }
%"struct.std::_Vector_base<XrViewConfigurationView, std::allocator<XrViewConfigurationView>>::_Vector_impl" = type { %"struct.std::_Vector_base<XrViewConfigurationView, std::allocator<XrViewConfigurationView>>::_Vector_impl_data" }
%"struct.std::_Vector_base<XrViewConfigurationView, std::allocator<XrViewConfigurationView>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.25" = type { %"struct.std::_Vector_base.26" }
%"struct.std::_Vector_base.26" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@.str.13 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [87 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

declare void @_ZN3Raz6Logger4warnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32)) #1

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

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

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

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

; 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 @_ZN3Raz8XrSystem28recoverEnvironmentBlendModesEv(ptr noundef nonnull align 8 dereferenceable(424) %0) #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca %"class.std::__cxx11::basic_string", align 8
  %5 = alloca %"class.std::allocator.35", align 1
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::allocator.35", align 1
  %10 = alloca ptr, align 8
  %11 = alloca %"class.std::initializer_list.39", align 8
  %12 = alloca [2 x i32], align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca %"class.__gnu_cxx::__normal_iterator.38", align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator.38", align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator.38", align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator.38", align 8
  %21 = alloca %"class.std::__cxx11::basic_string", align 8
  %22 = alloca %"class.std::allocator.35", align 1
  store ptr %0, ptr %2, align 8, !tbaa !5
  %23 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 0, ptr %3, align 4, !tbaa !9
  %24 = getelementptr inbounds %"class.Raz::XrSystem", ptr %23, i32 0, i32 1
  %25 = getelementptr inbounds %"class.Raz::XrContext", ptr %24, i32 0, i32 4
  %26 = load ptr, ptr %25, align 8, !tbaa !11
  %27 = getelementptr inbounds %"class.Raz::XrSystem", ptr %23, i32 0, i32 1
  %28 = getelementptr inbounds %"class.Raz::XrContext", ptr %27, i32 0, i32 6
  %29 = load i64, ptr %28, align 8, !tbaa !54
  %30 = getelementptr inbounds %"class.Raz::XrSystem", ptr %23, i32 0, i32 4
  %31 = load i32, ptr %30, align 8, !tbaa !55
  %32 = call i32 @xrEnumerateEnvironmentBlendModes(ptr noundef %26, i64 noundef %29, i32 noundef %31, i32 noundef 0, ptr noundef %3, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 32, ptr %4) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef @.str.13, ptr noundef nonnull align 1 dereferenceable(1) %5)
          to label %33 unwind label %70

33:                                               ; preds = %1
  %34 = getelementptr inbounds %"class.Raz::XrSystem", ptr %23, i32 0, i32 1
  %35 = getelementptr inbounds %"class.Raz::XrContext", ptr %34, i32 0, i32 4
  %36 = load ptr, ptr %35, align 8, !tbaa !11
  invoke void @_ZN3Raz12_GLOBAL__N_18checkLogE8XrResultRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP12XrInstance_T(i32 noundef %32, ptr noundef nonnull align 8 dereferenceable(32) %4, ptr noundef %36)
          to label %37 unwind label %74

37:                                               ; preds = %33
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #6
  %38 = getelementptr inbounds %"class.Raz::XrSystem", ptr %23, i32 0, i32 9
  %39 = load i32, ptr %3, align 4, !tbaa !9
  %40 = zext i32 %39 to i64
  call void @_ZNSt6vectorIjSaIjEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %38, i64 noundef %40)
  %41 = getelementptr inbounds %"class.Raz::XrSystem", ptr %23, i32 0, i32 1
  %42 = getelementptr inbounds %"class.Raz::XrContext", ptr %41, i32 0, i32 4
  %43 = load ptr, ptr %42, align 8, !tbaa !11
  %44 = getelementptr inbounds %"class.Raz::XrSystem", ptr %23, i32 0, i32 1
  %45 = getelementptr inbounds %"class.Raz::XrContext", ptr %44, i32 0, i32 6
  %46 = load i64, ptr %45, align 8, !tbaa !54
  %47 = getelementptr inbounds %"class.Raz::XrSystem", ptr %23, i32 0, i32 4
  %48 = load i32, ptr %47, align 8, !tbaa !55
  %49 = load i32, ptr %3, align 4, !tbaa !9
  %50 = getelementptr inbounds %"class.Raz::XrSystem", ptr %23, i32 0, i32 9
  %51 = call noundef ptr @_ZNSt6vectorIjSaIjEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %50) #6
  %52 = call i32 @xrEnumerateEnvironmentBlendModes(ptr noundef %43, i64 noundef %46, i32 noundef %48, i32 noundef %49, ptr noundef %3, ptr noundef %51)
  call void @llvm.lifetime.start.p0(i64 32, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %9) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef @.str.14, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %53 unwind label %79

53:                                               ; preds = %37
  %54 = getelementptr inbounds %"class.Raz::XrSystem", ptr %23, i32 0, i32 1
  %55 = getelementptr inbounds %"class.Raz::XrContext", ptr %54, i32 0, i32 4
  %56 = load ptr, ptr %55, align 8, !tbaa !11
  invoke void @_ZN3Raz12_GLOBAL__N_18checkLogE8XrResultRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP12XrInstance_T(i32 noundef %52, ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef %56)
          to label %57 unwind label %83

57:                                               ; preds = %53
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  store i32 1, ptr %12, align 4, !tbaa !56
  %58 = getelementptr inbounds i32, ptr %12, i64 1
  store i32 2, ptr %58, align 4, !tbaa !56
  %59 = getelementptr inbounds %"class.std::initializer_list.39", ptr %11, i32 0, i32 0
  store ptr %12, ptr %59, align 8, !tbaa !58
  %60 = getelementptr inbounds %"class.std::initializer_list.39", ptr %11, i32 0, i32 1
  store i64 2, ptr %60, align 8, !tbaa !60
  store ptr %11, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %61 = load ptr, ptr %10, align 8, !tbaa !5
  %62 = call noundef ptr @_ZNKSt16initializer_listI22XrEnvironmentBlendModeE5beginEv(ptr noundef nonnull align 8 dereferenceable(16) %61) #6
  store ptr %62, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %63 = load ptr, ptr %10, align 8, !tbaa !5
  %64 = call noundef ptr @_ZNKSt16initializer_listI22XrEnvironmentBlendModeE3endEv(ptr noundef nonnull align 8 dereferenceable(16) %63) #6
  store ptr %64, ptr %14, align 8, !tbaa !5
  br label %65

65:                                               ; preds = %113, %57
  %66 = load ptr, ptr %13, align 8, !tbaa !5
  %67 = load ptr, ptr %14, align 8, !tbaa !5
  %68 = icmp ne ptr %66, %67
  br i1 %68, label %88, label %69

69:                                               ; preds = %65
  store i32 2, ptr %15, align 4
  br label %116

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

74:                                               ; preds = %33
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %6, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %7, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %4) #6
  br label %78

78:                                               ; preds = %74, %70
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %4) #6
  br label %135

79:                                               ; preds = %37
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %6, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %7, align 4
  br label %87

83:                                               ; preds = %53
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %6, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %7, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  br label %87

87:                                               ; preds = %83, %79
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %8) #6
  br label %135

88:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  %89 = load ptr, ptr %13, align 8, !tbaa !5
  %90 = load i32, ptr %89, align 4, !tbaa !56
  store i32 %90, ptr %16, align 4, !tbaa !56
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  %91 = getelementptr inbounds %"class.Raz::XrSystem", ptr %23, i32 0, i32 9
  %92 = call ptr @_ZNKSt6vectorIjSaIjEE6cbeginEv(ptr noundef nonnull align 8 dereferenceable(24) %91) #6
  %93 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.38", ptr %18, i32 0, i32 0
  store ptr %92, ptr %93, align 8
  %94 = getelementptr inbounds %"class.Raz::XrSystem", ptr %23, i32 0, i32 9
  %95 = call ptr @_ZNKSt6vectorIjSaIjEE4cendEv(ptr noundef nonnull align 8 dereferenceable(24) %94) #6
  %96 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.38", ptr %19, i32 0, i32 0
  store ptr %95, ptr %96, align 8
  %97 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.38", ptr %18, i32 0, i32 0
  %98 = load ptr, ptr %97, align 8
  %99 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.38", ptr %19, i32 0, i32 0
  %100 = load ptr, ptr %99, align 8
  %101 = call ptr @_ZSt4findIN9__gnu_cxx17__normal_iteratorIPKjSt6vectorIjSaIjEEEE22XrEnvironmentBlendModeET_S9_S9_RKT0_(ptr %98, ptr %100, ptr noundef nonnull align 4 dereferenceable(4) %16)
  %102 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.38", ptr %17, i32 0, i32 0
  store ptr %101, ptr %102, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %103 = getelementptr inbounds %"class.Raz::XrSystem", ptr %23, i32 0, i32 9
  %104 = call ptr @_ZNKSt6vectorIjSaIjEE4cendEv(ptr noundef nonnull align 8 dereferenceable(24) %103) #6
  %105 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.38", ptr %20, i32 0, i32 0
  store ptr %104, ptr %105, align 8
  %106 = call noundef zeroext i1 @_ZN9__gnu_cxxeqIPKjSt6vectorIjSaIjEEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  br i1 %106, label %107, label %108

107:                                              ; preds = %88
  store i32 3, ptr %15, align 4
  br label %111

108:                                              ; preds = %88
  %109 = load i32, ptr %16, align 4, !tbaa !56
  %110 = getelementptr inbounds %"class.Raz::XrSystem", ptr %23, i32 0, i32 10
  store i32 %109, ptr %110, align 8, !tbaa !61
  store i32 2, ptr %15, align 4
  br label %111

111:                                              ; preds = %108, %107
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  %112 = load i32, ptr %15, align 4
  switch i32 %112, label %116 [
    i32 3, label %113
  ]

113:                                              ; preds = %111
  %114 = load ptr, ptr %13, align 8, !tbaa !5
  %115 = getelementptr inbounds i32, ptr %114, i32 1
  store ptr %115, ptr %13, align 8, !tbaa !5
  br label %65

116:                                              ; preds = %111, %69
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %117

117:                                              ; preds = %116
  %118 = getelementptr inbounds %"class.Raz::XrSystem", ptr %23, i32 0, i32 10
  %119 = load i32, ptr %118, align 8, !tbaa !61
  %120 = icmp eq i32 %119, 0
  br i1 %120, label %121, label %134

121:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 32, ptr %21) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef @.str.15, ptr noundef nonnull align 1 dereferenceable(1) %22)
          to label %122 unwind label %125

122:                                              ; preds = %121
  invoke void @_ZN3Raz6Logger4warnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %21)
          to label %123 unwind label %129

123:                                              ; preds = %122
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #6
  %124 = getelementptr inbounds %"class.Raz::XrSystem", ptr %23, i32 0, i32 10
  store i32 1, ptr %124, align 8, !tbaa !61
  br label %134

125:                                              ; preds = %121
  %126 = landingpad { ptr, i32 }
          cleanup
  %127 = extractvalue { ptr, i32 } %126, 0
  store ptr %127, ptr %6, align 8
  %128 = extractvalue { ptr, i32 } %126, 1
  store i32 %128, ptr %7, align 4
  br label %133

129:                                              ; preds = %122
  %130 = landingpad { ptr, i32 }
          cleanup
  %131 = extractvalue { ptr, i32 } %130, 0
  store ptr %131, ptr %6, align 8
  %132 = extractvalue { ptr, i32 } %130, 1
  store i32 %132, ptr %7, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #6
  br label %133

133:                                              ; preds = %129, %125
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #6
  br label %135

134:                                              ; preds = %123, %117
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  ret void

135:                                              ; preds = %133, %87, %78
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %136

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN3Raz12_GLOBAL__N_18checkLogE8XrResultRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP12XrInstance_T(i32 noundef, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #3

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxeqIPKjSt6vectorIjSaIjEEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #4

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

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

declare i32 @xrEnumerateEnvironmentBlendModes(ptr noundef, i64 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) #1

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt4findIN9__gnu_cxx17__normal_iteratorIPKjSt6vectorIjSaIjEEEE22XrEnvironmentBlendModeET_S9_S9_RKT0_(ptr, ptr, ptr noundef nonnull align 4 dereferenceable(4)) #5

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 168}
!12 = !{!"_ZTSN3Raz8XrSystemE", !13, i64 0, !25, i64 72, !35, i64 192, !46, i64 328, !10, i64 352, !50, i64 360, !10, i64 384, !10, i64 388, !46, i64 392, !10, i64 416}
!13 = !{!"_ZTSN3Raz6SystemE", !14, i64 8, !18, i64 32}
!14 = !{!"_ZTSSt6vectorIPN3Raz6EntityESaIS2_EE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseIPN3Raz6EntityESaIS2_EE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIPN3Raz6EntityESaIS2_EE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIPN3Raz6EntityESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!18 = !{!"_ZTSN3Raz6BitsetE", !19, i64 0}
!19 = !{!"_ZTSSt6vectorIbSaIbEE", !20, i64 0}
!20 = !{!"_ZTSSt13_Bvector_baseISaIbEE", !21, i64 0}
!21 = !{!"_ZTSNSt13_Bvector_baseISaIbEE13_Bvector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt13_Bvector_baseISaIbEE18_Bvector_impl_dataE", !23, i64 0, !23, i64 16, !6, i64 32}
!23 = !{!"_ZTSSt13_Bit_iterator", !24, i64 0}
!24 = !{!"_ZTSSt18_Bit_iterator_base", !6, i64 0, !10, i64 8}
!25 = !{!"_ZTSN3Raz9XrContextE", !26, i64 0, !30, i64 24, !26, i64 48, !30, i64 72, !6, i64 96, !6, i64 104, !34, i64 112}
!26 = !{!"_ZTSSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !27, i64 0}
!27 = !{!"_ZTSSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_Vector_implE", !29, i64 0}
!29 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!30 = !{!"_ZTSSt6vectorIPKcSaIS1_EE", !31, i64 0}
!31 = !{!"_ZTSSt12_Vector_baseIPKcSaIS1_EE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseIPKcSaIS1_EE12_Vector_implE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseIPKcSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!34 = !{!"long", !7, i64 0}
!35 = !{!"_ZTSN3Raz9XrSessionE", !6, i64 0, !6, i64 8, !10, i64 16, !36, i64 20, !6, i64 24, !37, i64 32, !37, i64 56, !41, i64 80}
!36 = !{!"bool", !7, i64 0}
!37 = !{!"_ZTSSt6vectorIP13XrSwapchain_TSaIS1_EE", !38, i64 0}
!38 = !{!"_ZTSSt12_Vector_baseIP13XrSwapchain_TSaIS1_EE", !39, i64 0}
!39 = !{!"_ZTSNSt12_Vector_baseIP13XrSwapchain_TSaIS1_EE12_Vector_implE", !40, i64 0}
!40 = !{!"_ZTSNSt12_Vector_baseIP13XrSwapchain_TSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!41 = !{!"_ZTSSt13unordered_mapIP13XrSwapchain_TSt6vectorI25XrSwapchainImageOpenGLKHRSaIS3_EESt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_S5_EEE", !42, i64 0}
!42 = !{!"_ZTSSt10_HashtableIP13XrSwapchain_TSt4pairIKS1_St6vectorI25XrSwapchainImageOpenGLKHRSaIS5_EEESaIS8_ENSt8__detail10_Select1stESt8equal_toIS1_ESt4hashIS1_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb0ELb0ELb1EEEE", !6, i64 0, !34, i64 8, !43, i64 16, !34, i64 24, !44, i64 32, !6, i64 48}
!43 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!44 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !45, i64 0, !34, i64 8}
!45 = !{!"float", !7, i64 0}
!46 = !{!"_ZTSSt6vectorIjSaIjEE", !47, i64 0}
!47 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !48, i64 0}
!48 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !49, i64 0}
!49 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!50 = !{!"_ZTSSt6vectorI23XrViewConfigurationViewSaIS0_EE", !51, i64 0}
!51 = !{!"_ZTSSt12_Vector_baseI23XrViewConfigurationViewSaIS0_EE", !52, i64 0}
!52 = !{!"_ZTSNSt12_Vector_baseI23XrViewConfigurationViewSaIS0_EE12_Vector_implE", !53, i64 0}
!53 = !{!"_ZTSNSt12_Vector_baseI23XrViewConfigurationViewSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!54 = !{!12, !34, i64 184}
!55 = !{!12, !10, i64 352}
!56 = !{!57, !57, i64 0}
!57 = !{!"_ZTS22XrEnvironmentBlendMode", !7, i64 0}
!58 = !{!59, !6, i64 0}
!59 = !{!"_ZTSSt16initializer_listI22XrEnvironmentBlendModeE", !6, i64 0, !34, i64 8}
!60 = !{!59, !34, i64 8}
!61 = !{!12, !10, i64 416}


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

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator.35" = type { i8 }
%"class.std::initializer_list.39" = type { ptr, i64 }
%"class.__gnu_cxx::__normal_iterator.38" = type { ptr }

@.str.13 = external hidden unnamed_addr constant [43 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [44 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [87 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

declare void @_ZN3Raz6Logger4warnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1

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

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

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

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

; 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 @_ZN3Raz8XrSystem28recoverEnvironmentBlendModesEv(ptr noundef nonnull align 8 dereferenceable(424) %0) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca i32, align 4
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca %"class.std::allocator.35", align 1
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::allocator.35", align 1
  %7 = alloca %"class.std::initializer_list.39", align 8
  %8 = alloca [2 x i32], align 4
  %9 = alloca i32, align 4
  %10 = alloca %"class.__gnu_cxx::__normal_iterator.38", align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator.38", align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::allocator.35", align 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  store i32 0, ptr %2, align 4, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %0, i64 168
  %15 = load ptr, ptr %14, align 8, !tbaa !9
  %16 = getelementptr inbounds i8, ptr %0, i64 184
  %17 = load i64, ptr %16, align 8, !tbaa !53
  %18 = getelementptr inbounds i8, ptr %0, i64 352
  %19 = load i32, ptr %18, align 8, !tbaa !54
  %20 = call i32 @xrEnumerateEnvironmentBlendModes(ptr noundef %15, i64 noundef %17, i32 noundef %19, i32 noundef 0, ptr noundef nonnull %2, ptr noundef null)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull @.str.13, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %21 unwind label %40

21:                                               ; preds = %1
  %22 = load ptr, ptr %14, align 8, !tbaa !9
  invoke void @_ZN3Raz12_GLOBAL__N_18checkLogE8XrResultRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP12XrInstance_T(i32 noundef %20, ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef %22)
          to label %23 unwind label %42

23:                                               ; preds = %21
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #6
  %24 = getelementptr inbounds i8, ptr %0, i64 392
  %25 = load i32, ptr %2, align 4, !tbaa !5
  %26 = zext i32 %25 to i64
  call void @_ZNSt6vectorIjSaIjEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %24, i64 noundef %26)
  %27 = load ptr, ptr %14, align 8, !tbaa !9
  %28 = load i64, ptr %16, align 8, !tbaa !53
  %29 = load i32, ptr %18, align 8, !tbaa !54
  %30 = load i32, ptr %2, align 4, !tbaa !5
  %31 = call noundef ptr @_ZNSt6vectorIjSaIjEE4dataEv(ptr noundef nonnull align 8 dereferenceable(24) %24) #6
  %32 = call i32 @xrEnumerateEnvironmentBlendModes(ptr noundef %27, i64 noundef %28, i32 noundef %29, i32 noundef %30, ptr noundef nonnull %2, ptr noundef %31)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull @.str.14, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %33 unwind label %45

33:                                               ; preds = %23
  %34 = load ptr, ptr %14, align 8, !tbaa !9
  invoke void @_ZN3Raz12_GLOBAL__N_18checkLogE8XrResultRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP12XrInstance_T(i32 noundef %32, ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef %34)
          to label %35 unwind label %47

35:                                               ; preds = %33
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  store i32 1, ptr %8, align 4, !tbaa !55
  %36 = getelementptr inbounds i8, ptr %8, i64 4
  store i32 2, ptr %36, align 4, !tbaa !55
  store ptr %8, ptr %7, align 8, !tbaa !57
  %37 = getelementptr inbounds i8, ptr %7, i64 8
  store i64 2, ptr %37, align 8, !tbaa !59
  %38 = call noundef ptr @_ZNKSt16initializer_listI22XrEnvironmentBlendModeE5beginEv(ptr noundef nonnull align 8 dereferenceable(16) %7) #6
  %39 = call noundef ptr @_ZNKSt16initializer_listI22XrEnvironmentBlendModeE3endEv(ptr noundef nonnull align 8 dereferenceable(16) %7) #6
  %.not22 = icmp eq ptr %38, %39
  br i1 %.not22, label %.loopexit, label %.lr.ph

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

42:                                               ; preds = %21
  %43 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #6
  br label %44

44:                                               ; preds = %42, %40
  %.pn = phi { ptr, i32 } [ %43, %42 ], [ %41, %40 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #6
  br label %72

45:                                               ; preds = %23
  %46 = landingpad { ptr, i32 }
          cleanup
  br label %49

47:                                               ; preds = %33
  %48 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  br label %49

49:                                               ; preds = %47, %45
  %.pn17 = phi { ptr, i32 } [ %48, %47 ], [ %46, %45 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  br label %72

.lr.ph:                                           ; preds = %35, %.critedge
  %.01523 = phi ptr [ %59, %.critedge ], [ %38, %35 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #6
  %50 = load i32, ptr %.01523, align 4, !tbaa !55
  store i32 %50, ptr %9, align 4, !tbaa !55
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #6
  %51 = call ptr @_ZNKSt6vectorIjSaIjEE6cbeginEv(ptr noundef nonnull align 8 dereferenceable(24) %24) #6
  %52 = call ptr @_ZNKSt6vectorIjSaIjEE4cendEv(ptr noundef nonnull align 8 dereferenceable(24) %24) #6
  %53 = call ptr @_ZSt4findIN9__gnu_cxx17__normal_iteratorIPKjSt6vectorIjSaIjEEEE22XrEnvironmentBlendModeET_S9_S9_RKT0_(ptr %51, ptr %52, ptr noundef nonnull align 4 dereferenceable(4) %9)
  store ptr %53, ptr %10, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #6
  %54 = call ptr @_ZNKSt6vectorIjSaIjEE4cendEv(ptr noundef nonnull align 8 dereferenceable(24) %24) #6
  store ptr %54, ptr %11, align 8
  %55 = call noundef zeroext i1 @_ZN9__gnu_cxxeqIPKjSt6vectorIjSaIjEEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #6
  br i1 %55, label %.critedge, label %56

56:                                               ; preds = %.lr.ph
  %57 = load i32, ptr %9, align 4, !tbaa !55
  %58 = getelementptr inbounds i8, ptr %0, i64 416
  store i32 %57, ptr %58, align 8, !tbaa !60
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #6
  br label %.loopexit

.critedge:                                        ; preds = %.lr.ph
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #6
  %59 = getelementptr inbounds i8, ptr %.01523, i64 4
  %.not = icmp eq ptr %59, %39
  br i1 %.not, label %.loopexit, label %.lr.ph

.loopexit:                                        ; preds = %.critedge, %35, %56
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #6
  %60 = getelementptr inbounds i8, ptr %0, i64 416
  %61 = load i32, ptr %60, align 8, !tbaa !60
  %62 = icmp eq i32 %61, 0
  br i1 %62, label %63, label %71

63:                                               ; preds = %.loopexit
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull @.str.15, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %64 unwind label %66

64:                                               ; preds = %63
  invoke void @_ZN3Raz6Logger4warnERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %65 unwind label %68

65:                                               ; preds = %64
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #6
  store i32 1, ptr %60, align 8, !tbaa !60
  br label %71

66:                                               ; preds = %63
  %67 = landingpad { ptr, i32 }
          cleanup
  br label %70

68:                                               ; preds = %64
  %69 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #6
  br label %70

70:                                               ; preds = %68, %66
  %.pn19 = phi { ptr, i32 } [ %69, %68 ], [ %67, %66 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #6
  br label %72

71:                                               ; preds = %65, %.loopexit
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  ret void

72:                                               ; preds = %70, %49, %44
  %.pn19.pn = phi { ptr, i32 } [ %.pn19, %70 ], [ %.pn17, %49 ], [ %.pn, %44 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  resume { ptr, i32 } %.pn19.pn
}

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN3Raz12_GLOBAL__N_18checkLogE8XrResultRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP12XrInstance_T(i32 noundef, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #3

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxeqIPKjSt6vectorIjSaIjEEEEbRKNS_17__normal_iteratorIT_T0_EESB_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #4

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

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

declare i32 @xrEnumerateEnvironmentBlendModes(ptr noundef, i64 noundef, i32 noundef, i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !16, i64 168}
!10 = !{!"_ZTSN3Raz8XrSystemE", !11, i64 0, !24, i64 72, !34, i64 192, !45, i64 328, !6, i64 352, !49, i64 360, !6, i64 384, !6, i64 388, !45, i64 392, !6, i64 416}
!11 = !{!"_ZTSN3Raz6SystemE", !12, i64 8, !17, i64 32}
!12 = !{!"_ZTSSt6vectorIPN3Raz6EntityESaIS2_EE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseIPN3Raz6EntityESaIS2_EE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIPN3Raz6EntityESaIS2_EE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIPN3Raz6EntityESaIS2_EE17_Vector_impl_dataE", !16, i64 0, !16, i64 8, !16, i64 16}
!16 = !{!"any pointer", !7, i64 0}
!17 = !{!"_ZTSN3Raz6BitsetE", !18, i64 0}
!18 = !{!"_ZTSSt6vectorIbSaIbEE", !19, i64 0}
!19 = !{!"_ZTSSt13_Bvector_baseISaIbEE", !20, i64 0}
!20 = !{!"_ZTSNSt13_Bvector_baseISaIbEE13_Bvector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt13_Bvector_baseISaIbEE18_Bvector_impl_dataE", !22, i64 0, !22, i64 16, !16, i64 32}
!22 = !{!"_ZTSSt13_Bit_iterator", !23, i64 0}
!23 = !{!"_ZTSSt18_Bit_iterator_base", !16, i64 0, !6, i64 8}
!24 = !{!"_ZTSN3Raz9XrContextE", !25, i64 0, !29, i64 24, !25, i64 48, !29, i64 72, !16, i64 96, !16, i64 104, !33, i64 112}
!25 = !{!"_ZTSSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !26, i64 0}
!26 = !{!"_ZTSSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_Vector_implE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_Vector_impl_dataE", !16, i64 0, !16, i64 8, !16, i64 16}
!29 = !{!"_ZTSSt6vectorIPKcSaIS1_EE", !30, i64 0}
!30 = !{!"_ZTSSt12_Vector_baseIPKcSaIS1_EE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseIPKcSaIS1_EE12_Vector_implE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseIPKcSaIS1_EE17_Vector_impl_dataE", !16, i64 0, !16, i64 8, !16, i64 16}
!33 = !{!"long", !7, i64 0}
!34 = !{!"_ZTSN3Raz9XrSessionE", !16, i64 0, !16, i64 8, !6, i64 16, !35, i64 20, !16, i64 24, !36, i64 32, !36, i64 56, !40, i64 80}
!35 = !{!"bool", !7, i64 0}
!36 = !{!"_ZTSSt6vectorIP13XrSwapchain_TSaIS1_EE", !37, i64 0}
!37 = !{!"_ZTSSt12_Vector_baseIP13XrSwapchain_TSaIS1_EE", !38, i64 0}
!38 = !{!"_ZTSNSt12_Vector_baseIP13XrSwapchain_TSaIS1_EE12_Vector_implE", !39, i64 0}
!39 = !{!"_ZTSNSt12_Vector_baseIP13XrSwapchain_TSaIS1_EE17_Vector_impl_dataE", !16, i64 0, !16, i64 8, !16, i64 16}
!40 = !{!"_ZTSSt13unordered_mapIP13XrSwapchain_TSt6vectorI25XrSwapchainImageOpenGLKHRSaIS3_EESt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_S5_EEE", !41, i64 0}
!41 = !{!"_ZTSSt10_HashtableIP13XrSwapchain_TSt4pairIKS1_St6vectorI25XrSwapchainImageOpenGLKHRSaIS5_EEESaIS8_ENSt8__detail10_Select1stESt8equal_toIS1_ESt4hashIS1_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb0ELb0ELb1EEEE", !16, i64 0, !33, i64 8, !42, i64 16, !33, i64 24, !43, i64 32, !16, i64 48}
!42 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !16, i64 0}
!43 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !44, i64 0, !33, i64 8}
!44 = !{!"float", !7, i64 0}
!45 = !{!"_ZTSSt6vectorIjSaIjEE", !46, i64 0}
!46 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !47, i64 0}
!47 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !48, i64 0}
!48 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !16, i64 0, !16, i64 8, !16, i64 16}
!49 = !{!"_ZTSSt6vectorI23XrViewConfigurationViewSaIS0_EE", !50, i64 0}
!50 = !{!"_ZTSSt12_Vector_baseI23XrViewConfigurationViewSaIS0_EE", !51, i64 0}
!51 = !{!"_ZTSNSt12_Vector_baseI23XrViewConfigurationViewSaIS0_EE12_Vector_implE", !52, i64 0}
!52 = !{!"_ZTSNSt12_Vector_baseI23XrViewConfigurationViewSaIS0_EE17_Vector_impl_dataE", !16, i64 0, !16, i64 8, !16, i64 16}
!53 = !{!10, !33, i64 184}
!54 = !{!10, !6, i64 352}
!55 = !{!56, !56, i64 0}
!56 = !{!"_ZTS22XrEnvironmentBlendMode", !7, i64 0}
!57 = !{!58, !16, i64 0}
!58 = !{!"_ZTSSt16initializer_listI22XrEnvironmentBlendModeE", !16, i64 0, !33, i64 8}
!59 = !{!58, !33, i64 8}
!60 = !{!10, !6, i64 416}


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