; LLVM IR from hbatagelo/abcg :: abcg/external/glslang/SPIRV (SpvPostProcess)

; 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::_Rb_tree_const_iterator" = type { ptr }
%"class.spv::Builder" = type { ptr, i32, i32, i32, i32, %"class.std::__cxx11::basic_string", i32, ptr, i8, %"class.std::set", %"class.std::vector", %"class.std::vector", i32, i32, %"class.std::set.6", i32, %"class.spv::Module", ptr, i32, ptr, i8, [7 x i8], %"struct.spv::Builder::AccessChain", %"class.std::vector.27", %"class.std::vector.27", %"class.std::vector.27", %"class.std::vector.27", %"class.std::vector.27", %"class.std::vector.27", %"class.std::vector.27", %"class.std::vector.27", %"class.std::vector.32", %"class.std::unordered_map", %"class.std::unordered_map", %"class.std::unordered_map", %"class.std::vector.17", %"class.std::stack", %"class.std::stack.45", %"class.std::unordered_map.52", %"class.std::map", 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::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, std::_Identity<std::__cxx11::basic_string<char>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>, std::_Identity<std::__cxx11::basic_string<char>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<const char *, std::allocator<const char *>>::_Vector_impl" }
%"struct.std::_Vector_base<const char *, std::allocator<const char *>>::_Vector_impl" = type { %"struct.std::_Vector_base<const char *, std::allocator<const char *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<const char *, std::allocator<const char *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::set.6" = type { %"class.std::_Rb_tree.7" }
%"class.std::_Rb_tree.7" = type { %"struct.std::_Rb_tree<spv::Capability, spv::Capability, std::_Identity<spv::Capability>, std::less<spv::Capability>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<spv::Capability, spv::Capability, std::_Identity<spv::Capability>, std::less<spv::Capability>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.spv::Module" = type { ptr, %"class.std::vector.12", %"class.std::vector.17" }
%"class.std::vector.12" = type { %"struct.std::_Vector_base.13" }
%"struct.std::_Vector_base.13" = type { %"struct.std::_Vector_base<spv::Function *, std::allocator<spv::Function *>>::_Vector_impl" }
%"struct.std::_Vector_base<spv::Function *, std::allocator<spv::Function *>>::_Vector_impl" = type { %"struct.std::_Vector_base<spv::Function *, std::allocator<spv::Function *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<spv::Function *, std::allocator<spv::Function *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.spv::Builder::AccessChain" = type <{ i32, [4 x i8], %"class.std::vector.22", i32, [4 x i8], %"class.std::vector.22", i32, i32, i8, [3 x i8], i32, %"struct.spv::Builder::AccessChain::CoherentFlags", [4 x i8] }>
%"class.std::vector.22" = type { %"struct.std::_Vector_base.23" }
%"struct.std::_Vector_base.23" = 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 }
%"struct.spv::Builder::AccessChain::CoherentFlags" = type { i16, [2 x i8] }
%"class.std::vector.27" = type { %"struct.std::_Vector_base.28" }
%"struct.std::_Vector_base.28" = type { %"struct.std::_Vector_base<std::unique_ptr<spv::Instruction>, std::allocator<std::unique_ptr<spv::Instruction>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unique_ptr<spv::Instruction>, std::allocator<std::unique_ptr<spv::Instruction>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unique_ptr<spv::Instruction>, std::allocator<std::unique_ptr<spv::Instruction>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unique_ptr<spv::Instruction>, std::allocator<std::unique_ptr<spv::Instruction>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.32" = type { %"struct.std::_Vector_base.33" }
%"struct.std::_Vector_base.33" = type { %"struct.std::_Vector_base<std::unique_ptr<spv::Function>, std::allocator<std::unique_ptr<spv::Function>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unique_ptr<spv::Function>, std::allocator<std::unique_ptr<spv::Function>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unique_ptr<spv::Function>, std::allocator<std::unique_ptr<spv::Function>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unique_ptr<spv::Function>, std::allocator<std::unique_ptr<spv::Function>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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.std::vector.17" = type { %"struct.std::_Vector_base.18" }
%"struct.std::_Vector_base.18" = type { %"struct.std::_Vector_base<spv::Instruction *, std::allocator<spv::Instruction *>>::_Vector_impl" }
%"struct.std::_Vector_base<spv::Instruction *, std::allocator<spv::Instruction *>>::_Vector_impl" = type { %"struct.std::_Vector_base<spv::Instruction *, std::allocator<spv::Instruction *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<spv::Instruction *, std::allocator<spv::Instruction *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::stack" = type { %"class.std::deque" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<spv::Block *, std::allocator<spv::Block *>>::_Deque_impl" }
%"struct.std::_Deque_base<spv::Block *, std::allocator<spv::Block *>>::_Deque_impl" = type { %"struct.std::_Deque_base<spv::Block *, std::allocator<spv::Block *>>::_Deque_impl_data" }
%"struct.std::_Deque_base<spv::Block *, std::allocator<spv::Block *>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"class.std::stack.45" = type { %"class.std::deque.46" }
%"class.std::deque.46" = type { %"class.std::_Deque_base.47" }
%"class.std::_Deque_base.47" = type { %"struct.std::_Deque_base<spv::Builder::LoopBlocks, std::allocator<spv::Builder::LoopBlocks>>::_Deque_impl" }
%"struct.std::_Deque_base<spv::Builder::LoopBlocks, std::allocator<spv::Builder::LoopBlocks>>::_Deque_impl" = type { %"struct.std::_Deque_base<spv::Builder::LoopBlocks, std::allocator<spv::Builder::LoopBlocks>>::_Deque_impl_data" }
%"struct.std::_Deque_base<spv::Builder::LoopBlocks, std::allocator<spv::Builder::LoopBlocks>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator.51", %"struct.std::_Deque_iterator.51" }
%"struct.std::_Deque_iterator.51" = type { ptr, ptr, ptr, 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.std::map" = type { %"class.std::_Rb_tree.72" }
%"class.std::_Rb_tree.72" = type { %"struct.std::_Rb_tree<unsigned int, std::pair<const unsigned int, const std::__cxx11::basic_string<char> *>, std::_Select1st<std::pair<const unsigned int, const std::__cxx11::basic_string<char> *>>, std::less<unsigned int>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned int, std::pair<const unsigned int, const std::__cxx11::basic_string<char> *>, std::_Select1st<std::pair<const unsigned int, const std::__cxx11::basic_string<char> *>>, std::less<unsigned int>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3spv7Builder15postProcessTypeERKNS_11InstructionEj(ptr noundef nonnull align 8 dereferenceable(1096) %0, ptr noundef nonnull align 8 dereferenceable(96) %1, i32 noundef %2) #0 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i8, align 1
  %11 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %12 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i8, align 1
  %16 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %17 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %18 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  %19 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #4
  %20 = load i32, ptr %6, align 4, !tbaa !9
  %21 = call noundef i32 @_ZNK3spv7Builder21getMostBasicTypeClassEj(ptr noundef nonnull align 8 dereferenceable(1096) %19, i32 noundef %20)
  store i32 %21, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 0, ptr %8, align 4, !tbaa !9
  %22 = load i32, ptr %7, align 4, !tbaa !9
  %23 = icmp eq i32 %22, 22
  br i1 %23, label %27, label %24

24:                                               ; preds = %3
  %25 = load i32, ptr %7, align 4, !tbaa !9
  %26 = icmp eq i32 %25, 21
  br i1 %26, label %27, label %30

27:                                               ; preds = %24, %3
  %28 = load i32, ptr %6, align 4, !tbaa !9
  %29 = call noundef i32 @_ZNK3spv7Builder18getScalarTypeWidthEj(ptr noundef nonnull align 8 dereferenceable(1096) %19, i32 noundef %28)
  store i32 %29, ptr %8, align 4, !tbaa !9
  br label %30

30:                                               ; preds = %27, %24
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  %32 = call noundef i32 @_ZNK3spv11Instruction9getOpCodeEv(ptr noundef nonnull align 8 dereferenceable(96) %31)
  switch i32 %32, label %207 [
    i32 61, label %33
    i32 62, label %33
    i32 83, label %240
    i32 115, label %79
    i32 114, label %79
    i32 113, label %79
    i32 12, label %168
    i32 65, label %189
    i32 67, label %189
  ]

33:                                               ; preds = %30, %30
  %34 = load i32, ptr %7, align 4, !tbaa !9
  %35 = icmp eq i32 %34, 30
  br i1 %35, label %36, label %49

36:                                               ; preds = %33
  %37 = load i32, ptr %6, align 4, !tbaa !9
  %38 = call noundef zeroext i1 @_ZNK3spv7Builder12containsTypeEjNS_2OpEj(ptr noundef nonnull align 8 dereferenceable(1096) %19, i32 noundef %37, i32 noundef 21, i32 noundef 8)
  br i1 %38, label %39, label %40

39:                                               ; preds = %36
  call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %19, i32 noundef 39)
  br label %40

40:                                               ; preds = %39, %36
  %41 = load i32, ptr %6, align 4, !tbaa !9
  %42 = call noundef zeroext i1 @_ZNK3spv7Builder12containsTypeEjNS_2OpEj(ptr noundef nonnull align 8 dereferenceable(1096) %19, i32 noundef %41, i32 noundef 21, i32 noundef 16)
  br i1 %42, label %43, label %44

43:                                               ; preds = %40
  call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %19, i32 noundef 22)
  br label %44

44:                                               ; preds = %43, %40
  %45 = load i32, ptr %6, align 4, !tbaa !9
  %46 = call noundef zeroext i1 @_ZNK3spv7Builder12containsTypeEjNS_2OpEj(ptr noundef nonnull align 8 dereferenceable(1096) %19, i32 noundef %45, i32 noundef 22, i32 noundef 16)
  br i1 %46, label %47, label %48

47:                                               ; preds = %44
  call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %19, i32 noundef 9)
  br label %48

48:                                               ; preds = %47, %44
  br label %78

49:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = call noundef i32 @_ZNK3spv11Instruction12getIdOperandEi(ptr noundef nonnull align 8 dereferenceable(96) %50, i32 noundef 0)
  %52 = call noundef i32 @_ZNK3spv7Builder15getStorageClassEj(ptr noundef nonnull align 8 dereferenceable(1096) %19, i32 noundef %51)
  store i32 %52, ptr %9, align 4, !tbaa !11
  %53 = load i32, ptr %8, align 4, !tbaa !9
  %54 = icmp eq i32 %53, 8
  br i1 %54, label %55, label %60

55:                                               ; preds = %49
  %56 = load i32, ptr %9, align 4, !tbaa !11
  switch i32 %56, label %58 [
    i32 5349, label %57
    i32 2, label %57
    i32 12, label %57
    i32 9, label %57
  ]

57:                                               ; preds = %55, %55, %55, %55
  br label %59

58:                                               ; preds = %55
  call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %19, i32 noundef 39)
  br label %59

59:                                               ; preds = %58, %57
  br label %77

60:                                               ; preds = %49
  %61 = load i32, ptr %8, align 4, !tbaa !9
  %62 = icmp eq i32 %61, 16
  br i1 %62, label %63, label %76

63:                                               ; preds = %60
  %64 = load i32, ptr %9, align 4, !tbaa !11
  switch i32 %64, label %66 [
    i32 5349, label %65
    i32 2, label %65
    i32 12, label %65
    i32 9, label %65
    i32 1, label %65
    i32 3, label %65
  ]

65:                                               ; preds = %63, %63, %63, %63, %63, %63
  br label %75

66:                                               ; preds = %63
  %67 = load i32, ptr %7, align 4, !tbaa !9
  %68 = icmp eq i32 %67, 21
  br i1 %68, label %69, label %70

69:                                               ; preds = %66
  call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %19, i32 noundef 22)
  br label %70

70:                                               ; preds = %69, %66
  %71 = load i32, ptr %7, align 4, !tbaa !9
  %72 = icmp eq i32 %71, 22
  br i1 %72, label %73, label %74

73:                                               ; preds = %70
  call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %19, i32 noundef 9)
  br label %74

74:                                               ; preds = %73, %70
  br label %75

75:                                               ; preds = %74, %65
  br label %76

76:                                               ; preds = %75, %60
  br label %77

77:                                               ; preds = %76, %59
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  br label %78

78:                                               ; preds = %77, %48
  br label %240

79:                                               ; preds = %30, %30, %30
  %80 = load i32, ptr %6, align 4, !tbaa !9
  %81 = call noundef zeroext i1 @_ZNK3spv7Builder12containsTypeEjNS_2OpEj(ptr noundef nonnull align 8 dereferenceable(1096) %19, i32 noundef %80, i32 noundef 22, i32 noundef 16)
  br i1 %81, label %85, label %82

82:                                               ; preds = %79
  %83 = load i32, ptr %6, align 4, !tbaa !9
  %84 = call noundef zeroext i1 @_ZNK3spv7Builder12containsTypeEjNS_2OpEj(ptr noundef nonnull align 8 dereferenceable(1096) %19, i32 noundef %83, i32 noundef 21, i32 noundef 16)
  br i1 %84, label %85, label %130

85:                                               ; preds = %82, %79
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #4
  store i8 0, ptr %10, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %86 = getelementptr inbounds %"class.spv::Builder", ptr %19, i32 0, i32 14
  %87 = call ptr @_ZNKSt3setIN3spv10CapabilityESt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %86) #4
  %88 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %11, i32 0, i32 0
  store ptr %87, ptr %88, align 8
  br label %89

89:                                               ; preds = %114, %85
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %90 = getelementptr inbounds %"class.spv::Builder", ptr %19, i32 0, i32 14
  %91 = call ptr @_ZNKSt3setIN3spv10CapabilityESt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %90) #4
  %92 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %12, i32 0, i32 0
  store ptr %91, ptr %92, align 8
  %93 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIN3spv10CapabilityEES4_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br i1 %93, label %95, label %94

