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

; 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" = type <{ %"struct.std::__detail::_Node_iterator", i8, [7 x i8] }>
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }
%"struct.spirv_cross::Compiler::CombinedImageSamplerUsageHandler" = type <{ %"struct.spirv_cross::Compiler::OpcodeHandler", ptr, ptr, %"class.std::unordered_map.301", %"class.std::unordered_set", i8, i8, [6 x i8] }>
%"struct.spirv_cross::Compiler::OpcodeHandler" = type { ptr }
%"class.std::unordered_map.301" = type { %"class.std::_Hashtable.302" }
%"class.std::_Hashtable.302" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.std::unordered_set" = type { %"class.std::_Hashtable.74" }
%"class.std::_Hashtable.74" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.spirv_cross::SPIRType" = type { %"struct.spirv_cross::IVariant.base", i32, i32, i32, i32, i32, %"class.spirv_cross::SmallVector.92", %"class.spirv_cross::SmallVector.166", i32, i8, i8, i32, %"class.spirv_cross::SmallVector.169", %"class.spirv_cross::SmallVector.92", %"struct.spirv_cross::SPIRType::ImageType", %"class.spirv_cross::TypedID.163", %"class.spirv_cross::TypedID.163", %"class.std::unordered_set.172" }
%"struct.spirv_cross::IVariant.base" = type <{ ptr, %"class.spirv_cross::TypedID.162" }>
%"class.spirv_cross::TypedID.162" = type { i32 }
%"class.spirv_cross::SmallVector.166" = type { %"class.spirv_cross::VectorView.167", i64, %"class.spirv_cross::AlignedBuffer.168" }
%"class.spirv_cross::VectorView.167" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.168" = type { [8 x i8] }
%"class.spirv_cross::SmallVector.169" = type { %"class.spirv_cross::VectorView.170", i64, %"class.spirv_cross::AlignedBuffer.171" }
%"class.spirv_cross::VectorView.170" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.171" = 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.163", i32, i8, i8, i8, i32, i32, i32 }
%"class.spirv_cross::TypedID.163" = type { i32 }
%"class.std::unordered_set.172" = type { %"class.std::_Hashtable.173" }
%"class.std::_Hashtable.173" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }

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

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

; Function Attrs: mustprogress uwtable
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 uwtable
declare dso_local { ptr, i8 } @_ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE6insertERKj(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(4)) #1 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 uwtable
declare dso_local void @_ZN11spirv_cross8Compiler32CombinedImageSamplerUsageHandler14add_dependencyEjj(ptr noundef nonnull align 8 dereferenceable(138), i32 noundef, i32 noundef) #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN11spirv_cross8Compiler32CombinedImageSamplerUsageHandler6handleEN3spv2OpEPKjj(ptr noundef nonnull align 8 dereferenceable(138) %0, i32 noundef %1, ptr noundef %2, i32 noundef %3) unnamed_addr #1 align 2 {
  %5 = alloca i1, align 1
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %"struct.std::pair", align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store ptr %2, ptr %8, align 8, !tbaa !5
  store i32 %3, ptr %9, align 4, !tbaa !11
  %15 = load ptr, ptr %6, align 8
  %16 = load i32, ptr %7, align 4, !tbaa !9
  switch i32 %16, label %89 [
    i32 65, label %17
    i32 66, label %17
    i32 67, label %17
    i32 61, label %17
    i32 86, label %61
  ]

17:                                               ; preds = %4, %4, %4, %4
  %18 = load i32, ptr %9, align 4, !tbaa !11
  %19 = icmp ult i32 %18, 3
  br i1 %19, label %20, label %21

20:                                               ; preds = %17
  store i1 false, ptr %5, align 1
  br label %91

21:                                               ; preds = %17
  %22 = load ptr, ptr %8, align 8, !tbaa !5
  %23 = getelementptr inbounds i32, ptr %22, i64 1
  %24 = load i32, ptr %23, align 4, !tbaa !11
  %25 = load ptr, ptr %8, align 8, !tbaa !5
  %26 = getelementptr inbounds i32, ptr %25, i64 2
  %27 = load i32, ptr %26, align 4, !tbaa !11
  call void @_ZN11spirv_cross8Compiler32CombinedImageSamplerUsageHandler14add_dependencyEjj(ptr noundef nonnull align 8 dereferenceable(138) %15, i32 noundef %24, i32 noundef %27)
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #2
  %28 = getelementptr inbounds %"struct.spirv_cross::Compiler::CombinedImageSamplerUsageHandler", ptr %15, i32 0, i32 1
  %29 = load ptr, ptr %28, align 8, !tbaa !13
  %30 = load ptr, ptr %8, align 8, !tbaa !5
  %31 = getelementptr inbounds i32, ptr %30, i64 0
  %32 = load i32, ptr %31, align 4, !tbaa !11
  %33 = call noundef nonnull align 8 dereferenceable(336) ptr @_ZN11spirv_cross8Compiler3getINS_8SPIRTypeEEERT_j(ptr noundef nonnull align 8 dereferenceable(3176) %29, i32 noundef %32)
  store ptr %33, ptr %10, align 8, !tbaa !5
  %34 = load ptr, ptr %10, align 8, !tbaa !5
  %35 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %34, i32 0, i32 14
  %36 = getelementptr inbounds %"struct.spirv_cross::SPIRType::ImageType", ptr %35, i32 0, i32 1
  %37 = load i32, ptr %36, align 4, !tbaa !25
  %38 = icmp eq i32 %37, 6
  br i1 %38, label %39, label %49

39:                                               ; preds = %21
  %40 = getelementptr inbounds %"struct.spirv_cross::Compiler::CombinedImageSamplerUsageHandler", ptr %15, i32 0, i32 5
  store i8 1, ptr %40, align 8, !tbaa !47
  %41 = load ptr, ptr %10, 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 4
  %44 = load i8, ptr %43, align 2, !tbaa !48, !range !49, !noundef !50
  %45 = trunc i8 %44 to i1
  br i1 %45, label %46, label %48

46:                                               ; preds = %39
  %47 = getelementptr inbounds %"struct.spirv_cross::Compiler::CombinedImageSamplerUsageHandler", ptr %15, i32 0, i32 6
  store i8 1, ptr %47, align 1, !tbaa !51
  br label %48

48:                                               ; preds = %46, %39
  br label %49

49:                                               ; preds = %48, %21
  %50 = getelementptr inbounds %"struct.spirv_cross::Compiler::CombinedImageSamplerUsageHandler", ptr %15, i32 0, i32 2
  %51 = load ptr, ptr %50, align 8, !tbaa !52
  %52 = load ptr, ptr %8, align 8, !tbaa !5
  %53 = getelementptr inbounds i32, ptr %52, i64 1
  %54 = call noundef i64 @_ZNKSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE5countERKj(ptr noundef nonnull align 8 dereferenceable(56) %51, ptr noundef nonnull align 4 dereferenceable(4) %53)
  %55 = icmp ne i64 %54, 0
  br i1 %55, label %56, label %60

56:                                               ; preds = %49
  %57 = load ptr, ptr %8, align 8, !tbaa !5
  %58 = getelementptr inbounds i32, ptr %57, i64 1
  %59 = load i32, ptr %58, align 4, !tbaa !11
  call void @_ZN11spirv_cross8Compiler32CombinedImageSamplerUsageHandler31add_hierarchy_to_comparison_idsEj(ptr noundef nonnull align 8 dereferenceable(138) %15, i32 noundef %59)
  br label %60

60:                                               ; preds = %56, %49
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #2
  br label %90

61:                                               ; preds = %4
  %62 = load i32, ptr %9, align 4, !tbaa !11
  %63 = icmp ult i32 %62, 4
  br i1 %63, label %64, label %65

64:                                               ; preds = %61
  store i1 false, ptr %5, align 1
  br label %91

65:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #2
  %66 = load ptr, ptr %8, align 8, !tbaa !5
  %67 = getelementptr inbounds i32, ptr %66, i64 1
  %68 = load i32, ptr %67, align 4, !tbaa !11
  store i32 %68, ptr %11, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #2
  %69 = load ptr, ptr %8, align 8, !tbaa !5
  %70 = getelementptr inbounds i32, ptr %69, i64 2
  %71 = load i32, ptr %70, align 4, !tbaa !11
  store i32 %71, ptr %12, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #2
  %72 = load ptr, ptr %8, align 8, !tbaa !5
  %73 = getelementptr inbounds i32, ptr %72, i64 3
  %74 = load i32, ptr %73, align 4, !tbaa !11
  store i32 %74, ptr %13, align 4, !tbaa !11
  %75 = getelementptr inbounds %"struct.spirv_cross::Compiler::CombinedImageSamplerUsageHandler", ptr %15, i32 0, i32 2
  %76 = load ptr, ptr %75, align 8, !tbaa !52
  %77 = call noundef i64 @_ZNKSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE5countERKj(ptr noundef nonnull align 8 dereferenceable(56) %76, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %78 = icmp ne i64 %77, 0
  br i1 %78, label %79, label %88

79:                                               ; preds = %65
  %80 = load i32, ptr %12, align 4, !tbaa !11
  call void @_ZN11spirv_cross8Compiler32CombinedImageSamplerUsageHandler31add_hierarchy_to_comparison_idsEj(ptr noundef nonnull align 8 dereferenceable(138) %15, i32 noundef %80)
  %81 = load i32, ptr %13, align 4, !tbaa !11
  call void @_ZN11spirv_cross8Compiler32CombinedImageSamplerUsageHandler31add_hierarchy_to_comparison_idsEj(ptr noundef nonnull align 8 dereferenceable(138) %15, i32 noundef %81)
  %82 = getelementptr inbounds %"struct.spirv_cross::Compiler::CombinedImageSamplerUsageHandler", ptr %15, i32 0, i32 4
  %83 = call { ptr, i8 } @_ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE6insertERKj(ptr noundef nonnull align 8 dereferenceable(56) %82, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %84 = getelementptr inbounds { ptr, i8 }, ptr %14, i32 0, i32 0
  %85 = extractvalue { ptr, i8 } %83, 0
  store ptr %85, ptr %84, align 8
  %86 = getelementptr inbounds { ptr, i8 }, ptr %14, i32 0, i32 1
  %87 = extractvalue { ptr, i8 } %83, 1
  store i8 %87, ptr %86, align 8
  br label %88

88:                                               ; preds = %79, %65
  store i1 true, ptr %5, align 1
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #2
  br label %91

89:                                               ; preds = %4
  br label %90

90:                                               ; preds = %89, %60
  store i1 true, ptr %5, align 1
  br label %91

91:                                               ; preds = %90, %88, %64, %20
  %92 = load i1, ptr %5, align 1
  ret i1 %92
}

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

!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 = !{!"_ZTSN3spv2OpE", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !6, i64 8}
!14 = !{!"_ZTSN11spirv_cross8Compiler32CombinedImageSamplerUsageHandlerE", !15, i64 0, !6, i64 8, !6, i64 16, !16, i64 24, !22, i64 80, !24, i64 136, !24, i64 137}
!15 = !{!"_ZTSN11spirv_cross8Compiler13OpcodeHandlerE"}
!16 = !{!"_ZTSSt13unordered_mapIjSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEES2_S4_SaISt4pairIKjS6_EEE", !17, i64 0}
!17 = !{!"_ZTSSt10_HashtableIjSt4pairIKjSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEEESaIS9_ENSt8__detail10_Select1stES6_S4_NSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb0ELb0ELb1EEEE", !6, i64 0, !18, i64 8, !19, i64 16, !18, i64 24, !20, i64 32, !6, i64 48}
!18 = !{!"long", !7, i64 0}
!19 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!20 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !21, i64 0, !18, i64 8}
!21 = !{!"float", !7, i64 0}
!22 = !{!"_ZTSSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE", !23, i64 0}
!23 = !{!"_ZTSSt10_HashtableIjjSaIjENSt8__detail9_IdentityESt8equal_toIjESt4hashIjENS1_18_Mod_range_hashingENS1_20_Default_ranged_hashENS1_20_Prime_rehash_policyENS1_17_Hashtable_traitsILb0ELb1ELb1EEEE", !6, i64 0, !18, i64 8, !19, i64 16, !18, i64 24, !20, i64 32, !6, i64 48}
!24 = !{!"bool", !7, i64 0}
!25 = !{!26, !42, i64 252}
!26 = !{!"_ZTSN11spirv_cross8SPIRTypeE", !27, i64 0, !10, i64 12, !29, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !30, i64 32, !33, i64 88, !12, i64 120, !24, i64 124, !24, i64 125, !36, i64 128, !37, i64 136, !30, i64 192, !40, i64 248, !41, i64 272, !41, i64 276, !45, i64 280}
!27 = !{!"_ZTSN11spirv_cross8IVariantE", !28, i64 8}
!28 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE0EEE", !12, i64 0}
!29 = !{!"_ZTSN11spirv_cross8SPIRType8BaseTypeE", !7, i64 0}
!30 = !{!"_ZTSN11spirv_cross11SmallVectorIjLm8EEE", !31, i64 0, !18, i64 16, !32, i64 24}
!31 = !{!"_ZTSN11spirv_cross10VectorViewIjEE", !6, i64 0, !18, i64 8}
!32 = !{!"_ZTSN11spirv_cross13AlignedBufferIjLm8EEE", !7, i64 0}
!33 = !{!"_ZTSN11spirv_cross11SmallVectorIbLm8EEE", !34, i64 0, !18, i64 16, !35, i64 24}
!34 = !{!"_ZTSN11spirv_cross10VectorViewIbEE", !6, i64 0, !18, i64 8}
!35 = !{!"_ZTSN11spirv_cross13AlignedBufferIbLm8EEE", !7, i64 0}
!36 = !{!"_ZTSN3spv12StorageClassE", !7, i64 0}
!37 = !{!"_ZTSN11spirv_cross11SmallVectorINS_7TypedIDILNS_5TypesE1EEELm8EEE", !38, i64 0, !18, i64 16, !39, i64 24}
!38 = !{!"_ZTSN11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE1EEEEE", !6, i64 0, !18, i64 8}
!39 = !{!"_ZTSN11spirv_cross13AlignedBufferINS_7TypedIDILNS_5TypesE1EEELm8EEE", !7, i64 0}
!40 = !{!"_ZTSN11spirv_cross8SPIRType9ImageTypeE", !41, i64 0, !42, i64 4, !24, i64 8, !24, i64 9, !24, i64 10, !12, i64 12, !43, i64 16, !44, i64 20}
!41 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE1EEE", !12, i64 0}
!42 = !{!"_ZTSN3spv3DimE", !7, i64 0}
!43 = !{!"_ZTSN3spv11ImageFormatE", !7, i64 0}
!44 = !{!"_ZTSN3spv15AccessQualifierE", !7, i64 0}
!45 = !{!"_ZTSSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE", !46, i64 0}
!46 = !{!"_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, !18, i64 8, !19, i64 16, !18, i64 24, !20, i64 32, !6, i64 48}
!47 = !{!14, !24, i64 136}
!48 = !{!26, !24, i64 258}
!49 = !{i8 0, i8 2}
!50 = !{}
!51 = !{!14, !24, i64 137}
!52 = !{!14, !6, i64 16}


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

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

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

; Function Attrs: mustprogress uwtable
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 uwtable
declare dso_local { ptr, i8 } @_ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE6insertERKj(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local 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 uwtable
declare dso_local void @_ZN11spirv_cross8Compiler32CombinedImageSamplerUsageHandler14add_dependencyEjj(ptr noundef nonnull align 8 dereferenceable(138), i32 noundef, i32 noundef) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN11spirv_cross8Compiler32CombinedImageSamplerUsageHandler6handleEN3spv2OpEPKjj(ptr noundef nonnull align 8 dereferenceable(138) %0, i32 noundef %1, ptr noundef %2, i32 noundef %3) unnamed_addr #1 align 2 {
  %5 = alloca i32, align 4
  switch i32 %1, label %49 [
    i32 65, label %6
    i32 66, label %6
    i32 67, label %6
    i32 61, label %6
    i32 86, label %33
  ]

6:                                                ; preds = %4, %4, %4, %4
  %7 = icmp ult i32 %3, 3
  br i1 %7, label %49, label %8

8:                                                ; preds = %6
  %9 = getelementptr inbounds i8, ptr %2, i64 4
  %10 = load i32, ptr %9, align 4, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %2, i64 8
  %12 = load i32, ptr %11, align 4, !tbaa !5
  tail call void @_ZN11spirv_cross8Compiler32CombinedImageSamplerUsageHandler14add_dependencyEjj(ptr noundef nonnull align 8 dereferenceable(138) %0, i32 noundef %10, i32 noundef %12)
  %13 = getelementptr inbounds i8, ptr %0, i64 8
  %14 = load ptr, ptr %13, align 8, !tbaa !9
  %15 = load i32, ptr %2, align 4, !tbaa !5
  %16 = tail call noundef nonnull align 8 dereferenceable(336) ptr @_ZN11spirv_cross8Compiler3getINS_8SPIRTypeEEERT_j(ptr noundef nonnull align 8 dereferenceable(3176) %14, i32 noundef %15)
  %17 = getelementptr inbounds i8, ptr %16, i64 252
  %18 = load i32, ptr %17, align 4, !tbaa !22
  %19 = icmp eq i32 %18, 6
  br i1 %19, label %20, label %27

20:                                               ; preds = %8
  %21 = getelementptr inbounds i8, ptr %0, i64 136
  store i8 1, ptr %21, align 8, !tbaa !45
  %22 = getelementptr inbounds i8, ptr %16, i64 258
  %23 = load i8, ptr %22, align 2, !tbaa !46, !range !47, !noundef !48
  %24 = trunc nuw i8 %23 to i1
  br i1 %24, label %25, label %27

25:                                               ; preds = %20
  %26 = getelementptr inbounds i8, ptr %0, i64 137
  store i8 1, ptr %26, align 1, !tbaa !49
  br label %27

27:                                               ; preds = %20, %25, %8
  %28 = getelementptr inbounds i8, ptr %0, i64 16
  %29 = load ptr, ptr %28, align 8, !tbaa !50
  %30 = tail call noundef i64 @_ZNKSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE5countERKj(ptr noundef nonnull align 8 dereferenceable(56) %29, ptr noundef nonnull align 4 dereferenceable(4) %9)
  %.not16 = icmp eq i64 %30, 0
  br i1 %.not16, label %49, label %31

31:                                               ; preds = %27
  %32 = load i32, ptr %9, align 4, !tbaa !5
  tail call void @_ZN11spirv_cross8Compiler32CombinedImageSamplerUsageHandler31add_hierarchy_to_comparison_idsEj(ptr noundef nonnull align 8 dereferenceable(138) %0, i32 noundef %32)
  br label %49

33:                                               ; preds = %4
  %34 = icmp ult i32 %3, 4
  br i1 %34, label %49, label %35

35:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #2
  %36 = getelementptr inbounds i8, ptr %2, i64 4
  %37 = load i32, ptr %36, align 4, !tbaa !5
  store i32 %37, ptr %5, align 4, !tbaa !5
  %38 = getelementptr inbounds i8, ptr %2, i64 8
  %39 = load i32, ptr %38, align 4, !tbaa !5
  %40 = getelementptr inbounds i8, ptr %2, i64 12
  %41 = load i32, ptr %40, align 4, !tbaa !5
  %42 = getelementptr inbounds i8, ptr %0, i64 16
  %43 = load ptr, ptr %42, align 8, !tbaa !50
  %44 = call noundef i64 @_ZNKSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE5countERKj(ptr noundef nonnull align 8 dereferenceable(56) %43, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %.not = icmp eq i64 %44, 0
  br i1 %.not, label %48, label %45

45:                                               ; preds = %35
  call void @_ZN11spirv_cross8Compiler32CombinedImageSamplerUsageHandler31add_hierarchy_to_comparison_idsEj(ptr noundef nonnull align 8 dereferenceable(138) %0, i32 noundef %39)
  call void @_ZN11spirv_cross8Compiler32CombinedImageSamplerUsageHandler31add_hierarchy_to_comparison_idsEj(ptr noundef nonnull align 8 dereferenceable(138) %0, i32 noundef %41)
  %46 = getelementptr inbounds i8, ptr %0, i64 80
  %47 = call { ptr, i8 } @_ZNSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE6insertERKj(ptr noundef nonnull align 8 dereferenceable(56) %46, ptr noundef nonnull align 4 dereferenceable(4) %5)
  br label %48

48:                                               ; preds = %45, %35
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #2
  br label %49

49:                                               ; preds = %4, %31, %27, %33, %6, %48
  %.0 = phi i1 [ true, %48 ], [ false, %6 ], [ false, %33 ], [ true, %27 ], [ true, %31 ], [ true, %4 ]
  ret i1 %.0
}

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

!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, !12, i64 8}
!10 = !{!"_ZTSN11spirv_cross8Compiler32CombinedImageSamplerUsageHandlerE", !11, i64 0, !12, i64 8, !12, i64 16, !13, i64 24, !19, i64 80, !21, i64 136, !21, i64 137}
!11 = !{!"_ZTSN11spirv_cross8Compiler13OpcodeHandlerE"}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!"_ZTSSt13unordered_mapIjSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEES2_S4_SaISt4pairIKjS6_EEE", !14, i64 0}
!14 = !{!"_ZTSSt10_HashtableIjSt4pairIKjSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEEESaIS9_ENSt8__detail10_Select1stES6_S4_NSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb0ELb0ELb1EEEE", !12, i64 0, !15, i64 8, !16, i64 16, !15, i64 24, !17, i64 32, !12, i64 48}
!15 = !{!"long", !7, i64 0}
!16 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !12, i64 0}
!17 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !18, i64 0, !15, i64 8}
!18 = !{!"float", !7, i64 0}
!19 = !{!"_ZTSSt13unordered_setIjSt4hashIjESt8equal_toIjESaIjEE", !20, i64 0}
!20 = !{!"_ZTSSt10_HashtableIjjSaIjENSt8__detail9_IdentityESt8equal_toIjESt4hashIjENS1_18_Mod_range_hashingENS1_20_Default_ranged_hashENS1_20_Prime_rehash_policyENS1_17_Hashtable_traitsILb0ELb1ELb1EEEE", !12, i64 0, !15, i64 8, !16, i64 16, !15, i64 24, !17, i64 32, !12, i64 48}
!21 = !{!"bool", !7, i64 0}
!22 = !{!23, !40, i64 252}
!23 = !{!"_ZTSN11spirv_cross8SPIRTypeE", !24, i64 0, !26, i64 12, !27, i64 16, !6, i64 20, !6, i64 24, !6, i64 28, !28, i64 32, !31, i64 88, !6, i64 120, !21, i64 124, !21, i64 125, !34, i64 128, !35, i64 136, !28, i64 192, !38, i64 248, !39, i64 272, !39, i64 276, !43, i64 280}
!24 = !{!"_ZTSN11spirv_cross8IVariantE", !25, i64 8}
!25 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE0EEE", !6, i64 0}
!26 = !{!"_ZTSN3spv2OpE", !7, i64 0}
!27 = !{!"_ZTSN11spirv_cross8SPIRType8BaseTypeE", !7, i64 0}
!28 = !{!"_ZTSN11spirv_cross11SmallVectorIjLm8EEE", !29, i64 0, !15, i64 16, !30, i64 24}
!29 = !{!"_ZTSN11spirv_cross10VectorViewIjEE", !12, i64 0, !15, i64 8}
!30 = !{!"_ZTSN11spirv_cross13AlignedBufferIjLm8EEE", !7, i64 0}
!31 = !{!"_ZTSN11spirv_cross11SmallVectorIbLm8EEE", !32, i64 0, !15, i64 16, !33, i64 24}
!32 = !{!"_ZTSN11spirv_cross10VectorViewIbEE", !12, i64 0, !15, i64 8}
!33 = !{!"_ZTSN11spirv_cross13AlignedBufferIbLm8EEE", !7, i64 0}
!34 = !{!"_ZTSN3spv12StorageClassE", !7, i64 0}
!35 = !{!"_ZTSN11spirv_cross11SmallVectorINS_7TypedIDILNS_5TypesE1EEELm8EEE", !36, i64 0, !15, i64 16, !37, i64 24}
!36 = !{!"_ZTSN11spirv_cross10VectorViewINS_7TypedIDILNS_5TypesE1EEEEE", !12, i64 0, !15, i64 8}
!37 = !{!"_ZTSN11spirv_cross13AlignedBufferINS_7TypedIDILNS_5TypesE1EEELm8EEE", !7, i64 0}
!38 = !{!"_ZTSN11spirv_cross8SPIRType9ImageTypeE", !39, i64 0, !40, i64 4, !21, i64 8, !21, i64 9, !21, i64 10, !6, i64 12, !41, i64 16, !42, i64 20}
!39 = !{!"_ZTSN11spirv_cross7TypedIDILNS_5TypesE1EEE", !6, i64 0}
!40 = !{!"_ZTSN3spv3DimE", !7, i64 0}
!41 = !{!"_ZTSN3spv11ImageFormatE", !7, i64 0}
!42 = !{!"_ZTSN3spv15AccessQualifierE", !7, i64 0}
!43 = !{!"_ZTSSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE", !44, i64 0}
!44 = !{!"_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", !12, i64 0, !15, i64 8, !16, i64 16, !15, i64 24, !17, i64 32, !12, i64 48}
!45 = !{!10, !21, i64 136}
!46 = !{!23, !21, i64 258}
!47 = !{i8 0, i8 2}
!48 = !{}
!49 = !{!10, !21, i64 137}
!50 = !{!10, !12, i64 16}


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