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

%"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] }
%"struct.spirv_cross::SPIRType" = type { %"struct.spirv_cross::IVariant.base", i32, i32, i32, i32, i32, %"class.spirv_cross::SmallVector.92", %"class.spirv_cross::SmallVector.325", i32, i8, i8, i32, %"class.spirv_cross::SmallVector.227", %"class.spirv_cross::SmallVector.92", %"struct.spirv_cross::SPIRType::ImageType", %"class.spirv_cross::TypedID.328", %"class.spirv_cross::TypedID.328", %"class.std::unordered_set.165" }
%"struct.spirv_cross::IVariant.base" = type <{ ptr, %"class.spirv_cross::TypedID.324" }>
%"class.spirv_cross::TypedID.324" = type { i32 }
%"class.spirv_cross::SmallVector.325" = type { %"class.spirv_cross::VectorView.326", i64, %"class.spirv_cross::AlignedBuffer.327" }
%"class.spirv_cross::VectorView.326" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.327" = 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] }
%"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] }
%"struct.spirv_cross::SPIRType::ImageType" = type { %"class.spirv_cross::TypedID.328", i32, i8, i8, i8, i32, i32, i32 }
%"class.spirv_cross::TypedID.328" = type { 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 }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@_ZTIN11spirv_cross13CompilerErrorE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.9 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [66 x i8], align 1

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

; 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: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE1EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4)) #2 align 2

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 i32 @__gxx_personality_v0(...)

declare void @__cxa_free_exception(ptr)

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

declare void @__cxa_throw(ptr, ptr, ptr)

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

; Function Attrs: 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_cross12CompilerHLSL22image_type_hlsl_legacyB5cxx11ERKNS_8SPIRTypeEj(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(10528) %1, ptr noundef nonnull align 8 dereferenceable(336) %2, i32 noundef %3) #1 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = alloca i32, align 4
  store ptr %0, ptr %5, align 8
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store i32 %3, ptr %8, align 4, !tbaa !9
  %15 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %16 = load ptr, ptr %7, align 8, !tbaa !5
  %17 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %16, i32 0, i32 14
  %18 = getelementptr inbounds %"struct.spirv_cross::SPIRType::ImageType", ptr %17, i32 0, i32 0
  %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) %15, i32 noundef %19)
  store ptr %20, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  %21 = load ptr, ptr %9, align 8, !tbaa !5
  %22 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %21, i32 0, i32 2
  %23 = load i32, ptr %22, align 8, !tbaa !11
  switch i32 %23, label %34 [
    i32 7, label %24
    i32 8, label %31
  ]

24:                                               ; preds = %4
  %25 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef @.str.18)
          to label %26 unwind label %27

26:                                               ; preds = %24
  br label %35

27:                                               ; preds = %150, %141, %130, %125, %122, %119, %116, %113, %110, %102, %91, %88, %31, %24
  %28 = landingpad { ptr, i32 }
          cleanup
  %29 = extractvalue { ptr, i32 } %28, 0
  store ptr %29, ptr %11, align 8
  %30 = extractvalue { ptr, i32 } %28, 1
  store i32 %30, ptr %12, align 4
  br label %155

31:                                               ; preds = %4
  %32 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef @.str.19)
          to label %33 unwind label %27

33:                                               ; preds = %31
  br label %35

34:                                               ; preds = %4
  br label %35

35:                                               ; preds = %34, %33, %26
  %36 = load ptr, ptr %7, align 8, !tbaa !5
  %37 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %36, i32 0, i32 2
  %38 = load i32, ptr %37, align 8, !tbaa !11
  %39 = icmp eq i32 %38, 16
  br i1 %39, label %40, label %65

40:                                               ; preds = %35
  %41 = load ptr, ptr %7, align 8, !tbaa !5
  %42 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %41, i32 0, i32 14
  %43 = getelementptr inbounds %"struct.spirv_cross::SPIRType::ImageType", ptr %42, i32 0, i32 1
  %44 = load i32, ptr %43, align 4, !tbaa !39
  %45 = icmp eq i32 %44, 6
  br i1 %45, label %46, label %65

46:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #5
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %13, ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef @.str.20)
          to label %47 unwind label %56

47:                                               ; preds = %46
  %48 = load ptr, ptr %7, align 8, !tbaa !5
  %49 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %48, i32 0, i32 14
  %50 = getelementptr inbounds %"struct.spirv_cross::SPIRType::ImageType", ptr %49, i32 0, i32 4
  %51 = load i8, ptr %50, align 2, !tbaa !40, !range !41, !noundef !42
  %52 = trunc i8 %51 to i1
  %53 = zext i1 %52 to i64
  %54 = select i1 %52, ptr @.str.14, ptr @.str.9
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef %54)
          to label %55 unwind label %60

55:                                               ; preds = %47
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #5
  store i32 1, ptr %14, align 4
  br label %154

56:                                               ; preds = %46
  %57 = landingpad { ptr, i32 }
          cleanup
  %58 = extractvalue { ptr, i32 } %57, 0
  store ptr %58, ptr %11, align 8
  %59 = extractvalue { ptr, i32 } %57, 1
  store i32 %59, ptr %12, align 4
  br label %64

60:                                               ; preds = %47
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %11, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %12, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #5
  br label %64

64:                                               ; preds = %60, %56
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #5
  br label %155

65:                                               ; preds = %40, %35
  %66 = load ptr, ptr %7, align 8, !tbaa !5
  %67 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %66, i32 0, i32 2
  %68 = load i32, ptr %67, align 8, !tbaa !11
  %69 = icmp eq i32 %68, 16
  br i1 %69, label %70, label %102

70:                                               ; preds = %65
  %71 = load ptr, ptr %7, align 8, !tbaa !5
  %72 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %71, i32 0, i32 14
  %73 = getelementptr inbounds %"struct.spirv_cross::SPIRType::ImageType", ptr %72, i32 0, i32 1
  %74 = load i32, ptr %73, align 4, !tbaa !39
  %75 = icmp ne i32 %74, 6
  br i1 %75, label %76, label %102

76:                                               ; preds = %70
  %77 = load ptr, ptr %7, align 8, !tbaa !5
  %78 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %77, i32 0, i32 14
  %79 = getelementptr inbounds %"struct.spirv_cross::SPIRType::ImageType", ptr %78, i32 0, i32 1
  %80 = load i32, ptr %79, align 4, !tbaa !39
  %81 = icmp eq i32 %80, 5
  br i1 %81, label %82, label %91

82:                                               ; preds = %76
  %83 = load ptr, ptr %7, align 8, !tbaa !5
  %84 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %83, i32 0, i32 14
  %85 = getelementptr inbounds %"struct.spirv_cross::SPIRType::ImageType", ptr %84, i32 0, i32 5
  %86 = load i32, ptr %85, align 4, !tbaa !43
  %87 = icmp eq i32 %86, 1
  br i1 %87, label %88, label %91

88:                                               ; preds = %82
  %89 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef @.str.21)
          to label %90 unwind label %27

90:                                               ; preds = %88
  br label %101

91:                                               ; preds = %82, %76
  %92 = load ptr, ptr %7, align 8, !tbaa !5
  %93 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %92, i32 0, i32 14
  %94 = getelementptr inbounds %"struct.spirv_cross::SPIRType::ImageType", ptr %93, i32 0, i32 5
  %95 = load i32, ptr %94, align 4, !tbaa !43
  %96 = icmp eq i32 %95, 2
  %97 = zext i1 %96 to i64
  %98 = select i1 %96, ptr @.str.22, ptr @.str.23
  %99 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef %98)
          to label %100 unwind label %27

100:                                              ; preds = %91
  br label %101

101:                                              ; preds = %100, %90
  br label %105

102:                                              ; preds = %70, %65
  %103 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef @.str.21)
          to label %104 unwind label %27

104:                                              ; preds = %102
  br label %105

105:                                              ; preds = %104, %101
  %106 = load ptr, ptr %7, align 8, !tbaa !5
  %107 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %106, i32 0, i32 14
  %108 = getelementptr inbounds %"struct.spirv_cross::SPIRType::ImageType", ptr %107, i32 0, i32 1
  %109 = load i32, ptr %108, align 4, !tbaa !39
  switch i32 %109, label %128 [
    i32 0, label %110
    i32 1, label %113
    i32 2, label %116
    i32 3, label %119
    i32 5, label %122
    i32 6, label %125
  ]

110:                                              ; preds = %105
  %111 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef @.str)
          to label %112 unwind label %27

112:                                              ; preds = %110
  br label %135

113:                                              ; preds = %105
  %114 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef @.str.1)
          to label %115 unwind label %27

115:                                              ; preds = %113
  br label %135

116:                                              ; preds = %105
  %117 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef @.str.2)
          to label %118 unwind label %27

118:                                              ; preds = %116
  br label %135

119:                                              ; preds = %105
  %120 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef @.str.24)
          to label %121 unwind label %27

121:                                              ; preds = %119
  br label %135

122:                                              ; preds = %105
  %123 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef @.str.25)
          to label %124 unwind label %27

124:                                              ; preds = %122
  br label %135

125:                                              ; preds = %105
  %126 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef @.str.1)
          to label %127 unwind label %27

127:                                              ; preds = %125
  br label %135

128:                                              ; preds = %105
  %129 = call ptr @__cxa_allocate_exception(i64 16) #5
  invoke void @_ZN11spirv_cross13CompilerErrorC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %129, ptr noundef @.str.26)
          to label %130 unwind label %131

130:                                              ; preds = %128
  invoke void @__cxa_throw(ptr %129, ptr @_ZTIN11spirv_cross13CompilerErrorE, ptr @_ZNSt13runtime_errorD2Ev) #6
          to label %161 unwind label %27

131:                                              ; preds = %128
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %11, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %12, align 4
  call void @__cxa_free_exception(ptr %129) #5
  br label %155

135:                                              ; preds = %127, %124, %121, %118, %115, %112
  %136 = load ptr, ptr %7, align 8, !tbaa !5
  %137 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %136, i32 0, i32 14
  %138 = getelementptr inbounds %"struct.spirv_cross::SPIRType::ImageType", ptr %137, i32 0, i32 4
  %139 = load i8, ptr %138, align 2, !tbaa !40, !range !41, !noundef !42
  %140 = trunc i8 %139 to i1
  br i1 %140, label %141, label %144

141:                                              ; preds = %135
  %142 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef @.str.14)
          to label %143 unwind label %27

143:                                              ; preds = %141
  br label %144

144:                                              ; preds = %143, %135
  %145 = load ptr, ptr %7, align 8, !tbaa !5
  %146 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %145, i32 0, i32 14
  %147 = getelementptr inbounds %"struct.spirv_cross::SPIRType::ImageType", ptr %146, i32 0, i32 3
  %148 = load i8, ptr %147, align 1, !tbaa !44, !range !41, !noundef !42
  %149 = trunc i8 %148 to i1
  br i1 %149, label %150, label %153

150:                                              ; preds = %144
  %151 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef @.str.13)
          to label %152 unwind label %27

152:                                              ; preds = %150
  br label %153

153:                                              ; preds = %152, %144
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  store i32 1, ptr %14, align 4
  br label %154

154:                                              ; preds = %153, %55
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  ret void

155:                                              ; preds = %131, %64, %27
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %156

156:                                              ; preds = %155
  %157 = load ptr, ptr %11, align 8
  %158 = load i32, ptr %12, align 4
  %159 = insertvalue { ptr, i32 } poison, ptr %157, 0
  %160 = insertvalue { ptr, i32 } %159, i32 %158, 1
  resume { ptr, i32 } %160

161:                                              ; preds = %130
  unreachable
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #4

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #4 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { noreturn }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!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 = !{!12, !31, i64 252}
!40 = !{!12, !24, i64 258}
!41 = !{i8 0, i8 2}
!42 = !{}
!43 = !{!12, !10, i64 260}
!44 = !{!12, !24, i64 257}


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

@.str = external hidden unnamed_addr constant [3 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [3 x i8], align 1
@_ZTIN11spirv_cross13CompilerErrorE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.9 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [8 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [66 x i8], align 1
@switch.table._ZN11spirv_cross12CompilerHLSL22image_type_hlsl_legacyB5cxx11ERKNS_8SPIRTypeEj = private unnamed_addr constant [7 x ptr] [ptr @.str, ptr @.str.1, ptr @.str.2, ptr @.str.24, ptr @.str, ptr @.str.25, ptr @.str.1], align 8

; 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 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: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE1EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2 align 2

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 i32 @__gxx_personality_v0(...)

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 #3

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

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

; Function Attrs: mustprogress 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_cross12CompilerHLSL22image_type_hlsl_legacyB5cxx11ERKNS_8SPIRTypeEj(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(10528) %1, ptr noundef nonnull align 8 dereferenceable(336) %2, i32 noundef %3) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = getelementptr inbounds i8, ptr %2, i64 248
  %8 = tail call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE1EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %7)
  %9 = tail call noundef nonnull align 8 dereferenceable(336) ptr @_ZN11spirv_cross8Compiler3getINS_8SPIRTypeEEERT_j(ptr noundef nonnull align 8 dereferenceable(3176) %1, i32 noundef %8)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #5
  %10 = getelementptr inbounds i8, ptr %9, i64 16
  %11 = load i32, ptr %10, align 8, !tbaa !5
  switch i32 %11, label %17 [
    i32 7, label %12
    i32 8, label %.invoke23
  ]

12:                                               ; preds = %4
  br label %.invoke23

13:                                               ; preds = %.invoke23, %.invoke22, %switch.lookup, %68, %62, %55
  %14 = landingpad { ptr, i32 }
          cleanup
  br label %72

.invoke23:                                        ; preds = %4, %12
  %15 = phi ptr [ @.str.18, %12 ], [ @.str.19, %4 ]
  %16 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull %15)
          to label %17 unwind label %13

17:                                               ; preds = %.invoke23, %4
  %18 = getelementptr inbounds i8, ptr %2, i64 16
  %19 = load i32, ptr %18, align 8, !tbaa !5
  %20 = icmp eq i32 %19, 16
  %21 = getelementptr inbounds i8, ptr %2, i64 252
  %22 = load i32, ptr %21, align 4
  %23 = icmp eq i32 %22, 6
  %or.cond = select i1 %20, i1 %23, i1 false
  br i1 %or.cond, label %24, label %36

24:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #5
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %6, ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull @.str.20)
          to label %25 unwind label %31

25:                                               ; preds = %24
  %26 = getelementptr inbounds i8, ptr %2, i64 258
  %27 = load i8, ptr %26, align 2, !tbaa !37, !range !38, !noundef !39
  %28 = trunc nuw i8 %27 to i1
  %29 = select i1 %28, ptr @.str.14, ptr @.str.9
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull %29)
          to label %30 unwind label %33

30:                                               ; preds = %25
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  br label %71

31:                                               ; preds = %24
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %35

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

35:                                               ; preds = %33, %31
  %.pn = phi { ptr, i32 } [ %34, %33 ], [ %32, %31 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  br label %72

36:                                               ; preds = %17
  br i1 %20, label %37, label %.invoke22

37:                                               ; preds = %36
  switch i32 %22, label %._crit_edge [
    i32 6, label %.invoke22
    i32 5, label %38
  ]

._crit_edge:                                      ; preds = %37
  %.phi.trans.insert = getelementptr inbounds i8, ptr %2, i64 260
  %.pre = load i32, ptr %.phi.trans.insert, align 4, !tbaa !40
  br label %42

38:                                               ; preds = %37
  %39 = getelementptr inbounds i8, ptr %2, i64 260
  %40 = load i32, ptr %39, align 4, !tbaa !40
  %41 = icmp eq i32 %40, 1
  br i1 %41, label %.invoke22, label %42

42:                                               ; preds = %._crit_edge, %38
  %43 = phi i32 [ %.pre, %._crit_edge ], [ %40, %38 ]
  %44 = icmp eq i32 %43, 2
  %45 = select i1 %44, ptr @.str.22, ptr @.str.23
  br label %.invoke22

.invoke22:                                        ; preds = %36, %37, %38, %42
  %46 = phi ptr [ %45, %42 ], [ @.str.21, %38 ], [ @.str.21, %37 ], [ @.str.21, %36 ]
  %47 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull %46)
          to label %48 unwind label %13

48:                                               ; preds = %.invoke22
  %49 = load i32, ptr %21, align 4, !tbaa !41
  %50 = icmp ult i32 %49, 7
  br i1 %50, label %switch.hole_check, label %53

switch.hole_check:                                ; preds = %48
  %switch.maskindex = trunc nuw i32 %49 to i8
  %switch.shifted = lshr i8 111, %switch.maskindex
  %switch.lobit = trunc i8 %switch.shifted to i1
  br i1 %switch.lobit, label %switch.lookup, label %53

switch.lookup:                                    ; preds = %switch.hole_check
  %51 = zext nneg i32 %49 to i64
  %switch.gep = getelementptr inbounds [7 x ptr], ptr @switch.table._ZN11spirv_cross12CompilerHLSL22image_type_hlsl_legacyB5cxx11ERKNS_8SPIRTypeEj, i64 0, i64 %51
  %switch.load = load ptr, ptr %switch.gep, align 8
  %52 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull %switch.load)
          to label %58 unwind label %13

53:                                               ; preds = %switch.hole_check, %48
  %54 = call ptr @__cxa_allocate_exception(i64 16) #5
  invoke void @_ZN11spirv_cross13CompilerErrorC2EPKc(ptr noundef nonnull align 8 dereferenceable(16) %54, ptr noundef nonnull @.str.26)
          to label %55 unwind label %56

55:                                               ; preds = %53
  invoke void @__cxa_throw(ptr nonnull %54, ptr nonnull @_ZTIN11spirv_cross13CompilerErrorE, ptr nonnull @_ZNSt13runtime_errorD2Ev) #6
          to label %73 unwind label %13

56:                                               ; preds = %53
  %57 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %54) #5
  br label %72

58:                                               ; preds = %switch.lookup
  %59 = getelementptr inbounds i8, ptr %2, i64 258
  %60 = load i8, ptr %59, align 2, !tbaa !37, !range !38, !noundef !39
  %61 = trunc nuw i8 %60 to i1
  br i1 %61, label %62, label %64

62:                                               ; preds = %58
  %63 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull @.str.14)
          to label %64 unwind label %13

64:                                               ; preds = %62, %58
  %65 = getelementptr inbounds i8, ptr %2, i64 257
  %66 = load i8, ptr %65, align 1, !tbaa !42, !range !38, !noundef !39
  %67 = trunc nuw i8 %66 to i1
  br i1 %67, label %68, label %70

68:                                               ; preds = %64
  %69 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull @.str.13)
          to label %70 unwind label %13

70:                                               ; preds = %68, %64
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %5) #5
  br label %71

71:                                               ; preds = %70, %30
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #5
  ret void

72:                                               ; preds = %56, %35, %13
  %.pn.pn = phi { ptr, i32 } [ %.pn, %35 ], [ %14, %13 ], [ %57, %56 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #5
  resume { ptr, i32 } %.pn.pn

73:                                               ; preds = %55
  unreachable
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #4

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !13, i64 16}
!6 = !{!"_ZTSN11spirv_cross8SPIRTypeE", !7, i64 0, !12, i64 12, !13, i64 16, !9, i64 20, !9, i64 24, !9, i64 28, !14, i64 32, !19, i64 88, !9, i64 120, !22, i64 124, !22, i64 125, !23, i64 128, !24, i64 136, !14, i64 192, !27, i64 248, !28, i64 272, !28, i64 276, !32, i64 280}
!7 = !{!"_ZTSN11spirv_cross8IVariantE", !8, i64 8}
!8 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE0EEE", !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"_ZTSN3spv2OpE", !10, i64 0}
!13 = !{!"_ZTSN11spirv_cross8SPIRType8BaseTypeE", !10, i64 0}
!14 = !{!"_ZTSN11spirv_cross11SmallVectorIjLm8EEE", !15, i64 0, !17, i64 16, !18, i64 24}
!15 = !{!"_ZTSN11spirv_cross10VectorViewIjEE", !16, i64 0, !17, i64 8}
!16 = !{!"any pointer", !10, i64 0}
!17 = !{!"long", !10, i64 0}
!18 = !{!"_ZTSN11spirv_cross13AlignedBufferIjLm8EEE", !10, i64 0}
!19 = !{!"_ZTSN11spirv_cross11SmallVectorIbLm8EEE", !20, i64 0, !17, i64 16, !21, i64 24}
!20 = !{!"_ZTSN11spirv_cross10VectorViewIbEE", !16, i64 0, !17, i64 8}
!21 = !{!"_ZTSN11spirv_cross13AlignedBufferIbLm8EEE", !10, i64 0}
!22 = !{!"bool", !10, i64 0}
!23 = !{!"_ZTSN3spv12StorageClassE", !10, i64 0}
!24 = !{!"_ZTSN11spirv_cross11SmallVectorINS_7TypedIDILNS_5TypesE1EEELm8EEE", !25, i64 0, !17, i64 16, !26, i64 24}
!25 = !{!"_ZTSN11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE1EEEEE", !16, i64 0, !17, i64 8}
!26 = !{!"_ZTSN11spirv_cross13AlignedBufferINS_7TypedIDILNS_5TypesE1EEELm8EEE", !10, i64 0}
!27 = !{!"_ZTSN11spirv_cross8SPIRType9ImageTypeE", !28, i64 0, !29, i64 4, !22, i64 8, !22, i64 9, !22, i64 10, !9, i64 12, !30, i64 16, !31, i64 20}
!28 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE1EEE", !9, i64 0}
!29 = !{!"_ZTSN3spv3DimE", !10, i64 0}
!30 = !{!"_ZTSN3spv11ImageFormatE", !10, i64 0}
!31 = !{!"_ZTSN3spv15AccessQualifierE", !10, i64 0}
!32 = !{!"_ZTSSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE", !33, i64 0}
!33 = !{!"_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", !16, i64 0, !17, i64 8, !34, i64 16, !17, i64 24, !35, i64 32, !16, i64 48}
!34 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !16, i64 0}
!35 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !36, i64 0, !17, i64 8}
!36 = !{!"float", !10, i64 0}
!37 = !{!6, !22, i64 258}
!38 = !{i8 0, i8 2}
!39 = !{}
!40 = !{!6, !9, i64 260}
!41 = !{!6, !29, i64 252}
!42 = !{!6, !22, i64 257}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass