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

; 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 }
%struct.XrEventDataSessionStateChanged = type { i32, ptr, ptr, i32, i64 }
%"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.16 = external hidden unnamed_addr constant [58 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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 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 #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 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 noundef zeroext i1 @_ZN3Raz8XrSystem26processSessionStateChangedERK30XrEventDataSessionStateChanged(ptr noundef nonnull align 8 dereferenceable(424) %0, ptr noundef nonnull align 8 dereferenceable(40) %1) #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::allocator.35", align 1
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %10 = load ptr, ptr %4, align 8
  %11 = load ptr, ptr %5, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.XrEventDataSessionStateChanged, ptr %11, i32 0, i32 2
  %13 = load ptr, ptr %12, align 8, !tbaa !9
  %14 = getelementptr inbounds %"class.Raz::XrSystem", ptr %10, i32 0, i32 2
  %15 = getelementptr inbounds %"class.Raz::XrSession", ptr %14, i32 0, i32 0
  %16 = load ptr, ptr %15, align 8, !tbaa !14
  %17 = icmp ne ptr %13, %16
  br i1 %17, label %18, label %30

18:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 32, ptr %6) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr %7) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef @.str.16, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %19 unwind label %21

19:                                               ; preds = %18
  invoke void @_ZN3Raz6Logger4infoERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %20 unwind label %25

20:                                               ; preds = %19
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #4
  store i1 true, ptr %3, align 1
  br label %57

21:                                               ; preds = %18
  %22 = landingpad { ptr, i32 }
          cleanup
  %23 = extractvalue { ptr, i32 } %22, 0
  store ptr %23, ptr %8, align 8
  %24 = extractvalue { ptr, i32 } %22, 1
  store i32 %24, ptr %9, align 4
  br label %29

25:                                               ; preds = %19
  %26 = landingpad { ptr, i32 }
          cleanup
  %27 = extractvalue { ptr, i32 } %26, 0
  store ptr %27, ptr %8, align 8
  %28 = extractvalue { ptr, i32 } %26, 1
  store i32 %28, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  br label %29

29:                                               ; preds = %25, %21
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %6) #4
  br label %59

30:                                               ; preds = %2
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.XrEventDataSessionStateChanged, ptr %31, i32 0, i32 3
  %33 = load i32, ptr %32, align 8, !tbaa !57
  switch i32 %33, label %50 [
    i32 2, label %34
    i32 6, label %40
    i32 7, label %44
    i32 8, label %47
  ]

34:                                               ; preds = %30
  %35 = getelementptr inbounds %"class.Raz::XrSystem", ptr %10, i32 0, i32 2
  %36 = getelementptr inbounds %"class.Raz::XrSystem", ptr %10, i32 0, i32 4
  %37 = load i32, ptr %36, align 8, !tbaa !58
  call void @_ZN3Raz9XrSession5beginEj(ptr noundef nonnull align 8 dereferenceable(136) %35, i32 noundef %37)
  %38 = getelementptr inbounds %"class.Raz::XrSystem", ptr %10, i32 0, i32 2
  %39 = getelementptr inbounds %"class.Raz::XrSession", ptr %38, i32 0, i32 3
  store i8 1, ptr %39, align 4, !tbaa !59
  br label %51

40:                                               ; preds = %30
  %41 = getelementptr inbounds %"class.Raz::XrSystem", ptr %10, i32 0, i32 2
  call void @_ZN3Raz9XrSession3endEv(ptr noundef nonnull align 8 dereferenceable(136) %41)
  %42 = getelementptr inbounds %"class.Raz::XrSystem", ptr %10, i32 0, i32 2
  %43 = getelementptr inbounds %"class.Raz::XrSession", ptr %42, i32 0, i32 3
  store i8 0, ptr %43, align 4, !tbaa !59
  br label %51

44:                                               ; preds = %30
  %45 = getelementptr inbounds %"class.Raz::XrSystem", ptr %10, i32 0, i32 2
  %46 = getelementptr inbounds %"class.Raz::XrSession", ptr %45, i32 0, i32 3
  store i8 0, ptr %46, align 4, !tbaa !59
  store i1 false, ptr %3, align 1
  br label %57

47:                                               ; preds = %30
  %48 = getelementptr inbounds %"class.Raz::XrSystem", ptr %10, i32 0, i32 2
  %49 = getelementptr inbounds %"class.Raz::XrSession", ptr %48, i32 0, i32 3
  store i8 0, ptr %49, align 4, !tbaa !59
  store i1 false, ptr %3, align 1
  br label %57

50:                                               ; preds = %30
  br label %51

51:                                               ; preds = %50, %40, %34
  %52 = load ptr, ptr %5, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.XrEventDataSessionStateChanged, ptr %52, i32 0, i32 3
  %54 = load i32, ptr %53, align 8, !tbaa !57
  %55 = getelementptr inbounds %"class.Raz::XrSystem", ptr %10, i32 0, i32 2
  %56 = getelementptr inbounds %"class.Raz::XrSession", ptr %55, i32 0, i32 2
  store i32 %54, ptr %56, align 8, !tbaa !60
  store i1 true, ptr %3, align 1
  br label %57

57:                                               ; preds = %51, %47, %44, %20
  %58 = load i1, ptr %3, align 1
  ret i1 %58

59:                                               ; preds = %29
  %60 = load ptr, ptr %8, align 8
  %61 = load i32, ptr %9, align 4
  %62 = insertvalue { ptr, i32 } poison, ptr %60, 0
  %63 = insertvalue { ptr, i32 } %62, i32 %61, 1
  resume { ptr, i32 } %63
}

declare void @_ZN3Raz6Logger4infoERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32)) #3

declare void @_ZN3Raz9XrSession5beginEj(ptr noundef nonnull align 8 dereferenceable(136), i32 noundef) #3

declare void @_ZN3Raz9XrSession3endEv(ptr noundef nonnull align 8 dereferenceable(136)) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "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 = { 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, !6, i64 16}
!10 = !{!"_ZTS30XrEventDataSessionStateChanged", !11, i64 0, !6, i64 8, !6, i64 16, !12, i64 24, !13, i64 32}
!11 = !{!"_ZTS15XrStructureType", !7, i64 0}
!12 = !{!"_ZTS14XrSessionState", !7, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!15, !6, i64 192}
!15 = !{!"_ZTSN3Raz8XrSystemE", !16, i64 0, !29, i64 72, !38, i64 192, !49, i64 328, !28, i64 352, !53, i64 360, !28, i64 384, !28, i64 388, !49, i64 392, !28, i64 416}
!16 = !{!"_ZTSN3Raz6SystemE", !17, i64 8, !21, i64 32}
!17 = !{!"_ZTSSt6vectorIPN3Raz6EntityESaIS2_EE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIPN3Raz6EntityESaIS2_EE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIPN3Raz6EntityESaIS2_EE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIPN3Raz6EntityESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!"_ZTSN3Raz6BitsetE", !22, i64 0}
!22 = !{!"_ZTSSt6vectorIbSaIbEE", !23, i64 0}
!23 = !{!"_ZTSSt13_Bvector_baseISaIbEE", !24, i64 0}
!24 = !{!"_ZTSNSt13_Bvector_baseISaIbEE13_Bvector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt13_Bvector_baseISaIbEE18_Bvector_impl_dataE", !26, i64 0, !26, i64 16, !6, i64 32}
!26 = !{!"_ZTSSt13_Bit_iterator", !27, i64 0}
!27 = !{!"_ZTSSt18_Bit_iterator_base", !6, i64 0, !28, i64 8}
!28 = !{!"int", !7, i64 0}
!29 = !{!"_ZTSN3Raz9XrContextE", !30, i64 0, !34, i64 24, !30, i64 48, !34, i64 72, !6, i64 96, !6, i64 104, !13, i64 112}
!30 = !{!"_ZTSSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !31, i64 0}
!31 = !{!"_ZTSSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_Vector_implE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!34 = !{!"_ZTSSt6vectorIPKcSaIS1_EE", !35, i64 0}
!35 = !{!"_ZTSSt12_Vector_baseIPKcSaIS1_EE", !36, i64 0}
!36 = !{!"_ZTSNSt12_Vector_baseIPKcSaIS1_EE12_Vector_implE", !37, i64 0}
!37 = !{!"_ZTSNSt12_Vector_baseIPKcSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!38 = !{!"_ZTSN3Raz9XrSessionE", !6, i64 0, !6, i64 8, !28, i64 16, !39, i64 20, !6, i64 24, !40, i64 32, !40, i64 56, !44, i64 80}
!39 = !{!"bool", !7, i64 0}
!40 = !{!"_ZTSSt6vectorIP13XrSwapchain_TSaIS1_EE", !41, i64 0}
!41 = !{!"_ZTSSt12_Vector_baseIP13XrSwapchain_TSaIS1_EE", !42, i64 0}
!42 = !{!"_ZTSNSt12_Vector_baseIP13XrSwapchain_TSaIS1_EE12_Vector_implE", !43, i64 0}
!43 = !{!"_ZTSNSt12_Vector_baseIP13XrSwapchain_TSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!44 = !{!"_ZTSSt13unordered_mapIP13XrSwapchain_TSt6vectorI25XrSwapchainImageOpenGLKHRSaIS3_EESt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_S5_EEE", !45, i64 0}
!45 = !{!"_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, !13, i64 8, !46, i64 16, !13, i64 24, !47, i64 32, !6, i64 48}
!46 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!47 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !48, i64 0, !13, i64 8}
!48 = !{!"float", !7, i64 0}
!49 = !{!"_ZTSSt6vectorIjSaIjEE", !50, i64 0}
!50 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !51, i64 0}
!51 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !52, i64 0}
!52 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!53 = !{!"_ZTSSt6vectorI23XrViewConfigurationViewSaIS0_EE", !54, i64 0}
!54 = !{!"_ZTSSt12_Vector_baseI23XrViewConfigurationViewSaIS0_EE", !55, i64 0}
!55 = !{!"_ZTSNSt12_Vector_baseI23XrViewConfigurationViewSaIS0_EE12_Vector_implE", !56, i64 0}
!56 = !{!"_ZTSNSt12_Vector_baseI23XrViewConfigurationViewSaIS0_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!57 = !{!10, !12, i64 24}
!58 = !{!15, !28, i64 352}
!59 = !{!15, !39, i64 212}
!60 = !{!15, !28, i64 208}


; 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 }

@.str.16 = external hidden unnamed_addr constant [58 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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 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 #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 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 noundef zeroext i1 @_ZN3Raz8XrSystem26processSessionStateChangedERK30XrEventDataSessionStateChanged(ptr noundef nonnull align 8 dereferenceable(424) %0, ptr nocapture noundef nonnull readonly align 8 dereferenceable(40) %1) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::__cxx11::basic_string", align 8
  %4 = alloca %"class.std::allocator.35", align 1
  %5 = getelementptr inbounds i8, ptr %1, i64 16
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %0, i64 192
  %8 = load ptr, ptr %7, align 8, !tbaa !13
  %.not = icmp eq ptr %6, %8
  br i1 %.not, label %17, label %9

9:                                                ; preds = %2
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #4
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #4
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef nonnull @.str.16, ptr noundef nonnull align 1 dereferenceable(1) %4)
          to label %10 unwind label %12

10:                                               ; preds = %9
  invoke void @_ZN3Raz6Logger4infoERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %3)
          to label %11 unwind label %14

11:                                               ; preds = %10
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #4
  br label %32

12:                                               ; preds = %9
  %13 = landingpad { ptr, i32 }
          cleanup
  br label %16

14:                                               ; preds = %10
  %15 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %3) #4
  br label %16

16:                                               ; preds = %14, %12
  %.pn = phi { ptr, i32 } [ %15, %14 ], [ %13, %12 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %4) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #4
  resume { ptr, i32 } %.pn

17:                                               ; preds = %2
  %18 = getelementptr inbounds i8, ptr %1, i64 24
  %19 = load i32, ptr %18, align 8, !tbaa !56
  switch i32 %19, label %29 [
    i32 2, label %20
    i32 6, label %23
    i32 7, label %24
    i32 8, label %26
  ]

20:                                               ; preds = %17
  %21 = getelementptr inbounds i8, ptr %0, i64 352
  %22 = load i32, ptr %21, align 8, !tbaa !57
  tail call void @_ZN3Raz9XrSession5beginEj(ptr noundef nonnull align 8 dereferenceable(136) %7, i32 noundef %22)
  br label %.sink.split

23:                                               ; preds = %17
  tail call void @_ZN3Raz9XrSession3endEv(ptr noundef nonnull align 8 dereferenceable(136) %7)
  br label %.sink.split

24:                                               ; preds = %17
  %25 = getelementptr inbounds i8, ptr %0, i64 212
  store i8 0, ptr %25, align 4, !tbaa !58
  br label %32

26:                                               ; preds = %17
  %27 = getelementptr inbounds i8, ptr %0, i64 212
  store i8 0, ptr %27, align 4, !tbaa !58
  br label %32

.sink.split:                                      ; preds = %20, %23
  %.sink = phi i8 [ 0, %23 ], [ 1, %20 ]
  %28 = getelementptr inbounds i8, ptr %0, i64 212
  store i8 %.sink, ptr %28, align 4, !tbaa !58
  br label %29

29:                                               ; preds = %.sink.split, %17
  %30 = load i32, ptr %18, align 8, !tbaa !56
  %31 = getelementptr inbounds i8, ptr %0, i64 208
  store i32 %30, ptr %31, align 8, !tbaa !59
  br label %32

32:                                               ; preds = %29, %26, %24, %11
  %.07 = phi i1 [ true, %11 ], [ true, %29 ], [ false, %26 ], [ false, %24 ]
  ret i1 %.07
}

declare void @_ZN3Raz6Logger4infoERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3

declare void @_ZN3Raz9XrSession5beginEj(ptr noundef nonnull align 8 dereferenceable(136), i32 noundef) local_unnamed_addr #3

declare void @_ZN3Raz9XrSession3endEv(ptr noundef nonnull align 8 dereferenceable(136)) local_unnamed_addr #3

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "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 = { 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, !10, i64 16}
!6 = !{!"_ZTS30XrEventDataSessionStateChanged", !7, i64 0, !10, i64 8, !10, i64 16, !11, i64 24, !12, i64 32}
!7 = !{!"_ZTS15XrStructureType", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"_ZTS14XrSessionState", !8, i64 0}
!12 = !{!"long", !8, i64 0}
!13 = !{!14, !10, i64 192}
!14 = !{!"_ZTSN3Raz8XrSystemE", !15, i64 0, !28, i64 72, !37, i64 192, !48, i64 328, !27, i64 352, !52, i64 360, !27, i64 384, !27, i64 388, !48, i64 392, !27, i64 416}
!15 = !{!"_ZTSN3Raz6SystemE", !16, i64 8, !20, i64 32}
!16 = !{!"_ZTSSt6vectorIPN3Raz6EntityESaIS2_EE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIPN3Raz6EntityESaIS2_EE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIPN3Raz6EntityESaIS2_EE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIPN3Raz6EntityESaIS2_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!20 = !{!"_ZTSN3Raz6BitsetE", !21, i64 0}
!21 = !{!"_ZTSSt6vectorIbSaIbEE", !22, i64 0}
!22 = !{!"_ZTSSt13_Bvector_baseISaIbEE", !23, i64 0}
!23 = !{!"_ZTSNSt13_Bvector_baseISaIbEE13_Bvector_implE", !24, i64 0}
!24 = !{!"_ZTSNSt13_Bvector_baseISaIbEE18_Bvector_impl_dataE", !25, i64 0, !25, i64 16, !10, i64 32}
!25 = !{!"_ZTSSt13_Bit_iterator", !26, i64 0}
!26 = !{!"_ZTSSt18_Bit_iterator_base", !10, i64 0, !27, i64 8}
!27 = !{!"int", !8, i64 0}
!28 = !{!"_ZTSN3Raz9XrContextE", !29, i64 0, !33, i64 24, !29, i64 48, !33, i64 72, !10, i64 96, !10, i64 104, !12, i64 112}
!29 = !{!"_ZTSSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !30, i64 0}
!30 = !{!"_ZTSSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12_Vector_implE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!33 = !{!"_ZTSSt6vectorIPKcSaIS1_EE", !34, i64 0}
!34 = !{!"_ZTSSt12_Vector_baseIPKcSaIS1_EE", !35, i64 0}
!35 = !{!"_ZTSNSt12_Vector_baseIPKcSaIS1_EE12_Vector_implE", !36, i64 0}
!36 = !{!"_ZTSNSt12_Vector_baseIPKcSaIS1_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!37 = !{!"_ZTSN3Raz9XrSessionE", !10, i64 0, !10, i64 8, !27, i64 16, !38, i64 20, !10, i64 24, !39, i64 32, !39, i64 56, !43, i64 80}
!38 = !{!"bool", !8, i64 0}
!39 = !{!"_ZTSSt6vectorIP13XrSwapchain_TSaIS1_EE", !40, i64 0}
!40 = !{!"_ZTSSt12_Vector_baseIP13XrSwapchain_TSaIS1_EE", !41, i64 0}
!41 = !{!"_ZTSNSt12_Vector_baseIP13XrSwapchain_TSaIS1_EE12_Vector_implE", !42, i64 0}
!42 = !{!"_ZTSNSt12_Vector_baseIP13XrSwapchain_TSaIS1_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!43 = !{!"_ZTSSt13unordered_mapIP13XrSwapchain_TSt6vectorI25XrSwapchainImageOpenGLKHRSaIS3_EESt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_S5_EEE", !44, i64 0}
!44 = !{!"_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", !10, i64 0, !12, i64 8, !45, i64 16, !12, i64 24, !46, i64 32, !10, i64 48}
!45 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !10, i64 0}
!46 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !47, i64 0, !12, i64 8}
!47 = !{!"float", !8, i64 0}
!48 = !{!"_ZTSSt6vectorIjSaIjEE", !49, i64 0}
!49 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !50, i64 0}
!50 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !51, i64 0}
!51 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!52 = !{!"_ZTSSt6vectorI23XrViewConfigurationViewSaIS0_EE", !53, i64 0}
!53 = !{!"_ZTSSt12_Vector_baseI23XrViewConfigurationViewSaIS0_EE", !54, i64 0}
!54 = !{!"_ZTSNSt12_Vector_baseI23XrViewConfigurationViewSaIS0_EE12_Vector_implE", !55, i64 0}
!55 = !{!"_ZTSNSt12_Vector_baseI23XrViewConfigurationViewSaIS0_EE17_Vector_impl_dataE", !10, i64 0, !10, i64 8, !10, i64 16}
!56 = !{!6, !11, i64 24}
!57 = !{!14, !27, i64 352}
!58 = !{!14, !38, i64 212}
!59 = !{!14, !27, i64 208}


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