; LLVM IR from Try/Tempest :: Engine/thirdparty/spirv_cross (spirv_hlsl)

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

%"struct.std::__detail::_Node_iterator.433" = type { %"struct.std::__detail::_Node_iterator_base.434" }
%"struct.std::__detail::_Node_iterator_base.434" = type { ptr }
%"struct.spirv_cross::StageSetBinding" = type { i32, i32, i32 }
%"class.spirv_cross::CompilerHLSL" = type { %"class.spirv_cross::CompilerGLSL", %"struct.spirv_cross::CompilerHLSL::Options", i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, %"struct.spirv_cross::CompilerHLSL::TextureSizeVariants", i8, i8, %"class.spirv_cross::SmallVector.277", i32, i32, %"class.std::vector.280", i32, %"class.std::unordered_map.285", %"class.std::unordered_set.302", %struct.anon, %"class.std::vector.319" }
%"class.spirv_cross::CompilerGLSL" = type { %"class.spirv_cross::Compiler", ptr, %"class.spirv_cross::SmallVector.159", i8, %"class.spirv_cross::StringStream", ptr, ptr, i8, i8, %"struct.spirv_cross::CompilerGLSL::Options", %"class.std::unordered_set.165", %"class.std::unordered_set.165", %"class.std::unordered_set.165", %"class.std::unordered_set.165", %"class.std::unordered_set.165", %"class.std::unordered_set.165", %"class.std::unordered_set.165", %"class.std::unordered_map.185", %"class.std::unordered_map.145", i8, [7 x i8], %"struct.spirv_cross::CompilerGLSL::BackendVariations", i32, %"class.std::unordered_set", %"class.std::unordered_set", %"class.std::unordered_set", %"class.std::unordered_map.199", %"struct.spirv_cross::CompilerGLSL::ShaderSubgroupSupportHelper", %"class.std::unordered_map.213", %"class.spirv_cross::SmallVector.30", %"class.spirv_cross::SmallVector.30", %"class.std::unordered_map.213", %"class.spirv_cross::SmallVector.227", i32, i32, i32, i8, i8, %"class.std::vector.230", %"class.std::vector.230", %"class.std::vector.235", %"class.std::vector.240", %"class.std::unordered_map.213", %"class.std::unordered_set", %"class.std::unordered_set", i8, %"class.std::unordered_set.245", %"class.std::unordered_set", ptr, %"class.std::unordered_map.263" }
%"class.spirv_cross::Compiler" = type { ptr, %"class.spirv_cross::ParsedIR", %"class.spirv_cross::SmallVector.92", %"class.spirv_cross::SmallVector.92", ptr, ptr, i32, %"class.std::unordered_set.95", i8, %"class.std::unordered_set", i8, i8, %"class.spirv_cross::SmallVector.114", %"class.spirv_cross::SmallVector.92", %"class.std::function", %"class.std::unordered_set", %"class.std::unordered_set", %"class.std::unordered_set", %"class.std::unordered_set", %"class.std::unordered_set", %"class.spirv_cross::Bitset", %"class.spirv_cross::Bitset", i32, i32, i8, %"class.std::unordered_set", i8, i8, i32, %"class.std::unordered_map.117", %"class.spirv_cross::SmallVector.92", %"class.std::unordered_map.131", %"class.std::unordered_set", i8, %"class.std::unordered_map.145" }
%"class.spirv_cross::ParsedIR" = type { %"class.std::unique_ptr", %"class.std::vector", %"class.spirv_cross::SmallVector", %"class.std::unordered_map", [14 x %"class.spirv_cross::SmallVector.10"], %"class.spirv_cross::SmallVector.10", %"class.spirv_cross::SmallVector.10", %"class.std::unordered_map.13", %"class.spirv_cross::SmallVector.27", %"class.spirv_cross::SmallVector.30", %"class.spirv_cross::SmallVector.33", %"class.std::unordered_map.36", %"class.std::unordered_map.55", %"class.spirv_cross::TypedID", %"struct.spirv_cross::ParsedIR::Source", i32, i32, i32, i32, %"class.std::__cxx11::basic_string", %"class.spirv_cross::Bitset", %"class.std::unordered_set" }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.1" }
%"struct.std::_Head_base.1" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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 }
%"class.spirv_cross::SmallVector" = type { %"class.spirv_cross::VectorView", i64, %"class.spirv_cross::AlignedBuffer" }
%"class.spirv_cross::VectorView" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer" = type { [192 x i8] }
%"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.spirv_cross::SmallVector.10" = type { %"class.spirv_cross::VectorView.11", i64, %"class.spirv_cross::AlignedBuffer.12" }
%"class.spirv_cross::VectorView.11" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.12" = type { [32 x i8] }
%"class.std::unordered_map.13" = type { %"class.std::_Hashtable.14" }
%"class.std::_Hashtable.14" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.spirv_cross::SmallVector.27" = type { %"class.spirv_cross::VectorView.28", i64, %"class.spirv_cross::AlignedBuffer.29" }
%"class.spirv_cross::VectorView.28" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.29" = type { [32 x i8] }
%"class.spirv_cross::SmallVector.33" = type { %"class.spirv_cross::VectorView.34", i64, %"class.spirv_cross::AlignedBuffer.35" }
%"class.spirv_cross::VectorView.34" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.35" = type { [8 x i8] }
%"class.std::unordered_map.36" = type { %"class.std::_Hashtable.37" }
%"class.std::_Hashtable.37" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::unordered_map.55" = type { %"class.std::_Hashtable.56" }
%"class.std::_Hashtable.56" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.spirv_cross::TypedID" = type { i32 }
%"struct.spirv_cross::ParsedIR::Source" = type <{ i32, i8, i8, i8, i8 }>
%"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::unordered_set.95" = type { %"class.std::_Hashtable.96" }
%"class.std::_Hashtable.96" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.spirv_cross::SmallVector.114" = type { %"class.spirv_cross::VectorView.115", i64, %"class.spirv_cross::AlignedBuffer.116" }
%"class.spirv_cross::VectorView.115" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.116" = type { [96 x i8] }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%"class.spirv_cross::Bitset" = type { i64, %"class.std::unordered_set" }
%"class.std::unordered_map.117" = type { %"class.std::_Hashtable.118" }
%"class.std::_Hashtable.118" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.spirv_cross::SmallVector.92" = type { %"class.spirv_cross::VectorView.93", i64, %"class.spirv_cross::AlignedBuffer.94" }
%"class.spirv_cross::VectorView.93" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.94" = type { [32 x i8] }
%"class.std::unordered_map.131" = type { %"class.std::_Hashtable.132" }
%"class.std::_Hashtable.132" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.spirv_cross::SmallVector.159" = type { %"class.spirv_cross::VectorView.160", i64, %"class.spirv_cross::AlignedBuffer.161" }
%"class.spirv_cross::VectorView.160" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.161" = type { [64 x i8] }
%"class.spirv_cross::StringStream" = type { %"struct.spirv_cross::StringStream<>::Buffer", [4096 x i8], %"class.spirv_cross::SmallVector.162" }
%"struct.spirv_cross::StringStream<>::Buffer" = type { ptr, i64, i64 }
%"class.spirv_cross::SmallVector.162" = type { %"class.spirv_cross::VectorView.163", i64, %"class.spirv_cross::AlignedBuffer.164" }
%"class.spirv_cross::VectorView.163" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.164" = type { [192 x i8] }
%"struct.spirv_cross::CompilerGLSL::Options" = type { i32, i8, i8, i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i32, %"struct.spirv_cross::CompilerGLSL::Options::VertexOptions", %"struct.spirv_cross::CompilerGLSL::Options::FragmentOptions" }
%"struct.spirv_cross::CompilerGLSL::Options::VertexOptions" = type { i8, i8, i8 }
%"struct.spirv_cross::CompilerGLSL::Options::FragmentOptions" = type { i32, i32 }
%"class.std::unordered_set.165" = type { %"class.std::_Hashtable.166" }
%"class.std::_Hashtable.166" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::unordered_map.185" = type { %"class.std::_Hashtable.186" }
%"class.std::_Hashtable.186" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::unordered_map.145" = type { %"class.std::_Hashtable.146" }
%"class.std::_Hashtable.146" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.spirv_cross::CompilerGLSL::BackendVariations" = type <{ %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i8, i8, i8, i8, [4 x i8], ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, [4 x i8] }>
%"class.std::unordered_map.199" = type { %"class.std::_Hashtable.200" }
%"class.std::_Hashtable.200" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.spirv_cross::CompilerGLSL::ShaderSubgroupSupportHelper" = type { i32 }
%"class.spirv_cross::SmallVector.30" = type { %"class.spirv_cross::VectorView.31", i64, %"class.spirv_cross::AlignedBuffer.32" }
%"class.spirv_cross::VectorView.31" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.32" = type { [256 x i8] }
%"class.spirv_cross::SmallVector.227" = type { %"class.spirv_cross::VectorView.228", i64, %"class.spirv_cross::AlignedBuffer.229" }
%"class.spirv_cross::VectorView.228" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.229" = type { [32 x i8] }
%"class.std::vector.230" = type { %"struct.std::_Vector_base.231" }
%"struct.std::_Vector_base.231" = type { %"struct.std::_Vector_base<spirv_cross::PlsRemap, std::allocator<spirv_cross::PlsRemap>>::_Vector_impl" }
%"struct.std::_Vector_base<spirv_cross::PlsRemap, std::allocator<spirv_cross::PlsRemap>>::_Vector_impl" = type { %"struct.std::_Vector_base<spirv_cross::PlsRemap, std::allocator<spirv_cross::PlsRemap>>::_Vector_impl_data" }
%"struct.std::_Vector_base<spirv_cross::PlsRemap, std::allocator<spirv_cross::PlsRemap>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.235" = type { %"struct.std::_Vector_base.236" }
%"struct.std::_Vector_base.236" = type { %"struct.std::_Vector_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.240" = type { %"struct.std::_Vector_base.241" }
%"struct.std::_Vector_base.241" = type { %"struct.std::_Vector_base<std::pair<unsigned int, bool>, std::allocator<std::pair<unsigned int, bool>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<unsigned int, bool>, std::allocator<std::pair<unsigned int, bool>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<unsigned int, bool>, std::allocator<std::pair<unsigned int, bool>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<unsigned int, bool>, std::allocator<std::pair<unsigned int, bool>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::unordered_map.213" = type { %"class.std::_Hashtable.214" }
%"class.std::_Hashtable.214" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::unordered_set.245" = type { %"class.std::_Hashtable.246" }
%"class.std::_Hashtable.246" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::unordered_set" = type { %"class.std::_Hashtable.74" }
%"class.std::_Hashtable.74" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::unordered_map.263" = type { %"class.std::_Hashtable.264" }
%"class.std::_Hashtable.264" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.spirv_cross::CompilerHLSL::Options" = type <{ i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, [3 x i8] }>
%"struct.spirv_cross::CompilerHLSL::TextureSizeVariants" = type { i64, [3 x [4 x i64]] }
%"class.spirv_cross::SmallVector.277" = type { %"class.spirv_cross::VectorView.278", i64, %"class.spirv_cross::AlignedBuffer.279" }
%"class.spirv_cross::VectorView.278" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.279" = type { [320 x i8] }
%"class.std::vector.280" = type { %"struct.std::_Vector_base.281" }
%"struct.std::_Vector_base.281" = type { %"struct.std::_Vector_base<spirv_cross::RootConstants, std::allocator<spirv_cross::RootConstants>>::_Vector_impl" }
%"struct.std::_Vector_base<spirv_cross::RootConstants, std::allocator<spirv_cross::RootConstants>>::_Vector_impl" = type { %"struct.std::_Vector_base<spirv_cross::RootConstants, std::allocator<spirv_cross::RootConstants>>::_Vector_impl_data" }
%"struct.std::_Vector_base<spirv_cross::RootConstants, std::allocator<spirv_cross::RootConstants>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::unordered_map.285" = type { %"class.std::_Hashtable.286" }
%"class.std::_Hashtable.286" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::unordered_set.302" = type { %"class.std::_Hashtable.303" }
%"class.std::_Hashtable.303" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%struct.anon = type <{ i32, i32, i8, i8, [2 x i8] }>
%"class.std::vector.319" = type { %"struct.std::_Vector_base.320" }
%"struct.std::_Vector_base.320" = type { %"struct.std::_Vector_base<spirv_cross::TypedID<spirv_cross::TypeType>, std::allocator<spirv_cross::TypedID<spirv_cross::TypeType>>>::_Vector_impl" }
%"struct.std::_Vector_base<spirv_cross::TypedID<spirv_cross::TypeType>, std::allocator<spirv_cross::TypedID<spirv_cross::TypeType>>>::_Vector_impl" = type { %"struct.std::_Vector_base<spirv_cross::TypedID<spirv_cross::TypeType>, std::allocator<spirv_cross::TypedID<spirv_cross::TypeType>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<spirv_cross::TypedID<spirv_cross::TypeType>, std::allocator<spirv_cross::TypedID<spirv_cross::TypeType>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::pair.435" = type { %"struct.spirv_cross::StageSetBinding", %"struct.std::pair.437" }
%"struct.std::pair.437" = type <{ %"struct.spirv_cross::HLSLResourceBinding", i8, [3 x i8] }>
%"struct.spirv_cross::HLSLResourceBinding" = type { i32, i32, i32, %"struct.spirv_cross::HLSLResourceBinding::Binding", %"struct.spirv_cross::HLSLResourceBinding::Binding", %"struct.spirv_cross::HLSLResourceBinding::Binding", %"struct.spirv_cross::HLSLResourceBinding::Binding" }
%"struct.spirv_cross::HLSLResourceBinding::Binding" = type { i32, i32 }

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

; 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 @_ZN11spirv_cross12CompilerHLSL27remap_hlsl_resource_bindingENS_19HLSLBindingFlagBitsERjS2_(ptr noundef nonnull align 8 dereferenceable(10528) %0, i32 noundef %1, ptr noundef nonnull align 4 dereferenceable(4) %2, ptr noundef nonnull align 4 dereferenceable(4) %3) #1 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"struct.std::__detail::_Node_iterator.433", align 8
  %10 = alloca %"struct.spirv_cross::StageSetBinding", align 4
  %11 = alloca %"struct.std::__detail::_Node_iterator.433", align 8
  %12 = alloca ptr, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  %13 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %14 = getelementptr inbounds %"class.spirv_cross::CompilerHLSL", ptr %13, i32 0, i32 26
  call void @llvm.lifetime.start.p0(i64 12, ptr %10) #5
  %15 = getelementptr inbounds %"struct.spirv_cross::StageSetBinding", ptr %10, i32 0, i32 0
  %16 = call noundef i32 @_ZNK11spirv_cross8Compiler19get_execution_modelEv(ptr noundef nonnull align 8 dereferenceable(3176) %13)
  store i32 %16, ptr %15, align 4, !tbaa !11
  %17 = getelementptr inbounds %"struct.spirv_cross::StageSetBinding", ptr %10, i32 0, i32 1
  %18 = load ptr, ptr %7, align 8, !tbaa !5
  %19 = load i32, ptr %18, align 4, !tbaa !15
  store i32 %19, ptr %17, align 4, !tbaa !16
  %20 = getelementptr inbounds %"struct.spirv_cross::StageSetBinding", ptr %10, i32 0, i32 2
  %21 = load ptr, ptr %8, align 8, !tbaa !5
  %22 = load i32, ptr %21, align 4, !tbaa !15
  store i32 %22, ptr %20, align 4, !tbaa !17
  %23 = call ptr @_ZNSt13unordered_mapIN11spirv_cross15StageSetBindingESt4pairINS0_19HLSLResourceBindingEbENS0_14InternalHasherESt8equal_toIS1_ESaIS2_IKS1_S4_EEE4findERS8_(ptr noundef nonnull align 8 dereferenceable(56) %14, ptr noundef nonnull align 4 dereferenceable(12) %10)
  %24 = getelementptr inbounds %"struct.std::__detail::_Node_iterator.433", ptr %9, i32 0, i32 0
  %25 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base.434", ptr %24, i32 0, i32 0
  store ptr %23, ptr %25, align 8
  call void @llvm.lifetime.end.p0(i64 12, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %26 = getelementptr inbounds %"class.spirv_cross::CompilerHLSL", ptr %13, i32 0, i32 26
  %27 = call ptr @_ZSt3endISt13unordered_mapIN11spirv_cross15StageSetBindingESt4pairINS1_19HLSLResourceBindingEbENS1_14InternalHasherESt8equal_toIS2_ESaIS3_IKS2_S5_EEEEDTcldtfp_3endEERT_(ptr noundef nonnull align 8 dereferenceable(56) %26)
  %28 = getelementptr inbounds %"struct.std::__detail::_Node_iterator.433", ptr %11, i32 0, i32 0
  %29 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base.434", ptr %28, i32 0, i32 0
  store ptr %27, ptr %29, align 8
  %30 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKN11spirv_cross15StageSetBindingES1_INS2_19HLSLResourceBindingEbEELb1EEESA_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br i1 %30, label %31, label %91

31:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %32 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKN11spirv_cross15StageSetBindingES1_INS2_19HLSLResourceBindingEbEELb0ELb1EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  %33 = getelementptr inbounds %"struct.std::pair.435", ptr %32, i32 0, i32 1
  store ptr %33, ptr %12, align 8, !tbaa !5
  %34 = load ptr, ptr %12, align 8, !tbaa !5
  %35 = getelementptr inbounds %"struct.std::pair.437", ptr %34, i32 0, i32 1
  store i8 1, ptr %35, align 4, !tbaa !18
  %36 = load i32, ptr %6, align 4, !tbaa !9
  switch i32 %36, label %89 [
    i32 1, label %37
    i32 2, label %37
    i32 4, label %50
    i32 16, label %63
    i32 8, label %76
  ]

37:                                               ; preds = %31, %31
  %38 = load ptr, ptr %12, align 8, !tbaa !5
  %39 = getelementptr inbounds %"struct.std::pair.437", ptr %38, i32 0, i32 0
  %40 = getelementptr inbounds %"struct.spirv_cross::HLSLResourceBinding", ptr %39, i32 0, i32 3
  %41 = getelementptr inbounds %"struct.spirv_cross::HLSLResourceBinding::Binding", ptr %40, i32 0, i32 0
  %42 = load i32, ptr %41, align 4, !tbaa !23
  %43 = load ptr, ptr %7, align 8, !tbaa !5
  store i32 %42, ptr %43, align 4, !tbaa !15
  %44 = load ptr, ptr %12, align 8, !tbaa !5
  %45 = getelementptr inbounds %"struct.std::pair.437", ptr %44, i32 0, i32 0
  %46 = getelementptr inbounds %"struct.spirv_cross::HLSLResourceBinding", ptr %45, i32 0, i32 3
  %47 = getelementptr inbounds %"struct.spirv_cross::HLSLResourceBinding::Binding", ptr %46, i32 0, i32 1
  %48 = load i32, ptr %47, align 4, !tbaa !24
  %49 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 %48, ptr %49, align 4, !tbaa !15
  br label %90

50:                                               ; preds = %31
  %51 = load ptr, ptr %12, align 8, !tbaa !5
  %52 = getelementptr inbounds %"struct.std::pair.437", ptr %51, i32 0, i32 0
  %53 = getelementptr inbounds %"struct.spirv_cross::HLSLResourceBinding", ptr %52, i32 0, i32 5
  %54 = getelementptr inbounds %"struct.spirv_cross::HLSLResourceBinding::Binding", ptr %53, i32 0, i32 0
  %55 = load i32, ptr %54, align 4, !tbaa !25
  %56 = load ptr, ptr %7, align 8, !tbaa !5
  store i32 %55, ptr %56, align 4, !tbaa !15
  %57 = load ptr, ptr %12, align 8, !tbaa !5
  %58 = getelementptr inbounds %"struct.std::pair.437", ptr %57, i32 0, i32 0
  %59 = getelementptr inbounds %"struct.spirv_cross::HLSLResourceBinding", ptr %58, i32 0, i32 5
  %60 = getelementptr inbounds %"struct.spirv_cross::HLSLResourceBinding::Binding", ptr %59, i32 0, i32 1
  %61 = load i32, ptr %60, align 4, !tbaa !26
  %62 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 %61, ptr %62, align 4, !tbaa !15
  br label %90

63:                                               ; preds = %31
  %64 = load ptr, ptr %12, align 8, !tbaa !5
  %65 = getelementptr inbounds %"struct.std::pair.437", ptr %64, i32 0, i32 0
  %66 = getelementptr inbounds %"struct.spirv_cross::HLSLResourceBinding", ptr %65, i32 0, i32 6
  %67 = getelementptr inbounds %"struct.spirv_cross::HLSLResourceBinding::Binding", ptr %66, i32 0, i32 0
  %68 = load i32, ptr %67, align 4, !tbaa !27
  %69 = load ptr, ptr %7, align 8, !tbaa !5
  store i32 %68, ptr %69, align 4, !tbaa !15
  %70 = load ptr, ptr %12, align 8, !tbaa !5
  %71 = getelementptr inbounds %"struct.std::pair.437", ptr %70, i32 0, i32 0
  %72 = getelementptr inbounds %"struct.spirv_cross::HLSLResourceBinding", ptr %71, i32 0, i32 6
  %73 = getelementptr inbounds %"struct.spirv_cross::HLSLResourceBinding::Binding", ptr %72, i32 0, i32 1
  %74 = load i32, ptr %73, align 4, !tbaa !28
  %75 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 %74, ptr %75, align 4, !tbaa !15
  br label %90

76:                                               ; preds = %31
  %77 = load ptr, ptr %12, align 8, !tbaa !5
  %78 = getelementptr inbounds %"struct.std::pair.437", ptr %77, i32 0, i32 0
  %79 = getelementptr inbounds %"struct.spirv_cross::HLSLResourceBinding", ptr %78, i32 0, i32 4
  %80 = getelementptr inbounds %"struct.spirv_cross::HLSLResourceBinding::Binding", ptr %79, i32 0, i32 0
  %81 = load i32, ptr %80, align 4, !tbaa !29
  %82 = load ptr, ptr %7, align 8, !tbaa !5
  store i32 %81, ptr %82, align 4, !tbaa !15
  %83 = load ptr, ptr %12, align 8, !tbaa !5
  %84 = getelementptr inbounds %"struct.std::pair.437", ptr %83, i32 0, i32 0
  %85 = getelementptr inbounds %"struct.spirv_cross::HLSLResourceBinding", ptr %84, i32 0, i32 4
  %86 = getelementptr inbounds %"struct.spirv_cross::HLSLResourceBinding::Binding", ptr %85, i32 0, i32 1
  %87 = load i32, ptr %86, align 4, !tbaa !30
  %88 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 %87, ptr %88, align 4, !tbaa !15
  br label %90

89:                                               ; preds = %31
  br label %90

90:                                               ; preds = %89, %76, %63, %50, %37
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %91

91:                                               ; preds = %90, %4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNSt13unordered_mapIN11spirv_cross15StageSetBindingESt4pairINS0_19HLSLResourceBindingEbENS0_14InternalHasherESt8equal_toIS1_ESaIS2_IKS1_S4_EEE4findERS8_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(12)) #1 align 2

declare noundef i32 @_ZNK11spirv_cross8Compiler19get_execution_modelEv(ptr noundef nonnull align 8 dereferenceable(3176)) #2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKN11spirv_cross15StageSetBindingES1_INS2_19HLSLResourceBindingEbEELb0ELb1EEptEv(ptr noundef nonnull align 8 dereferenceable(8)) #3 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 = { "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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 = !{!"_ZTSN11spirv_cross19HLSLBindingFlagBitsE", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"_ZTSN11spirv_cross15StageSetBindingE", !13, i64 0, !14, i64 4, !14, i64 8}
!13 = !{!"_ZTSN3spv14ExecutionModelE", !7, i64 0}
!14 = !{!"int", !7, i64 0}
!15 = !{!14, !14, i64 0}
!16 = !{!12, !14, i64 4}
!17 = !{!12, !14, i64 8}
!18 = !{!19, !22, i64 44}
!19 = !{!"_ZTSSt4pairIN11spirv_cross19HLSLResourceBindingEbE", !20, i64 0, !22, i64 44}
!20 = !{!"_ZTSN11spirv_cross19HLSLResourceBindingE", !13, i64 0, !14, i64 4, !14, i64 8, !21, i64 12, !21, i64 20, !21, i64 28, !21, i64 36}
!21 = !{!"_ZTSN11spirv_cross19HLSLResourceBinding7BindingE", !14, i64 0, !14, i64 4}
!22 = !{!"bool", !7, i64 0}
!23 = !{!19, !14, i64 12}
!24 = !{!19, !14, i64 16}
!25 = !{!19, !14, i64 28}
!26 = !{!19, !14, i64 32}
!27 = !{!19, !14, i64 36}
!28 = !{!19, !14, i64 40}
!29 = !{!19, !14, i64 20}
!30 = !{!19, !14, i64 24}


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

%"struct.std::__detail::_Node_iterator.433" = type { %"struct.std::__detail::_Node_iterator_base.434" }
%"struct.std::__detail::_Node_iterator_base.434" = type { ptr }
%"struct.spirv_cross::StageSetBinding" = type { i32, i32, i32 }

; 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 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 @_ZN11spirv_cross12CompilerHLSL27remap_hlsl_resource_bindingENS_19HLSLBindingFlagBitsERjS2_(ptr noundef nonnull align 8 dereferenceable(10528) %0, i32 noundef %1, ptr nocapture noundef nonnull align 4 dereferenceable(4) %2, ptr nocapture noundef nonnull align 4 dereferenceable(4) %3) local_unnamed_addr #1 align 2 {
  %5 = alloca %"struct.std::__detail::_Node_iterator.433", align 8
  %6 = alloca %"struct.spirv_cross::StageSetBinding", align 4
  %7 = alloca %"struct.std::__detail::_Node_iterator.433", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %8 = getelementptr inbounds i8, ptr %0, i64 10376
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #5
  %9 = tail call noundef i32 @_ZNK11spirv_cross8Compiler19get_execution_modelEv(ptr noundef nonnull align 8 dereferenceable(3176) %0)
  store i32 %9, ptr %6, align 4, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %6, i64 4
  %11 = load i32, ptr %2, align 4, !tbaa !11
  store i32 %11, ptr %10, align 4, !tbaa !12
  %12 = getelementptr inbounds i8, ptr %6, i64 8
  %13 = load i32, ptr %3, align 4, !tbaa !11
  store i32 %13, ptr %12, align 4, !tbaa !13
  %14 = call ptr @_ZNSt13unordered_mapIN11spirv_cross15StageSetBindingESt4pairINS0_19HLSLResourceBindingEbENS0_14InternalHasherESt8equal_toIS1_ESaIS2_IKS1_S4_EEE4findERS8_(ptr noundef nonnull align 8 dereferenceable(56) %8, ptr noundef nonnull align 4 dereferenceable(12) %6)
  store ptr %14, ptr %5, align 8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %15 = call ptr @_ZSt3endISt13unordered_mapIN11spirv_cross15StageSetBindingESt4pairINS1_19HLSLResourceBindingEbENS1_14InternalHasherESt8equal_toIS2_ESaIS3_IKS2_S5_EEEEDTcldtfp_3endEERT_(ptr noundef nonnull align 8 dereferenceable(56) %8)
  store ptr %15, ptr %7, align 8
  %16 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKN11spirv_cross15StageSetBindingES1_INS2_19HLSLResourceBindingEbEELb1EEESA_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  br i1 %16, label %17, label %27

17:                                               ; preds = %4
  %18 = call noundef ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKN11spirv_cross15StageSetBindingES1_INS2_19HLSLResourceBindingEbEELb0ELb1EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  %19 = getelementptr inbounds i8, ptr %18, i64 56
  store i8 1, ptr %19, align 4, !tbaa !14
  switch i32 %1, label %27 [
    i32 1, label %.sink.split
    i32 2, label %.sink.split
    i32 4, label %20
    i32 16, label %21
    i32 8, label %22
  ]

20:                                               ; preds = %17
  br label %.sink.split

21:                                               ; preds = %17
  br label %.sink.split

22:                                               ; preds = %17
  br label %.sink.split

.sink.split:                                      ; preds = %17, %17, %22, %21, %20
  %.sink23 = phi i64 [ 40, %20 ], [ 48, %21 ], [ 32, %22 ], [ 24, %17 ], [ 24, %17 ]
  %.sink = phi i64 [ 44, %20 ], [ 52, %21 ], [ 36, %22 ], [ 28, %17 ], [ 28, %17 ]
  %23 = getelementptr inbounds i8, ptr %18, i64 %.sink23
  %24 = load i32, ptr %23, align 4, !tbaa !11
  store i32 %24, ptr %2, align 4, !tbaa !11
  %25 = getelementptr inbounds i8, ptr %18, i64 %.sink
  %26 = load i32, ptr %25, align 4, !tbaa !11
  store i32 %26, ptr %3, align 4, !tbaa !11
  br label %27

27:                                               ; preds = %.sink.split, %17, %4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNSt13unordered_mapIN11spirv_cross15StageSetBindingESt4pairINS0_19HLSLResourceBindingEbENS0_14InternalHasherESt8equal_toIS1_ESaIS2_IKS1_S4_EEE4findERS8_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(12)) local_unnamed_addr #1 align 2

declare noundef i32 @_ZNK11spirv_cross8Compiler19get_execution_modelEv(ptr noundef nonnull align 8 dereferenceable(3176)) local_unnamed_addr #2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKN11spirv_cross15StageSetBindingES1_INS2_19HLSLResourceBindingEbEELb0ELb1EEptEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 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 = { "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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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, !7, i64 0}
!6 = !{!"_ZTSN11spirv_cross15StageSetBindingE", !7, i64 0, !10, i64 4, !10, i64 8}
!7 = !{!"_ZTSN3spv14ExecutionModelE", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!10, !10, i64 0}
!12 = !{!6, !10, i64 4}
!13 = !{!6, !10, i64 8}
!14 = !{!15, !18, i64 44}
!15 = !{!"_ZTSSt4pairIN11spirv_cross19HLSLResourceBindingEbE", !16, i64 0, !18, i64 44}
!16 = !{!"_ZTSN11spirv_cross19HLSLResourceBindingE", !7, i64 0, !10, i64 4, !10, i64 8, !17, i64 12, !17, i64 20, !17, i64 28, !17, i64 36}
!17 = !{!"_ZTSN11spirv_cross19HLSLResourceBinding7BindingE", !10, i64 0, !10, i64 4}
!18 = !{!"bool", !8, i64 0}


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