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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.spirv_cross::TypedID.162" = type { i32 }
%"class.spirv_cross::Compiler" = type { ptr, %"class.spirv_cross::ParsedIR", %"class.spirv_cross::SmallVector.92", %"class.spirv_cross::SmallVector.92", ptr, ptr, i32, %"class.std::unordered_set.95", i8, %"class.std::unordered_set", i8, i8, %"class.spirv_cross::SmallVector.114", %"class.spirv_cross::SmallVector.92", %"class.std::function", %"class.std::unordered_set", %"class.std::unordered_set", %"class.std::unordered_set", %"class.std::unordered_set", %"class.std::unordered_set", %"class.spirv_cross::Bitset", %"class.spirv_cross::Bitset", i32, i32, i8, %"class.std::unordered_set", i8, i8, i32, %"class.std::unordered_map.117", %"class.spirv_cross::SmallVector.92", %"class.std::unordered_map.131", %"class.std::unordered_set", i8, %"class.std::unordered_map.145" }
%"class.spirv_cross::ParsedIR" = type { %"class.std::unique_ptr", %"class.std::vector", %"class.spirv_cross::SmallVector", %"class.std::unordered_map", [14 x %"class.spirv_cross::SmallVector.7"], %"class.spirv_cross::SmallVector.7", %"class.spirv_cross::SmallVector.7", %"class.std::unordered_map.10", %"class.spirv_cross::SmallVector.24", %"class.spirv_cross::SmallVector.27", %"class.spirv_cross::SmallVector.30", %"class.std::unordered_map.33", %"class.std::unordered_map.52", %"class.spirv_cross::TypedID", %"struct.spirv_cross::ParsedIR::Source", i32, i32, i32, i32, %"class.std::__cxx11::basic_string", %"class.spirv_cross::Bitset", %"class.std::unordered_set" }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.1" }
%"struct.std::_Head_base.1" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, 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 { [192 x i8] }
%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.spirv_cross::SmallVector.7" = type { %"class.spirv_cross::VectorView.8", i64, %"class.spirv_cross::AlignedBuffer.9" }
%"class.spirv_cross::VectorView.8" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.9" = type { [32 x i8] }
%"class.std::unordered_map.10" = type { %"class.std::_Hashtable.11" }
%"class.std::_Hashtable.11" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.spirv_cross::SmallVector.24" = type { %"class.spirv_cross::VectorView.25", i64, %"class.spirv_cross::AlignedBuffer.26" }
%"class.spirv_cross::VectorView.25" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.26" = type { [32 x i8] }
%"class.spirv_cross::SmallVector.27" = type { %"class.spirv_cross::VectorView.28", i64, %"class.spirv_cross::AlignedBuffer.29" }
%"class.spirv_cross::VectorView.28" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.29" = type { [256 x i8] }
%"class.spirv_cross::SmallVector.30" = type { %"class.spirv_cross::VectorView.31", i64, %"class.spirv_cross::AlignedBuffer.32" }
%"class.spirv_cross::VectorView.31" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.32" = type { [8 x i8] }
%"class.std::unordered_map.33" = type { %"class.std::_Hashtable.34" }
%"class.std::_Hashtable.34" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::unordered_map.52" = type { %"class.std::_Hashtable.53" }
%"class.std::_Hashtable.53" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.spirv_cross::TypedID" = type { i32 }
%"struct.spirv_cross::ParsedIR::Source" = type <{ i32, i8, i8, i8, i8 }>
%"class.std::unordered_set.95" = type { %"class.std::_Hashtable.96" }
%"class.std::_Hashtable.96" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.spirv_cross::SmallVector.114" = type { %"class.spirv_cross::VectorView.115", i64, %"class.spirv_cross::AlignedBuffer.116" }
%"class.spirv_cross::VectorView.115" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.116" = type { [96 x i8] }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%"class.spirv_cross::Bitset" = type { i64, %"class.std::unordered_set" }
%"class.std::unordered_map.117" = type { %"class.std::_Hashtable.118" }
%"class.std::_Hashtable.118" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.spirv_cross::SmallVector.92" = type { %"class.spirv_cross::VectorView.93", i64, %"class.spirv_cross::AlignedBuffer.94" }
%"class.spirv_cross::VectorView.93" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.94" = type { [32 x i8] }
%"class.std::unordered_map.131" = type { %"class.std::_Hashtable.132" }
%"class.std::_Hashtable.132" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::unordered_set" = type { %"class.std::_Hashtable.74" }
%"class.std::_Hashtable.74" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::unordered_map.145" = type { %"class.std::_Hashtable.146" }
%"class.std::_Hashtable.146" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.spirv_cross::SPIRType" = type { %"struct.spirv_cross::IVariant.base", i32, i32, i32, i32, i32, %"class.spirv_cross::SmallVector.92", %"class.spirv_cross::SmallVector.166", i32, i8, i8, i32, %"class.spirv_cross::SmallVector.169", %"class.spirv_cross::SmallVector.92", %"struct.spirv_cross::SPIRType::ImageType", %"class.spirv_cross::TypedID.163", %"class.spirv_cross::TypedID.163", %"class.std::unordered_set.172" }
%"struct.spirv_cross::IVariant.base" = type <{ ptr, %"class.spirv_cross::TypedID.162" }>
%"class.spirv_cross::SmallVector.166" = type { %"class.spirv_cross::VectorView.167", i64, %"class.spirv_cross::AlignedBuffer.168" }
%"class.spirv_cross::VectorView.167" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.168" = type { [8 x i8] }
%"class.spirv_cross::SmallVector.169" = type { %"class.spirv_cross::VectorView.170", i64, %"class.spirv_cross::AlignedBuffer.171" }
%"class.spirv_cross::VectorView.170" = type { ptr, i64 }
%"class.spirv_cross::AlignedBuffer.171" = type { [32 x i8] }
%"struct.spirv_cross::SPIRType::ImageType" = type { %"class.spirv_cross::TypedID.163", i32, i8, i8, i8, i32, i32, i32 }
%"class.spirv_cross::TypedID.163" = type { i32 }
%"class.std::unordered_set.172" = type { %"class.std::_Hashtable.173" }
%"class.std::_Hashtable.173" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }

@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK11spirv_cross8Compiler7to_nameB5cxx11Ejb(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(3176) %1, i32 noundef %2, i1 noundef zeroext %3) unnamed_addr #2 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i8, align 1
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca ptr, align 8
  %12 = alloca %"class.spirv_cross::TypedID.162", align 4
  store ptr %0, ptr %5, align 8
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  %13 = zext i1 %3 to i8
  store i8 %13, ptr %8, align 1, !tbaa !11
  %14 = load ptr, ptr %6, align 8
  %15 = load i8, ptr %8, align 1, !tbaa !11, !range !13, !noundef !14
  %16 = trunc i8 %15 to i1
  br i1 %16, label %17, label %49

17:                                               ; preds = %4
  %18 = getelementptr inbounds %"class.spirv_cross::Compiler", ptr %14, i32 0, i32 1
  %19 = getelementptr inbounds %"class.spirv_cross::ParsedIR", ptr %18, i32 0, i32 2
  %20 = load i32, ptr %7, align 4, !tbaa !9
  %21 = zext i32 %20 to i64
  %22 = call noundef nonnull align 8 dereferenceable(21) ptr @_ZNK11spirv_cross10VectorViewINS_7VariantEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %19, i64 noundef %21) #4
  %23 = call noundef i32 @_ZNK11spirv_cross7Variant8get_typeEv(ptr noundef nonnull align 8 dereferenceable(21) %22)
  %24 = icmp eq i32 %23, 1
  br i1 %24, label %25, label %49

25:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %26 = load i32, ptr %7, align 4, !tbaa !9
  %27 = call noundef nonnull align 8 dereferenceable(336) ptr @_ZNK11spirv_cross8Compiler3getINS_8SPIRTypeEEERKT_j(ptr noundef nonnull align 8 dereferenceable(3176) %14, i32 noundef %26)
  store ptr %27, ptr %9, align 8, !tbaa !5
  %28 = load ptr, ptr %9, align 8, !tbaa !5
  %29 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %28, i32 0, i32 15
  %30 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE1EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %29)
  %31 = icmp ne i32 %30, 0
  br i1 %31, label %32, label %45

32:                                               ; preds = %25
  %33 = load ptr, ptr %9, align 8, !tbaa !5
  %34 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %33, i32 0, i32 15
  %35 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE1EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %34)
  %36 = call noundef zeroext i1 @_ZNK11spirv_cross8Compiler23has_extended_decorationEjNS_19ExtendedDecorationsE(ptr noundef nonnull align 8 dereferenceable(3176) %14, i32 noundef %35, i32 noundef 0)
  br i1 %36, label %44, label %37

37:                                               ; preds = %32
  %38 = load ptr, ptr %9, align 8, !tbaa !5
  %39 = getelementptr inbounds %"struct.spirv_cross::SPIRType", ptr %38, i32 0, i32 15
  %40 = call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE1EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %39)
  %41 = load ptr, ptr %14, align 8, !tbaa !15
  %42 = getelementptr inbounds ptr, ptr %41, i64 6
  %43 = load ptr, ptr %42, align 8
  call void %43(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(3176) %14, i32 noundef %40, i1 noundef zeroext true)
  store i32 1, ptr %10, align 4
  br label %46

44:                                               ; preds = %32
  br label %45

45:                                               ; preds = %44, %25
  store i32 0, ptr %10, align 4
  br label %46

46:                                               ; preds = %45, %37
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  %47 = load i32, ptr %10, align 4
  switch i32 %47, label %62 [
    i32 0, label %48
    i32 1, label %61
  ]

48:                                               ; preds = %46
  br label %49

49:                                               ; preds = %48, %17, %4
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %50 = getelementptr inbounds %"class.spirv_cross::Compiler", ptr %14, i32 0, i32 1
  %51 = load i32, ptr %7, align 4, !tbaa !9
  call void @_ZN11spirv_cross7TypedIDILNS_5TypesE0EEC2Ej(ptr noundef nonnull align 4 dereferenceable(4) %12, i32 noundef %51)
  %52 = getelementptr inbounds %"class.spirv_cross::TypedID.162", ptr %12, i32 0, i32 0
  %53 = load i32, ptr %52, align 4
  %54 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK11spirv_cross8ParsedIR8get_nameB5cxx11ENS_7TypedIDILNS_5TypesE0EEE(ptr noundef nonnull align 8 dereferenceable(1920) %50, i32 %53)
  store ptr %54, ptr %11, align 8, !tbaa !5
  %55 = load ptr, ptr %11, align 8, !tbaa !5
  %56 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %55) #4
  br i1 %56, label %57, label %58

57:                                               ; preds = %49
  call void @_ZN11spirv_cross4joinIJRA2_KcRjEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 1 dereferenceable(2) @.str.1, ptr noundef nonnull align 4 dereferenceable(4) %7)
  store i32 1, ptr %10, align 4
  br label %60

58:                                               ; preds = %49
  %59 = load ptr, ptr %11, align 8, !tbaa !5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %59)
  store i32 1, ptr %10, align 4
  br label %60

60:                                               ; preds = %58, %57
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  br label %61

61:                                               ; preds = %60, %46
  ret void

62:                                               ; preds = %46
  unreachable
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK11spirv_cross7Variant8get_typeEv(ptr noundef nonnull align 8 dereferenceable(21)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(336) ptr @_ZNK11spirv_cross8Compiler3getINS_8SPIRTypeEEERKT_j(ptr noundef nonnull align 8 dereferenceable(3176), i32 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK11spirv_cross8Compiler23has_extended_decorationEjNS_19ExtendedDecorationsE(ptr noundef nonnull align 8 dereferenceable(3176), i32 noundef, i32 noundef) #2 align 2

declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNK11spirv_cross8ParsedIR8get_nameB5cxx11ENS_7TypedIDILNS_5TypesE0EEE(ptr noundef nonnull align 8 dereferenceable(1920), i32) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11spirv_cross7TypedIDILNS_5TypesE0EEC2Ej(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32)) #1 align 2

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!16, !16, i64 0}
!16 = !{!"vtable pointer", !8, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.spirv_cross::TypedID.162" = type { i32 }

@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK11spirv_cross8Compiler7to_nameB5cxx11Ejb(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(3176) %1, i32 noundef %2, i1 noundef zeroext %3) unnamed_addr #1 align 2 {
  %5 = alloca i32, align 4
  %6 = alloca %"class.spirv_cross::TypedID.162", align 4
  store i32 %2, ptr %5, align 4, !tbaa !5
  br i1 %3, label %7, label %.thread

7:                                                ; preds = %4
  %8 = getelementptr inbounds i8, ptr %1, i64 40
  %9 = zext i32 %2 to i64
  %10 = tail call noundef nonnull align 8 dereferenceable(21) ptr @_ZNK11spirv_cross10VectorViewINS_7VariantEEixEm(ptr noundef nonnull align 8 dereferenceable(16) %8, i64 noundef %9) #3
  %11 = tail call noundef i32 @_ZNK11spirv_cross7Variant8get_typeEv(ptr noundef nonnull align 8 dereferenceable(21) %10)
  %12 = icmp eq i32 %11, 1
  br i1 %12, label %13, label %.thread

13:                                               ; preds = %7
  %14 = tail call noundef nonnull align 8 dereferenceable(336) ptr @_ZNK11spirv_cross8Compiler3getINS_8SPIRTypeEEERKT_j(ptr noundef nonnull align 8 dereferenceable(3176) %1, i32 noundef %2)
  %15 = getelementptr inbounds i8, ptr %14, i64 272
  %16 = tail call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE1EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %15)
  %.not = icmp eq i32 %16, 0
  br i1 %.not, label %.thread, label %17

17:                                               ; preds = %13
  %18 = tail call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE1EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %15)
  %19 = tail call noundef zeroext i1 @_ZNK11spirv_cross8Compiler23has_extended_decorationEjNS_19ExtendedDecorationsE(ptr noundef nonnull align 8 dereferenceable(3176) %1, i32 noundef %18, i32 noundef 0)
  br i1 %19, label %.thread, label %20

20:                                               ; preds = %17
  %21 = tail call noundef i32 @_ZNK11spirv_cross7TypedIDILNS_5TypesE1EEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %15)
  %22 = load ptr, ptr %1, align 8, !tbaa !9
  %23 = getelementptr inbounds i8, ptr %22, i64 48
  %24 = load ptr, ptr %23, align 8
  tail call void %24(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 8 dereferenceable(3176) %1, i32 noundef %21, i1 noundef zeroext true)
  br label %31

.thread:                                          ; preds = %13, %17, %7, %4
  %25 = getelementptr inbounds i8, ptr %1, i64 8
  call void @_ZN11spirv_cross7TypedIDILNS_5TypesE0EEC2Ej(ptr noundef nonnull align 4 dereferenceable(4) %6, i32 noundef %2)
  %26 = load i32, ptr %6, align 4
  %27 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNK11spirv_cross8ParsedIR8get_nameB5cxx11ENS_7TypedIDILNS_5TypesE0EEE(ptr noundef nonnull align 8 dereferenceable(1920) %25, i32 %26)
  %28 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %27) #3
  br i1 %28, label %29, label %30

29:                                               ; preds = %.thread
  call void @_ZN11spirv_cross4joinIJRA2_KcRjEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %0, ptr noundef nonnull align 1 dereferenceable(2) @.str.1, ptr noundef nonnull align 4 dereferenceable(4) %5)
  br label %31

30:                                               ; preds = %.thread
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %27)
  br label %31

31:                                               ; preds = %20, %29, %30
  ret void
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK11spirv_cross7Variant8get_typeEv(ptr noundef nonnull align 8 dereferenceable(21)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(336) ptr @_ZNK11spirv_cross8Compiler3getINS_8SPIRTypeEEERKT_j(ptr noundef nonnull align 8 dereferenceable(3176), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK11spirv_cross8Compiler23has_extended_decorationEjNS_19ExtendedDecorationsE(ptr noundef nonnull align 8 dereferenceable(3176), i32 noundef, i32 noundef) local_unnamed_addr #1 align 2

declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNK11spirv_cross8ParsedIR8get_nameB5cxx11ENS_7TypedIDILNS_5TypesE0EEE(ptr noundef nonnull align 8 dereferenceable(1920), i32) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN11spirv_cross7TypedIDILNS_5TypesE0EEC2Ej(ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #0 align 2

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

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

attributes #0 = { 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 #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"vtable pointer", !8, i64 0}


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