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

; 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.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" }

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK3spv6Module14getInstructionEj(ptr noundef nonnull align 8 dereferenceable(56), i32 noundef) #2 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK3spv7Builder12containsTypeEjNS_2OpEj(ptr noundef nonnull align 8 dereferenceable(1096) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) #1 align 2 {
  %5 = alloca i1, align 1
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store i32 %2, ptr %8, align 4, !tbaa !11
  store i32 %3, ptr %9, align 4, !tbaa !9
  %14 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %15 = getelementptr inbounds %"class.spv::Builder", ptr %14, i32 0, i32 16
  %16 = load i32, ptr %7, align 4, !tbaa !9
  %17 = call noundef ptr @_ZNK3spv6Module14getInstructionEj(ptr noundef nonnull align 8 dereferenceable(56) %15, i32 noundef %16)
  store ptr %17, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #3
  %18 = load ptr, ptr %10, align 8, !tbaa !5
  %19 = call noundef i32 @_ZNK3spv11Instruction9getOpCodeEv(ptr noundef nonnull align 8 dereferenceable(96) %18)
  store i32 %19, ptr %11, align 4, !tbaa !11
  %20 = load i32, ptr %11, align 4, !tbaa !11
  switch i32 %20, label %61 [
    i32 21, label %21
    i32 22, label %21
    i32 30, label %32
    i32 32, label %54
    i32 23, label %55
    i32 24, label %55
    i32 28, label %55
    i32 29, label %55
  ]

21:                                               ; preds = %4, %4
  %22 = load i32, ptr %11, align 4, !tbaa !11
  %23 = load i32, ptr %8, align 4, !tbaa !11
  %24 = icmp eq i32 %22, %23
  br i1 %24, label %25, label %30

25:                                               ; preds = %21
  %26 = load ptr, ptr %10, align 8, !tbaa !5
  %27 = call noundef i32 @_ZNK3spv11Instruction19getImmediateOperandEi(ptr noundef nonnull align 8 dereferenceable(96) %26, i32 noundef 0)
  %28 = load i32, ptr %9, align 4, !tbaa !9
  %29 = icmp eq i32 %27, %28
  br label %30

30:                                               ; preds = %25, %21
  %31 = phi i1 [ false, %21 ], [ %29, %25 ]
  store i1 %31, ptr %5, align 1
  store i32 1, ptr %12, align 4
  br label %65

32:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %33

33:                                               ; preds = %48, %32
  %34 = load i32, ptr %13, align 4, !tbaa !9
  %35 = load ptr, ptr %10, align 8, !tbaa !5
  %36 = call noundef i32 @_ZNK3spv11Instruction14getNumOperandsEv(ptr noundef nonnull align 8 dereferenceable(96) %35)
  %37 = icmp slt i32 %34, %36
  br i1 %37, label %39, label %38

38:                                               ; preds = %33
  store i32 3, ptr %12, align 4
  br label %51

39:                                               ; preds = %33
  %40 = load ptr, ptr %10, align 8, !tbaa !5
  %41 = load i32, ptr %13, align 4, !tbaa !9
  %42 = call noundef i32 @_ZNK3spv11Instruction12getIdOperandEi(ptr noundef nonnull align 8 dereferenceable(96) %40, i32 noundef %41)
  %43 = load i32, ptr %8, align 4, !tbaa !11
  %44 = load i32, ptr %9, align 4, !tbaa !9
  %45 = call noundef zeroext i1 @_ZNK3spv7Builder12containsTypeEjNS_2OpEj(ptr noundef nonnull align 8 dereferenceable(1096) %14, i32 noundef %42, i32 noundef %43, i32 noundef %44)
  br i1 %45, label %46, label %47

46:                                               ; preds = %39
  store i1 true, ptr %5, align 1
  store i32 1, ptr %12, align 4
  br label %51

47:                                               ; preds = %39
  br label %48

48:                                               ; preds = %47
  %49 = load i32, ptr %13, align 4, !tbaa !9
  %50 = add nsw i32 %49, 1
  store i32 %50, ptr %13, align 4, !tbaa !9
  br label %33, !llvm.loop !13

51:                                               ; preds = %46, %38
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  %52 = load i32, ptr %12, align 4
  switch i32 %52, label %65 [
    i32 3, label %53
  ]

53:                                               ; preds = %51
  store i1 false, ptr %5, align 1
  store i32 1, ptr %12, align 4
  br label %65

54:                                               ; preds = %4
  store i1 false, ptr %5, align 1
  store i32 1, ptr %12, align 4
  br label %65

55:                                               ; preds = %4, %4, %4, %4
  %56 = load i32, ptr %7, align 4, !tbaa !9
  %57 = call noundef i32 @_ZNK3spv7Builder18getContainedTypeIdEj(ptr noundef nonnull align 8 dereferenceable(1096) %14, i32 noundef %56)
  %58 = load i32, ptr %8, align 4, !tbaa !11
  %59 = load i32, ptr %9, align 4, !tbaa !9
  %60 = call noundef zeroext i1 @_ZNK3spv7Builder12containsTypeEjNS_2OpEj(ptr noundef nonnull align 8 dereferenceable(1096) %14, i32 noundef %57, i32 noundef %58, i32 noundef %59)
  store i1 %60, ptr %5, align 1
  store i32 1, ptr %12, align 4
  br label %65

61:                                               ; preds = %4
  %62 = load i32, ptr %11, align 4, !tbaa !11
  %63 = load i32, ptr %8, align 4, !tbaa !11
  %64 = icmp eq i32 %62, %63
  store i1 %64, ptr %5, align 1
  store i32 1, ptr %12, align 4
  br label %65

65:                                               ; preds = %61, %55, %54, %53, %51, %30
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  %66 = load i1, ptr %5, align 1
  ret i1 %66
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { 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 = { 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 = !{!"_ZTSN3spv2OpE", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"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"

; 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 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 nounwind uwtable
declare dso_local noundef i32 @_ZNK3spv11Instruction14getNumOperandsEv(ptr noundef nonnull align 8 dereferenceable(96)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK3spv6Module14getInstructionEj(ptr noundef nonnull align 8 dereferenceable(56), i32 noundef) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK3spv7Builder12containsTypeEjNS_2OpEj(ptr noundef nonnull align 8 dereferenceable(1096) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #0 align 2 {
  %5 = getelementptr inbounds i8, ptr %0, i64 240
  br label %tailrecurse

tailrecurse:                                      ; preds = %19, %4
  %.tr23 = phi i32 [ %1, %4 ], [ %20, %19 ]
  %6 = tail call noundef ptr @_ZNK3spv6Module14getInstructionEj(ptr noundef nonnull align 8 dereferenceable(56) %5, i32 noundef %.tr23)
  %7 = tail call noundef i32 @_ZNK3spv11Instruction9getOpCodeEv(ptr noundef nonnull align 8 dereferenceable(96) %6)
  switch i32 %7, label %21 [
    i32 21, label %9
    i32 22, label %9
    i32 30, label %.preheader
    i32 32, label %.loopexit
    i32 23, label %19
    i32 24, label %19
    i32 28, label %19
    i32 29, label %19
  ]

.preheader:                                       ; preds = %tailrecurse
  %8 = tail call noundef i32 @_ZNK3spv11Instruction14getNumOperandsEv(ptr noundef nonnull align 8 dereferenceable(96) %6)
  %.not34 = icmp sgt i32 %8, 0
  br i1 %.not34, label %.lr.ph, label %.loopexit

9:                                                ; preds = %tailrecurse, %tailrecurse
  %10 = icmp eq i32 %7, %2
  br i1 %10, label %11, label %.loopexit

11:                                               ; preds = %9
  %12 = tail call noundef i32 @_ZNK3spv11Instruction19getImmediateOperandEi(ptr noundef nonnull align 8 dereferenceable(96) %6, i32 noundef 0)
  %13 = icmp eq i32 %12, %3
  br label %.loopexit

14:                                               ; preds = %.lr.ph
  %15 = add nuw nsw i32 %.035, 1
  %16 = tail call noundef i32 @_ZNK3spv11Instruction14getNumOperandsEv(ptr noundef nonnull align 8 dereferenceable(96) %6)
  %.not = icmp slt i32 %15, %16
  br i1 %.not, label %.lr.ph, label %.loopexit, !llvm.loop !5

.lr.ph:                                           ; preds = %.preheader, %14
  %.035 = phi i32 [ %15, %14 ], [ 0, %.preheader ]
  %17 = tail call noundef i32 @_ZNK3spv11Instruction12getIdOperandEi(ptr noundef nonnull align 8 dereferenceable(96) %6, i32 noundef %.035)
  %18 = tail call noundef zeroext i1 @_ZNK3spv7Builder12containsTypeEjNS_2OpEj(ptr noundef nonnull align 8 dereferenceable(1096) %0, i32 noundef %17, i32 noundef %2, i32 noundef %3)
  br i1 %18, label %.loopexit, label %14

19:                                               ; preds = %tailrecurse, %tailrecurse, %tailrecurse, %tailrecurse
  %20 = tail call noundef i32 @_ZNK3spv7Builder18getContainedTypeIdEj(ptr noundef nonnull align 8 dereferenceable(1096) %0, i32 noundef %.tr23)
  br label %tailrecurse

21:                                               ; preds = %tailrecurse
  %22 = icmp eq i32 %7, %2
  br label %.loopexit

.loopexit:                                        ; preds = %tailrecurse, %.lr.ph, %14, %.preheader, %9, %11, %21
  %.1 = phi i1 [ %22, %21 ], [ false, %9 ], [ %13, %11 ], [ false, %.preheader ], [ %18, %14 ], [ %18, %.lr.ph ], [ false, %tailrecurse ]
  ret i1 %.1
}

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 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" }

!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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}


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