94:                                               ; preds = %89
  store i32 5, ptr %13, align 4
  br label %116

95:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #4
  %96 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIN3spv10CapabilityEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #4
  %97 = load i32, ptr %96, align 4, !tbaa !15
  store i32 %97, ptr %14, align 4, !tbaa !15
  %98 = load i32, ptr %14, align 4, !tbaa !15
  %99 = icmp eq i32 %98, 4436
  br i1 %99, label %109, label %100

100:                                              ; preds = %95
  %101 = load i32, ptr %14, align 4, !tbaa !15
  %102 = icmp eq i32 %101, 4435
  br i1 %102, label %109, label %103

103:                                              ; preds = %100
  %104 = load i32, ptr %14, align 4, !tbaa !15
  %105 = icmp eq i32 %104, 4433
  br i1 %105, label %109, label %106

106:                                              ; preds = %103
  %107 = load i32, ptr %14, align 4, !tbaa !15
  %108 = icmp eq i32 %107, 4434
  br i1 %108, label %109, label %110

109:                                              ; preds = %106, %103, %100, %95
  store i8 1, ptr %10, align 1, !tbaa !13
  store i32 5, ptr %13, align 4
  br label %111

110:                                              ; preds = %106
  store i32 0, ptr %13, align 4
  br label %111

111:                                              ; preds = %110, %109
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #4
  %112 = load i32, ptr %13, align 4
  switch i32 %112, label %116 [
    i32 0, label %113
  ]

113:                                              ; preds = %111
  br label %114

114:                                              ; preds = %113
  %115 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIN3spv10CapabilityEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #4
  br label %89, !llvm.loop !17

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

117:                                              ; preds = %116
  %118 = load i8, ptr %10, align 1, !tbaa !13, !range !19, !noundef !20
  %119 = trunc i8 %118 to i1
  br i1 %119, label %129, label %120

120:                                              ; preds = %117
  %121 = load i32, ptr %6, align 4, !tbaa !9
  %122 = call noundef zeroext i1 @_ZNK3spv7Builder12containsTypeEjNS_2OpEj(ptr noundef nonnull align 8 dereferenceable(1096) %19, i32 noundef %121, i32 noundef 22, i32 noundef 16)
  br i1 %122, label %123, label %124

123:                                              ; preds = %120
  call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %19, i32 noundef 9)
  br label %124

124:                                              ; preds = %123, %120
  %125 = load i32, ptr %6, align 4, !tbaa !9
  %126 = call noundef zeroext i1 @_ZNK3spv7Builder12containsTypeEjNS_2OpEj(ptr noundef nonnull align 8 dereferenceable(1096) %19, i32 noundef %125, i32 noundef 21, i32 noundef 16)
  br i1 %126, label %127, label %128

127:                                              ; preds = %124
  call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %19, i32 noundef 22)
  br label %128

128:                                              ; preds = %127, %124
  br label %129

129:                                              ; preds = %128, %117
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #4
  br label %130

130:                                              ; preds = %129, %82
  %131 = load i32, ptr %6, align 4, !tbaa !9
  %132 = call noundef zeroext i1 @_ZNK3spv7Builder12containsTypeEjNS_2OpEj(ptr noundef nonnull align 8 dereferenceable(1096) %19, i32 noundef %131, i32 noundef 21, i32 noundef 8)
  br i1 %132, label %133, label %167

133:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #4
  store i8 0, ptr %15, align 1, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %134 = getelementptr inbounds %"class.spv::Builder", ptr %19, i32 0, i32 14
  %135 = call ptr @_ZNKSt3setIN3spv10CapabilityESt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %134) #4
  %136 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %16, i32 0, i32 0
  store ptr %135, ptr %136, align 8
  br label %137

137:                                              ; preds = %159, %133
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %138 = getelementptr inbounds %"class.spv::Builder", ptr %19, i32 0, i32 14
  %139 = call ptr @_ZNKSt3setIN3spv10CapabilityESt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %138) #4
  %140 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %17, i32 0, i32 0
  store ptr %139, ptr %140, align 8
  %141 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIN3spv10CapabilityEES4_(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  br i1 %141, label %143, label %142

142:                                              ; preds = %137
  store i32 8, ptr %13, align 4
  br label %161

143:                                              ; preds = %137
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  %144 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIN3spv10CapabilityEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #4
  %145 = load i32, ptr %144, align 4, !tbaa !15
  store i32 %145, ptr %18, align 4, !tbaa !15
  %146 = load i32, ptr %18, align 4, !tbaa !15
  %147 = icmp eq i32 %146, 4450
  br i1 %147, label %154, label %148

148:                                              ; preds = %143
  %149 = load i32, ptr %18, align 4, !tbaa !15
  %150 = icmp eq i32 %149, 4449
  br i1 %150, label %154, label %151

151:                                              ; preds = %148
  %152 = load i32, ptr %18, align 4, !tbaa !15
  %153 = icmp eq i32 %152, 4448
  br i1 %153, label %154, label %155

154:                                              ; preds = %151, %148, %143
  store i8 1, ptr %15, align 1, !tbaa !13
  store i32 8, ptr %13, align 4
  br label %156

155:                                              ; preds = %151
  store i32 0, ptr %13, align 4
  br label %156

156:                                              ; preds = %155, %154
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  %157 = load i32, ptr %13, align 4
  switch i32 %157, label %161 [
    i32 0, label %158
  ]

158:                                              ; preds = %156
  br label %159

159:                                              ; preds = %158
  %160 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIN3spv10CapabilityEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %16) #4
  br label %137, !llvm.loop !21

161:                                              ; preds = %156, %142
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  br label %162

162:                                              ; preds = %161
  %163 = load i8, ptr %15, align 1, !tbaa !13, !range !19, !noundef !20
  %164 = trunc i8 %163 to i1
  br i1 %164, label %166, label %165

165:                                              ; preds = %162
  call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %19, i32 noundef 39)
  br label %166

166:                                              ; preds = %165, %162
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #4
  br label %167

167:                                              ; preds = %166, %130
  br label %240

168:                                              ; preds = %30
  %169 = load ptr, ptr %5, align 8, !tbaa !5
  %170 = call noundef i32 @_ZNK3spv11Instruction19getImmediateOperandEi(ptr noundef nonnull align 8 dereferenceable(96) %169, i32 noundef 1)
  switch i32 %170, label %187 [
    i32 51, label %171
    i32 52, label %171
    i32 76, label %179
    i32 77, label %179
    i32 78, label %179
  ]

171:                                              ; preds = %168, %168
  %172 = call noundef i32 @_ZNK3spv7Builder13getSpvVersionEv(ptr noundef nonnull align 8 dereferenceable(1096) %19)
  %173 = icmp ult i32 %172, 66304
  br i1 %173, label %174, label %178

174:                                              ; preds = %171
  %175 = load i32, ptr %6, align 4, !tbaa !9
  %176 = call noundef zeroext i1 @_ZNK3spv7Builder12containsTypeEjNS_2OpEj(ptr noundef nonnull align 8 dereferenceable(1096) %19, i32 noundef %175, i32 noundef 21, i32 noundef 16)
  br i1 %176, label %177, label %178

177:                                              ; preds = %174
  call void @_ZN3spv7Builder12addExtensionEPKc(ptr noundef nonnull align 8 dereferenceable(1096) %19, ptr noundef @.str)
  br label %178

178:                                              ; preds = %177, %174, %171
  br label %188

179:                                              ; preds = %168, %168, %168
  %180 = call noundef i32 @_ZNK3spv7Builder13getSpvVersionEv(ptr noundef nonnull align 8 dereferenceable(1096) %19)
  %181 = icmp ult i32 %180, 66304
  br i1 %181, label %182, label %186

182:                                              ; preds = %179
  %183 = load i32, ptr %6, align 4, !tbaa !9
  %184 = call noundef zeroext i1 @_ZNK3spv7Builder12containsTypeEjNS_2OpEj(ptr noundef nonnull align 8 dereferenceable(1096) %19, i32 noundef %183, i32 noundef 22, i32 noundef 16)
  br i1 %184, label %185, label %186

185:                                              ; preds = %182
  call void @_ZN3spv7Builder12addExtensionEPKc(ptr noundef nonnull align 8 dereferenceable(1096) %19, ptr noundef @.str.2)
  br label %186

186:                                              ; preds = %185, %182, %179
  br label %188

187:                                              ; preds = %168
  br label %188

188:                                              ; preds = %187, %186, %178
  br label %240

189:                                              ; preds = %30, %30
  %190 = load i32, ptr %6, align 4, !tbaa !9
  %191 = call noundef zeroext i1 @_ZNK3spv7Builder13isPointerTypeEj(ptr noundef nonnull align 8 dereferenceable(1096) %19, i32 noundef %190)
  br i1 %191, label %192, label %193

192:                                              ; preds = %189
  br label %240

193:                                              ; preds = %189
  %194 = load i32, ptr %7, align 4, !tbaa !9
  %195 = icmp eq i32 %194, 21
  br i1 %195, label %196, label %206

196:                                              ; preds = %193
  %197 = load i32, ptr %8, align 4, !tbaa !9
  %198 = icmp eq i32 %197, 16
  br i1 %198, label %199, label %200

199:                                              ; preds = %196
  call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %19, i32 noundef 22)
  br label %205

200:                                              ; preds = %196
  %201 = load i32, ptr %8, align 4, !tbaa !9
  %202 = icmp eq i32 %201, 8
  br i1 %202, label %203, label %204

203:                                              ; preds = %200
  call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %19, i32 noundef 39)
  br label %204

204:                                              ; preds = %203, %200
  br label %205

205:                                              ; preds = %204, %199
  br label %206

206:                                              ; preds = %205, %193
  br label %207

207:                                              ; preds = %206, %30
  %208 = load i32, ptr %7, align 4, !tbaa !9
  %209 = icmp eq i32 %208, 21
  br i1 %209, label %210, label %225

210:                                              ; preds = %207
  %211 = load i32, ptr %8, align 4, !tbaa !9
  %212 = icmp eq i32 %211, 16
  br i1 %212, label %213, label %214

213:                                              ; preds = %210
  call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %19, i32 noundef 22)
  br label %224

214:                                              ; preds = %210
  %215 = load i32, ptr %8, align 4, !tbaa !9
  %216 = icmp eq i32 %215, 8
  br i1 %216, label %217, label %218

217:                                              ; preds = %214
  call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %19, i32 noundef 39)
  br label %223

218:                                              ; preds = %214
  %219 = load i32, ptr %8, align 4, !tbaa !9
  %220 = icmp eq i32 %219, 64
  br i1 %220, label %221, label %222

221:                                              ; preds = %218
  call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %19, i32 noundef 11)
  br label %222

222:                                              ; preds = %221, %218
  br label %223

223:                                              ; preds = %222, %217
  br label %224

224:                                              ; preds = %223, %213
  br label %239

225:                                              ; preds = %207
  %226 = load i32, ptr %7, align 4, !tbaa !9
  %227 = icmp eq i32 %226, 22
  br i1 %227, label %228, label %238

228:                                              ; preds = %225
  %229 = load i32, ptr %8, align 4, !tbaa !9
  %230 = icmp eq i32 %229, 16
  br i1 %230, label %231, label %232

231:                                              ; preds = %228
  call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %19, i32 noundef 9)
  br label %237

232:                                              ; preds = %228
  %233 = load i32, ptr %8, align 4, !tbaa !9
  %234 = icmp eq i32 %233, 64
  br i1 %234, label %235, label %236

235:                                              ; preds = %232
  call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %19, i32 noundef 10)
  br label %236

236:                                              ; preds = %235, %232
  br label %237

237:                                              ; preds = %236, %231
  br label %238

238:                                              ; preds = %237, %225
  br label %239

239:                                              ; preds = %238, %224
  br label %240

240:                                              ; preds = %239, %192, %188, %167, %78, %30
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #4
  ret void
}

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

declare noundef i32 @_ZNK3spv7Builder21getMostBasicTypeClassEj(ptr noundef nonnull align 8 dereferenceable(1096), i32 noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK3spv7Builder18getScalarTypeWidthEj(ptr noundef nonnull align 8 dereferenceable(1096), i32 noundef) #0 align 2

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

declare noundef zeroext i1 @_ZNK3spv7Builder12containsTypeEjNS_2OpEj(ptr noundef nonnull align 8 dereferenceable(1096), i32 noundef, i32 noundef, i32 noundef) #2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK3spv7Builder15getStorageClassEj(ptr noundef nonnull align 8 dereferenceable(1096), i32 noundef) #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK3spv11Instruction12getIdOperandEi(ptr noundef nonnull align 8 dereferenceable(96), i32 noundef) #0 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK3spv11Instruction19getImmediateOperandEi(ptr noundef nonnull align 8 dereferenceable(96), i32 noundef) #0 align 2

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

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

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

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

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


; 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::_Rb_tree_const_iterator" = type { ptr }

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3spv7Builder15postProcessTypeERKNS_11InstructionEj(ptr noundef nonnull align 8 dereferenceable(1096) %0, ptr noundef nonnull align 8 dereferenceable(96) %1, i32 noundef %2) local_unnamed_addr #0 align 2 {
  %4 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %5 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %6 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %7 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %8 = tail call noundef i32 @_ZNK3spv7Builder21getMostBasicTypeClassEj(ptr noundef nonnull align 8 dereferenceable(1096) %0, i32 noundef %2)
  %9 = icmp eq i32 %8, 22
  %10 = icmp eq i32 %8, 21
  %11 = add i32 %8, -21
  %or.cond = icmp ult i32 %11, 2
  br i1 %or.cond, label %12, label %14

12:                                               ; preds = %3
  %13 = tail call noundef i32 @_ZNK3spv7Builder18getScalarTypeWidthEj(ptr noundef nonnull align 8 dereferenceable(1096) %0, i32 noundef %2)
  br label %14

14:                                               ; preds = %3, %12
  %.0 = phi i32 [ %13, %12 ], [ 0, %3 ]
  %15 = tail call noundef i32 @_ZNK3spv11Instruction9getOpCodeEv(ptr noundef nonnull align 8 dereferenceable(96) %1)
  switch i32 %15, label %91 [
    i32 61, label %16
    i32 62, label %16
    i32 83, label %98
    i32 115, label %36
    i32 114, label %36
    i32 113, label %36
    i32 12, label %73
    i32 65, label %87
    i32 67, label %87
  ]

16:                                               ; preds = %14, %14
  %17 = icmp eq i32 %8, 30
  br i1 %17, label %18, label %27

18:                                               ; preds = %16
  %19 = tail call noundef zeroext i1 @_ZNK3spv7Builder12containsTypeEjNS_2OpEj(ptr noundef nonnull align 8 dereferenceable(1096) %0, i32 noundef %2, i32 noundef 21, i32 noundef 8)
  br i1 %19, label %20, label %21

20:                                               ; preds = %18
  tail call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %0, i32 noundef 39)
  br label %21

21:                                               ; preds = %20, %18
  %22 = tail call noundef zeroext i1 @_ZNK3spv7Builder12containsTypeEjNS_2OpEj(ptr noundef nonnull align 8 dereferenceable(1096) %0, i32 noundef %2, i32 noundef 21, i32 noundef 16)
  br i1 %22, label %23, label %24

23:                                               ; preds = %21
  tail call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %0, i32 noundef 22)
  br label %24

24:                                               ; preds = %23, %21
  %25 = tail call noundef zeroext i1 @_ZNK3spv7Builder12containsTypeEjNS_2OpEj(ptr noundef nonnull align 8 dereferenceable(1096) %0, i32 noundef %2, i32 noundef 22, i32 noundef 16)
  br i1 %25, label %26, label %98

26:                                               ; preds = %24
  tail call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %0, i32 noundef 9)
  br label %98

27:                                               ; preds = %16
  %28 = tail call noundef i32 @_ZNK3spv11Instruction12getIdOperandEi(ptr noundef nonnull align 8 dereferenceable(96) %1, i32 noundef 0)
  %29 = tail call noundef i32 @_ZNK3spv7Builder15getStorageClassEj(ptr noundef nonnull align 8 dereferenceable(1096) %0, i32 noundef %28)
  switch i32 %.0, label %98 [
    i32 8, label %30
    i32 16, label %32
  ]

30:                                               ; preds = %27
  switch i32 %29, label %31 [
    i32 5349, label %98
    i32 2, label %98
    i32 12, label %98
    i32 9, label %98
  ]

31:                                               ; preds = %30
  tail call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %0, i32 noundef 39)
  br label %98

32:                                               ; preds = %27
  switch i32 %29, label %33 [
    i32 5349, label %98
    i32 2, label %98
    i32 12, label %98
    i32 9, label %98
    i32 1, label %98
    i32 3, label %98
  ]

33:                                               ; preds = %32
  br i1 %10, label %.thread, label %34

.thread:                                          ; preds = %33
  tail call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %0, i32 noundef 22)
  br label %98

34:                                               ; preds = %33
  br i1 %9, label %35, label %98

35:                                               ; preds = %34
  tail call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %0, i32 noundef 9)
  br label %98

36:                                               ; preds = %14, %14, %14
  %37 = tail call noundef zeroext i1 @_ZNK3spv7Builder12containsTypeEjNS_2OpEj(ptr noundef nonnull align 8 dereferenceable(1096) %0, i32 noundef %2, i32 noundef 22, i32 noundef 16)
  br i1 %37, label %40, label %38

38:                                               ; preds = %36
  %39 = tail call noundef zeroext i1 @_ZNK3spv7Builder12containsTypeEjNS_2OpEj(ptr noundef nonnull align 8 dereferenceable(1096) %0, i32 noundef %2, i32 noundef 21, i32 noundef 16)
  br i1 %39, label %40, label %58

40:                                               ; preds = %38, %36
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %41 = getelementptr inbounds i8, ptr %0, i64 184
  %42 = tail call ptr @_ZNKSt3setIN3spv10CapabilityESt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %41) #4
  store ptr %42, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  %43 = tail call ptr @_ZNKSt3setIN3spv10CapabilityESt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %41) #4
  store ptr %43, ptr %5, align 8
  %44 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIN3spv10CapabilityEES4_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  br i1 %44, label %.lr.ph, label %.loopexit77

.lr.ph:                                           ; preds = %40, %48
  %45 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIN3spv10CapabilityEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %46 = load i32, ptr %45, align 4, !tbaa !5
  %47 = add i32 %46, -4437
  %or.cond8 = icmp ult i32 %47, -4
  br i1 %or.cond8, label %48, label %52

48:                                               ; preds = %.lr.ph
  %49 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIN3spv10CapabilityEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  %50 = call ptr @_ZNKSt3setIN3spv10CapabilityESt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %41) #4
  store ptr %50, ptr %5, align 8
  %51 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIN3spv10CapabilityEES4_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  br i1 %51, label %.lr.ph, label %.loopexit77, !llvm.loop !9

52:                                               ; preds = %.lr.ph
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  br label %58

.loopexit77:                                      ; preds = %48, %40
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  %53 = call noundef zeroext i1 @_ZNK3spv7Builder12containsTypeEjNS_2OpEj(ptr noundef nonnull align 8 dereferenceable(1096) %0, i32 noundef %2, i32 noundef 22, i32 noundef 16)
  br i1 %53, label %54, label %55

54:                                               ; preds = %.loopexit77
  call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %0, i32 noundef 9)
  br label %55

55:                                               ; preds = %54, %.loopexit77
  %56 = call noundef zeroext i1 @_ZNK3spv7Builder12containsTypeEjNS_2OpEj(ptr noundef nonnull align 8 dereferenceable(1096) %0, i32 noundef %2, i32 noundef 21, i32 noundef 16)
  br i1 %56, label %57, label %58

57:                                               ; preds = %55
  call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %0, i32 noundef 22)
  br label %58

58:                                               ; preds = %52, %57, %55, %38
  %59 = call noundef zeroext i1 @_ZNK3spv7Builder12containsTypeEjNS_2OpEj(ptr noundef nonnull align 8 dereferenceable(1096) %0, i32 noundef %2, i32 noundef 21, i32 noundef 8)
  br i1 %59, label %60, label %98

60:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  %61 = getelementptr inbounds i8, ptr %0, i64 184
  %62 = call ptr @_ZNKSt3setIN3spv10CapabilityESt4lessIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(48) %61) #4
  store ptr %62, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  %63 = call ptr @_ZNKSt3setIN3spv10CapabilityESt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %61) #4
  store ptr %63, ptr %7, align 8
  %64 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIN3spv10CapabilityEES4_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  br i1 %64, label %.lr.ph72, label %.loopexit

.lr.ph72:                                         ; preds = %60, %68
  %65 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt23_Rb_tree_const_iteratorIN3spv10CapabilityEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  %66 = load i32, ptr %65, align 4, !tbaa !5
  %67 = add i32 %66, -4451
  %or.cond12 = icmp ult i32 %67, -3
  br i1 %or.cond12, label %68, label %72

68:                                               ; preds = %.lr.ph72
  %69 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt23_Rb_tree_const_iteratorIN3spv10CapabilityEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  %70 = call ptr @_ZNKSt3setIN3spv10CapabilityESt4lessIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %61) #4
  store ptr %70, ptr %7, align 8
  %71 = call noundef zeroext i1 @_ZStneRKSt23_Rb_tree_const_iteratorIN3spv10CapabilityEES4_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  br i1 %71, label %.lr.ph72, label %.loopexit, !llvm.loop !11

72:                                               ; preds = %.lr.ph72
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  br label %98

.loopexit:                                        ; preds = %68, %60
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %0, i32 noundef 39)
  br label %98

73:                                               ; preds = %14
  %74 = tail call noundef i32 @_ZNK3spv11Instruction19getImmediateOperandEi(ptr noundef nonnull align 8 dereferenceable(96) %1, i32 noundef 1)
  switch i32 %74, label %98 [
    i32 51, label %75
    i32 52, label %75
    i32 76, label %81
    i32 77, label %81
    i32 78, label %81
  ]

75:                                               ; preds = %73, %73
  %76 = tail call noundef i32 @_ZNK3spv7Builder13getSpvVersionEv(ptr noundef nonnull align 8 dereferenceable(1096) %0)
  %77 = icmp ult i32 %76, 66304
  br i1 %77, label %78, label %98

78:                                               ; preds = %75
  %79 = tail call noundef zeroext i1 @_ZNK3spv7Builder12containsTypeEjNS_2OpEj(ptr noundef nonnull align 8 dereferenceable(1096) %0, i32 noundef %2, i32 noundef 21, i32 noundef 16)
  br i1 %79, label %80, label %98

80:                                               ; preds = %78
  tail call void @_ZN3spv7Builder12addExtensionEPKc(ptr noundef nonnull align 8 dereferenceable(1096) %0, ptr noundef nonnull @.str)
  br label %98

81:                                               ; preds = %73, %73, %73
  %82 = tail call noundef i32 @_ZNK3spv7Builder13getSpvVersionEv(ptr noundef nonnull align 8 dereferenceable(1096) %0)
  %83 = icmp ult i32 %82, 66304
  br i1 %83, label %84, label %98

84:                                               ; preds = %81
  %85 = tail call noundef zeroext i1 @_ZNK3spv7Builder12containsTypeEjNS_2OpEj(ptr noundef nonnull align 8 dereferenceable(1096) %0, i32 noundef %2, i32 noundef 22, i32 noundef 16)
  br i1 %85, label %86, label %98

86:                                               ; preds = %84
  tail call void @_ZN3spv7Builder12addExtensionEPKc(ptr noundef nonnull align 8 dereferenceable(1096) %0, ptr noundef nonnull @.str.2)
  br label %98

87:                                               ; preds = %14, %14
  %88 = tail call noundef zeroext i1 @_ZNK3spv7Builder13isPointerTypeEj(ptr noundef nonnull align 8 dereferenceable(1096) %0, i32 noundef %2)
  br i1 %88, label %98, label %89

89:                                               ; preds = %87
  br i1 %10, label %90, label %.critedge

90:                                               ; preds = %89
  switch i32 %.0, label %98 [
    i32 16, label %.thread64.thread
    i32 8, label %.thread64.thread65
    i32 64, label %94
  ]

.thread64.thread:                                 ; preds = %90
  tail call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %0, i32 noundef 22)
  br label %92

.thread64.thread65:                               ; preds = %90
  tail call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %0, i32 noundef 39)
  br label %93

91:                                               ; preds = %14
  br i1 %10, label %.thread64, label %.critedge

.thread64:                                        ; preds = %91
  switch i32 %.0, label %98 [
    i32 16, label %92
    i32 8, label %93
    i32 64, label %94
  ]

92:                                               ; preds = %.thread64.thread, %.thread64
  tail call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %0, i32 noundef 22)
  br label %98

93:                                               ; preds = %.thread64.thread65, %.thread64
  tail call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %0, i32 noundef 39)
  br label %98

94:                                               ; preds = %90, %.thread64
  tail call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %0, i32 noundef 11)
  br label %98

.critedge:                                        ; preds = %89, %91
  br i1 %9, label %95, label %98

95:                                               ; preds = %.critedge
  switch i32 %.0, label %98 [
    i32 16, label %96
    i32 64, label %97
  ]

96:                                               ; preds = %95
  tail call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %0, i32 noundef 9)
  br label %98

97:                                               ; preds = %95
  tail call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %0, i32 noundef 10)
  br label %98

98:                                               ; preds = %72, %90, %.thread, %95, %.thread64, %.loopexit, %30, %30, %30, %30, %31, %32, %32, %32, %32, %32, %32, %35, %34, %27, %93, %94, %92, %96, %97, %.critedge, %87, %80, %78, %75, %86, %84, %81, %73, %58, %26, %24, %14
  ret void
}

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

declare noundef i32 @_ZNK3spv7Builder21getMostBasicTypeClassEj(ptr noundef nonnull align 8 dereferenceable(1096), i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK3spv7Builder18getScalarTypeWidthEj(ptr noundef nonnull align 8 dereferenceable(1096), i32 noundef) local_unnamed_addr #0 align 2

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

declare noundef zeroext i1 @_ZNK3spv7Builder12containsTypeEjNS_2OpEj(ptr noundef nonnull align 8 dereferenceable(1096), i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK3spv7Builder15getStorageClassEj(ptr noundef nonnull align 8 dereferenceable(1096), i32 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK3spv11Instruction12getIdOperandEi(ptr noundef nonnull align 8 dereferenceable(96), i32 noundef) local_unnamed_addr #0 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i32 @_ZNK3spv11Instruction19getImmediateOperandEi(ptr noundef nonnull align 8 dereferenceable(96), i32 noundef) local_unnamed_addr #0 align 2

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

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

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

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

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass