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

%"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.std::pair.395" = type { i32, i32 }
%"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::TypedID.280" = type { i32 }
%"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.spirv_cross::TypedID.281" = 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 }
%"struct.spirv_cross::PlsRemap" = type { i32, i32 }
%"struct.spirv_cross::IVariant" = type <{ ptr, %"class.spirv_cross::TypedID.280", [4 x i8] }>

@.str.307 = external hidden unnamed_addr constant [2 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(176) ptr @_ZN11spirv_cross8Compiler3getINS_12SPIRVariableEEERT_j(ptr noundef nonnull align 8 dereferenceable(3176), i32 noundef) #1 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: mustprogress uwtable
declare dso_local void @_ZN11spirv_cross8SPIRTypeC2EN3spv2OpE(ptr noundef nonnull align 8 dereferenceable(336), i32 noundef) unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN11spirv_cross8SPIRTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(336)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11spirv_cross12CompilerGLSL8pls_declB5cxx11ERKNS_8PlsRemapE(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(9848) %1, ptr noundef nonnull align 4 dereferenceable(8) %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 %"struct.std::pair.395", align 4
  %9 = alloca %"struct.spirv_cross::SPIRType", align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %17 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %18 = load ptr, ptr %6, align 8, !tbaa !5
  %19 = getelementptr inbounds %"struct.spirv_cross::PlsRemap", ptr %18, i32 0, i32 0
  %20 = load i32, ptr %19, align 4, !tbaa !9
  %21 = call noundef nonnull align 8 dereferenceable(176) ptr @_ZN11spirv_cross8Compiler3getINS_12SPIRVariableEEERT_j(ptr noundef nonnull align 8 dereferenceable(3176) %17, i32 noundef %20)
  store ptr %21, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = getelementptr inbounds %"struct.spirv_cross::PlsRemap", ptr %22, i32 0, i32 1
  %24 = load i32, ptr %23, align 4, !tbaa !13
  %25 = call i64 @_ZL22pls_format_to_basetypeN11spirv_cross9PlsFormatE(i32 noundef %24)
  store i64 %25, ptr %8, align 4
  call void @llvm.lifetime.start.p0(i64 336, ptr %9) #4
  %26 = getelementptr inbounds %"struct.std::pair.395", ptr %8, i32 0, i32 0
  %27 = load i32, ptr %26, align 4, !tbaa !14
  call void @_ZN11spirv_cross8SPIRTypeC2EN3spv2OpE(ptr noundef nonnull align 8 dereferenceable(336) %9, i32 noundef %27)
  %28 = getelementptr inbounds %"struct.std::pair.395", ptr %8, i32 0, i32 1
  %29 = load i32, ptr %28, align 4, !tbaa !18
  %30 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %9, i32 0, i32 2
  store i32 %29, ptr %30, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #4
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  %32 = getelementptr inbounds %"struct.spirv_cross::PlsRemap", ptr %31, i32 0, i32 1
  %33 = load i32, ptr %32, align 4, !tbaa !13
  %34 = invoke noundef i32 @_ZL24pls_format_to_componentsN11spirv_cross9PlsFormatE(i32 noundef %33)
          to label %35 unwind label %42

35:                                               ; preds = %3
  store i32 %34, ptr %10, align 4, !tbaa !45
  %36 = load i32, ptr %10, align 4, !tbaa !45
  %37 = icmp ugt i32 %36, 1
  br i1 %37, label %38, label %46

38:                                               ; preds = %35
  %39 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %9, i32 0, i32 1
  store i32 23, ptr %39, align 4, !tbaa !46
  %40 = load i32, ptr %10, align 4, !tbaa !45
  %41 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %9, i32 0, i32 4
  store i32 %40, ptr %41, align 8, !tbaa !47
  br label %46

42:                                               ; preds = %3
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %11, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %12, align 4
  br label %92

46:                                               ; preds = %38, %35
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %47 = load ptr, ptr %6, align 8, !tbaa !5
  %48 = getelementptr inbounds %"struct.spirv_cross::PlsRemap", ptr %47, i32 0, i32 1
  %49 = load i32, ptr %48, align 4, !tbaa !13
  %50 = invoke noundef ptr @_ZL13to_pls_layoutN11spirv_cross9PlsFormatE(i32 noundef %49)
          to label %51 unwind label %68

51:                                               ; preds = %46
  store ptr %50, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %52 = load ptr, ptr %7, align 8, !tbaa !5
  %53 = invoke noundef ptr @_ZN11spirv_cross12CompilerGLSL22to_pls_qualifiers_glslERKNS_12SPIRVariableE(ptr noundef nonnull align 8 dereferenceable(9848) %17, ptr noundef nonnull align 8 dereferenceable(176) %52)
          to label %54 unwind label %72

54:                                               ; preds = %51
  store ptr %53, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %15) #4
  %55 = load ptr, ptr %17, align 8, !tbaa !48
  %56 = getelementptr inbounds ptr, ptr %55, i64 19
  %57 = load ptr, ptr %56, align 8
  invoke void %57(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %15, ptr noundef nonnull align 8 dereferenceable(9848) %17, ptr noundef nonnull align 8 dereferenceable(336) %9, i32 noundef 0)
          to label %58 unwind label %76

58:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #4
  %59 = load ptr, ptr %7, align 8, !tbaa !5
  %60 = getelementptr inbounds %"struct.spirv_cross::IVariant", ptr %59, i32 0, i32 1
  %61 = invoke noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %60)
          to label %62 unwind label %80

62:                                               ; preds = %58
  %63 = load ptr, ptr %17, align 8, !tbaa !48
  %64 = getelementptr inbounds ptr, ptr %63, i64 6
  %65 = load ptr, ptr %64, align 8
  invoke void %65(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %16, ptr noundef nonnull align 8 dereferenceable(3176) %17, i32 noundef %61, i1 noundef zeroext true)
          to label %66 unwind label %80

66:                                               ; preds = %62
  invoke void @_ZN11spirv_cross4joinIJPKcS2_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA2_S1_S8_EEES8_DpOT_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(32) %15, ptr noundef nonnull align 1 dereferenceable(2) @.str.307, ptr noundef nonnull align 8 dereferenceable(32) %16)
          to label %67 unwind label %84

67:                                               ; preds = %66
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @_ZN11spirv_cross8SPIRTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(336) %9) #4
  call void @llvm.lifetime.end.p0(i64 336, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  ret void

68:                                               ; preds = %46
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %11, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %12, align 4
  br label %91

72:                                               ; preds = %51
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %11, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %12, align 4
  br label %90

76:                                               ; preds = %54
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %11, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %12, align 4
  br label %89

80:                                               ; preds = %62, %58
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %11, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %12, align 4
  br label %88

84:                                               ; preds = %66
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %11, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %12, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #4
  br label %88

88:                                               ; preds = %84, %80
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #4
  br label %89

89:                                               ; preds = %88, %76
  call void @llvm.lifetime.end.p0(i64 32, ptr %15) #4
  br label %90

90:                                               ; preds = %89, %72
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  br label %91

91:                                               ; preds = %90, %68
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br label %92

92:                                               ; preds = %91, %42
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #4
  call void @_ZN11spirv_cross8SPIRTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(336) %9) #4
  call void @llvm.lifetime.end.p0(i64 336, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  br label %93

93:                                               ; preds = %92
  %94 = load ptr, ptr %11, align 8
  %95 = load i32, ptr %12, align 4
  %96 = insertvalue { ptr, i32 } poison, ptr %94, 0
  %97 = insertvalue { ptr, i32 } %96, i32 %95, 1
  resume { ptr, i32 } %97
}

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL24pls_format_to_componentsN11spirv_cross9PlsFormatE(i32 noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN11spirv_cross12CompilerGLSL22to_pls_qualifiers_glslERKNS_12SPIRVariableE(ptr noundef nonnull align 8 dereferenceable(9848), ptr noundef nonnull align 8 dereferenceable(176)) #1 align 2

; Function Attrs: mustprogress uwtable
declare hidden i64 @_ZL22pls_format_to_basetypeN11spirv_cross9PlsFormatE(i32 noundef) #1

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef ptr @_ZL13to_pls_layoutN11spirv_cross9PlsFormatE(i32 noundef) #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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

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

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


; 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] }
%"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::TypedID.280" = type { i32 }
%"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.spirv_cross::TypedID.281" = 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.307 = external hidden unnamed_addr constant [2 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(176) ptr @_ZN11spirv_cross8Compiler3getINS_12SPIRVariableEEERT_j(ptr noundef nonnull align 8 dereferenceable(3176), i32 noundef) local_unnamed_addr #1 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 void @_ZN11spirv_cross8SPIRTypeC2EN3spv2OpE(ptr noundef nonnull align 8 dereferenceable(336), i32 noundef) unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN11spirv_cross8SPIRTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(336)) unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN11spirv_cross12CompilerGLSL8pls_declB5cxx11ERKNS_8PlsRemapE(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(9848) %1, ptr nocapture noundef nonnull readonly align 4 dereferenceable(8) %2) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"struct.spirv_cross::SPIRType", align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = load i32, ptr %2, align 4, !tbaa !5
  %10 = tail call noundef nonnull align 8 dereferenceable(176) ptr @_ZN11spirv_cross8Compiler3getINS_12SPIRVariableEEERT_j(ptr noundef nonnull align 8 dereferenceable(3176) %1, i32 noundef %9)
  %11 = getelementptr inbounds i8, ptr %2, i64 4
  %12 = load i32, ptr %11, align 4, !tbaa !11
  %13 = tail call i64 @_ZL22pls_format_to_basetypeN11spirv_cross9PlsFormatE(i32 noundef %12)
  %.sroa.0.0.extract.trunc = trunc i64 %13 to i32
  %.sroa.5.0.extract.shift = lshr i64 %13, 32
  %.sroa.5.0.extract.trunc = trunc nuw i64 %.sroa.5.0.extract.shift to i32
  call void @llvm.lifetime.start.p0(i64 336, ptr nonnull %4) #4
  call void @_ZN11spirv_cross8SPIRTypeC2EN3spv2OpE(ptr noundef nonnull align 8 dereferenceable(336) %4, i32 noundef %.sroa.0.0.extract.trunc)
  %14 = getelementptr inbounds i8, ptr %4, i64 16
  store i32 %.sroa.5.0.extract.trunc, ptr %14, align 8, !tbaa !12
  %15 = load i32, ptr %11, align 4, !tbaa !11
  %16 = call noundef i32 @_ZL24pls_format_to_componentsN11spirv_cross9PlsFormatE(i32 noundef %15)
  %17 = icmp ugt i32 %16, 1
  br i1 %17, label %18, label %21

18:                                               ; preds = %3
  %19 = getelementptr inbounds i8, ptr %4, i64 12
  store i32 23, ptr %19, align 4, !tbaa !41
  %20 = getelementptr inbounds i8, ptr %4, i64 24
  store i32 %16, ptr %20, align 8, !tbaa !42
  br label %21

21:                                               ; preds = %18, %3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  %22 = load i32, ptr %11, align 4, !tbaa !11
  %23 = call noundef ptr @_ZL13to_pls_layoutN11spirv_cross9PlsFormatE(i32 noundef %22)
  store ptr %23, ptr %5, align 8, !tbaa !43
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  %24 = invoke noundef ptr @_ZN11spirv_cross12CompilerGLSL22to_pls_qualifiers_glslERKNS_12SPIRVariableE(ptr noundef nonnull align 8 dereferenceable(9848) %1, ptr noundef nonnull align 8 dereferenceable(176) %10)
          to label %25 unwind label %37

25:                                               ; preds = %21
  store ptr %24, ptr %6, align 8, !tbaa !43
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #4
  %26 = load ptr, ptr %1, align 8, !tbaa !44
  %27 = getelementptr inbounds i8, ptr %26, i64 152
  %28 = load ptr, ptr %27, align 8
  invoke void %28(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %7, ptr noundef nonnull align 8 dereferenceable(9848) %1, ptr noundef nonnull align 8 dereferenceable(336) %4, i32 noundef 0)
          to label %29 unwind label %39

29:                                               ; preds = %25
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #4
  %30 = getelementptr inbounds i8, ptr %10, i64 8
  %31 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE0EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %30)
  %32 = load ptr, ptr %1, align 8, !tbaa !44
  %33 = getelementptr inbounds i8, ptr %32, i64 48
  %34 = load ptr, ptr %33, align 8
  invoke void %34(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %8, ptr noundef nonnull align 8 dereferenceable(3176) %1, i32 noundef %31, i1 noundef zeroext true)
          to label %35 unwind label %41

35:                                               ; preds = %29
  invoke void @_ZN11spirv_cross4joinIJPKcS2_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA2_S1_S8_EEES8_DpOT_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 1 dereferenceable(2) @.str.307, ptr noundef nonnull align 8 dereferenceable(32) %8)
          to label %36 unwind label %43

36:                                               ; preds = %35
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  call void @_ZN11spirv_cross8SPIRTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(336) %4) #4
  call void @llvm.lifetime.end.p0(i64 336, ptr nonnull %4) #4
  ret void

37:                                               ; preds = %21
  %38 = landingpad { ptr, i32 }
          cleanup
  br label %47

39:                                               ; preds = %25
  %40 = landingpad { ptr, i32 }
          cleanup
  br label %46

41:                                               ; preds = %29
  %42 = landingpad { ptr, i32 }
          cleanup
  br label %45

43:                                               ; preds = %35
  %44 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #4
  br label %45

45:                                               ; preds = %43, %41
  %.pn = phi { ptr, i32 } [ %44, %43 ], [ %42, %41 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #4
  br label %46

46:                                               ; preds = %45, %39
  %.pn.pn = phi { ptr, i32 } [ %.pn, %45 ], [ %40, %39 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #4
  br label %47

47:                                               ; preds = %46, %37
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %46 ], [ %38, %37 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  call void @_ZN11spirv_cross8SPIRTypeD2Ev(ptr noundef nonnull align 8 dereferenceable(336) %4) #4
  call void @llvm.lifetime.end.p0(i64 336, ptr nonnull %4) #4
  resume { ptr, i32 } %.pn.pn.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i32 @_ZL24pls_format_to_componentsN11spirv_cross9PlsFormatE(i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef ptr @_ZN11spirv_cross12CompilerGLSL22to_pls_qualifiers_glslERKNS_12SPIRVariableE(ptr noundef nonnull align 8 dereferenceable(9848), ptr noundef nonnull align 8 dereferenceable(176)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare hidden i64 @_ZL22pls_format_to_basetypeN11spirv_cross9PlsFormatE(i32 noundef) local_unnamed_addr #1

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

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef ptr @_ZL13to_pls_layoutN11spirv_cross9PlsFormatE(i32 noundef) local_unnamed_addr #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 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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, !7, i64 0}
!6 = !{!"_ZTSN11spirv_cross8PlsRemapE", !7, i64 0, !10, i64 4}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN11spirv_cross9PlsFormatE", !8, i64 0}
!11 = !{!6, !10, i64 4}
!12 = !{!13, !17, i64 16}
!13 = !{!"_ZTSN11spirv_cross8SPIRTypeE", !14, i64 0, !16, i64 12, !17, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !18, i64 32, !23, i64 88, !7, i64 120, !26, i64 124, !26, i64 125, !27, i64 128, !28, i64 136, !18, i64 192, !31, i64 248, !32, i64 272, !32, i64 276, !36, i64 280}
!14 = !{!"_ZTSN11spirv_cross8IVariantE", !15, i64 8}
!15 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE0EEE", !7, i64 0}
!16 = !{!"_ZTSN3spv2OpE", !8, i64 0}
!17 = !{!"_ZTSN11spirv_cross8SPIRType8BaseTypeE", !8, i64 0}
!18 = !{!"_ZTSN11spirv_cross11SmallVectorIjLm8EEE", !19, i64 0, !21, i64 16, !22, i64 24}
!19 = !{!"_ZTSN11spirv_cross10VectorViewIjEE", !20, i64 0, !21, i64 8}
!20 = !{!"any pointer", !8, i64 0}
!21 = !{!"long", !8, i64 0}
!22 = !{!"_ZTSN11spirv_cross13AlignedBufferIjLm8EEE", !8, i64 0}
!23 = !{!"_ZTSN11spirv_cross11SmallVectorIbLm8EEE", !24, i64 0, !21, i64 16, !25, i64 24}
!24 = !{!"_ZTSN11spirv_cross10VectorViewIbEE", !20, i64 0, !21, i64 8}
!25 = !{!"_ZTSN11spirv_cross13AlignedBufferIbLm8EEE", !8, i64 0}
!26 = !{!"bool", !8, i64 0}
!27 = !{!"_ZTSN3spv12StorageClassE", !8, i64 0}
!28 = !{!"_ZTSN11spirv_cross11SmallVectorINS_7TypedIDILNS_5TypesE1EEELm8EEE", !29, i64 0, !21, i64 16, !30, i64 24}
!29 = !{!"_ZTSN11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE1EEEEE", !20, i64 0, !21, i64 8}
!30 = !{!"_ZTSN11spirv_cross13AlignedBufferINS_7TypedIDILNS_5TypesE1EEELm8EEE", !8, i64 0}
!31 = !{!"_ZTSN11spirv_cross8SPIRType9ImageTypeE", !32, i64 0, !33, i64 4, !26, i64 8, !26, i64 9, !26, i64 10, !7, i64 12, !34, i64 16, !35, i64 20}
!32 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE1EEE", !7, i64 0}
!33 = !{!"_ZTSN3spv3DimE", !8, i64 0}
!34 = !{!"_ZTSN3spv11ImageFormatE", !8, i64 0}
!35 = !{!"_ZTSN3spv15AccessQualifierE", !8, i64 0}
!36 = !{!"_ZTSSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE", !37, i64 0}
!37 = !{!"_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", !20, i64 0, !21, i64 8, !38, i64 16, !21, i64 24, !39, i64 32, !20, i64 48}
!38 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !20, i64 0}
!39 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !40, i64 0, !21, i64 8}
!40 = !{!"float", !8, i64 0}
!41 = !{!13, !16, i64 12}
!42 = !{!13, !7, i64 24}
!43 = !{!20, !20, i64 0}
!44 = !{!45, !45, i64 0}
!45 = !{!"vtable pointer", !9, i64 0}


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