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

; 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::pair.444" = type <{ %"struct.std::__detail::_Node_iterator.446", i8, [7 x i8] }>
%"struct.std::__detail::_Node_iterator.446" = type { %"struct.std::__detail::_Node_iterator_base.447" }
%"struct.std::__detail::_Node_iterator_base.447" = type { ptr }
%"struct.spirv_cross::CompilerMSL::MemberSorter" = type <{ ptr, ptr, i32, [4 x i8] }>
%"class.spirv_cross::TypedID.414" = type { i32 }
%"struct.spirv_cross::IVariant" = type <{ ptr, %"class.spirv_cross::TypedID.413", [4 x i8] }>
%"class.spirv_cross::TypedID.413" = type { i32 }
%"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.7"], %"class.spirv_cross::SmallVector.7", %"class.spirv_cross::SmallVector.7", %"class.std::unordered_map.10", %"class.spirv_cross::SmallVector.24", %"class.spirv_cross::SmallVector.27", %"class.spirv_cross::SmallVector.30", %"class.std::unordered_map.33", %"class.std::unordered_map.52", %"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.7" = type { %"class.spirv_cross::VectorView.8", i64, %"class.spirv_cross::AlignedBuffer.9" }
%"class.spirv_cross::VectorView.8" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.9" = type { [32 x i8] }
%"class.std::unordered_map.10" = type { %"class.std::_Hashtable.11" }
%"class.std::_Hashtable.11" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.spirv_cross::SmallVector.24" = type { %"class.spirv_cross::VectorView.25", i64, %"class.spirv_cross::AlignedBuffer.26" }
%"class.spirv_cross::VectorView.25" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.26" = type { [32 x i8] }
%"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 { [256 x i8] }
%"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 { [8 x i8] }
%"class.std::unordered_map.33" = type { %"class.std::_Hashtable.34" }
%"class.std::_Hashtable.34" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::unordered_map.52" = type { %"class.std::_Hashtable.53" }
%"class.std::_Hashtable.53" = 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.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.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::SPIRType" = type { %"struct.spirv_cross::IVariant.base", i32, i32, i32, i32, i32, %"class.spirv_cross::SmallVector.92", %"class.spirv_cross::SmallVector.416", i32, i8, i8, i32, %"class.spirv_cross::SmallVector.227", %"class.spirv_cross::SmallVector.92", %"struct.spirv_cross::SPIRType::ImageType", %"class.spirv_cross::TypedID.414", %"class.spirv_cross::TypedID.414", %"class.std::unordered_set.165" }
%"struct.spirv_cross::IVariant.base" = type <{ ptr, %"class.spirv_cross::TypedID.413" }>
%"class.spirv_cross::SmallVector.416" = type { %"class.spirv_cross::VectorView.417", i64, %"class.spirv_cross::AlignedBuffer.418" }
%"class.spirv_cross::VectorView.417" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.418" = type { [8 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] }
%"struct.spirv_cross::SPIRType::ImageType" = type { %"class.spirv_cross::TypedID.414", i32, i8, i8, i8, i32, 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 }

@_ZTIN11spirv_cross13CompilerErrorE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.25 = external hidden unnamed_addr constant [89 x i8], align 1
@.str.142 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.143 = external hidden unnamed_addr constant [39 x i8], align 1
@__PRETTY_FUNCTION__._ZN11spirv_cross11CompilerMSL12align_structERNS_8SPIRTypeERSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE = external hidden unnamed_addr constant [83 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

declare ptr @__cxa_allocate_exception(i64)

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

declare void @__cxa_free_exception(ptr)

; Function Attrs: nounwind
declare void @_ZNSt13runtime_errorD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2

declare void @__cxa_throw(ptr, ptr, ptr)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(336) ptr @_ZN11spirv_cross8Compiler3getINS_8SPIRTypeEEERT_j(ptr noundef nonnull align 8 dereferenceable(3176), i32 noundef) #1 align 2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE1EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4)) #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE6insertEOj(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE1EEEEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvNS0_IXT_EEEILS1_1EEEv(ptr noundef nonnull align 4 dereferenceable(4)) #1 align 2

declare void @_ZN11spirv_cross8Compiler30set_extended_member_decorationEjjNS_19ExtendedDecorationsEj(ptr noundef nonnull align 8 dereferenceable(3176), i32 noundef, i32 noundef, i32 noundef, i32 noundef) #5

declare noundef i32 @_ZNK11spirv_cross8Compiler21get_member_decorationENS_7TypedIDILNS_5TypesE1EEEjN3spv10DecorationE(ptr noundef nonnull align 8 dereferenceable(3176), i32, i32 noundef, i32 noundef) #5

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK11spirv_cross11CompilerMSL40get_declared_struct_member_alignment_mslERKNS_8SPIRTypeEj(ptr noundef nonnull align 8 dereferenceable(12482), ptr noundef nonnull align 8 dereferenceable(336), i32 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK11spirv_cross11CompilerMSL35get_declared_struct_member_size_mslERKNS_8SPIRTypeEj(ptr noundef nonnull align 8 dereferenceable(12482), ptr noundef nonnull align 8 dereferenceable(336), i32 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11spirv_cross11CompilerMSL12align_structERNS_8SPIRTypeERSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE(ptr noundef nonnull align 8 dereferenceable(12482) %0, ptr noundef nonnull align 8 dereferenceable(336) %1, ptr noundef nonnull align 8 dereferenceable(56) %2) #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca %"struct.std::pair.444", align 8
  %12 = alloca %"struct.spirv_cross::CompilerMSL::MemberSorter", align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca %"class.spirv_cross::TypedID.414", align 4
  %22 = alloca i32, align 4
  %23 = alloca ptr, align 8
  %24 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %25 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = getelementptr inbounds %"struct.spirv_cross::IVariant", ptr %26, i32 0, i32 1
  store ptr %27, ptr %7, align 8, !tbaa !5
  %28 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #6
  %29 = load ptr, ptr %7, align 8, !tbaa !5
  %30 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %29)
  store i32 %30, ptr %8, align 4, !tbaa !9
  %31 = call noundef i64 @_ZNKSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE5countERKj(ptr noundef nonnull align 8 dereferenceable(56) %28, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %32 = icmp ne i64 %31, 0
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #6
  br i1 %32, label %33, label %34

33:                                               ; preds = %3
  store i32 1, ptr %9, align 4
  br label %157

34:                                               ; preds = %3
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %36 = load ptr, ptr %7, align 8, !tbaa !5
  %37 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %36)
  store i32 %37, ptr %10, align 4, !tbaa !9
  %38 = call { ptr, i8 } @_ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE6insertEOj(ptr noundef nonnull align 8 dereferenceable(56) %35, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %39 = getelementptr inbounds { ptr, i8 }, ptr %11, i32 0, i32 0
  %40 = extractvalue { ptr, i8 } %38, 0
  store ptr %40, ptr %39, align 8
  %41 = getelementptr inbounds { ptr, i8 }, ptr %11, i32 0, i32 1
  %42 = extractvalue { ptr, i8 } %38, 1
  store i8 %42, ptr %41, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %12) #6
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = getelementptr inbounds %"class.spirv_cross::Compiler", ptr %25, i32 0, i32 1
  %45 = getelementptr inbounds %"class.spirv_cross::ParsedIR", ptr %44, i32 0, i32 3
  %46 = load ptr, ptr %7, align 8, !tbaa !5
  %47 = call noundef nonnull align 8 dereferenceable(488) ptr @_ZNSt13unordered_mapIN11spirv_cross7TypedIDILNS0_5TypesE0EEENS0_4MetaESt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_S4_EEEixERSA_(ptr noundef nonnull align 8 dereferenceable(56) %45, ptr noundef nonnull align 4 dereferenceable(4) %46)
  call void @_ZN11spirv_cross11CompilerMSL12MemberSorterC1ERNS_8SPIRTypeERNS_4MetaENS1_10SortAspectE(ptr noundef nonnull align 8 dereferenceable(20) %12, ptr noundef nonnull align 8 dereferenceable(336) %43, ptr noundef nonnull align 8 dereferenceable(488) %47, i32 noundef 1)
  call void @_ZN11spirv_cross11CompilerMSL12MemberSorter4sortEv(ptr noundef nonnull align 8 dereferenceable(20) %12)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %48, i32 0, i32 12
  %50 = call noundef i64 @_ZNK11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE1EEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %49) #6
  %51 = trunc i64 %50 to i32
  store i32 %51, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %52

52:                                               ; preds = %73, %34
  %53 = load i32, ptr %14, align 4, !tbaa !9
  %54 = load i32, ptr %13, align 4, !tbaa !9
  %55 = icmp ult i32 %53, %54
  br i1 %55, label %57, label %56

56:                                               ; preds = %52
  store i32 2, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  br label %76

57:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %58, i32 0, i32 12
  %60 = load i32, ptr %14, align 4, !tbaa !9
  %61 = zext i32 %60 to i64
  %62 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE1EEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %59, i64 noundef %61) #6
  %63 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE1EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %62)
  %64 = call noundef nonnull align 8 dereferenceable(336) ptr @_ZN11spirv_cross8Compiler3getINS_8SPIRTypeEEERT_j(ptr noundef nonnull align 8 dereferenceable(3176) %25, i32 noundef %63)
  store ptr %64, ptr %15, align 8, !tbaa !5
  %65 = load ptr, ptr %15, align 8, !tbaa !5
  %66 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %65, i32 0, i32 2
  %67 = load i32, ptr %66, align 8, !tbaa !11
  %68 = icmp eq i32 %67, 15
  br i1 %68, label %69, label %72

69:                                               ; preds = %57
  %70 = load ptr, ptr %15, align 8, !tbaa !5
  %71 = load ptr, ptr %6, align 8, !tbaa !5
  call void @_ZN11spirv_cross11CompilerMSL12align_structERNS_8SPIRTypeERSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE(ptr noundef nonnull align 8 dereferenceable(12482) %25, ptr noundef nonnull align 8 dereferenceable(336) %70, ptr noundef nonnull align 8 dereferenceable(56) %71)
  br label %72

72:                                               ; preds = %69, %57
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %73

73:                                               ; preds = %72
  %74 = load i32, ptr %14, align 4, !tbaa !9
  %75 = add i32 %74, 1
  store i32 %75, ptr %14, align 4, !tbaa !9
  br label %52, !llvm.loop !39

76:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #6
  store i32 0, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #6
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %77

77:                                               ; preds = %153, %76
  %78 = load i32, ptr %17, align 4, !tbaa !9
  %79 = load i32, ptr %13, align 4, !tbaa !9
  %80 = icmp ult i32 %78, %79
  br i1 %80, label %82, label %81

81:                                               ; preds = %77
  store i32 5, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  br label %156

82:                                               ; preds = %77
  %83 = load ptr, ptr %5, align 8, !tbaa !5
  %84 = load i32, ptr %17, align 4, !tbaa !9
  call void @_ZN11spirv_cross11CompilerMSL31ensure_member_packing_rules_mslERNS_8SPIRTypeEj(ptr noundef nonnull align 8 dereferenceable(12482) %25, ptr noundef nonnull align 8 dereferenceable(336) %83, i32 noundef %84)
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #6
  %85 = load ptr, ptr %5, align 8, !tbaa !5
  %86 = load i32, ptr %17, align 4, !tbaa !9
  %87 = call noundef i32 @_ZNK11spirv_cross11CompilerMSL40get_declared_struct_member_alignment_mslERKNS_8SPIRTypeEj(ptr noundef nonnull align 8 dereferenceable(12482) %25, ptr noundef nonnull align 8 dereferenceable(336) %85, i32 noundef %86)
  %88 = sub i32 %87, 1
  store i32 %88, ptr %18, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  %89 = load i32, ptr %16, align 4, !tbaa !9
  %90 = load i32, ptr %18, align 4, !tbaa !9
  %91 = add i32 %89, %90
  %92 = load i32, ptr %18, align 4, !tbaa !9
  %93 = xor i32 %92, -1
  %94 = and i32 %91, %93
  store i32 %94, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #6
  %95 = load ptr, ptr %7, align 8, !tbaa !5
  %96 = call i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvNS0_IXT_EEEILS1_1EEEv(ptr noundef nonnull align 4 dereferenceable(4) %95)
  %97 = getelementptr inbounds %"class.spirv_cross::TypedID.414", ptr %21, i32 0, i32 0
  store i32 %96, ptr %97, align 4
  %98 = load i32, ptr %17, align 4, !tbaa !9
  %99 = getelementptr inbounds %"class.spirv_cross::TypedID.414", ptr %21, i32 0, i32 0
  %100 = load i32, ptr %99, align 4
  %101 = call noundef i32 @_ZNK11spirv_cross8Compiler21get_member_decorationENS_7TypedIDILNS_5TypesE1EEEjN3spv10DecorationE(ptr noundef nonnull align 8 dereferenceable(3176) %25, i32 %100, i32 noundef %98, i32 noundef 35)
  store i32 %101, ptr %20, align 4, !tbaa !9
  %102 = load i32, ptr %20, align 4, !tbaa !9
  %103 = load i32, ptr %19, align 4, !tbaa !9
  %104 = icmp ugt i32 %102, %103
  br i1 %104, label %105, label %122

105:                                              ; preds = %82
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #6
  %106 = load i32, ptr %20, align 4, !tbaa !9
  %107 = load i32, ptr %19, align 4, !tbaa !9
  %108 = sub i32 %106, %107
  store i32 %108, ptr %22, align 4, !tbaa !9
  %109 = load ptr, ptr %7, align 8, !tbaa !5
  %110 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %109)
  %111 = load i32, ptr %17, align 4, !tbaa !9
  %112 = load i32, ptr %22, align 4, !tbaa !9
  call void @_ZN11spirv_cross8Compiler30set_extended_member_decorationEjjNS_19ExtendedDecorationsEj(ptr noundef nonnull align 8 dereferenceable(3176) %25, i32 noundef %110, i32 noundef %111, i32 noundef 3, i32 noundef %112)
  %113 = load i32, ptr %22, align 4, !tbaa !9
  %114 = load i32, ptr %16, align 4, !tbaa !9
  %115 = add i32 %114, %113
  store i32 %115, ptr %16, align 4, !tbaa !9
  %116 = load i32, ptr %16, align 4, !tbaa !9
  %117 = load i32, ptr %18, align 4, !tbaa !9
  %118 = add i32 %116, %117
  %119 = load i32, ptr %18, align 4, !tbaa !9
  %120 = xor i32 %119, -1
  %121 = and i32 %118, %120
  store i32 %121, ptr %19, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #6
  br label %134

122:                                              ; preds = %82
  %123 = load i32, ptr %20, align 4, !tbaa !9
  %124 = load i32, ptr %19, align 4, !tbaa !9
  %125 = icmp ult i32 %123, %124
  br i1 %125, label %126, label %133

126:                                              ; preds = %122
  %127 = call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZN11spirv_cross13CompilerErrorC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %127, ptr noundef @.str.142)
          to label %128 unwind label %129

128:                                              ; preds = %126
  call void @__cxa_throw(ptr %127, ptr @_ZTIN11spirv_cross13CompilerErrorE, ptr @_ZNSt13runtime_errorD2Ev) #7
  unreachable

129:                                              ; preds = %126
  %130 = landingpad { ptr, i32 }
          cleanup
  %131 = extractvalue { ptr, i32 } %130, 0
  store ptr %131, ptr %23, align 8
  %132 = extractvalue { ptr, i32 } %130, 1
  store i32 %132, ptr %24, align 4
  call void @__cxa_free_exception(ptr %127) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %160

133:                                              ; preds = %122
  br label %134

134:                                              ; preds = %133, %105
  %135 = load i32, ptr %19, align 4, !tbaa !9
  %136 = load i32, ptr %20, align 4, !tbaa !9
  %137 = icmp eq i32 %135, %136
  br i1 %137, label %138, label %139

138:                                              ; preds = %134
  br label %141

139:                                              ; preds = %134
  call void @__assert_fail(ptr noundef @.str.143, ptr noundef @.str.25, i32 noundef 4927, ptr noundef @__PRETTY_FUNCTION__._ZN11spirv_cross11CompilerMSL12align_structERNS_8SPIRTypeERSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE) #8
  unreachable

140:                                              ; No predecessors!
  br label %141

141:                                              ; preds = %140, %138
  %142 = load i32, ptr %17, align 4, !tbaa !9
  %143 = add i32 %142, 1
  %144 = load i32, ptr %13, align 4, !tbaa !9
  %145 = icmp ult i32 %143, %144
  br i1 %145, label %146, label %152

146:                                              ; preds = %141
  %147 = load i32, ptr %19, align 4, !tbaa !9
  %148 = load ptr, ptr %5, align 8, !tbaa !5
  %149 = load i32, ptr %17, align 4, !tbaa !9
  %150 = call noundef i32 @_ZNK11spirv_cross11CompilerMSL35get_declared_struct_member_size_mslERKNS_8SPIRTypeEj(ptr noundef nonnull align 8 dereferenceable(12482) %25, ptr noundef nonnull align 8 dereferenceable(336) %148, i32 noundef %149)
  %151 = add i32 %147, %150
  store i32 %151, ptr %16, align 4, !tbaa !9
  br label %152

152:                                              ; preds = %146, %141
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  br label %153

153:                                              ; preds = %152
  %154 = load i32, ptr %17, align 4, !tbaa !9
  %155 = add i32 %154, 1
  store i32 %155, ptr %17, align 4, !tbaa !9
  br label %77, !llvm.loop !41

156:                                              ; preds = %81
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %12) #6
  store i32 0, ptr %9, align 4
  br label %157

157:                                              ; preds = %156, %33
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  %158 = load i32, ptr %9, align 4
  switch i32 %158, label %165 [
    i32 0, label %159
    i32 1, label %159
  ]

159:                                              ; preds = %157, %157
  ret void

160:                                              ; preds = %129
  %161 = load ptr, ptr %23, align 8
  %162 = load i32, ptr %24, align 4
  %163 = insertvalue { ptr, i32 } poison, ptr %161, 0
  %164 = insertvalue { ptr, i32 } %163, i32 %162, 1
  resume { ptr, i32 } %164

165:                                              ; preds = %157
  unreachable
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11spirv_cross11CompilerMSL31ensure_member_packing_rules_mslERNS_8SPIRTypeEj(ptr noundef nonnull align 8 dereferenceable(12482), ptr noundef nonnull align 8 dereferenceable(336), i32 noundef) #1 align 2

declare void @_ZN11spirv_cross11CompilerMSL12MemberSorterC1ERNS_8SPIRTypeERNS_4MetaENS1_10SortAspectE(ptr, ptr, ptr, i32)

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 = { nounwind "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 = { noreturn nounwind "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 = { "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 }
attributes #7 = { noreturn }
attributes #8 = { noreturn 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, !16, i64 16}
!12 = !{!"_ZTSN11spirv_cross8SPIRTypeE", !13, i64 0, !15, i64 12, !16, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !17, i64 32, !21, i64 88, !10, i64 120, !24, i64 124, !24, i64 125, !25, i64 128, !26, i64 136, !17, i64 192, !29, i64 248, !30, i64 272, !30, i64 276, !34, i64 280}
!13 = !{!"_ZTSN11spirv_cross8IVariantE", !14, i64 8}
!14 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE0EEE", !10, i64 0}
!15 = !{!"_ZTSN3spv2OpE", !7, i64 0}
!16 = !{!"_ZTSN11spirv_cross8SPIRType8BaseTypeE", !7, i64 0}
!17 = !{!"_ZTSN11spirv_cross11SmallVectorIjLm8EEE", !18, i64 0, !19, i64 16, !20, i64 24}
!18 = !{!"_ZTSN11spirv_cross10VectorViewIjEE", !6, i64 0, !19, i64 8}
!19 = !{!"long", !7, i64 0}
!20 = !{!"_ZTSN11spirv_cross13AlignedBufferIjLm8EEE", !7, i64 0}
!21 = !{!"_ZTSN11spirv_cross11SmallVectorIbLm8EEE", !22, i64 0, !19, i64 16, !23, i64 24}
!22 = !{!"_ZTSN11spirv_cross10VectorViewIbEE", !6, i64 0, !19, i64 8}
!23 = !{!"_ZTSN11spirv_cross13AlignedBufferIbLm8EEE", !7, i64 0}
!24 = !{!"bool", !7, i64 0}
!25 = !{!"_ZTSN3spv12StorageClassE", !7, i64 0}
!26 = !{!"_ZTSN11spirv_cross11SmallVectorINS_7TypedIDILNS_5TypesE1EEELm8EEE", !27, i64 0, !19, i64 16, !28, i64 24}
!27 = !{!"_ZTSN11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE1EEEEE", !6, i64 0, !19, i64 8}
!28 = !{!"_ZTSN11spirv_cross13AlignedBufferINS_7TypedIDILNS_5TypesE1EEELm8EEE", !7, i64 0}
!29 = !{!"_ZTSN11spirv_cross8SPIRType9ImageTypeE", !30, i64 0, !31, i64 4, !24, i64 8, !24, i64 9, !24, i64 10, !10, i64 12, !32, i64 16, !33, i64 20}
!30 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE1EEE", !10, i64 0}
!31 = !{!"_ZTSN3spv3DimE", !7, i64 0}
!32 = !{!"_ZTSN3spv11ImageFormatE", !7, i64 0}
!33 = !{!"_ZTSN3spv15AccessQualifierE", !7, i64 0}
!34 = !{!"_ZTSSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE", !35, i64 0}
!35 = !{!"_ZTSSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEE", !6, i64 0, !19, i64 8, !36, i64 16, !19, i64 24, !37, i64 32, !6, i64 48}
!36 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!37 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !38, i64 0, !19, i64 8}
!38 = !{!"float", !7, i64 0}
!39 = distinct !{!39, !40}
!40 = !{!"llvm.loop.mustprogress"}
!41 = distinct !{!41, !40}


; 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.spirv_cross::CompilerMSL::MemberSorter" = type <{ ptr, ptr, i32, [4 x i8] }>

@_ZTIN11spirv_cross13CompilerErrorE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.25 = external hidden unnamed_addr constant [89 x i8], align 1
@.str.142 = external hidden unnamed_addr constant [48 x i8], align 1
@.str.143 = external hidden unnamed_addr constant [39 x i8], align 1
@__PRETTY_FUNCTION__._ZN11spirv_cross11CompilerMSL12align_structERNS_8SPIRTypeERSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE = external hidden unnamed_addr constant [83 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

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

declare void @__cxa_free_exception(ptr) local_unnamed_addr

; Function Attrs: nounwind
declare void @_ZNSt13runtime_errorD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(336) ptr @_ZN11spirv_cross8Compiler3getINS_8SPIRTypeEEERT_j(ptr noundef nonnull align 8 dereferenceable(3176), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE1EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZN11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE1EEEEixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvNS0_IXT_EEEILS1_1EEEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

declare void @_ZN11spirv_cross8Compiler30set_extended_member_decorationEjjNS_19ExtendedDecorationsEj(ptr noundef nonnull align 8 dereferenceable(3176), i32 noundef, i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #5

declare noundef i32 @_ZNK11spirv_cross8Compiler21get_member_decorationENS_7TypedIDILNS_5TypesE1EEEjN3spv10DecorationE(ptr noundef nonnull align 8 dereferenceable(3176), i32, i32 noundef, i32 noundef) local_unnamed_addr #5

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK11spirv_cross11CompilerMSL40get_declared_struct_member_alignment_mslERKNS_8SPIRTypeEj(ptr noundef nonnull align 8 dereferenceable(12482), ptr noundef nonnull align 8 dereferenceable(336), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK11spirv_cross11CompilerMSL35get_declared_struct_member_size_mslERKNS_8SPIRTypeEj(ptr noundef nonnull align 8 dereferenceable(12482), ptr noundef nonnull align 8 dereferenceable(336), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11spirv_cross11CompilerMSL12align_structERNS_8SPIRTypeERSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE(ptr noundef nonnull align 8 dereferenceable(12482) %0, ptr noundef nonnull align 8 dereferenceable(336) %1, ptr noundef nonnull align 8 dereferenceable(56) %2) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"struct.spirv_cross::CompilerMSL::MemberSorter", align 8
  %7 = getelementptr inbounds i8, ptr %1, i64 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #6
  %8 = tail call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %7)
  store i32 %8, ptr %4, align 4, !tbaa !5
  %9 = call noundef i64 @_ZNKSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE5countERKj(ptr noundef nonnull align 8 dereferenceable(56) %2, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %.not = icmp eq i64 %9, 0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #6
  br i1 %.not, label %10, label %57

10:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  %11 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %7)
  store i32 %11, ptr %5, align 4, !tbaa !5
  %12 = call { ptr, i8 } @_ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE6insertEOj(ptr noundef nonnull align 8 dereferenceable(56) %2, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #6
  %13 = getelementptr inbounds i8, ptr %0, i64 256
  %14 = call noundef nonnull align 8 dereferenceable(488) ptr @_ZNSt13unordered_mapIN11spirv_cross7TypedIDILNS0_5TypesE0EEENS0_4MetaESt4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_S4_EEEixERSA_(ptr noundef nonnull align 8 dereferenceable(56) %13, ptr noundef nonnull align 4 dereferenceable(4) %7)
  call void @_ZN11spirv_cross11CompilerMSL12MemberSorterC1ERNS_8SPIRTypeERNS_4MetaENS1_10SortAspectE(ptr noundef nonnull align 8 dereferenceable(20) %6, ptr noundef nonnull align 8 dereferenceable(336) %1, ptr noundef nonnull align 8 dereferenceable(488) %14, i32 noundef 1)
  call void @_ZN11spirv_cross11CompilerMSL12MemberSorter4sortEv(ptr noundef nonnull align 8 dereferenceable(20) %6)
  %15 = getelementptr inbounds i8, ptr %1, i64 136
  %16 = call noundef i64 @_ZNK11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE1EEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %15) #6
  %17 = trunc i64 %16 to i32
  %.not64 = icmp eq i32 %17, 0
  br i1 %.not64, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %10
  %wide.trip.count = and i64 %16, 4294967295
  br label %.lr.ph

.preheader:                                       ; preds = %25
  br i1 %.not64, label %._crit_edge, label %.lr.ph63

.lr.ph:                                           ; preds = %.lr.ph.preheader, %25
  %indvars.iv = phi i64 [ 0, %.lr.ph.preheader ], [ %indvars.iv.next, %25 ]
  %18 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE1EEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %15, i64 noundef %indvars.iv) #6
  %19 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE1EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %18)
  %20 = call noundef nonnull align 8 dereferenceable(336) ptr @_ZN11spirv_cross8Compiler3getINS_8SPIRTypeEEERT_j(ptr noundef nonnull align 8 dereferenceable(3176) %0, i32 noundef %19)
  %21 = getelementptr inbounds i8, ptr %20, i64 16
  %22 = load i32, ptr %21, align 8, !tbaa !9
  %23 = icmp eq i32 %22, 15
  br i1 %23, label %24, label %25

24:                                               ; preds = %.lr.ph
  call void @_ZN11spirv_cross11CompilerMSL12align_structERNS_8SPIRTypeERSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE(ptr noundef nonnull align 8 dereferenceable(12482) %0, ptr noundef nonnull align 8 dereferenceable(336) %20, ptr noundef nonnull align 8 dereferenceable(56) %2)
  br label %25

25:                                               ; preds = %24, %.lr.ph
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %.preheader, label %.lr.ph, !llvm.loop !38

._crit_edge:                                      ; preds = %56, %10, %.preheader
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  br label %57

.lr.ph63:                                         ; preds = %.preheader, %56
  %.05262 = phi i32 [ %.2, %56 ], [ 0, %.preheader ]
  %.05361 = phi i32 [ %51, %56 ], [ 0, %.preheader ]
  call void @_ZN11spirv_cross11CompilerMSL31ensure_member_packing_rules_mslERNS_8SPIRTypeEj(ptr noundef nonnull align 8 dereferenceable(12482) %0, ptr noundef nonnull align 8 dereferenceable(336) %1, i32 noundef %.05361)
  %26 = call noundef i32 @_ZNK11spirv_cross11CompilerMSL40get_declared_struct_member_alignment_mslERKNS_8SPIRTypeEj(ptr noundef nonnull align 8 dereferenceable(12482) %0, ptr noundef nonnull align 8 dereferenceable(336) %1, i32 noundef %.05361)
  %27 = add i32 %26, -1
  %28 = add i32 %27, %.05262
  %29 = sub i32 0, %26
  %30 = and i32 %28, %29
  %31 = call i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvNS0_IXT_EEEILS1_1EEEv(ptr noundef nonnull align 4 dereferenceable(4) %7)
  %32 = call noundef i32 @_ZNK11spirv_cross8Compiler21get_member_decorationENS_7TypedIDILNS_5TypesE1EEEjN3spv10DecorationE(ptr noundef nonnull align 8 dereferenceable(3176) %0, i32 %31, i32 noundef %.05361, i32 noundef 35)
  %33 = icmp ugt i32 %32, %30
  br i1 %33, label %34, label %40

34:                                               ; preds = %.lr.ph63
  %35 = sub i32 %32, %30
  %36 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %7)
  call void @_ZN11spirv_cross8Compiler30set_extended_member_decorationEjjNS_19ExtendedDecorationsEj(ptr noundef nonnull align 8 dereferenceable(3176) %0, i32 noundef %36, i32 noundef %.05361, i32 noundef 3, i32 noundef %35)
  %37 = add i32 %35, %.05262
  %38 = add i32 %37, %27
  %39 = and i32 %38, %29
  br label %47

40:                                               ; preds = %.lr.ph63
  %41 = icmp ult i32 %32, %30
  br i1 %41, label %42, label %47

42:                                               ; preds = %40
  %43 = call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZN11spirv_cross13CompilerErrorC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %43, ptr noundef nonnull @.str.142)
          to label %44 unwind label %45

44:                                               ; preds = %42
  call void @__cxa_throw(ptr nonnull %43, ptr nonnull @_ZTIN11spirv_cross13CompilerErrorE, ptr nonnull @_ZNSt13runtime_errorD2Ev) #7
  unreachable

45:                                               ; preds = %42
  %46 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %43) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #6
  resume { ptr, i32 } %46

47:                                               ; preds = %40, %34
  %.054 = phi i32 [ %39, %34 ], [ %30, %40 ]
  %.1 = phi i32 [ %37, %34 ], [ %.05262, %40 ]
  %48 = icmp eq i32 %.054, %32
  br i1 %48, label %50, label %49

49:                                               ; preds = %47
  call void @__assert_fail(ptr noundef nonnull @.str.143, ptr noundef nonnull @.str.25, i32 noundef 4927, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN11spirv_cross11CompilerMSL12align_structERNS_8SPIRTypeERSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE) #8
  unreachable

50:                                               ; preds = %47
  %51 = add nuw i32 %.05361, 1
  %52 = icmp ult i32 %51, %17
  br i1 %52, label %53, label %56

53:                                               ; preds = %50
  %54 = call noundef i32 @_ZNK11spirv_cross11CompilerMSL35get_declared_struct_member_size_mslERKNS_8SPIRTypeEj(ptr noundef nonnull align 8 dereferenceable(12482) %0, ptr noundef nonnull align 8 dereferenceable(336) %1, i32 noundef %.05361)
  %55 = add i32 %54, %32
  br label %56

56:                                               ; preds = %53, %50
  %.2 = phi i32 [ %55, %53 ], [ %.1, %50 ]
  %exitcond67.not = icmp eq i32 %51, %17
  br i1 %exitcond67.not, label %._crit_edge, label %.lr.ph63, !llvm.loop !40

57:                                               ; preds = %3, %._crit_edge
  ret void
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN11spirv_cross11CompilerMSL31ensure_member_packing_rules_mslERNS_8SPIRTypeEj(ptr noundef nonnull align 8 dereferenceable(12482), ptr noundef nonnull align 8 dereferenceable(336), i32 noundef) local_unnamed_addr #1 align 2

declare void @_ZN11spirv_cross11CompilerMSL12MemberSorterC1ERNS_8SPIRTypeERNS_4MetaENS1_10SortAspectE(ptr, ptr, ptr, i32) local_unnamed_addr

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 = { nounwind "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 = { noreturn nounwind "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 = { "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 }
attributes #7 = { noreturn }
attributes #8 = { noreturn 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, !14, i64 16}
!10 = !{!"_ZTSN11spirv_cross8SPIRTypeE", !11, i64 0, !13, i64 12, !14, i64 16, !6, i64 20, !6, i64 24, !6, i64 28, !15, i64 32, !20, i64 88, !6, i64 120, !23, i64 124, !23, i64 125, !24, i64 128, !25, i64 136, !15, i64 192, !28, i64 248, !29, i64 272, !29, i64 276, !33, i64 280}
!11 = !{!"_ZTSN11spirv_cross8IVariantE", !12, i64 8}
!12 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE0EEE", !6, i64 0}
!13 = !{!"_ZTSN3spv2OpE", !7, i64 0}
!14 = !{!"_ZTSN11spirv_cross8SPIRType8BaseTypeE", !7, i64 0}
!15 = !{!"_ZTSN11spirv_cross11SmallVectorIjLm8EEE", !16, i64 0, !18, i64 16, !19, i64 24}
!16 = !{!"_ZTSN11spirv_cross10VectorViewIjEE", !17, i64 0, !18, i64 8}
!17 = !{!"any pointer", !7, i64 0}
!18 = !{!"long", !7, i64 0}
!19 = !{!"_ZTSN11spirv_cross13AlignedBufferIjLm8EEE", !7, i64 0}
!20 = !{!"_ZTSN11spirv_cross11SmallVectorIbLm8EEE", !21, i64 0, !18, i64 16, !22, i64 24}
!21 = !{!"_ZTSN11spirv_cross10VectorViewIbEE", !17, i64 0, !18, i64 8}
!22 = !{!"_ZTSN11spirv_cross13AlignedBufferIbLm8EEE", !7, i64 0}
!23 = !{!"bool", !7, i64 0}
!24 = !{!"_ZTSN3spv12StorageClassE", !7, i64 0}
!25 = !{!"_ZTSN11spirv_cross11SmallVectorINS_7TypedIDILNS_5TypesE1EEELm8EEE", !26, i64 0, !18, i64 16, !27, i64 24}
!26 = !{!"_ZTSN11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE1EEEEE", !17, i64 0, !18, i64 8}
!27 = !{!"_ZTSN11spirv_cross13AlignedBufferINS_7TypedIDILNS_5TypesE1EEELm8EEE", !7, i64 0}
!28 = !{!"_ZTSN11spirv_cross8SPIRType9ImageTypeE", !29, i64 0, !30, i64 4, !23, i64 8, !23, i64 9, !23, i64 10, !6, i64 12, !31, i64 16, !32, i64 20}
!29 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE1EEE", !6, i64 0}
!30 = !{!"_ZTSN3spv3DimE", !7, i64 0}
!31 = !{!"_ZTSN3spv11ImageFormatE", !7, i64 0}
!32 = !{!"_ZTSN3spv15AccessQualifierE", !7, i64 0}
!33 = !{!"_ZTSSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE", !34, i64 0}
!34 = !{!"_ZTSSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEE", !17, i64 0, !18, i64 8, !35, i64 16, !18, i64 24, !36, i64 32, !17, i64 48}
!35 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !17, i64 0}
!36 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !37, i64 0, !18, i64 8}
!37 = !{!"float", !7, i64 0}
!38 = distinct !{!38, !39}
!39 = !{!"llvm.loop.mustprogress"}
!40 = distinct !{!40, !39}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass