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

; 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::nothrow_t" = type { i8 }
%"class.std::unique_ptr.235" = type { %"struct.std::__uniq_ptr_data.236" }
%"struct.std::__uniq_ptr_data.236" = type { %"class.std::__uniq_ptr_impl.237" }
%"class.std::__uniq_ptr_impl.237" = type { %"class.std::tuple.238" }
%"class.std::tuple.238" = type { %"struct.std::_Tuple_impl.239" }
%"struct.std::_Tuple_impl.239" = type { %"struct.std::_Head_base.242" }
%"struct.std::_Head_base.242" = type { ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }
%"struct.spirv_cross::ShaderResources" = type { %"class.spirv_cross::SmallVector.213", %"class.spirv_cross::SmallVector.213", %"class.spirv_cross::SmallVector.213", %"class.spirv_cross::SmallVector.213", %"class.spirv_cross::SmallVector.213", %"class.spirv_cross::SmallVector.213", %"class.spirv_cross::SmallVector.213", %"class.spirv_cross::SmallVector.213", %"class.spirv_cross::SmallVector.213", %"class.spirv_cross::SmallVector.213", %"class.spirv_cross::SmallVector.213", %"class.spirv_cross::SmallVector.213", %"class.spirv_cross::SmallVector.213", %"class.spirv_cross::SmallVector.213", %"class.spirv_cross::SmallVector.224", %"class.spirv_cross::SmallVector.224" }
%"class.spirv_cross::SmallVector.213" = type { %"class.spirv_cross::VectorView.214", i64, %"class.spirv_cross::AlignedBuffer.215" }
%"class.spirv_cross::VectorView.214" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.215" = type { [384 x i8] }
%"class.spirv_cross::SmallVector.224" = type { %"class.spirv_cross::VectorView.225", i64, %"class.spirv_cross::AlignedBuffer.226" }
%"class.spirv_cross::VectorView.225" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.226" = type { [448 x i8] }
%"class.std::unique_ptr.117" = type { %"struct.std::__uniq_ptr_data.118" }
%"struct.std::__uniq_ptr_data.118" = type { %"class.std::__uniq_ptr_impl.119" }
%"class.std::__uniq_ptr_impl.119" = type { %"class.std::tuple.120" }
%"class.std::tuple.120" = type { %"struct.std::_Tuple_impl.121" }
%"struct.std::_Tuple_impl.121" = type { %"struct.std::_Head_base.124" }
%"struct.std::_Head_base.124" = type { ptr }
%struct.spvc_compiler_s = type <{ %struct.ScratchMemoryAllocation, ptr, %"class.std::unique_ptr.133", i32, [4 x i8] }>
%struct.ScratchMemoryAllocation = type { ptr }
%"class.std::unique_ptr.133" = type { %"struct.std::__uniq_ptr_data.134" }
%"struct.std::__uniq_ptr_data.134" = type { %"class.std::__uniq_ptr_impl.135" }
%"class.std::__uniq_ptr_impl.135" = type { %"class.std::tuple.136" }
%"class.std::tuple.136" = type { %"struct.std::_Tuple_impl.137" }
%"struct.std::_Tuple_impl.137" = type { %"struct.std::_Head_base.140" }
%"struct.std::_Head_base.140" = type { ptr }
%struct.spvc_resources_s = type { %struct.ScratchMemoryAllocation, ptr, %"class.spirv_cross::SmallVector.218", %"class.spirv_cross::SmallVector.218", %"class.spirv_cross::SmallVector.218", %"class.spirv_cross::SmallVector.218", %"class.spirv_cross::SmallVector.218", %"class.spirv_cross::SmallVector.218", %"class.spirv_cross::SmallVector.218", %"class.spirv_cross::SmallVector.218", %"class.spirv_cross::SmallVector.218", %"class.spirv_cross::SmallVector.218", %"class.spirv_cross::SmallVector.218", %"class.spirv_cross::SmallVector.218", %"class.spirv_cross::SmallVector.218", %"class.spirv_cross::SmallVector.218", %"class.spirv_cross::SmallVector.221", %"class.spirv_cross::SmallVector.221" }
%"class.spirv_cross::SmallVector.218" = type { %"class.spirv_cross::VectorView.219", i64, %"class.spirv_cross::AlignedBuffer.220" }
%"class.spirv_cross::VectorView.219" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.220" = type { [192 x i8] }
%"class.spirv_cross::SmallVector.221" = type { %"class.spirv_cross::VectorView.222", i64, %"class.spirv_cross::AlignedBuffer.223" }
%"class.spirv_cross::VectorView.222" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.223" = type { [256 x i8] }
%struct.spvc_set_s = type { %struct.ScratchMemoryAllocation, %"class.std::unordered_set.141" }
%"class.std::unordered_set.141" = type { %"class.std::_Hashtable.142" }
%"class.std::_Hashtable.142" = 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.spvc_context_s = type { %"class.std::__cxx11::basic_string", %"class.spirv_cross::SmallVector", ptr, ptr }
%"class.spirv_cross::SmallVector" = type { %"class.spirv_cross::VectorView", i64, %"class.spirv_cross::AlignedBuffer" }
%"class.spirv_cross::VectorView" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer" = type { [64 x i8] }

@_ZTISt9exception = external constant ptr
@_ZSt7nothrow = external global %"struct.std::nothrow_t", align 1
@.str = external hidden unnamed_addr constant [15 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN14spvc_context_s12report_errorENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(136), ptr noundef) #0 align 2

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #2

declare ptr @__cxa_begin_catch(ptr)

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

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

declare void @__cxa_end_catch()

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) #4

; Function Attrs: nobuiltin nounwind allocsize(0)
declare noalias noundef ptr @_ZnwmRKSt9nothrow_t(i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11spirv_cross11SmallVectorISt10unique_ptrI23ScratchMemoryAllocationSt14default_deleteIS2_EELm8EE9push_backEOS5_(ptr noundef nonnull align 8 dereferenceable(88), ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN16spvc_resources_s14copy_resourcesERKN11spirv_cross15ShaderResourcesE(ptr noundef nonnull align 8 dereferenceable(3600), ptr noundef nonnull align 8 dereferenceable(6656)) #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local i32 @spvc_compiler_create_shader_resources_for_active_variables(ptr noundef %0, ptr noundef %1, ptr noundef %2) #0 personality ptr @__gxx_personality_v0 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %"class.std::unique_ptr.235", align 8
  %9 = alloca i1, align 1
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::allocator", align 1
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %"struct.spirv_cross::ShaderResources", align 8
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca %"class.std::allocator", align 1
  %18 = alloca %"class.std::unique_ptr.117", align 8
  %19 = alloca ptr, align 8
  %20 = alloca %"class.std::__cxx11::basic_string", align 8
  %21 = alloca %"class.std::allocator", align 1
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  %22 = call noalias noundef ptr @_ZnwmRKSt9nothrow_t(i64 noundef 3600, ptr noundef nonnull align 1 dereferenceable(1) @_ZSt7nothrow) #9
  %23 = icmp eq ptr %22, null
  store i1 false, ptr %9, align 1
  br i1 %23, label %25, label %24

24:                                               ; preds = %3
  store i1 true, ptr %9, align 1
  call void @_ZN16spvc_resources_sC2Ev(ptr noundef nonnull align 8 dereferenceable(3600) %22) #8
  br label %25

25:                                               ; preds = %24, %3
  %26 = phi ptr [ %22, %24 ], [ null, %3 ]
  call void @_ZNSt10unique_ptrI16spvc_resources_sSt14default_deleteIS0_EEC2IS2_vEEPS0_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef %26) #8
  %27 = call noundef zeroext i1 @_ZNKSt10unique_ptrI16spvc_resources_sSt14default_deleteIS0_EEcvbEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  br i1 %27, label %43, label %28

28:                                               ; preds = %25
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.spvc_compiler_s, ptr %29, i32 0, i32 1
  %31 = load ptr, ptr %30, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef @.str, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %32 unwind label %34

32:                                               ; preds = %28
  invoke void @_ZN14spvc_context_s12report_errorENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(136) %31, ptr noundef %10)
          to label %33 unwind label %38

33:                                               ; preds = %32
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #8
  store i32 -3, ptr %4, align 4
  store i32 1, ptr %14, align 4
  br label %89

34:                                               ; preds = %28
  %35 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %36 = extractvalue { ptr, i32 } %35, 0
  store ptr %36, ptr %12, align 8
  %37 = extractvalue { ptr, i32 } %35, 1
  store i32 %37, ptr %13, align 4
  br label %42

38:                                               ; preds = %32
  %39 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %12, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %13, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #8
  br label %42

42:                                               ; preds = %38, %34
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #8
  br label %94

43:                                               ; preds = %25
  %44 = load ptr, ptr %5, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.spvc_compiler_s, ptr %44, i32 0, i32 1
  %46 = load ptr, ptr %45, align 8, !tbaa !9
  %47 = call noundef ptr @_ZNKSt10unique_ptrI16spvc_resources_sSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  %48 = getelementptr inbounds %struct.spvc_resources_s, ptr %47, i32 0, i32 1
  store ptr %46, ptr %48, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 6656, ptr %15) #8
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.spvc_compiler_s, ptr %49, i32 0, i32 2
  %51 = call noundef ptr @_ZNKSt10unique_ptrIN11spirv_cross8CompilerESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %50) #8
  %52 = load ptr, ptr %7, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.spvc_set_s, ptr %52, i32 0, i32 1
  invoke void @_ZNK11spirv_cross8Compiler20get_shader_resourcesERKSt13unordered_setINS_7TypedIDILNS_5TypesE2EEESt4hashIS4_ESt8equal_toIS4_ESaIS4_EE(ptr dead_on_unwind writable sret(%"struct.spirv_cross::ShaderResources") align 8 %15, ptr noundef nonnull align 8 dereferenceable(3176) %51, ptr noundef nonnull align 8 dereferenceable(56) %53)
          to label %54 unwind label %64

54:                                               ; preds = %43
  %55 = call noundef ptr @_ZNKSt10unique_ptrI16spvc_resources_sSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  %56 = invoke noundef zeroext i1 @_ZN16spvc_resources_s14copy_resourcesERKN11spirv_cross15ShaderResourcesE(ptr noundef nonnull align 8 dereferenceable(3600) %55, ptr noundef nonnull align 8 dereferenceable(6656) %15)
          to label %57 unwind label %68

57:                                               ; preds = %54
  br i1 %56, label %81, label %58

58:                                               ; preds = %57
  %59 = call noundef ptr @_ZNKSt10unique_ptrI16spvc_resources_sSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  %60 = getelementptr inbounds %struct.spvc_resources_s, ptr %59, i32 0, i32 1
  %61 = load ptr, ptr %60, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef @.str, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %62 unwind label %72

62:                                               ; preds = %58
  invoke void @_ZN14spvc_context_s12report_errorENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(136) %61, ptr noundef %16)
          to label %63 unwind label %76

63:                                               ; preds = %62
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #8
  store i32 -3, ptr %4, align 4
  store i32 1, ptr %14, align 4
  br label %88

64:                                               ; preds = %43
  %65 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %12, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %13, align 4
  br label %93

68:                                               ; preds = %54
  %69 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %12, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %13, align 4
  br label %92

72:                                               ; preds = %58
  %73 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %12, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %13, align 4
  br label %80

76:                                               ; preds = %62
  %77 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %12, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %13, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #8
  br label %80

80:                                               ; preds = %76, %72
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #8
  br label %92

81:                                               ; preds = %57
  %82 = call noundef ptr @_ZNKSt10unique_ptrI16spvc_resources_sSt14default_deleteIS0_EE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  %83 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %82, ptr %83, align 8, !tbaa !5
  %84 = load ptr, ptr %5, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.spvc_compiler_s, ptr %84, i32 0, i32 1
  %86 = load ptr, ptr %85, align 8, !tbaa !9
  %87 = getelementptr inbounds %struct.spvc_context_s, ptr %86, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  call void @_ZNSt10unique_ptrI23ScratchMemoryAllocationSt14default_deleteIS0_EEC2I16spvc_resources_sS1_IS5_EvEEOS_IT_T0_E(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  call void @_ZN11spirv_cross11SmallVectorISt10unique_ptrI23ScratchMemoryAllocationSt14default_deleteIS2_EELm8EE9push_backEOS5_(ptr noundef nonnull align 8 dereferenceable(88) %87, ptr noundef nonnull align 8 dereferenceable(8) %18) #8
  call void @_ZNSt10unique_ptrI23ScratchMemoryAllocationSt14default_deleteIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  store i32 0, ptr %14, align 4
  br label %88

88:                                               ; preds = %81, %63
  call void @_ZN11spirv_cross15ShaderResourcesD2Ev(ptr noundef nonnull align 8 dereferenceable(6656) %15) #8
  call void @llvm.lifetime.end.p0(i64 6656, ptr %15) #8
  br label %89

89:                                               ; preds = %88, %33
  call void @_ZNSt10unique_ptrI16spvc_resources_sSt14default_deleteIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  %90 = load i32, ptr %14, align 4
  switch i32 %90, label %133 [
    i32 0, label %91
    i32 1, label %123
  ]

91:                                               ; preds = %89
  br label %122

92:                                               ; preds = %80, %68
  call void @_ZN11spirv_cross15ShaderResourcesD2Ev(ptr noundef nonnull align 8 dereferenceable(6656) %15) #8
  br label %93

93:                                               ; preds = %92, %64
  call void @llvm.lifetime.end.p0(i64 6656, ptr %15) #8
  br label %94

94:                                               ; preds = %93, %42
  call void @_ZNSt10unique_ptrI16spvc_resources_sSt14default_deleteIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  br label %95

95:                                               ; preds = %94
  %96 = load i32, ptr %13, align 4
  %97 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTISt9exception) #8
  %98 = icmp eq i32 %96, %97
  br i1 %98, label %99, label %125

99:                                               ; preds = %95
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %100 = load ptr, ptr %12, align 8
  %101 = call ptr @__cxa_begin_catch(ptr %100) #8
  store ptr %101, ptr %19, align 8
  %102 = load ptr, ptr %5, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.spvc_compiler_s, ptr %102, i32 0, i32 1
  %104 = load ptr, ptr %103, align 8, !tbaa !9
  %105 = load ptr, ptr %19, align 8, !tbaa !5
  %106 = load ptr, ptr %105, align 8, !tbaa !28
  %107 = getelementptr inbounds ptr, ptr %106, i64 2
  %108 = load ptr, ptr %107, align 8
  %109 = call noundef ptr %108(ptr noundef nonnull align 8 dereferenceable(8) %105) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef %109, ptr noundef nonnull align 1 dereferenceable(1) %21)
          to label %110 unwind label %112

110:                                              ; preds = %99
  invoke void @_ZN14spvc_context_s12report_errorENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(136) %104, ptr noundef %20)
          to label %111 unwind label %116

111:                                              ; preds = %110
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #8
  store i32 -3, ptr %4, align 4
  store i32 1, ptr %14, align 4
  call void @__cxa_end_catch()
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  br label %123

112:                                              ; preds = %99
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %12, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %13, align 4
  br label %120

116:                                              ; preds = %110
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %12, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %13, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #8
  br label %120

120:                                              ; preds = %116, %112
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #8
  invoke void @__cxa_end_catch()
          to label %121 unwind label %130

121:                                              ; preds = %120
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  br label %125

122:                                              ; preds = %91
  store i32 0, ptr %4, align 4
  br label %123

123:                                              ; preds = %122, %111, %89
  %124 = load i32, ptr %4, align 4
  ret i32 %124

125:                                              ; preds = %121, %95
  %126 = load ptr, ptr %12, align 8
  %127 = load i32, ptr %13, align 4
  %128 = insertvalue { ptr, i32 } poison, ptr %126, 0
  %129 = insertvalue { ptr, i32 } %128, i32 %127, 1
  resume { ptr, i32 } %129

130:                                              ; preds = %120
  %131 = landingpad { ptr, i32 }
          catch ptr null
  %132 = extractvalue { ptr, i32 } %131, 0
  call void @__clang_call_terminate(ptr %132) #10
  unreachable

133:                                              ; preds = %89
  unreachable
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN16spvc_resources_sC2Ev(ptr noundef nonnull align 8 dereferenceable(3600)) unnamed_addr #6 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt10unique_ptrI16spvc_resources_sSt14default_deleteIS0_EEcvbEv(ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

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

declare void @_ZNK11spirv_cross8Compiler20get_shader_resourcesERKSt13unordered_setINS_7TypedIDILNS_5TypesE2EEESt4hashIS4_ESt8equal_toIS4_ESaIS4_EE(ptr dead_on_unwind writable sret(%"struct.spirv_cross::ShaderResources") align 8, ptr noundef nonnull align 8 dereferenceable(3176), ptr noundef nonnull align 8 dereferenceable(56)) #7

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN11spirv_cross15ShaderResourcesD2Ev(ptr noundef nonnull align 8 dereferenceable(6656)) unnamed_addr #6 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 8}
!10 = !{!"_ZTS15spvc_compiler_s", !11, i64 0, !6, i64 8, !12, i64 16, !18, i64 24}
!11 = !{!"_ZTS23ScratchMemoryAllocation"}
!12 = !{!"_ZTSSt10unique_ptrIN11spirv_cross8CompilerESt14default_deleteIS1_EE", !13, i64 0}
!13 = !{!"_ZTSSt15__uniq_ptr_dataIN11spirv_cross8CompilerESt14default_deleteIS1_ELb1ELb1EE", !14, i64 0}
!14 = !{!"_ZTSSt15__uniq_ptr_implIN11spirv_cross8CompilerESt14default_deleteIS1_EE", !15, i64 0}
!15 = !{!"_ZTSSt5tupleIJPN11spirv_cross8CompilerESt14default_deleteIS1_EEE", !16, i64 0}
!16 = !{!"_ZTSSt11_Tuple_implILm0EJPN11spirv_cross8CompilerESt14default_deleteIS1_EEE", !17, i64 0}
!17 = !{!"_ZTSSt10_Head_baseILm0EPN11spirv_cross8CompilerELb0EE", !6, i64 0}
!18 = !{!"_ZTS12spvc_backend", !7, i64 0}
!19 = !{!20, !6, i64 8}
!20 = !{!"_ZTS16spvc_resources_s", !11, i64 0, !6, i64 8, !21, i64 16, !21, i64 232, !21, i64 448, !21, i64 664, !21, i64 880, !21, i64 1096, !21, i64 1312, !21, i64 1528, !21, i64 1744, !21, i64 1960, !21, i64 2176, !21, i64 2392, !21, i64 2608, !21, i64 2824, !25, i64 3040, !25, i64 3320}
!21 = !{!"_ZTSN11spirv_cross11SmallVectorI23spvc_reflected_resourceLm8EEE", !22, i64 0, !23, i64 16, !24, i64 24}
!22 = !{!"_ZTSN11spirv_cross10VectorViewI23spvc_reflected_resourceEE", !6, i64 0, !23, i64 8}
!23 = !{!"long", !7, i64 0}
!24 = !{!"_ZTSN11spirv_cross13AlignedBufferI23spvc_reflected_resourceLm8EEE", !7, i64 0}
!25 = !{!"_ZTSN11spirv_cross11SmallVectorI31spvc_reflected_builtin_resourceLm8EEE", !26, i64 0, !23, i64 16, !27, i64 24}
!26 = !{!"_ZTSN11spirv_cross10VectorViewI31spvc_reflected_builtin_resourceEE", !6, i64 0, !23, i64 8}
!27 = !{!"_ZTSN11spirv_cross13AlignedBufferI31spvc_reflected_builtin_resourceLm8EEE", !7, i64 0}
!28 = !{!29, !29, i64 0}
!29 = !{!"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"

%"struct.std::nothrow_t" = type { i8 }
%"class.std::unique_ptr.235" = type { %"struct.std::__uniq_ptr_data.236" }
%"struct.std::__uniq_ptr_data.236" = type { %"class.std::__uniq_ptr_impl.237" }
%"class.std::__uniq_ptr_impl.237" = type { %"class.std::tuple.238" }
%"class.std::tuple.238" = type { %"struct.std::_Tuple_impl.239" }
%"struct.std::_Tuple_impl.239" = type { %"struct.std::_Head_base.242" }
%"struct.std::_Head_base.242" = type { ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator" = type { i8 }
%"struct.spirv_cross::ShaderResources" = type { %"class.spirv_cross::SmallVector.213", %"class.spirv_cross::SmallVector.213", %"class.spirv_cross::SmallVector.213", %"class.spirv_cross::SmallVector.213", %"class.spirv_cross::SmallVector.213", %"class.spirv_cross::SmallVector.213", %"class.spirv_cross::SmallVector.213", %"class.spirv_cross::SmallVector.213", %"class.spirv_cross::SmallVector.213", %"class.spirv_cross::SmallVector.213", %"class.spirv_cross::SmallVector.213", %"class.spirv_cross::SmallVector.213", %"class.spirv_cross::SmallVector.213", %"class.spirv_cross::SmallVector.213", %"class.spirv_cross::SmallVector.224", %"class.spirv_cross::SmallVector.224" }
%"class.spirv_cross::SmallVector.213" = type { %"class.spirv_cross::VectorView.214", i64, %"class.spirv_cross::AlignedBuffer.215" }
%"class.spirv_cross::VectorView.214" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.215" = type { [384 x i8] }
%"class.spirv_cross::SmallVector.224" = type { %"class.spirv_cross::VectorView.225", i64, %"class.spirv_cross::AlignedBuffer.226" }
%"class.spirv_cross::VectorView.225" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.226" = type { [448 x i8] }
%"class.std::unique_ptr.117" = type { %"struct.std::__uniq_ptr_data.118" }
%"struct.std::__uniq_ptr_data.118" = type { %"class.std::__uniq_ptr_impl.119" }
%"class.std::__uniq_ptr_impl.119" = type { %"class.std::tuple.120" }
%"class.std::tuple.120" = type { %"struct.std::_Tuple_impl.121" }
%"struct.std::_Tuple_impl.121" = type { %"struct.std::_Head_base.124" }
%"struct.std::_Head_base.124" = type { ptr }

@_ZTISt9exception = external constant ptr
@_ZSt7nothrow = external global %"struct.std::nothrow_t", align 1
@.str = external hidden unnamed_addr constant [15 x i8], align 1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN14spvc_context_s12report_errorENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(136), ptr noundef) local_unnamed_addr #0 align 2

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: nofree nosync nounwind memory(none)
declare i32 @llvm.eh.typeid.for.p0(ptr) #2

declare ptr @__cxa_begin_catch(ptr) local_unnamed_addr

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

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

declare void @__cxa_end_catch() local_unnamed_addr

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) local_unnamed_addr #4

; Function Attrs: nobuiltin nounwind allocsize(0)
declare noalias noundef ptr @_ZnwmRKSt9nothrow_t(i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11spirv_cross11SmallVectorISt10unique_ptrI23ScratchMemoryAllocationSt14default_deleteIS2_EELm8EE9push_backEOS5_(ptr noundef nonnull align 8 dereferenceable(88), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN16spvc_resources_s14copy_resourcesERKN11spirv_cross15ShaderResourcesE(ptr noundef nonnull align 8 dereferenceable(3600), ptr noundef nonnull align 8 dereferenceable(6656)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local range(i32 -3, 1) i32 @spvc_compiler_create_shader_resources_for_active_variables(ptr noundef %0, ptr nocapture noundef writeonly %1, ptr noundef %2) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.std::unique_ptr.235", align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::allocator", align 1
  %7 = alloca %"struct.spirv_cross::ShaderResources", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::allocator", align 1
  %10 = alloca %"class.std::unique_ptr.117", align 8
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::allocator", align 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  %13 = tail call noalias noundef dereferenceable_or_null(3600) ptr @_ZnwmRKSt9nothrow_t(i64 noundef 3600, ptr noundef nonnull align 1 dereferenceable(1) @_ZSt7nothrow) #9
  %14 = icmp eq ptr %13, null
  br i1 %14, label %16, label %15

15:                                               ; preds = %3
  tail call void @_ZN16spvc_resources_sC2Ev(ptr noundef nonnull align 8 dereferenceable(3600) %13) #8
  br label %16

16:                                               ; preds = %15, %3
  call void @_ZNSt10unique_ptrI16spvc_resources_sSt14default_deleteIS0_EEC2IS2_vEEPS0_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef %13) #8
  %17 = call noundef zeroext i1 @_ZNKSt10unique_ptrI16spvc_resources_sSt14default_deleteIS0_EEcvbEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  %18 = getelementptr inbounds i8, ptr %0, i64 8
  %19 = load ptr, ptr %18, align 8, !tbaa !5
  br i1 %17, label %27, label %20

20:                                               ; preds = %16
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull @.str, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %21 unwind label %22

21:                                               ; preds = %20
  invoke void @_ZN14spvc_context_s12report_errorENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(136) %19, ptr noundef nonnull %5)
          to label %.thread unwind label %24

.thread:                                          ; preds = %21
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #8
  call void @_ZNSt10unique_ptrI16spvc_resources_sSt14default_deleteIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  br label %77

22:                                               ; preds = %20
  %23 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  br label %26

24:                                               ; preds = %21
  %25 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #8
  br label %26

26:                                               ; preds = %24, %22
  %.pn = phi { ptr, i32 } [ %25, %24 ], [ %23, %22 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #8
  br label %59

27:                                               ; preds = %16
  %28 = call noundef ptr @_ZNKSt10unique_ptrI16spvc_resources_sSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  %29 = getelementptr inbounds i8, ptr %28, i64 8
  store ptr %19, ptr %29, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 6656, ptr nonnull %7) #8
  %30 = getelementptr inbounds i8, ptr %0, i64 16
  %31 = call noundef ptr @_ZNKSt10unique_ptrIN11spirv_cross8CompilerESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %30) #8
  %32 = getelementptr inbounds i8, ptr %2, i64 8
  invoke void @_ZNK11spirv_cross8Compiler20get_shader_resourcesERKSt13unordered_setINS_7TypedIDILNS_5TypesE2EEESt4hashIS4_ESt8equal_toIS4_ESaIS4_EE(ptr dead_on_unwind nonnull writable sret(%"struct.spirv_cross::ShaderResources") align 8 %7, ptr noundef nonnull align 8 dereferenceable(3176) %31, ptr noundef nonnull align 8 dereferenceable(56) %32)
          to label %33 unwind label %43

33:                                               ; preds = %27
  %34 = call noundef ptr @_ZNKSt10unique_ptrI16spvc_resources_sSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  %35 = invoke noundef zeroext i1 @_ZN16spvc_resources_s14copy_resourcesERKN11spirv_cross15ShaderResourcesE(ptr noundef nonnull align 8 dereferenceable(3600) %34, ptr noundef nonnull align 8 dereferenceable(6656) %7)
          to label %36 unwind label %45

36:                                               ; preds = %33
  br i1 %35, label %52, label %37

37:                                               ; preds = %36
  %38 = call noundef ptr @_ZNKSt10unique_ptrI16spvc_resources_sSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  %39 = getelementptr inbounds i8, ptr %38, i64 8
  %40 = load ptr, ptr %39, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull @.str, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %41 unwind label %47

41:                                               ; preds = %37
  invoke void @_ZN14spvc_context_s12report_errorENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(136) %40, ptr noundef nonnull %8)
          to label %42 unwind label %49

42:                                               ; preds = %41
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #8
  br label %56

43:                                               ; preds = %27
  %44 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  br label %58

45:                                               ; preds = %33
  %46 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  br label %57

47:                                               ; preds = %37
  %48 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  br label %51

49:                                               ; preds = %41
  %50 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #8
  br label %51

51:                                               ; preds = %49, %47
  %.pn26 = phi { ptr, i32 } [ %50, %49 ], [ %48, %47 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #8
  br label %57

52:                                               ; preds = %36
  %53 = call noundef ptr @_ZNKSt10unique_ptrI16spvc_resources_sSt14default_deleteIS0_EE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  store ptr %53, ptr %1, align 8, !tbaa !27
  %54 = load ptr, ptr %18, align 8, !tbaa !5
  %55 = getelementptr inbounds i8, ptr %54, i64 32
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #8
  call void @_ZNSt10unique_ptrI23ScratchMemoryAllocationSt14default_deleteIS0_EEC2I16spvc_resources_sS1_IS5_EvEEOS_IT_T0_E(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  call void @_ZN11spirv_cross11SmallVectorISt10unique_ptrI23ScratchMemoryAllocationSt14default_deleteIS2_EELm8EE9push_backEOS5_(ptr noundef nonnull align 8 dereferenceable(88) %55, ptr noundef nonnull align 8 dereferenceable(8) %10) #8
  call void @_ZNSt10unique_ptrI23ScratchMemoryAllocationSt14default_deleteIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #8
  br label %56

56:                                               ; preds = %42, %52
  %spec.select = phi i32 [ 0, %52 ], [ -3, %42 ]
  call void @_ZN11spirv_cross15ShaderResourcesD2Ev(ptr noundef nonnull align 8 dereferenceable(6656) %7) #8
  call void @llvm.lifetime.end.p0(i64 6656, ptr nonnull %7) #8
  call void @_ZNSt10unique_ptrI16spvc_resources_sSt14default_deleteIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  br label %77

57:                                               ; preds = %51, %45
  %.pn26.pn = phi { ptr, i32 } [ %.pn26, %51 ], [ %46, %45 ]
  call void @_ZN11spirv_cross15ShaderResourcesD2Ev(ptr noundef nonnull align 8 dereferenceable(6656) %7) #8
  br label %58

58:                                               ; preds = %57, %43
  %.pn26.pn.pn = phi { ptr, i32 } [ %.pn26.pn, %57 ], [ %44, %43 ]
  call void @llvm.lifetime.end.p0(i64 6656, ptr nonnull %7) #8
  br label %59

59:                                               ; preds = %58, %26
  %.pn26.pn.pn.pn = phi { ptr, i32 } [ %.pn26.pn.pn, %58 ], [ %.pn, %26 ]
  %.4 = extractvalue { ptr, i32 } %.pn26.pn.pn.pn, 1
  call void @_ZNSt10unique_ptrI16spvc_resources_sSt14default_deleteIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  %60 = call i32 @llvm.eh.typeid.for.p0(ptr nonnull @_ZTISt9exception) #8
  %61 = icmp eq i32 %.4, %60
  br i1 %61, label %62, label %78

62:                                               ; preds = %59
  %.422 = extractvalue { ptr, i32 } %.pn26.pn.pn.pn, 0
  %63 = call ptr @__cxa_begin_catch(ptr %.422) #8
  %64 = getelementptr inbounds i8, ptr %0, i64 8
  %65 = load ptr, ptr %64, align 8, !tbaa !5
  %66 = load ptr, ptr %63, align 8, !tbaa !28
  %67 = getelementptr inbounds i8, ptr %66, i64 16
  %68 = load ptr, ptr %67, align 8
  %69 = call noundef ptr %68(ptr noundef nonnull align 8 dereferenceable(8) %63) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef %69, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %70 unwind label %72

70:                                               ; preds = %62
  invoke void @_ZN14spvc_context_s12report_errorENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(136) %65, ptr noundef nonnull %11)
          to label %71 unwind label %74

71:                                               ; preds = %70
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #8
  call void @__cxa_end_catch()
  br label %77

72:                                               ; preds = %62
  %73 = landingpad { ptr, i32 }
          cleanup
  br label %76

74:                                               ; preds = %70
  %75 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #8
  br label %76

76:                                               ; preds = %74, %72
  %.pn31 = phi { ptr, i32 } [ %75, %74 ], [ %73, %72 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #8
  invoke void @__cxa_end_catch()
          to label %78 unwind label %79

77:                                               ; preds = %56, %.thread, %71
  %.2 = phi i32 [ -3, %71 ], [ -3, %.thread ], [ %spec.select, %56 ]
  ret i32 %.2

78:                                               ; preds = %76, %59
  %.merged = phi { ptr, i32 } [ %.pn26.pn.pn.pn, %59 ], [ %.pn31, %76 ]
  resume { ptr, i32 } %.merged

79:                                               ; preds = %76
  %80 = landingpad { ptr, i32 }
          catch ptr null
  %81 = extractvalue { ptr, i32 } %80, 0
  call void @__clang_call_terminate(ptr %81) #10
  unreachable
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN16spvc_resources_sC2Ev(ptr noundef nonnull align 8 dereferenceable(3600)) unnamed_addr #6 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt10unique_ptrI16spvc_resources_sSt14default_deleteIS0_EEcvbEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

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

declare void @_ZNK11spirv_cross8Compiler20get_shader_resourcesERKSt13unordered_setINS_7TypedIDILNS_5TypesE2EEESt4hashIS4_ESt8equal_toIS4_ESaIS4_EE(ptr dead_on_unwind writable sret(%"struct.spirv_cross::ShaderResources") align 8, ptr noundef nonnull align 8 dereferenceable(3176), ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #7

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN11spirv_cross15ShaderResourcesD2Ev(ptr noundef nonnull align 8 dereferenceable(6656)) unnamed_addr #6 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #3 align 2

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !8, i64 8}
!6 = !{!"_ZTS15spvc_compiler_s", !7, i64 0, !8, i64 8, !11, i64 16, !17, i64 24}
!7 = !{!"_ZTS23ScratchMemoryAllocation"}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"_ZTSSt10unique_ptrIN11spirv_cross8CompilerESt14default_deleteIS1_EE", !12, i64 0}
!12 = !{!"_ZTSSt15__uniq_ptr_dataIN11spirv_cross8CompilerESt14default_deleteIS1_ELb1ELb1EE", !13, i64 0}
!13 = !{!"_ZTSSt15__uniq_ptr_implIN11spirv_cross8CompilerESt14default_deleteIS1_EE", !14, i64 0}
!14 = !{!"_ZTSSt5tupleIJPN11spirv_cross8CompilerESt14default_deleteIS1_EEE", !15, i64 0}
!15 = !{!"_ZTSSt11_Tuple_implILm0EJPN11spirv_cross8CompilerESt14default_deleteIS1_EEE", !16, i64 0}
!16 = !{!"_ZTSSt10_Head_baseILm0EPN11spirv_cross8CompilerELb0EE", !8, i64 0}
!17 = !{!"_ZTS12spvc_backend", !9, i64 0}
!18 = !{!19, !8, i64 8}
!19 = !{!"_ZTS16spvc_resources_s", !7, i64 0, !8, i64 8, !20, i64 16, !20, i64 232, !20, i64 448, !20, i64 664, !20, i64 880, !20, i64 1096, !20, i64 1312, !20, i64 1528, !20, i64 1744, !20, i64 1960, !20, i64 2176, !20, i64 2392, !20, i64 2608, !20, i64 2824, !24, i64 3040, !24, i64 3320}
!20 = !{!"_ZTSN11spirv_cross11SmallVectorI23spvc_reflected_resourceLm8EEE", !21, i64 0, !22, i64 16, !23, i64 24}
!21 = !{!"_ZTSN11spirv_cross10VectorViewI23spvc_reflected_resourceEE", !8, i64 0, !22, i64 8}
!22 = !{!"long", !9, i64 0}
!23 = !{!"_ZTSN11spirv_cross13AlignedBufferI23spvc_reflected_resourceLm8EEE", !9, i64 0}
!24 = !{!"_ZTSN11spirv_cross11SmallVectorI31spvc_reflected_builtin_resourceLm8EEE", !25, i64 0, !22, i64 16, !26, i64 24}
!25 = !{!"_ZTSN11spirv_cross10VectorViewI31spvc_reflected_builtin_resourceEE", !8, i64 0, !22, i64 8}
!26 = !{!"_ZTSN11spirv_cross13AlignedBufferI31spvc_reflected_builtin_resourceLm8EEE", !9, i64 0}
!27 = !{!8, !8, i64 0}
!28 = !{!29, !29, i64 0}
!29 = !{!"vtable pointer", !10, i64 0}


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