; 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_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: 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

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

22:                                               ; preds = %2
  store i1 true, ptr %7, align 1
  call void @_ZN16spvc_resources_sC2Ev(ptr noundef nonnull align 8 dereferenceable(3600) %20) #8
  br label %23

23:                                               ; preds = %22, %2
  %24 = phi ptr [ %20, %22 ], [ null, %2 ]
  call void @_ZNSt10unique_ptrI16spvc_resources_sSt14default_deleteIS0_EEC2IS2_vEEPS0_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef %24) #8
  %25 = call noundef zeroext i1 @_ZNKSt10unique_ptrI16spvc_resources_sSt14default_deleteIS0_EEcvbEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  br i1 %25, label %41, label %26

26:                                               ; preds = %23
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.spvc_compiler_s, ptr %27, i32 0, i32 1
  %29 = load ptr, ptr %28, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %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 @.str, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %30 unwind label %32

30:                                               ; preds = %26
  invoke void @_ZN14spvc_context_s12report_errorENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(136) %29, ptr noundef %8)
          to label %31 unwind label %36

31:                                               ; preds = %30
  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 %9) #8
  store i32 -3, ptr %3, align 4
  store i32 1, ptr %12, align 4
  br label %85

32:                                               ; preds = %26
  %33 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %34 = extractvalue { ptr, i32 } %33, 0
  store ptr %34, ptr %10, align 8
  %35 = extractvalue { ptr, i32 } %33, 1
  store i32 %35, ptr %11, align 4
  br label %40

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

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

41:                                               ; preds = %23
  %42 = load ptr, ptr %4, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.spvc_compiler_s, ptr %42, i32 0, i32 1
  %44 = load ptr, ptr %43, align 8, !tbaa !9
  %45 = call noundef ptr @_ZNKSt10unique_ptrI16spvc_resources_sSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  %46 = getelementptr inbounds %struct.spvc_resources_s, ptr %45, i32 0, i32 1
  store ptr %44, ptr %46, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 6656, ptr %13) #8
  %47 = load ptr, ptr %4, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.spvc_compiler_s, ptr %47, i32 0, i32 2
  %49 = call noundef ptr @_ZNKSt10unique_ptrIN11spirv_cross8CompilerESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %48) #8
  invoke void @_ZNK11spirv_cross8Compiler20get_shader_resourcesEv(ptr dead_on_unwind writable sret(%"struct.spirv_cross::ShaderResources") align 8 %13, ptr noundef nonnull align 8 dereferenceable(3176) %49)
          to label %50 unwind label %60

50:                                               ; preds = %41
  %51 = call noundef ptr @_ZNKSt10unique_ptrI16spvc_resources_sSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  %52 = invoke noundef zeroext i1 @_ZN16spvc_resources_s14copy_resourcesERKN11spirv_cross15ShaderResourcesE(ptr noundef nonnull align 8 dereferenceable(3600) %51, ptr noundef nonnull align 8 dereferenceable(6656) %13)
          to label %53 unwind label %64

53:                                               ; preds = %50
  br i1 %52, label %77, label %54

54:                                               ; preds = %53
  %55 = call noundef ptr @_ZNKSt10unique_ptrI16spvc_resources_sSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  %56 = getelementptr inbounds %struct.spvc_resources_s, ptr %55, i32 0, i32 1
  %57 = load ptr, ptr %56, align 8, !tbaa !19
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef @.str, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %58 unwind label %68

58:                                               ; preds = %54
  invoke void @_ZN14spvc_context_s12report_errorENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(136) %57, ptr noundef %14)
          to label %59 unwind label %72

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

60:                                               ; preds = %41
  %61 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %10, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %11, align 4
  br label %89

64:                                               ; preds = %50
  %65 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %10, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %11, align 4
  br label %88

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

72:                                               ; preds = %58
  %73 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %10, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %11, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #8
  br label %76

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

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

84:                                               ; preds = %77, %59
  call void @_ZN11spirv_cross15ShaderResourcesD2Ev(ptr noundef nonnull align 8 dereferenceable(6656) %13) #8
  call void @llvm.lifetime.end.p0(i64 6656, ptr %13) #8
  br label %85

85:                                               ; preds = %84, %31
  call void @_ZNSt10unique_ptrI16spvc_resources_sSt14default_deleteIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  %86 = load i32, ptr %12, align 4
  switch i32 %86, label %129 [
    i32 0, label %87
    i32 1, label %119
  ]

87:                                               ; preds = %85
  br label %118

88:                                               ; preds = %76, %64
  call void @_ZN11spirv_cross15ShaderResourcesD2Ev(ptr noundef nonnull align 8 dereferenceable(6656) %13) #8
  br label %89

89:                                               ; preds = %88, %60
  call void @llvm.lifetime.end.p0(i64 6656, ptr %13) #8
  br label %90

90:                                               ; preds = %89, %40
  call void @_ZNSt10unique_ptrI16spvc_resources_sSt14default_deleteIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #8
  br label %91

91:                                               ; preds = %90
  %92 = load i32, ptr %11, align 4
  %93 = call i32 @llvm.eh.typeid.for.p0(ptr @_ZTISt9exception) #8
  %94 = icmp eq i32 %92, %93
  br i1 %94, label %95, label %121

95:                                               ; preds = %91
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %96 = load ptr, ptr %10, align 8
  %97 = call ptr @__cxa_begin_catch(ptr %96) #8
  store ptr %97, ptr %17, align 8
  %98 = load ptr, ptr %4, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.spvc_compiler_s, ptr %98, i32 0, i32 1
  %100 = load ptr, ptr %99, align 8, !tbaa !9
  %101 = load ptr, ptr %17, align 8, !tbaa !5
  %102 = load ptr, ptr %101, align 8, !tbaa !28
  %103 = getelementptr inbounds ptr, ptr %102, i64 2
  %104 = load ptr, ptr %103, align 8
  %105 = call noundef ptr %104(ptr noundef nonnull align 8 dereferenceable(8) %101) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr %19) #8
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #8
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %18, ptr noundef %105, ptr noundef nonnull align 1 dereferenceable(1) %19)
          to label %106 unwind label %108

106:                                              ; preds = %95
  invoke void @_ZN14spvc_context_s12report_errorENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(136) %100, ptr noundef %18)
          to label %107 unwind label %112

107:                                              ; preds = %106
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %19) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr %19) #8
  store i32 -3, ptr %3, align 4
  store i32 1, ptr %12, align 4
  call void @__cxa_end_catch()
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  br label %119

108:                                              ; preds = %95
  %109 = landingpad { ptr, i32 }
          cleanup
  %110 = extractvalue { ptr, i32 } %109, 0
  store ptr %110, ptr %10, align 8
  %111 = extractvalue { ptr, i32 } %109, 1
  store i32 %111, ptr %11, align 4
  br label %116

112:                                              ; preds = %106
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %10, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %11, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #8
  br label %116

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

117:                                              ; preds = %116
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  br label %121

118:                                              ; preds = %87
  store i32 0, ptr %3, align 4
  br label %119

119:                                              ; preds = %118, %107, %85
  %120 = load i32, ptr %3, align 4
  ret i32 %120

121:                                              ; preds = %117, %91
  %122 = load ptr, ptr %10, align 8
  %123 = load i32, ptr %11, align 4
  %124 = insertvalue { ptr, i32 } poison, ptr %122, 0
  %125 = insertvalue { ptr, i32 } %124, i32 %123, 1
  resume { ptr, i32 } %125

126:                                              ; preds = %116
  %127 = landingpad { ptr, i32 }
          catch ptr null
  %128 = extractvalue { ptr, i32 } %127, 0
  call void @__clang_call_terminate(ptr %128) #10
  unreachable

129:                                              ; preds = %85
  unreachable
}

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

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

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

14:                                               ; preds = %2
  tail call void @_ZN16spvc_resources_sC2Ev(ptr noundef nonnull align 8 dereferenceable(3600) %12) #8
  br label %15

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

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

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

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

21:                                               ; preds = %19
  %22 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  br label %25

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

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

26:                                               ; preds = %15
  %27 = call noundef ptr @_ZNKSt10unique_ptrI16spvc_resources_sSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #8
  %28 = getelementptr inbounds i8, ptr %27, i64 8
  store ptr %18, ptr %28, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 6656, ptr nonnull %6) #8
  %29 = getelementptr inbounds i8, ptr %0, i64 16
  %30 = call noundef ptr @_ZNKSt10unique_ptrIN11spirv_cross8CompilerESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %29) #8
  invoke void @_ZNK11spirv_cross8Compiler20get_shader_resourcesEv(ptr dead_on_unwind nonnull writable sret(%"struct.spirv_cross::ShaderResources") align 8 %6, ptr noundef nonnull align 8 dereferenceable(3176) %30)
          to label %31 unwind label %41

31:                                               ; preds = %26
  %32 = call noundef ptr @_ZNKSt10unique_ptrI16spvc_resources_sSt14default_deleteIS0_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #8
  %33 = invoke noundef zeroext i1 @_ZN16spvc_resources_s14copy_resourcesERKN11spirv_cross15ShaderResourcesE(ptr noundef nonnull align 8 dereferenceable(3600) %32, ptr noundef nonnull align 8 dereferenceable(6656) %6)
          to label %34 unwind label %43

34:                                               ; preds = %31
  br i1 %33, label %50, label %35

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

39:                                               ; preds = %35
  invoke void @_ZN14spvc_context_s12report_errorENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(136) %38, ptr noundef nonnull %7)
          to label %40 unwind label %47

40:                                               ; preds = %39
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #8
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #8
  br label %54

41:                                               ; preds = %26
  %42 = landingpad { ptr, i32 }
          cleanup
          catch ptr @_ZTISt9exception
  br label %56

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

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

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

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

50:                                               ; preds = %34
  %51 = call noundef ptr @_ZNKSt10unique_ptrI16spvc_resources_sSt14default_deleteIS0_EE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #8
  store ptr %51, ptr %1, align 8, !tbaa !27
  %52 = load ptr, ptr %17, align 8, !tbaa !5
  %53 = getelementptr inbounds i8, ptr %52, i64 32
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #8
  call void @_ZNSt10unique_ptrI23ScratchMemoryAllocationSt14default_deleteIS0_EEC2I16spvc_resources_sS1_IS5_EvEEOS_IT_T0_E(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %3) #8
  call void @_ZN11spirv_cross11SmallVectorISt10unique_ptrI23ScratchMemoryAllocationSt14default_deleteIS2_EELm8EE9push_backEOS5_(ptr noundef nonnull align 8 dereferenceable(88) %53, ptr noundef nonnull align 8 dereferenceable(8) %9) #8
  call void @_ZNSt10unique_ptrI23ScratchMemoryAllocationSt14default_deleteIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  br label %54

54:                                               ; preds = %40, %50
  %spec.select = phi i32 [ 0, %50 ], [ -3, %40 ]
  call void @_ZN11spirv_cross15ShaderResourcesD2Ev(ptr noundef nonnull align 8 dereferenceable(6656) %6) #8
  call void @llvm.lifetime.end.p0(i64 6656, ptr nonnull %6) #8
  call void @_ZNSt10unique_ptrI16spvc_resources_sSt14default_deleteIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #8
  br label %75

55:                                               ; preds = %49, %43
  %.pn25.pn = phi { ptr, i32 } [ %.pn25, %49 ], [ %44, %43 ]
  call void @_ZN11spirv_cross15ShaderResourcesD2Ev(ptr noundef nonnull align 8 dereferenceable(6656) %6) #8
  br label %56

56:                                               ; preds = %55, %41
  %.pn25.pn.pn = phi { ptr, i32 } [ %.pn25.pn, %55 ], [ %42, %41 ]
  call void @llvm.lifetime.end.p0(i64 6656, ptr nonnull %6) #8
  br label %57

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

60:                                               ; preds = %57
  %.421 = extractvalue { ptr, i32 } %.pn25.pn.pn.pn, 0
  %61 = call ptr @__cxa_begin_catch(ptr %.421) #8
  %62 = getelementptr inbounds i8, ptr %0, i64 8
  %63 = load ptr, ptr %62, align 8, !tbaa !5
  %64 = load ptr, ptr %61, align 8, !tbaa !28
  %65 = getelementptr inbounds i8, ptr %64, i64 16
  %66 = load ptr, ptr %65, align 8
  %67 = call noundef ptr %66(ptr noundef nonnull align 8 dereferenceable(8) %61) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %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 %67, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %68 unwind label %70

68:                                               ; preds = %60
  invoke void @_ZN14spvc_context_s12report_errorENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(136) %63, ptr noundef nonnull %10)
          to label %69 unwind label %72

69:                                               ; preds = %68
  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 nonnull %11) #8
  call void @__cxa_end_catch()
  br label %75

70:                                               ; preds = %60
  %71 = landingpad { ptr, i32 }
          cleanup
  br label %74

72:                                               ; preds = %68
  %73 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #8
  br label %74

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

75:                                               ; preds = %54, %.thread, %69
  %.2 = phi i32 [ -3, %69 ], [ -3, %.thread ], [ %spec.select, %54 ]
  ret i32 %.2

76:                                               ; preds = %74, %57
  %.merged = phi { ptr, i32 } [ %.pn25.pn.pn.pn, %57 ], [ %.pn30, %74 ]
  resume { ptr, i32 } %.merged

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

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

; 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