; LLVM IR from NervanaSystems/ngraph :: src/ngraph/op/broadcast.ll (ZN6ngraph2op2v013BroadcastLike11infer_shapeEv)

; 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::pair.173" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"class.ngraph::op::v0::Broadcast" = type { %"class.ngraph::op::Op", %"class.ngraph::Shape", %"class.ngraph::AxisSet" }
%"class.ngraph::op::Op" = type { %"class.ngraph::Node" }
%"class.ngraph::Node" = type { ptr, %"class.std::enable_shared_from_this", %"class.std::unordered_set", %"class.std::unordered_set", %"class.std::vector", %"class.std::vector.5", %"class.std::__cxx11::basic_string", i64, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", %"class.std::unordered_set.13", %"class.std::set", %"class.std::deque", %"class.std::deque.39", %"class.std::unordered_map", i32, %"class.std::shared_ptr", %"class.std::map" }
%"class.std::enable_shared_from_this" = type { %"class.std::weak_ptr" }
%"class.std::weak_ptr" = type { %"class.std::__weak_ptr" }
%"class.std::__weak_ptr" = type { ptr, %"class.std::__weak_count" }
%"class.std::__weak_count" = type { ptr }
%"class.std::unordered_set" = 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" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<ngraph::Node *, std::allocator<ngraph::Node *>>::_Vector_impl" }
%"struct.std::_Vector_base<ngraph::Node *, std::allocator<ngraph::Node *>>::_Vector_impl" = type { %"struct.std::_Vector_base<ngraph::Node *, std::allocator<ngraph::Node *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ngraph::Node *, std::allocator<ngraph::Node *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<std::shared_ptr<ngraph::Node>, std::allocator<std::shared_ptr<ngraph::Node>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<ngraph::Node>, std::allocator<std::shared_ptr<ngraph::Node>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<ngraph::Node>, std::allocator<std::shared_ptr<ngraph::Node>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<ngraph::Node>, std::allocator<std::shared_ptr<ngraph::Node>>>::_Vector_impl_data" = type { ptr, ptr, 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::unordered_set.13" = type { %"class.std::_Hashtable.14" }
%"class.std::_Hashtable.14" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::shared_ptr<ngraph::Node>, std::shared_ptr<ngraph::Node>, std::_Identity<std::shared_ptr<ngraph::Node>>, std::less<std::shared_ptr<ngraph::Node>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::shared_ptr<ngraph::Node>, std::shared_ptr<ngraph::Node>, std::_Identity<std::shared_ptr<ngraph::Node>>, std::less<std::shared_ptr<ngraph::Node>>>::_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::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<ngraph::descriptor::Input, std::allocator<ngraph::descriptor::Input>>::_Deque_impl" }
%"struct.std::_Deque_base<ngraph::descriptor::Input, std::allocator<ngraph::descriptor::Input>>::_Deque_impl" = type { %"struct.std::_Deque_base<ngraph::descriptor::Input, std::allocator<ngraph::descriptor::Input>>::_Deque_impl_data" }
%"struct.std::_Deque_base<ngraph::descriptor::Input, std::allocator<ngraph::descriptor::Input>>::_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::deque.39" = type { %"class.std::_Deque_base.40" }
%"class.std::_Deque_base.40" = type { %"struct.std::_Deque_base<ngraph::descriptor::Output, std::allocator<ngraph::descriptor::Output>>::_Deque_impl" }
%"struct.std::_Deque_base<ngraph::descriptor::Output, std::allocator<ngraph::descriptor::Output>>::_Deque_impl" = type { %"struct.std::_Deque_base<ngraph::descriptor::Output, std::allocator<ngraph::descriptor::Output>>::_Deque_impl_data" }
%"struct.std::_Deque_base<ngraph::descriptor::Output, std::allocator<ngraph::descriptor::Output>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator.44", %"struct.std::_Deque_iterator.44" }
%"struct.std::_Deque_iterator.44" = type { ptr, ptr, ptr, ptr }
%"class.std::unordered_map" = type { %"class.std::_Hashtable.45" }
%"class.std::_Hashtable.45" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::map" = type { %"class.std::_Rb_tree.64" }
%"class.std::_Rb_tree.64" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, std::shared_ptr<ngraph::Variant>>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, std::shared_ptr<ngraph::Variant>>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, std::shared_ptr<ngraph::Variant>>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, std::shared_ptr<ngraph::Variant>>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.ngraph::Shape" = type { %"class.std::vector.83" }
%"class.std::vector.83" = type { %"struct.std::_Vector_base.84" }
%"struct.std::_Vector_base.84" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned long, std::allocator<unsigned long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.ngraph::AxisSet" = type { %"class.std::set.72" }
%"class.std::set.72" = type { %"class.std::_Rb_tree.73" }
%"class.std::_Rb_tree.73" = type { %"struct.std::_Rb_tree<unsigned long, unsigned long, std::_Identity<unsigned long>, std::less<unsigned long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned long, unsigned long, std::_Identity<unsigned long>, std::less<unsigned long>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.ngraph::op::v0::BroadcastLike" = type { %"class.ngraph::op::v0::Broadcast", %"class.ngraph::AxisSet" }

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

declare noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6ngraph4Node15get_input_shapeEm(ptr noundef nonnull align 8 dereferenceable(680), i64 noundef) #1

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6ngraph2op2v013BroadcastLike11infer_shapeEv(ptr noundef nonnull align 8 dereferenceable(800) %0) unnamed_addr #3 align 2 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  %5 = alloca %"struct.std::pair.173", align 8
  %6 = alloca %"struct.std::pair.173", align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %7 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #4
  %8 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6ngraph4Node15get_input_shapeEm(ptr noundef nonnull align 8 dereferenceable(680) %7, i64 noundef 0)
  store ptr %8, ptr %3, align 8, !tbaa !5
  %9 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6ngraph4Node15get_input_shapeEm(ptr noundef nonnull align 8 dereferenceable(680) %7, i64 noundef 1)
  %10 = getelementptr inbounds %"class.ngraph::op::v0::Broadcast", ptr %7, i32 0, i32 1
  %11 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZN6ngraph5ShapeaSERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(24) %9)
  %12 = getelementptr inbounds %"class.ngraph::op::v0::BroadcastLike", ptr %7, i32 0, i32 1
  %13 = getelementptr inbounds %"class.ngraph::op::v0::Broadcast", ptr %7, i32 0, i32 2
  %14 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZN6ngraph7AxisSetaSERKS0_(ptr noundef nonnull align 8 dereferenceable(48) %13, ptr noundef nonnull align 8 dereferenceable(48) %12)
  %15 = getelementptr inbounds %"class.ngraph::op::v0::Broadcast", ptr %7, i32 0, i32 2
  %16 = call noundef i64 @_ZNKSt3setImSt4lessImESaImEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %15) #4
  %17 = icmp eq i64 %16, 0
  br i1 %17, label %18, label %62

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

19:                                               ; preds = %58, %18
  %20 = load i64, ptr %4, align 8, !tbaa !9
  %21 = getelementptr inbounds %"class.ngraph::op::v0::Broadcast", ptr %7, i32 0, i32 1
  %22 = call noundef i64 @_ZNKSt6vectorImSaImEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %21) #4
  %23 = icmp ult i64 %20, %22
  br i1 %23, label %25, label %24

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

25:                                               ; preds = %19
  %26 = load i64, ptr %4, align 8, !tbaa !9
  %27 = load ptr, ptr %3, align 8, !tbaa !5
  %28 = call noundef i64 @_ZNKSt6vectorImSaImEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %27) #4
  %29 = icmp ult i64 %26, %28
  br i1 %29, label %30, label %50

30:                                               ; preds = %25
  %31 = load ptr, ptr %3, align 8, !tbaa !5
  %32 = load i64, ptr %4, align 8, !tbaa !9
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %31, i64 noundef %32)
  %34 = load i64, ptr %33, align 8, !tbaa !9
  %35 = icmp eq i64 %34, 1
  br i1 %35, label %36, label %49

36:                                               ; preds = %30
  %37 = getelementptr inbounds %"class.ngraph::op::v0::Broadcast", ptr %7, i32 0, i32 1
  %38 = load i64, ptr %4, align 8, !tbaa !9
  %39 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %37, i64 noundef %38)
  %40 = load i64, ptr %39, align 8, !tbaa !9
  %41 = icmp ugt i64 %40, 1
  br i1 %41, label %42, label %49

42:                                               ; preds = %36
  %43 = getelementptr inbounds %"class.ngraph::op::v0::Broadcast", ptr %7, i32 0, i32 2
  %44 = call { ptr, i8 } @_ZNSt3setImSt4lessImESaImEE6insertERKm(ptr noundef nonnull align 8 dereferenceable(48) %43, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %45 = getelementptr inbounds { ptr, i8 }, ptr %5, i32 0, i32 0
  %46 = extractvalue { ptr, i8 } %44, 0
  store ptr %46, ptr %45, align 8
  %47 = getelementptr inbounds { ptr, i8 }, ptr %5, i32 0, i32 1
  %48 = extractvalue { ptr, i8 } %44, 1
  store i8 %48, ptr %47, align 8
  br label %49

49:                                               ; preds = %42, %36, %30
  br label %57

50:                                               ; preds = %25
  %51 = getelementptr inbounds %"class.ngraph::op::v0::Broadcast", ptr %7, i32 0, i32 2
  %52 = call { ptr, i8 } @_ZNSt3setImSt4lessImESaImEE6insertERKm(ptr noundef nonnull align 8 dereferenceable(48) %51, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %53 = getelementptr inbounds { ptr, i8 }, ptr %6, i32 0, i32 0
  %54 = extractvalue { ptr, i8 } %52, 0
  store ptr %54, ptr %53, align 8
  %55 = getelementptr inbounds { ptr, i8 }, ptr %6, i32 0, i32 1
  %56 = extractvalue { ptr, i8 } %52, 1
  store i8 %56, ptr %55, align 8
  br label %57

57:                                               ; preds = %50, %49
  br label %58

58:                                               ; preds = %57
  %59 = load i64, ptr %4, align 8, !tbaa !9
  %60 = add i64 %59, 1
  store i64 %60, ptr %4, align 8, !tbaa !9
  br label %19, !llvm.loop !11

61:                                               ; preds = %24
  br label %62

62:                                               ; preds = %61, %1
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #4
  ret void
}

declare noundef nonnull align 8 dereferenceable(24) ptr @_ZN6ngraph5ShapeaSERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #1

declare noundef nonnull align 8 dereferenceable(48) ptr @_ZN6ngraph7AxisSetaSERKS0_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) #1

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setImSt4lessImESaImEE6insertERKm(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 = !{!"long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #0

declare noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6ngraph4Node15get_input_shapeEm(ptr noundef nonnull align 8 dereferenceable(680), i64 noundef) local_unnamed_addr #1

; 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 i64 @_ZNKSt6vectorImSaImEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6ngraph2op2v013BroadcastLike11infer_shapeEv(ptr noundef nonnull align 8 dereferenceable(800) %0) unnamed_addr #3 align 2 {
  %2 = alloca i64, align 8
  %3 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6ngraph4Node15get_input_shapeEm(ptr noundef nonnull align 8 dereferenceable(680) %0, i64 noundef 0)
  %4 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6ngraph4Node15get_input_shapeEm(ptr noundef nonnull align 8 dereferenceable(680) %0, i64 noundef 1)
  %5 = getelementptr inbounds i8, ptr %0, i64 680
  %6 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZN6ngraph5ShapeaSERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %4)
  %7 = getelementptr inbounds i8, ptr %0, i64 752
  %8 = getelementptr inbounds i8, ptr %0, i64 704
  %9 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_ZN6ngraph7AxisSetaSERKS0_(ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull align 8 dereferenceable(48) %7)
  %10 = tail call noundef i64 @_ZNKSt3setImSt4lessImESaImEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(48) %8) #4
  %11 = icmp eq i64 %10, 0
  br i1 %11, label %12, label %33

12:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #4
  store i64 0, ptr %2, align 8, !tbaa !5
  %13 = tail call noundef i64 @_ZNKSt6vectorImSaImEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  %.not = icmp eq i64 %13, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %28, %12
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #4
  br label %33

.lr.ph:                                           ; preds = %12, %28
  %14 = load i64, ptr %2, align 8, !tbaa !5
  %15 = call noundef i64 @_ZNKSt6vectorImSaImEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #4
  %16 = icmp ult i64 %14, %15
  br i1 %16, label %17, label %.sink.split

17:                                               ; preds = %.lr.ph
  %18 = load i64, ptr %2, align 8, !tbaa !5
  %19 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt6vectorImSaImEE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %18)
  %20 = load i64, ptr %19, align 8, !tbaa !5
  %21 = icmp eq i64 %20, 1
  br i1 %21, label %22, label %28

22:                                               ; preds = %17
  %23 = load i64, ptr %2, align 8, !tbaa !5
  %24 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %23)
  %25 = load i64, ptr %24, align 8, !tbaa !5
  %26 = icmp ugt i64 %25, 1
  br i1 %26, label %.sink.split, label %28

.sink.split:                                      ; preds = %.lr.ph, %22
  %27 = call { ptr, i8 } @_ZNSt3setImSt4lessImESaImEE6insertERKm(ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull align 8 dereferenceable(8) %2)
  br label %28

28:                                               ; preds = %.sink.split, %22, %17
  %29 = load i64, ptr %2, align 8, !tbaa !5
  %30 = add i64 %29, 1
  store i64 %30, ptr %2, align 8, !tbaa !5
  %31 = call noundef i64 @_ZNKSt6vectorImSaImEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  %32 = icmp ult i64 %30, %31
  br i1 %32, label %.lr.ph, label %._crit_edge, !llvm.loop !9

33:                                               ; preds = %._crit_edge, %1
  ret void
}

declare noundef nonnull align 8 dereferenceable(24) ptr @_ZN6ngraph5ShapeaSERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1

declare noundef nonnull align 8 dereferenceable(48) ptr @_ZN6ngraph7AxisSetaSERKS0_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #1

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setImSt4lessImESaImEE6insertERKm(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass