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

; 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::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.82" }
%"struct.std::_Head_base.82" = 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.3 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [29 x i8], align 1
@__PRETTY_FUNCTION__._ZN3spv7Builder13makeImageTypeEjNS_3DimEbbbjNS_11ImageFormatE = external hidden unnamed_addr constant [85 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #0

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3spv6Module14mapInstructionEPNS_11InstructionE(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef) #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorISt10unique_ptrIN3spv11InstructionESt14default_deleteIS2_EESaIS5_EE9push_backEOS5_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) #4 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt10unique_ptrIN3spv11InstructionESt14default_deleteIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #3 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 noundef i32 @_ZNK3spv11Instruction11getResultIdEv(ptr noundef nonnull align 8 dereferenceable(96)) #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt13unordered_mapIjSt6vectorIPN3spv11InstructionESaIS3_EESt4hashIjESt8equal_toIjESaISt4pairIKjS5_EEEixEOj(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(4)) #4 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIPN3spv11InstructionESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(8)) #4 align 2

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

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

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #5

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN3spv7Builder13makeImageTypeEjNS_3DimEbbbjNS_11ImageFormatE(ptr noundef nonnull align 8 dereferenceable(1096) %0, i32 noundef %1, i32 noundef %2, i1 noundef zeroext %3, i1 noundef zeroext %4, i1 noundef zeroext %5, i32 noundef %6, i32 noundef %7) #4 align 2 personality ptr @__gxx_personality_v0 {
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i8, align 1
  %14 = alloca i8, align 1
  %15 = alloca i8, align 1
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca ptr, align 8
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca %"class.std::unique_ptr", align 8
  store ptr %0, ptr %10, align 8, !tbaa !5
  store i32 %1, ptr %11, align 4, !tbaa !9
  store i32 %2, ptr %12, align 4, !tbaa !11
  %27 = zext i1 %3 to i8
  store i8 %27, ptr %13, align 1, !tbaa !13
  %28 = zext i1 %4 to i8
  store i8 %28, ptr %14, align 1, !tbaa !13
  %29 = zext i1 %5 to i8
  store i8 %29, ptr %15, align 1, !tbaa !13
  store i32 %6, ptr %16, align 4, !tbaa !9
  store i32 %7, ptr %17, align 4, !tbaa !15
  %30 = load ptr, ptr %10, align 8
  %31 = load i32, ptr %16, align 4, !tbaa !9
  %32 = icmp eq i32 %31, 1
  br i1 %32, label %36, label %33

33:                                               ; preds = %8
  %34 = load i32, ptr %16, align 4, !tbaa !9
  %35 = icmp eq i32 %34, 2
  br label %36

36:                                               ; preds = %33, %8
  %37 = phi i1 [ true, %8 ], [ %35, %33 ]
  br i1 %37, label %38, label %39

38:                                               ; preds = %36
  br label %41

39:                                               ; preds = %36
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.3, i32 noundef 534, ptr noundef @__PRETTY_FUNCTION__._ZN3spv7Builder13makeImageTypeEjNS_3DimEbbbjNS_11ImageFormatE) #6
  unreachable

40:                                               ; No predecessors!
  br label %41

41:                                               ; preds = %40, %38
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  store i32 0, ptr %19, align 4, !tbaa !9
  br label %42

42:                                               ; preds = %104, %41
  %43 = load i32, ptr %19, align 4, !tbaa !9
  %44 = getelementptr inbounds %"class.spv::Builder", ptr %30, i32 0, i32 34
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  store i32 25, ptr %20, align 4, !tbaa !9
  %45 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt13unordered_mapIjSt6vectorIPN3spv11InstructionESaIS3_EESt4hashIjESt8equal_toIjESaISt4pairIKjS5_EEEixEOj(ptr noundef nonnull align 8 dereferenceable(56) %44, ptr noundef nonnull align 4 dereferenceable(4) %20)
  %46 = call noundef i64 @_ZNKSt6vectorIPN3spv11InstructionESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %45) #7
  %47 = trunc i64 %46 to i32
  %48 = icmp slt i32 %43, %47
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  br i1 %48, label %50, label %49

49:                                               ; preds = %42
  store i32 2, ptr %21, align 4
  br label %107

50:                                               ; preds = %42
  %51 = getelementptr inbounds %"class.spv::Builder", ptr %30, i32 0, i32 34
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #7
  store i32 25, ptr %22, align 4, !tbaa !9
  %52 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt13unordered_mapIjSt6vectorIPN3spv11InstructionESaIS3_EESt4hashIjESt8equal_toIjESaISt4pairIKjS5_EEEixEOj(ptr noundef nonnull align 8 dereferenceable(56) %51, ptr noundef nonnull align 4 dereferenceable(4) %22)
  %53 = load i32, ptr %19, align 4, !tbaa !9
  %54 = sext i32 %53 to i64
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN3spv11InstructionESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %52, i64 noundef %54) #7
  %56 = load ptr, ptr %55, align 8, !tbaa !5
  store ptr %56, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #7
  %57 = load ptr, ptr %18, align 8, !tbaa !5
  %58 = call noundef i32 @_ZNK3spv11Instruction12getIdOperandEi(ptr noundef nonnull align 8 dereferenceable(96) %57, i32 noundef 0)
  %59 = load i32, ptr %11, align 4, !tbaa !9
  %60 = icmp eq i32 %58, %59
  br i1 %60, label %61, label %103

61:                                               ; preds = %50
  %62 = load ptr, ptr %18, align 8, !tbaa !5
  %63 = call noundef i32 @_ZNK3spv11Instruction19getImmediateOperandEi(ptr noundef nonnull align 8 dereferenceable(96) %62, i32 noundef 1)
  %64 = load i32, ptr %12, align 4, !tbaa !11
  %65 = icmp eq i32 %63, %64
  br i1 %65, label %66, label %103

66:                                               ; preds = %61
  %67 = load ptr, ptr %18, align 8, !tbaa !5
  %68 = call noundef i32 @_ZNK3spv11Instruction19getImmediateOperandEi(ptr noundef nonnull align 8 dereferenceable(96) %67, i32 noundef 2)
  %69 = load i8, ptr %13, align 1, !tbaa !13, !range !17, !noundef !18
  %70 = trunc i8 %69 to i1
  %71 = zext i1 %70 to i64
  %72 = select i1 %70, i32 1, i32 0
  %73 = icmp eq i32 %68, %72
  br i1 %73, label %74, label %103

74:                                               ; preds = %66
  %75 = load ptr, ptr %18, align 8, !tbaa !5
  %76 = call noundef i32 @_ZNK3spv11Instruction19getImmediateOperandEi(ptr noundef nonnull align 8 dereferenceable(96) %75, i32 noundef 3)
  %77 = load i8, ptr %14, align 1, !tbaa !13, !range !17, !noundef !18
  %78 = trunc i8 %77 to i1
  %79 = zext i1 %78 to i64
  %80 = select i1 %78, i32 1, i32 0
  %81 = icmp eq i32 %76, %80
  br i1 %81, label %82, label %103

82:                                               ; preds = %74
  %83 = load ptr, ptr %18, align 8, !tbaa !5
  %84 = call noundef i32 @_ZNK3spv11Instruction19getImmediateOperandEi(ptr noundef nonnull align 8 dereferenceable(96) %83, i32 noundef 4)
  %85 = load i8, ptr %15, align 1, !tbaa !13, !range !17, !noundef !18
  %86 = trunc i8 %85 to i1
  %87 = zext i1 %86 to i64
  %88 = select i1 %86, i32 1, i32 0
  %89 = icmp eq i32 %84, %88
  br i1 %89, label %90, label %103

90:                                               ; preds = %82
  %91 = load ptr, ptr %18, align 8, !tbaa !5
  %92 = call noundef i32 @_ZNK3spv11Instruction19getImmediateOperandEi(ptr noundef nonnull align 8 dereferenceable(96) %91, i32 noundef 5)
  %93 = load i32, ptr %16, align 4, !tbaa !9
  %94 = icmp eq i32 %92, %93
  br i1 %94, label %95, label %103

95:                                               ; preds = %90
  %96 = load ptr, ptr %18, align 8, !tbaa !5
  %97 = call noundef i32 @_ZNK3spv11Instruction19getImmediateOperandEi(ptr noundef nonnull align 8 dereferenceable(96) %96, i32 noundef 6)
  %98 = load i32, ptr %17, align 4, !tbaa !15
  %99 = icmp eq i32 %97, %98
  br i1 %99, label %100, label %103

100:                                              ; preds = %95
  %101 = load ptr, ptr %18, align 8, !tbaa !5
  %102 = call noundef i32 @_ZNK3spv11Instruction11getResultIdEv(ptr noundef nonnull align 8 dereferenceable(96) %101)
  store i32 %102, ptr %9, align 4
  store i32 1, ptr %21, align 4
  br label %107

103:                                              ; preds = %95, %90, %82, %74, %66, %61, %50
  br label %104

104:                                              ; preds = %103
  %105 = load i32, ptr %19, align 4, !tbaa !9
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %19, align 4, !tbaa !9
  br label %42, !llvm.loop !19

107:                                              ; preds = %100, %49
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  %108 = load i32, ptr %21, align 4
  switch i32 %108, label %202 [
    i32 2, label %109
  ]

109:                                              ; preds = %107
  %110 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 96) #8
  %111 = invoke noundef i32 @_ZN3spv7Builder11getUniqueIdEv(ptr noundef nonnull align 8 dereferenceable(1096) %30)
          to label %112 unwind label %145

112:                                              ; preds = %109
  invoke void @_ZN3spv11InstructionC2EjjNS_2OpE(ptr noundef nonnull align 8 dereferenceable(96) %110, i32 noundef %111, i32 noundef 0, i32 noundef 25)
          to label %113 unwind label %145

113:                                              ; preds = %112
  store ptr %110, ptr %18, align 8, !tbaa !5
  %114 = load ptr, ptr %18, align 8, !tbaa !5
  %115 = load i32, ptr %11, align 4, !tbaa !9
  call void @_ZN3spv11Instruction12addIdOperandEj(ptr noundef nonnull align 8 dereferenceable(96) %114, i32 noundef %115)
  %116 = load ptr, ptr %18, align 8, !tbaa !5
  %117 = load i32, ptr %12, align 4, !tbaa !11
  call void @_ZN3spv11Instruction19addImmediateOperandEj(ptr noundef nonnull align 8 dereferenceable(96) %116, i32 noundef %117)
  %118 = load ptr, ptr %18, align 8, !tbaa !5
  %119 = load i8, ptr %13, align 1, !tbaa !13, !range !17, !noundef !18
  %120 = trunc i8 %119 to i1
  %121 = zext i1 %120 to i64
  %122 = select i1 %120, i32 1, i32 0
  call void @_ZN3spv11Instruction19addImmediateOperandEj(ptr noundef nonnull align 8 dereferenceable(96) %118, i32 noundef %122)
  %123 = load ptr, ptr %18, align 8, !tbaa !5
  %124 = load i8, ptr %14, align 1, !tbaa !13, !range !17, !noundef !18
  %125 = trunc i8 %124 to i1
  %126 = zext i1 %125 to i64
  %127 = select i1 %125, i32 1, i32 0
  call void @_ZN3spv11Instruction19addImmediateOperandEj(ptr noundef nonnull align 8 dereferenceable(96) %123, i32 noundef %127)
  %128 = load ptr, ptr %18, align 8, !tbaa !5
  %129 = load i8, ptr %15, align 1, !tbaa !13, !range !17, !noundef !18
  %130 = trunc i8 %129 to i1
  %131 = zext i1 %130 to i64
  %132 = select i1 %130, i32 1, i32 0
  call void @_ZN3spv11Instruction19addImmediateOperandEj(ptr noundef nonnull align 8 dereferenceable(96) %128, i32 noundef %132)
  %133 = load ptr, ptr %18, align 8, !tbaa !5
  %134 = load i32, ptr %16, align 4, !tbaa !9
  call void @_ZN3spv11Instruction19addImmediateOperandEj(ptr noundef nonnull align 8 dereferenceable(96) %133, i32 noundef %134)
  %135 = load ptr, ptr %18, align 8, !tbaa !5
  %136 = load i32, ptr %17, align 4, !tbaa !15
  call void @_ZN3spv11Instruction19addImmediateOperandEj(ptr noundef nonnull align 8 dereferenceable(96) %135, i32 noundef %136)
  %137 = getelementptr inbounds %"class.spv::Builder", ptr %30, i32 0, i32 34
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #7
  store i32 25, ptr %25, align 4, !tbaa !9
  %138 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt13unordered_mapIjSt6vectorIPN3spv11InstructionESaIS3_EESt4hashIjESt8equal_toIjESaISt4pairIKjS5_EEEixEOj(ptr noundef nonnull align 8 dereferenceable(56) %137, ptr noundef nonnull align 4 dereferenceable(4) %25)
  call void @_ZNSt6vectorIPN3spv11InstructionESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %138, ptr noundef nonnull align 8 dereferenceable(8) %18)
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #7
  %139 = getelementptr inbounds %"class.spv::Builder", ptr %30, i32 0, i32 29
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  %140 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZNSt10unique_ptrIN3spv11InstructionESt14default_deleteIS1_EEC2IS3_vEEPS1_(ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef %140) #7
  invoke void @_ZNSt6vectorISt10unique_ptrIN3spv11InstructionESt14default_deleteIS2_EESaIS5_EE9push_backEOS5_(ptr noundef nonnull align 8 dereferenceable(24) %139, ptr noundef nonnull align 8 dereferenceable(8) %26)
          to label %141 unwind label %149

141:                                              ; preds = %113
  call void @_ZNSt10unique_ptrIN3spv11InstructionESt14default_deleteIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %26) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  %142 = getelementptr inbounds %"class.spv::Builder", ptr %30, i32 0, i32 16
  %143 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN3spv6Module14mapInstructionEPNS_11InstructionE(ptr noundef nonnull align 8 dereferenceable(56) %142, ptr noundef %143)
  %144 = load i32, ptr %12, align 4, !tbaa !11
  switch i32 %144, label %182 [
    i32 5, label %153
    i32 0, label %159
    i32 3, label %165
    i32 4, label %175
    i32 6, label %181
  ]

145:                                              ; preds = %112, %109
  %146 = landingpad { ptr, i32 }
          cleanup
  %147 = extractvalue { ptr, i32 } %146, 0
  store ptr %147, ptr %23, align 8
  %148 = extractvalue { ptr, i32 } %146, 1
  store i32 %148, ptr %24, align 4
  call void @_ZdlPvm(ptr noundef %110, i64 noundef 96) #9
  br label %204

149:                                              ; preds = %113
  %150 = landingpad { ptr, i32 }
          cleanup
  %151 = extractvalue { ptr, i32 } %150, 0
  store ptr %151, ptr %23, align 8
  %152 = extractvalue { ptr, i32 } %150, 1
  store i32 %152, ptr %24, align 4
  call void @_ZNSt10unique_ptrIN3spv11InstructionESt14default_deleteIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %26) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  br label %204

153:                                              ; preds = %141
  %154 = load i32, ptr %16, align 4, !tbaa !9
  %155 = icmp eq i32 %154, 1
  br i1 %155, label %156, label %157

156:                                              ; preds = %153
  call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %30, i32 noundef 46)
  br label %158

157:                                              ; preds = %153
  call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %30, i32 noundef 47)
  br label %158

158:                                              ; preds = %157, %156
  br label %183

159:                                              ; preds = %141
  %160 = load i32, ptr %16, align 4, !tbaa !9
  %161 = icmp eq i32 %160, 1
  br i1 %161, label %162, label %163

162:                                              ; preds = %159
  call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %30, i32 noundef 43)
  br label %164

163:                                              ; preds = %159
  call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %30, i32 noundef 44)
  br label %164

164:                                              ; preds = %163, %162
  br label %183

165:                                              ; preds = %141
  %166 = load i8, ptr %14, align 1, !tbaa !13, !range !17, !noundef !18
  %167 = trunc i8 %166 to i1
  br i1 %167, label %168, label %174

168:                                              ; preds = %165
  %169 = load i32, ptr %16, align 4, !tbaa !9
  %170 = icmp eq i32 %169, 1
  br i1 %170, label %171, label %172

171:                                              ; preds = %168
  call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %30, i32 noundef 45)
  br label %173

172:                                              ; preds = %168
  call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %30, i32 noundef 34)
  br label %173

173:                                              ; preds = %172, %171
  br label %174

174:                                              ; preds = %173, %165
  br label %183

175:                                              ; preds = %141
  %176 = load i32, ptr %16, align 4, !tbaa !9
  %177 = icmp eq i32 %176, 1
  br i1 %177, label %178, label %179

178:                                              ; preds = %175
  call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %30, i32 noundef 37)
  br label %180

179:                                              ; preds = %175
  call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %30, i32 noundef 36)
  br label %180

180:                                              ; preds = %179, %178
  br label %183

181:                                              ; preds = %141
  call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %30, i32 noundef 40)
  br label %183

182:                                              ; preds = %141
  br label %183

183:                                              ; preds = %182, %181, %180, %174, %164, %158
  %184 = load i8, ptr %15, align 1, !tbaa !13, !range !17, !noundef !18
  %185 = trunc i8 %184 to i1
  br i1 %185, label %186, label %199

186:                                              ; preds = %183
  %187 = load i32, ptr %16, align 4, !tbaa !9
  %188 = icmp eq i32 %187, 2
  br i1 %188, label %189, label %198

189:                                              ; preds = %186
  %190 = load i32, ptr %12, align 4, !tbaa !11
  %191 = icmp ne i32 %190, 6
  br i1 %191, label %192, label %193

192:                                              ; preds = %189
  call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %30, i32 noundef 27)
  br label %193

193:                                              ; preds = %192, %189
  %194 = load i8, ptr %14, align 1, !tbaa !13, !range !17, !noundef !18
  %195 = trunc i8 %194 to i1
  br i1 %195, label %196, label %197

196:                                              ; preds = %193
  call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %30, i32 noundef 48)
  br label %197

197:                                              ; preds = %196, %193
  br label %198

198:                                              ; preds = %197, %186
  br label %199

199:                                              ; preds = %198, %183
  %200 = load ptr, ptr %18, align 8, !tbaa !5
  %201 = call noundef i32 @_ZNK3spv11Instruction11getResultIdEv(ptr noundef nonnull align 8 dereferenceable(96) %200)
  store i32 %201, ptr %9, align 4
  store i32 1, ptr %21, align 4
  br label %202

202:                                              ; preds = %199, %107
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  %203 = load i32, ptr %9, align 4
  ret i32 %203

204:                                              ; preds = %149, %145
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %205

205:                                              ; preds = %204
  %206 = load ptr, ptr %23, align 8
  %207 = load i32, ptr %24, align 4
  %208 = insertvalue { ptr, i32 } poison, ptr %206, 0
  %209 = insertvalue { ptr, i32 } %208, i32 %207, 1
  resume { ptr, i32 } %209
}

attributes #0 = { nobuiltin nounwind "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 = { nobuiltin 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 #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 = { 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 #5 = { noreturn nounwind "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 = { noreturn nounwind }
attributes #7 = { nounwind }
attributes #8 = { builtin allocsize(0) }
attributes #9 = { builtin 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 = !{!"_ZTSN3spv3DimE", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"_ZTSN3spv11ImageFormatE", !7, i64 0}
!17 = !{i8 0, i8 2}
!18 = !{}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}


; 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::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.82" }
%"struct.std::_Head_base.82" = type { ptr }

@.str.3 = external hidden unnamed_addr constant [91 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [29 x i8], align 1
@__PRETTY_FUNCTION__._ZN3spv7Builder13makeImageTypeEjNS_3DimEbbbjNS_11ImageFormatE = external hidden unnamed_addr constant [85 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #1

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

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

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt13unordered_mapIjSt6vectorIPN3spv11InstructionESaIS3_EESt4hashIjESt8equal_toIjESaISt4pairIKjS5_EEEixEOj(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIPN3spv11InstructionESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24), 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 @_ZNSt6vectorIPN3spv11InstructionESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 align 2

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

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN3spv7Builder13makeImageTypeEjNS_3DimEbbbjNS_11ImageFormatE(ptr noundef nonnull align 8 dereferenceable(1096) %0, i32 noundef %1, i32 noundef %2, i1 noundef zeroext %3, i1 noundef zeroext %4, i1 noundef zeroext %5, i32 noundef %6, i32 noundef %7) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca %"class.std::unique_ptr", align 8
  %14 = icmp eq i32 %6, 1
  %15 = icmp eq i32 %6, 2
  %16 = add i32 %6, -1
  %17 = icmp ult i32 %16, 2
  br i1 %17, label %19, label %18

18:                                               ; preds = %8
  tail call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.3, i32 noundef 534, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN3spv7Builder13makeImageTypeEjNS_3DimEbbbjNS_11ImageFormatE) #5
  unreachable

19:                                               ; preds = %8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  %20 = getelementptr inbounds i8, ptr %0, i64 744
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #6
  store i32 25, ptr %10, align 4, !tbaa !5
  %21 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt13unordered_mapIjSt6vectorIPN3spv11InstructionESaIS3_EESt4hashIjESt8equal_toIjESaISt4pairIKjS5_EEEixEOj(ptr noundef nonnull align 8 dereferenceable(56) %20, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %22 = call noundef i64 @_ZNKSt6vectorIPN3spv11InstructionESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #6
  %23 = trunc i64 %22 to i32
  %.not46 = icmp sgt i32 %23, 0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #6
  %24 = zext i1 %3 to i32
  %25 = zext i1 %4 to i32
  %26 = zext i1 %5 to i32
  br i1 %.not46, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %19, %50
  %indvars.iv = phi i64 [ %indvars.iv.next, %50 ], [ 0, %19 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #6
  store i32 25, ptr %11, align 4, !tbaa !5
  %27 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt13unordered_mapIjSt6vectorIPN3spv11InstructionESaIS3_EESt4hashIjESt8equal_toIjESaISt4pairIKjS5_EEEixEOj(ptr noundef nonnull align 8 dereferenceable(56) %20, ptr noundef nonnull align 4 dereferenceable(4) %11)
  %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN3spv11InstructionESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %27, i64 noundef %indvars.iv) #6
  %29 = load ptr, ptr %28, align 8, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #6
  %30 = call noundef i32 @_ZNK3spv11Instruction12getIdOperandEi(ptr noundef nonnull align 8 dereferenceable(96) %29, i32 noundef 0)
  %31 = icmp eq i32 %30, %1
  br i1 %31, label %32, label %50

32:                                               ; preds = %.lr.ph
  %33 = call noundef i32 @_ZNK3spv11Instruction19getImmediateOperandEi(ptr noundef nonnull align 8 dereferenceable(96) %29, i32 noundef 1)
  %34 = icmp eq i32 %33, %2
  br i1 %34, label %35, label %50

35:                                               ; preds = %32
  %36 = call noundef i32 @_ZNK3spv11Instruction19getImmediateOperandEi(ptr noundef nonnull align 8 dereferenceable(96) %29, i32 noundef 2)
  %37 = icmp eq i32 %36, %24
  br i1 %37, label %38, label %50

38:                                               ; preds = %35
  %39 = call noundef i32 @_ZNK3spv11Instruction19getImmediateOperandEi(ptr noundef nonnull align 8 dereferenceable(96) %29, i32 noundef 3)
  %40 = icmp eq i32 %39, %25
  br i1 %40, label %41, label %50

41:                                               ; preds = %38
  %42 = call noundef i32 @_ZNK3spv11Instruction19getImmediateOperandEi(ptr noundef nonnull align 8 dereferenceable(96) %29, i32 noundef 4)
  %43 = icmp eq i32 %42, %26
  br i1 %43, label %44, label %50

44:                                               ; preds = %41
  %45 = call noundef i32 @_ZNK3spv11Instruction19getImmediateOperandEi(ptr noundef nonnull align 8 dereferenceable(96) %29, i32 noundef 5)
  %46 = icmp eq i32 %45, %6
  br i1 %46, label %47, label %50

47:                                               ; preds = %44
  %48 = call noundef i32 @_ZNK3spv11Instruction19getImmediateOperandEi(ptr noundef nonnull align 8 dereferenceable(96) %29, i32 noundef 6)
  %49 = icmp eq i32 %48, %7
  br i1 %49, label %.thread, label %50

50:                                               ; preds = %.lr.ph, %32, %35, %38, %41, %44, %47
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #6
  store i32 25, ptr %10, align 4, !tbaa !5
  %51 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt13unordered_mapIjSt6vectorIPN3spv11InstructionESaIS3_EESt4hashIjESt8equal_toIjESaISt4pairIKjS5_EEEixEOj(ptr noundef nonnull align 8 dereferenceable(56) %20, ptr noundef nonnull align 4 dereferenceable(4) %10)
  %52 = call noundef i64 @_ZNKSt6vectorIPN3spv11InstructionESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %51) #6
  %sext = shl i64 %52, 32
  %53 = ashr exact i64 %sext, 32
  %.not = icmp slt i64 %indvars.iv.next, %53
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #6
  br i1 %.not, label %.lr.ph, label %._crit_edge, !llvm.loop !11

._crit_edge:                                      ; preds = %50, %19
  %54 = call noalias noundef nonnull dereferenceable(96) ptr @_Znwm(i64 noundef 96) #7
  %55 = call noundef i32 @_ZN3spv7Builder11getUniqueIdEv(ptr noundef nonnull align 8 dereferenceable(1096) %0)
  call void @_ZN3spv11InstructionC2EjjNS_2OpE(ptr noundef nonnull align 8 dereferenceable(96) %54, i32 noundef %55, i32 noundef 0, i32 noundef 25)
  store ptr %54, ptr %9, align 8, !tbaa !9
  call void @_ZN3spv11Instruction12addIdOperandEj(ptr noundef nonnull align 8 dereferenceable(96) %54, i32 noundef %1)
  call void @_ZN3spv11Instruction19addImmediateOperandEj(ptr noundef nonnull align 8 dereferenceable(96) %54, i32 noundef %2)
  call void @_ZN3spv11Instruction19addImmediateOperandEj(ptr noundef nonnull align 8 dereferenceable(96) %54, i32 noundef %24)
  call void @_ZN3spv11Instruction19addImmediateOperandEj(ptr noundef nonnull align 8 dereferenceable(96) %54, i32 noundef %25)
  call void @_ZN3spv11Instruction19addImmediateOperandEj(ptr noundef nonnull align 8 dereferenceable(96) %54, i32 noundef %26)
  call void @_ZN3spv11Instruction19addImmediateOperandEj(ptr noundef nonnull align 8 dereferenceable(96) %54, i32 noundef %6)
  call void @_ZN3spv11Instruction19addImmediateOperandEj(ptr noundef nonnull align 8 dereferenceable(96) %54, i32 noundef %7)
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %12) #6
  store i32 25, ptr %12, align 4, !tbaa !5
  %56 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt13unordered_mapIjSt6vectorIPN3spv11InstructionESaIS3_EESt4hashIjESt8equal_toIjESaISt4pairIKjS5_EEEixEOj(ptr noundef nonnull align 8 dereferenceable(56) %20, ptr noundef nonnull align 4 dereferenceable(4) %12)
  call void @_ZNSt6vectorIPN3spv11InstructionESaIS2_EE9push_backERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %56, ptr noundef nonnull align 8 dereferenceable(8) %9)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %12) #6
  %57 = getelementptr inbounds i8, ptr %0, i64 560
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #6
  %58 = load ptr, ptr %9, align 8, !tbaa !9
  call void @_ZNSt10unique_ptrIN3spv11InstructionESt14default_deleteIS1_EEC2IS3_vEEPS1_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef %58) #6
  invoke void @_ZNSt6vectorISt10unique_ptrIN3spv11InstructionESt14default_deleteIS2_EESaIS5_EE9push_backEOS5_(ptr noundef nonnull align 8 dereferenceable(24) %57, ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %59 unwind label %62

59:                                               ; preds = %._crit_edge
  call void @_ZNSt10unique_ptrIN3spv11InstructionESt14default_deleteIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  %60 = getelementptr inbounds i8, ptr %0, i64 240
  %61 = load ptr, ptr %9, align 8, !tbaa !9
  call void @_ZN3spv6Module14mapInstructionEPNS_11InstructionE(ptr noundef nonnull align 8 dereferenceable(56) %60, ptr noundef %61)
  switch i32 %2, label %69 [
    i32 5, label %64
    i32 0, label %65
    i32 3, label %66
    i32 4, label %68
    i32 6, label %.thread40
  ]

62:                                               ; preds = %._crit_edge
  %63 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt10unique_ptrIN3spv11InstructionESt14default_deleteIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  resume { ptr, i32 } %63

64:                                               ; preds = %59
  br i1 %14, label %.thread38.sink.split, label %.sink.split

65:                                               ; preds = %59
  br i1 %14, label %.thread38.sink.split, label %.sink.split

66:                                               ; preds = %59
  br i1 %4, label %67, label %69

67:                                               ; preds = %66
  br i1 %14, label %.thread38.sink.split, label %.sink.split

68:                                               ; preds = %59
  br i1 %14, label %.thread38.sink.split, label %.sink.split

.sink.split:                                      ; preds = %68, %67, %65, %64
  %.sink = phi i32 [ 47, %64 ], [ 44, %65 ], [ 34, %67 ], [ 36, %68 ]
  call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %0, i32 noundef %.sink)
  br label %69

69:                                               ; preds = %.sink.split, %59, %66
  %or.cond = and i1 %15, %5
  br i1 %or.cond, label %70, label %.thread38

.thread40:                                        ; preds = %59
  call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %0, i32 noundef 40)
  %or.cond41 = and i1 %15, %5
  %brmerge.demorgan = and i1 %or.cond41, %4
  br i1 %brmerge.demorgan, label %.thread38.sink.split, label %.thread38

70:                                               ; preds = %69
  %.not36 = icmp eq i32 %2, 6
  br i1 %.not36, label %.thread42, label %71

71:                                               ; preds = %70
  call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %0, i32 noundef 27)
  br label %.thread42

.thread42:                                        ; preds = %71, %70
  br i1 %4, label %.thread38.sink.split, label %.thread38

.thread38.sink.split:                             ; preds = %.thread42, %.thread40, %68, %67, %65, %64
  %.sink54 = phi i32 [ 46, %64 ], [ 43, %65 ], [ 45, %67 ], [ 37, %68 ], [ 48, %.thread40 ], [ 48, %.thread42 ]
  call void @_ZN3spv7Builder13addCapabilityENS_10CapabilityE(ptr noundef nonnull align 8 dereferenceable(1096) %0, i32 noundef %.sink54)
  br label %.thread38

.thread38:                                        ; preds = %.thread38.sink.split, %.thread40, %.thread42, %69
  %72 = load ptr, ptr %9, align 8, !tbaa !9
  br label %.thread

.thread:                                          ; preds = %47, %.thread38
  %.lcssa.sink = phi ptr [ %72, %.thread38 ], [ %29, %47 ]
  %73 = call noundef i32 @_ZNK3spv11Instruction11getResultIdEv(ptr noundef nonnull align 8 dereferenceable(96) %.lcssa.sink)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  ret i32 %73
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nobuiltin 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 #2 = { 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 #3 = { 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 #4 = { noreturn nounwind "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 = { noreturn nounwind }
attributes #6 = { nounwind }
attributes #7 = { builtin allocsize(0) }

!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 = !{!"any pointer", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass