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

; 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.362" = type <{ %"struct.std::__detail::_Node_iterator.364", i8, [7 x i8] }>
%"struct.std::__detail::_Node_iterator.364" = type { %"struct.std::__detail::_Node_iterator_base.365" }
%"struct.std::__detail::_Node_iterator_base.365" = type { ptr }
%"class.spirv_cross::TypedID.280" = type { i32 }
%"class.spirv_cross::TypedID.281" = type { i32 }
%"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::IVariant" = type <{ ptr, %"class.spirv_cross::TypedID.280", [4 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.284", i32, i8, i8, i32, %"class.spirv_cross::SmallVector.227", %"class.spirv_cross::SmallVector.92", %"struct.spirv_cross::SPIRType::ImageType", %"class.spirv_cross::TypedID.281", %"class.spirv_cross::TypedID.281", %"class.std::unordered_set.165" }
%"struct.spirv_cross::IVariant.base" = type <{ ptr, %"class.spirv_cross::TypedID.280" }>
%"class.spirv_cross::SmallVector.284" = type { %"class.spirv_cross::VectorView.285", i64, %"class.spirv_cross::AlignedBuffer.286" }
%"class.spirv_cross::VectorView.285" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.286" = 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.281", 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 }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }

@.str.1679 = external hidden unnamed_addr constant [6 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

declare i32 @__gxx_personality_v0(...)

; 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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

; Function Attrs: mustprogress uwtable
declare dso_local i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvNS0_IXT_EEEILS1_1EEEv(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)) #2 align 2

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

; 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 noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32)) #2 align 2

declare void @_ZN11spirv_cross8ParsedIR20sanitize_underscoresERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32)) #4

declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNK11spirv_cross8Compiler15get_member_nameB5cxx11ENS_7TypedIDILNS_5TypesE1EEEj(ptr noundef nonnull align 8 dereferenceable(3176), i32, i32 noundef) #4

declare void @_ZN11spirv_cross8Compiler8set_nameENS_7TypedIDILNS_5TypesE0EEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(3176), i32, ptr noundef nonnull align 8 dereferenceable(32)) #4

; 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

declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNK11spirv_cross8Compiler8get_nameB5cxx11ENS_7TypedIDILNS_5TypesE0EEE(ptr noundef nonnull align 8 dereferenceable(3176), i32) #4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11spirv_cross12CompilerGLSL28fixup_anonymous_struct_namesERSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEERKNS_8SPIRTypeE(ptr noundef nonnull align 8 dereferenceable(9848) %0, ptr noundef nonnull align 8 dereferenceable(56) %1, ptr noundef nonnull align 8 dereferenceable(336) %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 i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca %"struct.std::pair.362", align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca %"class.spirv_cross::TypedID.280", align 4
  %13 = alloca %"class.spirv_cross::TypedID.281", align 4
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca %"class.spirv_cross::TypedID.281", align 4
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca %"class.spirv_cross::TypedID.280", 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
  %19 = load ptr, ptr %4, align 8
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  %22 = getelementptr inbounds %"struct.spirv_cross::IVariant", ptr %21, i32 0, i32 1
  %23 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %22)
  store i32 %23, ptr %7, align 4, !tbaa !9
  %24 = call noundef i64 @_ZNKSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE5countERKj(ptr noundef nonnull align 8 dereferenceable(56) %20, ptr noundef nonnull align 4 dereferenceable(4) %7)
  %25 = icmp ne i64 %24, 0
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br i1 %25, label %26, label %27

26:                                               ; preds = %3
  br label %100

27:                                               ; preds = %3
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = getelementptr inbounds %"struct.spirv_cross::IVariant", ptr %29, i32 0, i32 1
  %31 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %30)
  store i32 %31, ptr %8, align 4, !tbaa !9
  %32 = call { ptr, i8 } @_ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE6insertEOj(ptr noundef nonnull align 8 dereferenceable(56) %28, ptr noundef nonnull align 4 dereferenceable(4) %8)
  %33 = getelementptr inbounds { ptr, i8 }, ptr %9, i32 0, i32 0
  %34 = extractvalue { ptr, i8 } %32, 0
  store ptr %34, ptr %33, align 8
  %35 = getelementptr inbounds { ptr, i8 }, ptr %9, i32 0, i32 1
  %36 = extractvalue { ptr, i8 } %32, 1
  store i8 %36, ptr %35, align 8
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store i32 0, ptr %10, align 4, !tbaa !9
  br label %37

37:                                               ; preds = %97, %27
  %38 = load i32, ptr %10, align 4, !tbaa !9
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  %40 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %39, i32 0, i32 12
  %41 = call noundef i64 @_ZNK11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE1EEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %40) #5
  %42 = trunc i64 %41 to i32
  %43 = icmp ult i32 %38, %42
  br i1 %43, label %45, label %44

44:                                               ; preds = %37
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %100

45:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %46 = load ptr, ptr %6, align 8, !tbaa !5
  %47 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %46, i32 0, i32 12
  %48 = load i32, ptr %10, align 4, !tbaa !9
  %49 = zext i32 %48 to i64
  %50 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNK11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE1EEEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %47, i64 noundef %49) #5
  %51 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE1EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %50)
  %52 = call noundef nonnull align 8 dereferenceable(336) ptr @_ZN11spirv_cross8Compiler3getINS_8SPIRTypeEEERT_j(ptr noundef nonnull align 8 dereferenceable(3176) %19, i32 noundef %51)
  store ptr %52, ptr %11, align 8, !tbaa !5
  %53 = load ptr, ptr %11, align 8, !tbaa !5
  %54 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %53, i32 0, i32 2
  %55 = load i32, ptr %54, align 8, !tbaa !11
  %56 = icmp eq i32 %55, 15
  br i1 %56, label %57, label %96

57:                                               ; preds = %45
  %58 = load ptr, ptr %11, align 8, !tbaa !5
  %59 = getelementptr inbounds %"struct.spirv_cross::IVariant", ptr %58, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %12, ptr align 8 %59, i64 4, i1 false), !tbaa.struct !39
  %60 = getelementptr inbounds %"class.spirv_cross::TypedID.280", ptr %12, i32 0, i32 0
  %61 = load i32, ptr %60, align 4
  %62 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK11spirv_cross8Compiler8get_nameB5cxx11ENS_7TypedIDILNS_5TypesE0EEE(ptr noundef nonnull align 8 dereferenceable(3176) %19, i32 %61)
  %63 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %62) #5
  br i1 %63, label %64, label %93

64:                                               ; preds = %57
  %65 = load ptr, ptr %6, align 8, !tbaa !5
  %66 = getelementptr inbounds %"struct.spirv_cross::IVariant", ptr %65, i32 0, i32 1
  %67 = call i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvNS0_IXT_EEEILS1_1EEEv(ptr noundef nonnull align 4 dereferenceable(4) %66)
  %68 = getelementptr inbounds %"class.spirv_cross::TypedID.281", ptr %13, i32 0, i32 0
  store i32 %67, ptr %68, align 4
  %69 = load i32, ptr %10, align 4, !tbaa !9
  %70 = getelementptr inbounds %"class.spirv_cross::TypedID.281", ptr %13, i32 0, i32 0
  %71 = load i32, ptr %70, align 4
  %72 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK11spirv_cross8Compiler15get_member_nameB5cxx11ENS_7TypedIDILNS_5TypesE1EEEj(ptr noundef nonnull align 8 dereferenceable(3176) %19, i32 %71, i32 noundef %69)
  %73 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %72) #5
  br i1 %73, label %93, label %74

74:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #5
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = getelementptr inbounds %"struct.spirv_cross::IVariant", ptr %75, i32 0, i32 1
  %77 = call i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvNS0_IXT_EEEILS1_1EEEv(ptr noundef nonnull align 4 dereferenceable(4) %76)
  %78 = getelementptr inbounds %"class.spirv_cross::TypedID.281", ptr %15, i32 0, i32 0
  store i32 %77, ptr %78, align 4
  %79 = load i32, ptr %10, align 4, !tbaa !9
  %80 = getelementptr inbounds %"class.spirv_cross::TypedID.281", ptr %15, i32 0, i32 0
  %81 = load i32, ptr %80, align 4
  %82 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK11spirv_cross8Compiler15get_member_nameB5cxx11ENS_7TypedIDILNS_5TypesE1EEEj(ptr noundef nonnull align 8 dereferenceable(3176) %19, i32 %81, i32 noundef %79)
  call void @_ZN11spirv_cross4joinIJRA6_KcRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEES9_DpOT_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %14, ptr noundef nonnull align 1 dereferenceable(6) @.str.1679, ptr noundef nonnull align 8 dereferenceable(32) %82)
  invoke void @_ZN11spirv_cross8ParsedIR20sanitize_underscoresERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %14)
          to label %83 unwind label %89

83:                                               ; preds = %74
  %84 = load ptr, ptr %11, align 8, !tbaa !5
  %85 = getelementptr inbounds %"struct.spirv_cross::IVariant", ptr %84, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %18, ptr align 8 %85, i64 4, i1 false), !tbaa.struct !39
  %86 = getelementptr inbounds %"class.spirv_cross::TypedID.280", ptr %18, i32 0, i32 0
  %87 = load i32, ptr %86, align 4
  invoke void @_ZN11spirv_cross8Compiler8set_nameENS_7TypedIDILNS_5TypesE0EEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(3176) %19, i32 %87, ptr noundef nonnull align 8 dereferenceable(32) %14)
          to label %88 unwind label %89

88:                                               ; preds = %83
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #5
  br label %93

89:                                               ; preds = %83, %74
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %16, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %17, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %101

93:                                               ; preds = %88, %64, %57
  %94 = load ptr, ptr %5, align 8, !tbaa !5
  %95 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZN11spirv_cross12CompilerGLSL28fixup_anonymous_struct_namesERSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEERKNS_8SPIRTypeE(ptr noundef nonnull align 8 dereferenceable(9848) %19, ptr noundef nonnull align 8 dereferenceable(56) %94, ptr noundef nonnull align 8 dereferenceable(336) %95)
  br label %96

96:                                               ; preds = %93, %45
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %97

97:                                               ; preds = %96
  %98 = load i32, ptr %10, align 4, !tbaa !9
  %99 = add i32 %98, 1
  store i32 %99, ptr %10, align 4, !tbaa !9
  br label %37, !llvm.loop !40

100:                                              ; preds = %44, %26
  ret void

101:                                              ; preds = %89
  %102 = load ptr, ptr %16, align 8
  %103 = load i32, ptr %17, align 4
  %104 = insertvalue { ptr, i32 } poison, ptr %102, 0
  %105 = insertvalue { ptr, i32 } %104, i32 %103, 1
  resume { ptr, i32 } %105
}

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

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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"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 = !{i64 0, i64 4, !9}
!40 = distinct !{!40, !41}
!41 = !{!"llvm.loop.mustprogress"}


; 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.1679 = external hidden unnamed_addr constant [6 x i8], align 1

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

; 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

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

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

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

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

; 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 noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2 align 2

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

declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNK11spirv_cross8Compiler15get_member_nameB5cxx11ENS_7TypedIDILNS_5TypesE1EEEj(ptr noundef nonnull align 8 dereferenceable(3176), i32, i32 noundef) local_unnamed_addr #3

declare void @_ZN11spirv_cross8Compiler8set_nameENS_7TypedIDILNS_5TypesE0EEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(3176), i32, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3

; 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

declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNK11spirv_cross8Compiler8get_nameB5cxx11ENS_7TypedIDILNS_5TypesE0EEE(ptr noundef nonnull align 8 dereferenceable(3176), i32) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11spirv_cross12CompilerGLSL28fixup_anonymous_struct_namesERSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEERKNS_8SPIRTypeE(ptr noundef nonnull align 8 dereferenceable(9848) %0, ptr noundef nonnull align 8 dereferenceable(56) %1, ptr noundef nonnull align 8 dereferenceable(336) %2) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  %7 = getelementptr inbounds i8, ptr %2, i64 8
  %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) %1, 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) #4
  br i1 %.not, label %10, label %.loopexit

10:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #4
  %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) %1, ptr noundef nonnull align 4 dereferenceable(4) %5)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #4
  %13 = getelementptr inbounds i8, ptr %2, i64 136
  %14 = call noundef i64 @_ZNK11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE1EEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %13) #4
  %15 = and i64 %14, 4294967295
  %.not26 = icmp eq i64 %15, 0
  br i1 %.not26, label %.loopexit, label %.lr.ph

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

22:                                               ; preds = %.lr.ph
  %23 = getelementptr inbounds i8, ptr %18, i64 8
  %.sroa.03.0.copyload = load i32, ptr %23, align 8, !tbaa !5
  %24 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK11spirv_cross8Compiler8get_nameB5cxx11ENS_7TypedIDILNS_5TypesE0EEE(ptr noundef nonnull align 8 dereferenceable(3176) %0, i32 %.sroa.03.0.copyload)
  %25 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %24) #4
  br i1 %25, label %26, label %38

26:                                               ; preds = %22
  %27 = call i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvNS0_IXT_EEEILS1_1EEEv(ptr noundef nonnull align 4 dereferenceable(4) %7)
  %28 = trunc nuw i64 %indvars.iv to i32
  %29 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK11spirv_cross8Compiler15get_member_nameB5cxx11ENS_7TypedIDILNS_5TypesE1EEEj(ptr noundef nonnull align 8 dereferenceable(3176) %0, i32 %27, i32 noundef %28)
  %30 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %29) #4
  br i1 %30, label %38, label %31

31:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #4
  %32 = call i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvNS0_IXT_EEEILS1_1EEEv(ptr noundef nonnull align 4 dereferenceable(4) %7)
  %33 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK11spirv_cross8Compiler15get_member_nameB5cxx11ENS_7TypedIDILNS_5TypesE1EEEj(ptr noundef nonnull align 8 dereferenceable(3176) %0, i32 %32, i32 noundef %28)
  call void @_ZN11spirv_cross4joinIJRA6_KcRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEES9_DpOT_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %6, ptr noundef nonnull align 1 dereferenceable(6) @.str.1679, ptr noundef nonnull align 8 dereferenceable(32) %33)
  invoke void @_ZN11spirv_cross8ParsedIR20sanitize_underscoresERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %34 unwind label %36

34:                                               ; preds = %31
  %.sroa.0.0.copyload = load i32, ptr %23, align 8, !tbaa !5
  invoke void @_ZN11spirv_cross8Compiler8set_nameENS_7TypedIDILNS_5TypesE0EEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(3176) %0, i32 %.sroa.0.0.copyload, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %35 unwind label %36

35:                                               ; preds = %34
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #4
  br label %38

36:                                               ; preds = %34, %31
  %37 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #4
  resume { ptr, i32 } %37

38:                                               ; preds = %35, %26, %22
  call void @_ZN11spirv_cross12CompilerGLSL28fixup_anonymous_struct_namesERSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEERKNS_8SPIRTypeE(ptr noundef nonnull align 8 dereferenceable(9848) %0, ptr noundef nonnull align 8 dereferenceable(56) %1, ptr noundef nonnull align 8 dereferenceable(336) %18)
  br label %39

39:                                               ; preds = %38, %.lr.ph
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %40 = call noundef i64 @_ZNK11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE1EEEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %13) #4
  %41 = and i64 %40, 4294967295
  %42 = icmp ult i64 %indvars.iv.next, %41
  br i1 %42, label %.lr.ph, label %.loopexit, !llvm.loop !38

.loopexit:                                        ; preds = %39, %10, %3
  ret void
}

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

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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"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"}


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