; LLVM IR from NervanaSystems/ngraph :: src/ngraph/op (topk)

; 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.ngraph::Output" = type { %"class.std::shared_ptr.74", i64 }
%"class.std::shared_ptr.74" = type { %"class.std::__shared_ptr.75" }
%"class.std::__shared_ptr.75" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { 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.ngraph::Shape" = type { %"class.std::vector.81" }
%"class.std::vector.81" = type { %"struct.std::_Vector_base.82" }
%"struct.std::_Vector_base.82" = 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::Dimension" = type { %"class.ngraph::Interval" }
%"class.ngraph::Interval" = type { i64, i64 }
%"class.std::__cxx11::basic_stringstream" = type { %"class.std::basic_iostream.base", %"class.std::__cxx11::basic_stringbuf", %"class.std::basic_ios" }
%"class.std::basic_iostream.base" = type { %"class.std::basic_istream.base", %"class.std::basic_ostream.base" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string" }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"struct.ngraph::CheckLocInfo" = type { ptr, i32, ptr }
%"class.std::allocator.10" = type { i8 }
%"class.ngraph::PartialShape" = type { i8, %"class.std::vector.94" }
%"class.std::vector.94" = type { %"struct.std::_Vector_base.95" }
%"struct.std::_Vector_base.95" = type { %"struct.std::_Vector_base<ngraph::Dimension, std::allocator<ngraph::Dimension>>::_Vector_impl" }
%"struct.std::_Vector_base<ngraph::Dimension, std::allocator<ngraph::Dimension>>::_Vector_impl" = type { %"struct.std::_Vector_base<ngraph::Dimension, std::allocator<ngraph::Dimension>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ngraph::Dimension, std::allocator<ngraph::Dimension>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.ngraph::element::Type" = type { i32 }
%"class.ngraph::op::v1::TopK" = type <{ %"class.ngraph::op::Op", i64, i64, i32, i32, %"class.ngraph::element::Type", [4 x i8] }>
%"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::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::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" }

@.str.1 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [1 x i8], align 1
@_ZTIN6ngraph12CheckFailureE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.37 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [21 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: nounwind
declare void @_ZN6ngraph5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2

declare void @_ZNK6ngraph4Node11input_valueEm(ptr dead_on_unwind writable sret(%"class.ngraph::Output") align 8, ptr noundef nonnull align 8 dereferenceable(680), i64 noundef) #3

declare void @_ZNK6ngraph6OutputINS_4NodeEE19get_node_shared_ptrEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.74") align 8, ptr noundef nonnull align 8 dereferenceable(24)) #3

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK6ngraph9Dimension9is_staticEv(ptr noundef nonnull align 8 dereferenceable(16)) #5 align 2

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #5 align 2

declare ptr @__cxa_allocate_exception(i64)

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6ngraph12CheckFailureC2ERKNS_12CheckLocInfoERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESB_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #5 align 2

declare void @__cxa_throw(ptr, ptr, ptr)

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

declare void @__cxa_free_exception(ptr)

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

declare void @_ZN6ngraph9DimensionC1El(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) unnamed_addr #3

declare noundef nonnull align 4 dereferenceable(4) ptr @_ZNK6ngraph4Node22get_input_element_typeEm(ptr noundef nonnull align 8 dereferenceable(680), i64 noundef) #3

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

; Function Attrs: nounwind
declare void @_ZNSt13runtime_errorD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2

declare void @_ZN6ngraph5ShapeC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i64 @_ZN12_GLOBAL__N_123read_k_from_host_tensorERKSt10shared_ptrIN6ngraph7runtime10HostTensorEE(ptr noundef nonnull align 8 dereferenceable(16)) #5

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZN12_GLOBAL__N_113evaluate_topkERKSt10shared_ptrIN6ngraph7runtime10HostTensorEES6_S6_NS1_5ShapeEmmbNS1_2op12TopKSortTypeENS1_7element4TypeE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, i64 noundef, i64 noundef, i1 noundef zeroext, i32 noundef, ptr noundef) #5

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

declare noundef i64 @_ZN6ngraph14normalize_axisEPKNS_4NodeElRKNS_9DimensionE(ptr noundef, i64 noundef, ptr noundef nonnull align 8 dereferenceable(16)) #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK6ngraph2op2v14TopK20compute_output_shapeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_12PartialShapeEl(ptr dead_on_unwind noalias writable sret(%"class.ngraph::Shape") align 8, ptr noundef nonnull align 8 dereferenceable(708), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i64 noundef) #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK6ngraph2op2v14TopK8evaluateERKSt6vectorISt10shared_ptrINS_7runtime10HostTensorEESaIS7_EESB_(ptr noundef nonnull align 8 dereferenceable(708) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"class.ngraph::Shape", align 8
  %8 = alloca %"class.ngraph::Dimension", align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %12 = alloca i8, align 1
  %13 = alloca i32, align 4
  %14 = alloca i64, align 8
  %15 = alloca %"class.std::shared_ptr.74", align 8
  %16 = alloca %"class.ngraph::Output", align 8
  %17 = alloca %"class.std::shared_ptr.74", align 8
  %18 = alloca %"class.ngraph::Output", align 8
  %19 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %20 = alloca %"struct.ngraph::CheckLocInfo", align 8
  %21 = alloca %"class.std::__cxx11::basic_string", align 8
  %22 = alloca %"class.std::allocator.10", align 1
  %23 = alloca %"class.std::__cxx11::basic_string", align 8
  %24 = alloca i1, align 1
  %25 = alloca %"class.ngraph::Shape", align 8
  %26 = alloca %"class.ngraph::PartialShape", align 8
  %27 = alloca %"class.ngraph::Shape", align 8
  %28 = alloca %"class.ngraph::element::Type", align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %29 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #7
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6ngraph7runtime10HostTensorEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %30, i64 noundef 0) #7
  %32 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6ngraph7runtime10HostTensorELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %31) #7
  %33 = load ptr, ptr %32, align 8, !tbaa !9
  %34 = getelementptr inbounds ptr, ptr %33, i64 2
  %35 = load ptr, ptr %34, align 8
  %36 = call noundef nonnull align 8 dereferenceable(24) ptr %35(ptr noundef nonnull align 8 dereferenceable(64) %32)
  call void @_ZN6ngraph5ShapeC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %36)
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #7
  %37 = call noundef i64 @_ZNKSt6vectorImSaImEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  invoke void @_ZN6ngraph9DimensionC1El(ptr noundef nonnull align 8 dereferenceable(16) %8, i64 noundef %37)
          to label %38 unwind label %46

38:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %39 = invoke noundef zeroext i1 @_ZNK6ngraph9Dimension9is_staticEv(ptr noundef nonnull align 8 dereferenceable(16) %8)
          to label %40 unwind label %50

40:                                               ; preds = %38
  br i1 %39, label %41, label %54

41:                                               ; preds = %40
  %42 = getelementptr inbounds %"class.ngraph::op::v1::TopK", ptr %29, i32 0, i32 1
  %43 = load i64, ptr %42, align 8, !tbaa !11
  %44 = invoke noundef i64 @_ZN6ngraph14normalize_axisEPKNS_4NodeElRKNS_9DimensionE(ptr noundef %29, i64 noundef %43, ptr noundef nonnull align 8 dereferenceable(16) %8)
          to label %45 unwind label %50

45:                                               ; preds = %41
  store i64 %44, ptr %11, align 8, !tbaa !70
  br label %55

46:                                               ; preds = %3
  %47 = landingpad { ptr, i32 }
          cleanup
  %48 = extractvalue { ptr, i32 } %47, 0
  store ptr %48, ptr %9, align 8
  %49 = extractvalue { ptr, i32 } %47, 1
  store i32 %49, ptr %10, align 4
  br label %241

50:                                               ; preds = %41, %38
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %9, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %10, align 4
  br label %240

54:                                               ; preds = %40
  store i64 -1, ptr %11, align 8, !tbaa !70
  br label %55

55:                                               ; preds = %54, %45
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #7
  %56 = invoke noundef i32 @_ZNK6ngraph2op2v14TopK8get_modeEv(ptr noundef nonnull align 8 dereferenceable(708) %29)
          to label %57 unwind label %100

57:                                               ; preds = %55
  %58 = icmp eq i32 %56, 0
  %59 = zext i1 %58 to i64
  %60 = select i1 %58, i1 true, i1 false
  %61 = zext i1 %60 to i8
  store i8 %61, ptr %12, align 1, !tbaa !71
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  %62 = invoke noundef i32 @_ZNK6ngraph2op2v14TopK13get_sort_typeEv(ptr noundef nonnull align 8 dereferenceable(708) %29)
          to label %63 unwind label %104

63:                                               ; preds = %57
  store i32 %62, ptr %13, align 4, !tbaa !73
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  store i64 0, ptr %14, align 8, !tbaa !70
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %16) #7
  invoke void @_ZNK6ngraph4Node11input_valueEm(ptr dead_on_unwind writable sret(%"class.ngraph::Output") align 8 %16, ptr noundef nonnull align 8 dereferenceable(680) %29, i64 noundef 1)
          to label %64 unwind label %108

64:                                               ; preds = %63
  invoke void @_ZNK6ngraph6OutputINS_4NodeEE19get_node_shared_ptrEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.74") align 8 %15, ptr noundef nonnull align 8 dereferenceable(24) %16)
          to label %65 unwind label %112

65:                                               ; preds = %64
  %66 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6ngraph4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %15) #7
  %67 = load ptr, ptr %66, align 8, !tbaa !9
  %68 = getelementptr inbounds ptr, ptr %67, i64 20
  %69 = load ptr, ptr %68, align 8
  %70 = invoke noundef zeroext i1 %69(ptr noundef nonnull align 8 dereferenceable(680) %66)
          to label %71 unwind label %116

71:                                               ; preds = %65
  call void @_ZNSt12__shared_ptrIN6ngraph4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %15) #7
  call void @_ZN6ngraph6OutputINS_4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #7
  br i1 %70, label %72, label %166

72:                                               ; preds = %71
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %18) #7
  invoke void @_ZNK6ngraph4Node11input_valueEm(ptr dead_on_unwind writable sret(%"class.ngraph::Output") align 8 %18, ptr noundef nonnull align 8 dereferenceable(680) %29, i64 noundef 1)
          to label %73 unwind label %122

73:                                               ; preds = %72
  invoke void @_ZNK6ngraph6OutputINS_4NodeEE19get_node_shared_ptrEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.74") align 8 %17, ptr noundef nonnull align 8 dereferenceable(24) %18)
          to label %74 unwind label %126

74:                                               ; preds = %73
  %75 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK6ngraph4Node22get_input_element_typeEm(ptr noundef nonnull align 8 dereferenceable(680) %29, i64 noundef 1)
          to label %76 unwind label %130

76:                                               ; preds = %74
  %77 = load ptr, ptr %29, align 8, !tbaa !9
  %78 = getelementptr inbounds ptr, ptr %77, i64 35
  %79 = load ptr, ptr %78, align 8
  %80 = invoke noundef i64 %79(ptr noundef nonnull align 8 dereferenceable(708) %29, ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 4 dereferenceable(4) %75)
          to label %81 unwind label %130

81:                                               ; preds = %76
  store i64 %80, ptr %14, align 8, !tbaa !70
  call void @_ZNSt12__shared_ptrIN6ngraph4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #7
  call void @_ZN6ngraph6OutputINS_4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #7
  br label %82

82:                                               ; preds = %81
  %83 = load i64, ptr %14, align 8, !tbaa !70
  %84 = load i64, ptr %11, align 8, !tbaa !70
  %85 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %84) #7
  %86 = load i64, ptr %85, align 8, !tbaa !70
  %87 = icmp ule i64 %83, %86
  br i1 %87, label %163, label %88

88:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 392, ptr %19) #7
  invoke void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %19)
          to label %89 unwind label %136

89:                                               ; preds = %88
  %90 = getelementptr inbounds i8, ptr %19, i64 16
  %91 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN6ngraphL19write_all_to_streamIA40_cJEEERSoS2_RKT_DpOT0_(ptr noundef nonnull align 8 dereferenceable(8) %90, ptr noundef nonnull align 1 dereferenceable(40) @.str.37)
          to label %92 unwind label %140

92:                                               ; preds = %89
  store i1 true, ptr %24, align 1
  %93 = call ptr @__cxa_allocate_exception(i64 16) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #7
  %94 = getelementptr inbounds %"struct.ngraph::CheckLocInfo", ptr %20, i32 0, i32 0
  store ptr @.str.1, ptr %94, align 8, !tbaa !74
  %95 = getelementptr inbounds %"struct.ngraph::CheckLocInfo", ptr %20, i32 0, i32 1
  store i32 709, ptr %95, align 8, !tbaa !76
  %96 = getelementptr inbounds %"struct.ngraph::CheckLocInfo", ptr %20, i32 0, i32 2
  store ptr @.str.38, ptr %96, align 8, !tbaa !77
  call void @llvm.lifetime.start.p0(i64 32, ptr %21) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %22) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %22)
          to label %97 unwind label %144

97:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 32, ptr %23) #7
  invoke void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %23, ptr noundef nonnull align 8 dereferenceable(128) %19)
          to label %98 unwind label %148

98:                                               ; preds = %97
  invoke void @_ZN6ngraph12CheckFailureC2ERKNS_12CheckLocInfoERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESB_(ptr noundef nonnull align 8 dereferenceable(16) %93, ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef nonnull align 8 dereferenceable(32) %21, ptr noundef nonnull align 8 dereferenceable(32) %23)
          to label %99 unwind label %152

99:                                               ; preds = %98
  store i1 false, ptr %24, align 1
  invoke void @__cxa_throw(ptr %93, ptr @_ZTIN6ngraph12CheckFailureE, ptr @_ZNSt13runtime_errorD2Ev) #8
          to label %247 unwind label %152

100:                                              ; preds = %55
  %101 = landingpad { ptr, i32 }
          cleanup
  %102 = extractvalue { ptr, i32 } %101, 0
  store ptr %102, ptr %9, align 8
  %103 = extractvalue { ptr, i32 } %101, 1
  store i32 %103, ptr %10, align 4
  br label %239

104:                                              ; preds = %57
  %105 = landingpad { ptr, i32 }
          cleanup
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %9, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %10, align 4
  br label %238

108:                                              ; preds = %63
  %109 = landingpad { ptr, i32 }
          cleanup
  %110 = extractvalue { ptr, i32 } %109, 0
  store ptr %110, ptr %9, align 8
  %111 = extractvalue { ptr, i32 } %109, 1
  store i32 %111, ptr %10, align 4
  br label %121

112:                                              ; preds = %64
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %9, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %10, align 4
  br label %120

116:                                              ; preds = %65
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %9, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %10, align 4
  call void @_ZNSt12__shared_ptrIN6ngraph4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %15) #7
  br label %120

120:                                              ; preds = %116, %112
  call void @_ZN6ngraph6OutputINS_4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #7
  br label %121

121:                                              ; preds = %120, %108
  call void @llvm.lifetime.end.p0(i64 24, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #7
  br label %237

122:                                              ; preds = %72
  %123 = landingpad { ptr, i32 }
          cleanup
  %124 = extractvalue { ptr, i32 } %123, 0
  store ptr %124, ptr %9, align 8
  %125 = extractvalue { ptr, i32 } %123, 1
  store i32 %125, ptr %10, align 4
  br label %135

126:                                              ; preds = %73
  %127 = landingpad { ptr, i32 }
          cleanup
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %9, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %10, align 4
  br label %134

130:                                              ; preds = %76, %74
  %131 = landingpad { ptr, i32 }
          cleanup
  %132 = extractvalue { ptr, i32 } %131, 0
  store ptr %132, ptr %9, align 8
  %133 = extractvalue { ptr, i32 } %131, 1
  store i32 %133, ptr %10, align 4
  call void @_ZNSt12__shared_ptrIN6ngraph4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #7
  br label %134

134:                                              ; preds = %130, %126
  call void @_ZN6ngraph6OutputINS_4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #7
  br label %135

135:                                              ; preds = %134, %122
  call void @llvm.lifetime.end.p0(i64 24, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #7
  br label %237

136:                                              ; preds = %88
  %137 = landingpad { ptr, i32 }
          cleanup
  %138 = extractvalue { ptr, i32 } %137, 0
  store ptr %138, ptr %9, align 8
  %139 = extractvalue { ptr, i32 } %137, 1
  store i32 %139, ptr %10, align 4
  br label %162

140:                                              ; preds = %89
  %141 = landingpad { ptr, i32 }
          cleanup
  %142 = extractvalue { ptr, i32 } %141, 0
  store ptr %142, ptr %9, align 8
  %143 = extractvalue { ptr, i32 } %141, 1
  store i32 %143, ptr %10, align 4
  br label %161

144:                                              ; preds = %92
  %145 = landingpad { ptr, i32 }
          cleanup
  %146 = extractvalue { ptr, i32 } %145, 0
  store ptr %146, ptr %9, align 8
  %147 = extractvalue { ptr, i32 } %145, 1
  store i32 %147, ptr %10, align 4
  br label %157

148:                                              ; preds = %97
  %149 = landingpad { ptr, i32 }
          cleanup
  %150 = extractvalue { ptr, i32 } %149, 0
  store ptr %150, ptr %9, align 8
  %151 = extractvalue { ptr, i32 } %149, 1
  store i32 %151, ptr %10, align 4
  br label %156

152:                                              ; preds = %99, %98
  %153 = landingpad { ptr, i32 }
          cleanup
  %154 = extractvalue { ptr, i32 } %153, 0
  store ptr %154, ptr %9, align 8
  %155 = extractvalue { ptr, i32 } %153, 1
  store i32 %155, ptr %10, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #7
  br label %156

156:                                              ; preds = %152, %148
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %21) #7
  br label %157

157:                                              ; preds = %156, %144
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %22) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #7
  %158 = load i1, ptr %24, align 1
  br i1 %158, label %159, label %160

159:                                              ; preds = %157
  call void @__cxa_free_exception(ptr %93) #7
  br label %160

160:                                              ; preds = %159, %157
  br label %161

161:                                              ; preds = %160, %140
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %19) #7
  br label %162

162:                                              ; preds = %161, %136
  call void @llvm.lifetime.end.p0(i64 392, ptr %19) #7
  br label %237

163:                                              ; preds = %82
  br label %164

164:                                              ; preds = %163
  br label %165

165:                                              ; preds = %164
  br label %175

166:                                              ; preds = %71
  %167 = load ptr, ptr %6, align 8, !tbaa !5
  %168 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6ngraph7runtime10HostTensorEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %167, i64 noundef 1) #7
  %169 = invoke noundef i64 @_ZN12_GLOBAL__N_123read_k_from_host_tensorERKSt10shared_ptrIN6ngraph7runtime10HostTensorEE(ptr noundef nonnull align 8 dereferenceable(16) %168)
          to label %170 unwind label %171

170:                                              ; preds = %166
  store i64 %169, ptr %14, align 8, !tbaa !70
  br label %175

171:                                              ; preds = %166
  %172 = landingpad { ptr, i32 }
          cleanup
  %173 = extractvalue { ptr, i32 } %172, 0
  store ptr %173, ptr %9, align 8
  %174 = extractvalue { ptr, i32 } %172, 1
  store i32 %174, ptr %10, align 4
  br label %237

175:                                              ; preds = %170, %165
  call void @llvm.lifetime.start.p0(i64 24, ptr %25) #7
  %176 = load ptr, ptr %29, align 8, !tbaa !9
  %177 = getelementptr inbounds ptr, ptr %176, i64 17
  %178 = load ptr, ptr %177, align 8
  %179 = invoke noundef nonnull align 8 dereferenceable(32) ptr %178(ptr noundef nonnull align 8 dereferenceable(680) %29)
          to label %180 unwind label %198

180:                                              ; preds = %175
  %181 = load ptr, ptr %6, align 8, !tbaa !5
  %182 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6ngraph7runtime10HostTensorEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %181, i64 noundef 0) #7
  %183 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6ngraph7runtime10HostTensorELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %182) #7
  %184 = load ptr, ptr %183, align 8, !tbaa !9
  %185 = getelementptr inbounds ptr, ptr %184, i64 2
  %186 = load ptr, ptr %185, align 8
  %187 = invoke noundef nonnull align 8 dereferenceable(24) ptr %186(ptr noundef nonnull align 8 dereferenceable(64) %183)
          to label %188 unwind label %198

188:                                              ; preds = %180
  invoke void @_ZN6ngraph12PartialShapeC1ERKNS_5ShapeE(ptr noundef nonnull align 8 dereferenceable(32) %26, ptr noundef nonnull align 8 dereferenceable(24) %187)
          to label %189 unwind label %198

189:                                              ; preds = %188
  %190 = load i64, ptr %14, align 8, !tbaa !70
  invoke void @_ZNK6ngraph2op2v14TopK20compute_output_shapeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_12PartialShapeEl(ptr dead_on_unwind writable sret(%"class.ngraph::Shape") align 8 %25, ptr noundef nonnull align 8 dereferenceable(708) %29, ptr noundef nonnull align 8 dereferenceable(32) %179, ptr noundef %26, i64 noundef %190)
          to label %191 unwind label %202

191:                                              ; preds = %189
  call void @_ZN6ngraph12PartialShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %26) #7
  %192 = load i64, ptr %14, align 8, !tbaa !70
  %193 = icmp eq i64 %192, 0
  br i1 %193, label %194, label %206

194:                                              ; preds = %191
  %195 = load i64, ptr %11, align 8, !tbaa !70
  %196 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %195) #7
  %197 = load i64, ptr %196, align 8, !tbaa !70
  store i64 %197, ptr %14, align 8, !tbaa !70
  br label %206

198:                                              ; preds = %188, %180, %175
  %199 = landingpad { ptr, i32 }
          cleanup
  %200 = extractvalue { ptr, i32 } %199, 0
  store ptr %200, ptr %9, align 8
  %201 = extractvalue { ptr, i32 } %199, 1
  store i32 %201, ptr %10, align 4
  br label %236

202:                                              ; preds = %189
  %203 = landingpad { ptr, i32 }
          cleanup
  %204 = extractvalue { ptr, i32 } %203, 0
  store ptr %204, ptr %9, align 8
  %205 = extractvalue { ptr, i32 } %203, 1
  store i32 %205, ptr %10, align 4
  call void @_ZN6ngraph12PartialShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %26) #7
  br label %236

206:                                              ; preds = %194, %191
  %207 = load ptr, ptr %6, align 8, !tbaa !5
  %208 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6ngraph7runtime10HostTensorEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %207, i64 noundef 0) #7
  %209 = load ptr, ptr %5, align 8, !tbaa !5
  %210 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6ngraph7runtime10HostTensorEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %209, i64 noundef 1) #7
  %211 = load ptr, ptr %5, align 8, !tbaa !5
  %212 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6ngraph7runtime10HostTensorEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %211, i64 noundef 0) #7
  invoke void @_ZN6ngraph5ShapeC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %27, ptr noundef nonnull align 8 dereferenceable(24) %25)
          to label %213 unwind label %222

213:                                              ; preds = %206
  %214 = load i64, ptr %11, align 8, !tbaa !70
  %215 = load i64, ptr %14, align 8, !tbaa !70
  %216 = load i8, ptr %12, align 1, !tbaa !71, !range !78, !noundef !79
  %217 = trunc i8 %216 to i1
  %218 = load i32, ptr %13, align 4, !tbaa !73
  invoke void @_ZNK6ngraph2op2v14TopK22get_index_element_typeEv(ptr dead_on_unwind writable sret(%"class.ngraph::element::Type") align 4 %28, ptr noundef nonnull align 8 dereferenceable(708) %29)
          to label %219 unwind label %226

219:                                              ; preds = %213
  %220 = invoke noundef zeroext i1 @_ZN12_GLOBAL__N_113evaluate_topkERKSt10shared_ptrIN6ngraph7runtime10HostTensorEES6_S6_NS1_5ShapeEmmbNS1_2op12TopKSortTypeENS1_7element4TypeE(ptr noundef nonnull align 8 dereferenceable(16) %208, ptr noundef nonnull align 8 dereferenceable(16) %210, ptr noundef nonnull align 8 dereferenceable(16) %212, ptr noundef %27, i64 noundef %214, i64 noundef %215, i1 noundef zeroext %217, i32 noundef %218, ptr noundef %28)
          to label %221 unwind label %230

221:                                              ; preds = %219
  call void @_ZN6ngraph7element4TypeD2Ev(ptr noundef nonnull align 4 dereferenceable(4) %28) #7
  call void @_ZN6ngraph5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %27) #7
  call void @_ZN6ngraph5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #7
  call void @_ZN6ngraph5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #7
  ret i1 %220

222:                                              ; preds = %206
  %223 = landingpad { ptr, i32 }
          cleanup
  %224 = extractvalue { ptr, i32 } %223, 0
  store ptr %224, ptr %9, align 8
  %225 = extractvalue { ptr, i32 } %223, 1
  store i32 %225, ptr %10, align 4
  br label %235

226:                                              ; preds = %213
  %227 = landingpad { ptr, i32 }
          cleanup
  %228 = extractvalue { ptr, i32 } %227, 0
  store ptr %228, ptr %9, align 8
  %229 = extractvalue { ptr, i32 } %227, 1
  store i32 %229, ptr %10, align 4
  br label %234

230:                                              ; preds = %219
  %231 = landingpad { ptr, i32 }
          cleanup
  %232 = extractvalue { ptr, i32 } %231, 0
  store ptr %232, ptr %9, align 8
  %233 = extractvalue { ptr, i32 } %231, 1
  store i32 %233, ptr %10, align 4
  call void @_ZN6ngraph7element4TypeD2Ev(ptr noundef nonnull align 4 dereferenceable(4) %28) #7
  br label %234

234:                                              ; preds = %230, %226
  call void @_ZN6ngraph5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %27) #7
  br label %235

235:                                              ; preds = %234, %222
  call void @_ZN6ngraph5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %25) #7
  br label %236

236:                                              ; preds = %235, %202, %198
  call void @llvm.lifetime.end.p0(i64 24, ptr %25) #7
  br label %237

237:                                              ; preds = %236, %171, %162, %135, %121
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %238

238:                                              ; preds = %237, %104
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  br label %239

239:                                              ; preds = %238, %100
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #7
  br label %240

240:                                              ; preds = %239, %50
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %241

241:                                              ; preds = %240, %46
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #7
  call void @_ZN6ngraph5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #7
  br label %242

242:                                              ; preds = %241
  %243 = load ptr, ptr %9, align 8
  %244 = load i32, ptr %10, align 4
  %245 = insertvalue { ptr, i32 } poison, ptr %243, 0
  %246 = insertvalue { ptr, i32 } %245, i32 %244, 1
  resume { ptr, i32 } %246

247:                                              ; preds = %99
  unreachable
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef nonnull align 8 dereferenceable(8) ptr @_ZN6ngraphL19write_all_to_streamIA40_cJEEERSoS2_RKT_DpOT0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(40)) #6

declare void @_ZN6ngraph12PartialShapeC1ERKNS_5ShapeE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK6ngraph2op2v14TopK22get_index_element_typeEv(ptr dead_on_unwind noalias writable sret(%"class.ngraph::element::Type") align 4, ptr noundef nonnull align 8 dereferenceable(708)) #4 align 2

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

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

!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 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !21, i64 680}
!12 = !{!"_ZTSN6ngraph2op2v14TopKE", !13, i64 0, !21, i64 680, !21, i64 688, !66, i64 696, !67, i64 700, !68, i64 704}
!13 = !{!"_ZTSN6ngraph2op2OpE", !14, i64 0}
!14 = !{!"_ZTSN6ngraph4NodeE", !15, i64 8, !19, i64 24, !19, i64 80, !25, i64 136, !29, i64 160, !33, i64 184, !21, i64 216, !33, i64 224, !33, i64 256, !35, i64 288, !37, i64 344, !45, i64 392, !50, i64 472, !55, i64 552, !57, i64 608, !58, i64 616, !61, i64 632}
!15 = !{!"_ZTSSt23enable_shared_from_thisIN6ngraph4NodeEE", !16, i64 0}
!16 = !{!"_ZTSSt8weak_ptrIN6ngraph4NodeEE", !17, i64 0}
!17 = !{!"_ZTSSt10__weak_ptrIN6ngraph4NodeELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !18, i64 8}
!18 = !{!"_ZTSSt12__weak_countILN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0}
!19 = !{!"_ZTSSt13unordered_setIPN6ngraph10descriptor6TensorESt4hashIS3_ESt8equal_toIS3_ESaIS3_EE", !20, i64 0}
!20 = !{!"_ZTSSt10_HashtableIPN6ngraph10descriptor6TensorES3_SaIS3_ENSt8__detail9_IdentityESt8equal_toIS3_ESt4hashIS3_ENS5_18_Mod_range_hashingENS5_20_Default_ranged_hashENS5_20_Prime_rehash_policyENS5_17_Hashtable_traitsILb0ELb1ELb1EEEE", !6, i64 0, !21, i64 8, !22, i64 16, !21, i64 24, !23, i64 32, !6, i64 48}
!21 = !{!"long", !7, i64 0}
!22 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!23 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !24, i64 0, !21, i64 8}
!24 = !{!"float", !7, i64 0}
!25 = !{!"_ZTSSt6vectorIPN6ngraph4NodeESaIS2_EE", !26, i64 0}
!26 = !{!"_ZTSSt12_Vector_baseIPN6ngraph4NodeESaIS2_EE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIPN6ngraph4NodeESaIS2_EE12_Vector_implE", !28, i64 0}
!28 = !{!"_ZTSNSt12_Vector_baseIPN6ngraph4NodeESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!29 = !{!"_ZTSSt6vectorISt10shared_ptrIN6ngraph4NodeEESaIS3_EE", !30, i64 0}
!30 = !{!"_ZTSSt12_Vector_baseISt10shared_ptrIN6ngraph4NodeEESaIS3_EE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN6ngraph4NodeEESaIS3_EE12_Vector_implE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN6ngraph4NodeEESaIS3_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!33 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !34, i64 0, !21, i64 8, !7, i64 16}
!34 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!35 = !{!"_ZTSSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE", !36, i64 0}
!36 = !{!"_ZTSSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEE", !6, i64 0, !21, i64 8, !22, i64 16, !21, i64 24, !23, i64 32, !6, i64 48}
!37 = !{!"_ZTSSt3setISt10shared_ptrIN6ngraph4NodeEESt4lessIS3_ESaIS3_EE", !38, i64 0}
!38 = !{!"_ZTSSt8_Rb_treeISt10shared_ptrIN6ngraph4NodeEES3_St9_IdentityIS3_ESt4lessIS3_ESaIS3_EE", !39, i64 0}
!39 = !{!"_ZTSNSt8_Rb_treeISt10shared_ptrIN6ngraph4NodeEES3_St9_IdentityIS3_ESt4lessIS3_ESaIS3_EE13_Rb_tree_implIS7_Lb1EEE", !40, i64 0, !42, i64 8}
!40 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessISt10shared_ptrIN6ngraph4NodeEEEE", !41, i64 0}
!41 = !{!"_ZTSSt4lessISt10shared_ptrIN6ngraph4NodeEEE"}
!42 = !{!"_ZTSSt15_Rb_tree_header", !43, i64 0, !21, i64 32}
!43 = !{!"_ZTSSt18_Rb_tree_node_base", !44, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!44 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!45 = !{!"_ZTSSt5dequeIN6ngraph10descriptor5InputESaIS2_EE", !46, i64 0}
!46 = !{!"_ZTSSt11_Deque_baseIN6ngraph10descriptor5InputESaIS2_EE", !47, i64 0}
!47 = !{!"_ZTSNSt11_Deque_baseIN6ngraph10descriptor5InputESaIS2_EE11_Deque_implE", !48, i64 0}
!48 = !{!"_ZTSNSt11_Deque_baseIN6ngraph10descriptor5InputESaIS2_EE16_Deque_impl_dataE", !6, i64 0, !21, i64 8, !49, i64 16, !49, i64 48}
!49 = !{!"_ZTSSt15_Deque_iteratorIN6ngraph10descriptor5InputERS2_PS2_E", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!50 = !{!"_ZTSSt5dequeIN6ngraph10descriptor6OutputESaIS2_EE", !51, i64 0}
!51 = !{!"_ZTSSt11_Deque_baseIN6ngraph10descriptor6OutputESaIS2_EE", !52, i64 0}
!52 = !{!"_ZTSNSt11_Deque_baseIN6ngraph10descriptor6OutputESaIS2_EE11_Deque_implE", !53, i64 0}
!53 = !{!"_ZTSNSt11_Deque_baseIN6ngraph10descriptor6OutputESaIS2_EE16_Deque_impl_dataE", !6, i64 0, !21, i64 8, !54, i64 16, !54, i64 48}
!54 = !{!"_ZTSSt15_Deque_iteratorIN6ngraph10descriptor6OutputERS2_PS2_E", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!55 = !{!"_ZTSSt13unordered_mapIPN6ngraph4NodeENS0_8autodiff8AdjointsESt4hashIS2_ESt8equal_toIS2_ESaISt4pairIKS2_S4_EEE", !56, i64 0}
!56 = !{!"_ZTSSt10_HashtableIPN6ngraph4NodeESt4pairIKS2_NS0_8autodiff8AdjointsEESaIS7_ENSt8__detail10_Select1stESt8equal_toIS2_ESt4hashIS2_ENS9_18_Mod_range_hashingENS9_20_Default_ranged_hashENS9_20_Prime_rehash_policyENS9_17_Hashtable_traitsILb0ELb0ELb1EEEE", !6, i64 0, !21, i64 8, !22, i64 16, !21, i64 24, !23, i64 32, !6, i64 48}
!57 = !{!"int", !7, i64 0}
!58 = !{!"_ZTSSt10shared_ptrIN6ngraph2op4util13OpAnnotationsEE", !59, i64 0}
!59 = !{!"_ZTSSt12__shared_ptrIN6ngraph2op4util13OpAnnotationsELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !60, i64 8}
!60 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0}
!61 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN6ngraph7VariantEESt4lessIS5_ESaISt4pairIKS5_S9_EEE", !62, i64 0}
!62 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St10shared_ptrIN6ngraph7VariantEEESt10_Select1stISC_ESt4lessIS5_ESaISC_EE", !63, i64 0}
!63 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St10shared_ptrIN6ngraph7VariantEEESt10_Select1stISC_ESt4lessIS5_ESaISC_EE13_Rb_tree_implISG_Lb1EEE", !64, i64 0, !42, i64 8}
!64 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !65, i64 0}
!65 = !{!"_ZTSSt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE"}
!66 = !{!"_ZTSN6ngraph2op8TopKModeE", !7, i64 0}
!67 = !{!"_ZTSN6ngraph2op12TopKSortTypeE", !7, i64 0}
!68 = !{!"_ZTSN6ngraph7element4TypeE", !69, i64 0}
!69 = !{!"_ZTSN6ngraph7element6Type_tE", !7, i64 0}
!70 = !{!21, !21, i64 0}
!71 = !{!72, !72, i64 0}
!72 = !{!"bool", !7, i64 0}
!73 = !{!67, !67, i64 0}
!74 = !{!75, !6, i64 0}
!75 = !{!"_ZTSN6ngraph12CheckLocInfoE", !6, i64 0, !57, i64 8, !6, i64 16}
!76 = !{!75, !57, i64 8}
!77 = !{!75, !6, i64 16}
!78 = !{i8 0, i8 2}
!79 = !{}


; 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.ngraph::Output" = type { %"class.std::shared_ptr.74", i64 }
%"class.std::shared_ptr.74" = type { %"class.std::__shared_ptr.75" }
%"class.std::__shared_ptr.75" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { 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.ngraph::Shape" = type { %"class.std::vector.81" }
%"class.std::vector.81" = type { %"struct.std::_Vector_base.82" }
%"struct.std::_Vector_base.82" = 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::Dimension" = type { %"class.ngraph::Interval" }
%"class.ngraph::Interval" = type { i64, i64 }
%"class.std::__cxx11::basic_stringstream" = type { %"class.std::basic_iostream.base", %"class.std::__cxx11::basic_stringbuf", %"class.std::basic_ios" }
%"class.std::basic_iostream.base" = type { %"class.std::basic_istream.base", %"class.std::basic_ostream.base" }
%"class.std::basic_istream.base" = type { ptr, i64 }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::__cxx11::basic_stringbuf" = type { %"class.std::basic_streambuf", i32, %"class.std::__cxx11::basic_string" }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"struct.ngraph::CheckLocInfo" = type { ptr, i32, ptr }
%"class.std::allocator.10" = type { i8 }
%"class.ngraph::PartialShape" = type { i8, %"class.std::vector.94" }
%"class.std::vector.94" = type { %"struct.std::_Vector_base.95" }
%"struct.std::_Vector_base.95" = type { %"struct.std::_Vector_base<ngraph::Dimension, std::allocator<ngraph::Dimension>>::_Vector_impl" }
%"struct.std::_Vector_base<ngraph::Dimension, std::allocator<ngraph::Dimension>>::_Vector_impl" = type { %"struct.std::_Vector_base<ngraph::Dimension, std::allocator<ngraph::Dimension>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ngraph::Dimension, std::allocator<ngraph::Dimension>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.ngraph::element::Type" = type { i32 }

@.str.1 = external hidden unnamed_addr constant [78 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [1 x i8], align 1
@_ZTIN6ngraph12CheckFailureE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.37 = external hidden unnamed_addr constant [40 x i8], align 1
@.str.38 = external hidden unnamed_addr constant [21 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: nounwind
declare void @_ZN6ngraph5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2

declare void @_ZNK6ngraph4Node11input_valueEm(ptr dead_on_unwind writable sret(%"class.ngraph::Output") align 8, ptr noundef nonnull align 8 dereferenceable(680), i64 noundef) local_unnamed_addr #3

declare void @_ZNK6ngraph6OutputINS_4NodeEE19get_node_shared_ptrEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.74") align 8, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK6ngraph9Dimension9is_staticEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #5 align 2

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

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #5 align 2

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6ngraph12CheckFailureC2ERKNS_12CheckLocInfoERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESB_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #5 align 2

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

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

declare void @__cxa_free_exception(ptr) local_unnamed_addr

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

declare void @_ZN6ngraph9DimensionC1El(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) unnamed_addr #3

declare noundef nonnull align 4 dereferenceable(4) ptr @_ZNK6ngraph4Node22get_input_element_typeEm(ptr noundef nonnull align 8 dereferenceable(680), i64 noundef) local_unnamed_addr #3

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

; Function Attrs: nounwind
declare void @_ZNSt13runtime_errorD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #2

declare void @_ZN6ngraph5ShapeC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i64 @_ZN12_GLOBAL__N_123read_k_from_host_tensorERKSt10shared_ptrIN6ngraph7runtime10HostTensorEE(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare hidden noundef zeroext i1 @_ZN12_GLOBAL__N_113evaluate_topkERKSt10shared_ptrIN6ngraph7runtime10HostTensorEES6_S6_NS1_5ShapeEmmbNS1_2op12TopKSortTypeENS1_7element4TypeE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, i64 noundef, i64 noundef, i1 noundef zeroext, i32 noundef, ptr noundef) local_unnamed_addr #5

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

declare noundef i64 @_ZN6ngraph14normalize_axisEPKNS_4NodeElRKNS_9DimensionE(ptr noundef, i64 noundef, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK6ngraph2op2v14TopK20compute_output_shapeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_12PartialShapeEl(ptr dead_on_unwind noalias writable sret(%"class.ngraph::Shape") align 8, ptr noundef nonnull align 8 dereferenceable(708), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i64 noundef) local_unnamed_addr #5 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK6ngraph2op2v14TopK8evaluateERKSt6vectorISt10shared_ptrINS_7runtime10HostTensorEESaIS7_EESB_(ptr noundef nonnull align 8 dereferenceable(708) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) unnamed_addr #5 align 2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.ngraph::Shape", align 8
  %5 = alloca %"class.ngraph::Dimension", align 8
  %6 = alloca %"class.std::shared_ptr.74", align 8
  %7 = alloca %"class.ngraph::Output", align 8
  %8 = alloca %"class.std::shared_ptr.74", align 8
  %9 = alloca %"class.ngraph::Output", align 8
  %10 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %11 = alloca %"struct.ngraph::CheckLocInfo", align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::allocator.10", align 1
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca %"class.ngraph::Shape", align 8
  %16 = alloca %"class.ngraph::PartialShape", align 8
  %17 = alloca %"class.ngraph::Shape", align 8
  %18 = alloca %"class.ngraph::element::Type", align 4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #7
  %19 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6ngraph7runtime10HostTensorEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 0) #7
  %20 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN6ngraph7runtime10HostTensorELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %19) #7
  %21 = load ptr, ptr %20, align 8, !tbaa !5
  %22 = getelementptr inbounds i8, ptr %21, i64 16
  %23 = load ptr, ptr %22, align 8
  %24 = tail call noundef nonnull align 8 dereferenceable(24) ptr %23(ptr noundef nonnull align 8 dereferenceable(64) %20)
  call void @_ZN6ngraph5ShapeC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %24)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #7
  %25 = call noundef i64 @_ZNKSt6vectorImSaImEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  invoke void @_ZN6ngraph9DimensionC1El(ptr noundef nonnull align 8 dereferenceable(16) %5, i64 noundef %25)
          to label %26 unwind label %33

26:                                               ; preds = %3
  %27 = invoke noundef zeroext i1 @_ZNK6ngraph9Dimension9is_staticEv(ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %28 unwind label %35

28:                                               ; preds = %26
  br i1 %27, label %29, label %37

29:                                               ; preds = %28
  %30 = getelementptr inbounds i8, ptr %0, i64 680
  %31 = load i64, ptr %30, align 8, !tbaa !8
  %32 = invoke noundef i64 @_ZN6ngraph14normalize_axisEPKNS_4NodeElRKNS_9DimensionE(ptr noundef nonnull %0, i64 noundef %31, ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %37 unwind label %35

33:                                               ; preds = %3
  %34 = landingpad { ptr, i32 }
          cleanup
  br label %142

35:                                               ; preds = %29, %26
  %36 = landingpad { ptr, i32 }
          cleanup
  br label %142

37:                                               ; preds = %28, %29
  %.036 = phi i64 [ %32, %29 ], [ -1, %28 ]
  %38 = call noundef i32 @_ZNK6ngraph2op2v14TopK8get_modeEv(ptr noundef nonnull align 8 dereferenceable(708) %0)
  %39 = icmp eq i32 %38, 0
  %40 = call noundef i32 @_ZNK6ngraph2op2v14TopK13get_sort_typeEv(ptr noundef nonnull align 8 dereferenceable(708) %0)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #7
  invoke void @_ZNK6ngraph4Node11input_valueEm(ptr dead_on_unwind nonnull writable sret(%"class.ngraph::Output") align 8 %7, ptr noundef nonnull align 8 dereferenceable(680) %0, i64 noundef 1)
          to label %41 unwind label %72

41:                                               ; preds = %37
  invoke void @_ZNK6ngraph6OutputINS_4NodeEE19get_node_shared_ptrEv(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.74") align 8 %6, ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %42 unwind label %74

42:                                               ; preds = %41
  %43 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6ngraph4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  %44 = load ptr, ptr %43, align 8, !tbaa !5
  %45 = getelementptr inbounds i8, ptr %44, i64 160
  %46 = load ptr, ptr %45, align 8
  %47 = invoke noundef zeroext i1 %46(ptr noundef nonnull align 8 dereferenceable(680) %43)
          to label %48 unwind label %76

48:                                               ; preds = %42
  call void @_ZNSt12__shared_ptrIN6ngraph4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #7
  call void @_ZN6ngraph6OutputINS_4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  br i1 %47, label %49, label %101

49:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %9) #7
  invoke void @_ZNK6ngraph4Node11input_valueEm(ptr dead_on_unwind nonnull writable sret(%"class.ngraph::Output") align 8 %9, ptr noundef nonnull align 8 dereferenceable(680) %0, i64 noundef 1)
          to label %50 unwind label %80

50:                                               ; preds = %49
  invoke void @_ZNK6ngraph6OutputINS_4NodeEE19get_node_shared_ptrEv(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.74") align 8 %8, ptr noundef nonnull align 8 dereferenceable(24) %9)
          to label %51 unwind label %82

51:                                               ; preds = %50
  %52 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZNK6ngraph4Node22get_input_element_typeEm(ptr noundef nonnull align 8 dereferenceable(680) %0, i64 noundef 1)
          to label %53 unwind label %84

53:                                               ; preds = %51
  %54 = load ptr, ptr %0, align 8, !tbaa !5
  %55 = getelementptr inbounds i8, ptr %54, i64 280
  %56 = load ptr, ptr %55, align 8
  %57 = invoke noundef i64 %56(ptr noundef nonnull align 8 dereferenceable(708) %0, ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 4 dereferenceable(4) %52)
          to label %58 unwind label %84

58:                                               ; preds = %53
  call void @_ZNSt12__shared_ptrIN6ngraph4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #7
  call void @_ZN6ngraph6OutputINS_4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #7
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.036) #7
  %60 = load i64, ptr %59, align 8, !tbaa !69
  %.not = icmp ugt i64 %57, %60
  br i1 %.not, label %61, label %106

61:                                               ; preds = %58
  call void @llvm.lifetime.start.p0(i64 392, ptr nonnull %10) #7
  invoke void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %10)
          to label %62 unwind label %88

62:                                               ; preds = %61
  %63 = getelementptr inbounds i8, ptr %10, i64 16
  %64 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN6ngraphL19write_all_to_streamIA40_cJEEERSoS2_RKT_DpOT0_(ptr noundef nonnull align 8 dereferenceable(8) %63, ptr noundef nonnull align 1 dereferenceable(40) @.str.37)
          to label %65 unwind label %90

65:                                               ; preds = %62
  %66 = call ptr @__cxa_allocate_exception(i64 16) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %11) #7
  store ptr @.str.1, ptr %11, align 8, !tbaa !70
  %67 = getelementptr inbounds i8, ptr %11, i64 8
  store i32 709, ptr %67, align 8, !tbaa !72
  %68 = getelementptr inbounds i8, ptr %11, i64 16
  store ptr @.str.38, ptr %68, align 8, !tbaa !73
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %13) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %13)
          to label %69 unwind label %.thread

69:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %14) #7
  invoke void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %14, ptr noundef nonnull align 8 dereferenceable(128) %10)
          to label %70 unwind label %93

70:                                               ; preds = %69
  invoke void @_ZN6ngraph12CheckFailureC2ERKNS_12CheckLocInfoERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESB_(ptr noundef nonnull align 8 dereferenceable(16) %66, ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull align 8 dereferenceable(32) %14)
          to label %71 unwind label %95

71:                                               ; preds = %70
  invoke void @__cxa_throw(ptr nonnull %66, ptr nonnull @_ZTIN6ngraph12CheckFailureE, ptr nonnull @_ZNSt13runtime_errorD2Ev) #8
          to label %143 unwind label %95

72:                                               ; preds = %37
  %73 = landingpad { ptr, i32 }
          cleanup
  br label %79

74:                                               ; preds = %41
  %75 = landingpad { ptr, i32 }
          cleanup
  br label %78

76:                                               ; preds = %42
  %77 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN6ngraph4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #7
  br label %78

78:                                               ; preds = %76, %74
  %.pn = phi { ptr, i32 } [ %77, %76 ], [ %75, %74 ]
  call void @_ZN6ngraph6OutputINS_4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #7
  br label %79

79:                                               ; preds = %78, %72
  %.pn.pn = phi { ptr, i32 } [ %.pn, %78 ], [ %73, %72 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  br label %142

80:                                               ; preds = %49
  %81 = landingpad { ptr, i32 }
          cleanup
  br label %87

82:                                               ; preds = %50
  %83 = landingpad { ptr, i32 }
          cleanup
  br label %86

84:                                               ; preds = %53, %51
  %85 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN6ngraph4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #7
  br label %86

86:                                               ; preds = %84, %82
  %.pn40 = phi { ptr, i32 } [ %85, %84 ], [ %83, %82 ]
  call void @_ZN6ngraph6OutputINS_4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #7
  br label %87

87:                                               ; preds = %86, %80
  %.pn40.pn = phi { ptr, i32 } [ %.pn40, %86 ], [ %81, %80 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #7
  br label %142

88:                                               ; preds = %61
  %89 = landingpad { ptr, i32 }
          cleanup
  br label %100

90:                                               ; preds = %62
  %91 = landingpad { ptr, i32 }
          cleanup
  br label %99

.thread:                                          ; preds = %65
  %92 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #7
  br label %98

93:                                               ; preds = %69
  %94 = landingpad { ptr, i32 }
          cleanup
  br label %97

95:                                               ; preds = %71, %70
  %.0 = phi i1 [ false, %71 ], [ true, %70 ]
  %96 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  br label %97

97:                                               ; preds = %93, %95
  %.pn43 = phi { ptr, i32 } [ %96, %95 ], [ %94, %93 ]
  %.1 = phi i1 [ %.0, %95 ], [ true, %93 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %13) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %11) #7
  br i1 %.1, label %98, label %99

98:                                               ; preds = %.thread, %97
  %.pn43.pn56 = phi { ptr, i32 } [ %92, %.thread ], [ %.pn43, %97 ]
  call void @__cxa_free_exception(ptr %66) #7
  br label %99

99:                                               ; preds = %97, %98, %90
  %.pn43.pn.pn = phi { ptr, i32 } [ %.pn43.pn56, %98 ], [ %.pn43, %97 ], [ %91, %90 ]
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %10) #7
  br label %100

100:                                              ; preds = %99, %88
  %.pn43.pn.pn.pn = phi { ptr, i32 } [ %.pn43.pn.pn, %99 ], [ %89, %88 ]
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %10) #7
  br label %142

101:                                              ; preds = %48
  %102 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6ngraph7runtime10HostTensorEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 1) #7
  %103 = invoke noundef i64 @_ZN12_GLOBAL__N_123read_k_from_host_tensorERKSt10shared_ptrIN6ngraph7runtime10HostTensorEE(ptr noundef nonnull align 8 dereferenceable(16) %102)
          to label %106 unwind label %104

104:                                              ; preds = %101
  %105 = landingpad { ptr, i32 }
          cleanup
  br label %142

106:                                              ; preds = %101, %58
  %.018 = phi i64 [ %57, %58 ], [ %103, %101 ]
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %15) #7
  %107 = load ptr, ptr %0, align 8, !tbaa !5
  %108 = getelementptr inbounds i8, ptr %107, i64 136
  %109 = load ptr, ptr %108, align 8
  %110 = invoke noundef nonnull align 8 dereferenceable(32) ptr %109(ptr noundef nonnull align 8 dereferenceable(680) %0)
          to label %111 unwind label %125

111:                                              ; preds = %106
  %112 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6ngraph7runtime10HostTensorEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 0) #7
  %113 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6ngraph7runtime10HostTensorELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %112) #7
  %114 = load ptr, ptr %113, align 8, !tbaa !5
  %115 = getelementptr inbounds i8, ptr %114, i64 16
  %116 = load ptr, ptr %115, align 8
  %117 = invoke noundef nonnull align 8 dereferenceable(24) ptr %116(ptr noundef nonnull align 8 dereferenceable(64) %113)
          to label %118 unwind label %125

118:                                              ; preds = %111
  invoke void @_ZN6ngraph12PartialShapeC1ERKNS_5ShapeE(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef nonnull align 8 dereferenceable(24) %117)
          to label %119 unwind label %125

119:                                              ; preds = %118
  invoke void @_ZNK6ngraph2op2v14TopK20compute_output_shapeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_12PartialShapeEl(ptr dead_on_unwind nonnull writable sret(%"class.ngraph::Shape") align 8 %15, ptr noundef nonnull align 8 dereferenceable(708) %0, ptr noundef nonnull align 8 dereferenceable(32) %110, ptr noundef nonnull %16, i64 noundef %.018)
          to label %120 unwind label %127

120:                                              ; preds = %119
  call void @_ZN6ngraph12PartialShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #7
  %121 = icmp eq i64 %.018, 0
  br i1 %121, label %122, label %129

122:                                              ; preds = %120
  %123 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.036) #7
  %124 = load i64, ptr %123, align 8, !tbaa !69
  br label %129

125:                                              ; preds = %118, %111, %106
  %126 = landingpad { ptr, i32 }
          cleanup
  br label %141

127:                                              ; preds = %119
  %128 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6ngraph12PartialShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #7
  br label %141

129:                                              ; preds = %122, %120
  %.119 = phi i64 [ %124, %122 ], [ %.018, %120 ]
  %130 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6ngraph7runtime10HostTensorEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 0) #7
  %131 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6ngraph7runtime10HostTensorEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 1) #7
  %132 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6ngraph7runtime10HostTensorEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #7
  invoke void @_ZN6ngraph5ShapeC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %17, ptr noundef nonnull align 8 dereferenceable(24) %15)
          to label %133 unwind label %136

133:                                              ; preds = %129
  call void @_ZNK6ngraph2op2v14TopK22get_index_element_typeEv(ptr dead_on_unwind nonnull writable sret(%"class.ngraph::element::Type") align 4 %18, ptr noundef nonnull align 8 dereferenceable(708) %0)
  %134 = invoke noundef zeroext i1 @_ZN12_GLOBAL__N_113evaluate_topkERKSt10shared_ptrIN6ngraph7runtime10HostTensorEES6_S6_NS1_5ShapeEmmbNS1_2op12TopKSortTypeENS1_7element4TypeE(ptr noundef nonnull align 8 dereferenceable(16) %130, ptr noundef nonnull align 8 dereferenceable(16) %131, ptr noundef nonnull align 8 dereferenceable(16) %132, ptr noundef nonnull %17, i64 noundef %.036, i64 noundef %.119, i1 noundef zeroext %39, i32 noundef %40, ptr noundef nonnull %18)
          to label %135 unwind label %138

135:                                              ; preds = %133
  call void @_ZN6ngraph7element4TypeD2Ev(ptr noundef nonnull align 4 dereferenceable(4) %18) #7
  call void @_ZN6ngraph5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #7
  call void @_ZN6ngraph5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  call void @_ZN6ngraph5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  ret i1 %134

136:                                              ; preds = %129
  %137 = landingpad { ptr, i32 }
          cleanup
  br label %140

138:                                              ; preds = %133
  %139 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6ngraph7element4TypeD2Ev(ptr noundef nonnull align 4 dereferenceable(4) %18) #7
  call void @_ZN6ngraph5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #7
  br label %140

140:                                              ; preds = %138, %136
  %.pn48 = phi { ptr, i32 } [ %139, %138 ], [ %137, %136 ]
  call void @_ZN6ngraph5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #7
  br label %141

141:                                              ; preds = %140, %127, %125
  %.pn48.pn = phi { ptr, i32 } [ %.pn48, %140 ], [ %128, %127 ], [ %126, %125 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #7
  br label %142

142:                                              ; preds = %35, %141, %104, %100, %87, %79, %33
  %.pn48.pn.pn.pn.pn = phi { ptr, i32 } [ %34, %33 ], [ %36, %35 ], [ %.pn48.pn, %141 ], [ %.pn43.pn.pn.pn, %100 ], [ %.pn40.pn, %87 ], [ %105, %104 ], [ %.pn.pn, %79 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  call void @_ZN6ngraph5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  resume { ptr, i32 } %.pn48.pn.pn.pn.pn

143:                                              ; preds = %71
  unreachable
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef nonnull align 8 dereferenceable(8) ptr @_ZN6ngraphL19write_all_to_streamIA40_cJEEERSoS2_RKT_DpOT0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(40)) local_unnamed_addr #6

declare void @_ZN6ngraph12PartialShapeC1ERKNS_5ShapeE(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK6ngraph2op2v14TopK22get_index_element_typeEv(ptr dead_on_unwind noalias writable sret(%"class.ngraph::element::Type") align 4, ptr noundef nonnull align 8 dereferenceable(708)) local_unnamed_addr #4 align 2

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

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

!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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !20, i64 680}
!9 = !{!"_ZTSN6ngraph2op2v14TopKE", !10, i64 0, !20, i64 680, !20, i64 688, !65, i64 696, !66, i64 700, !67, i64 704}
!10 = !{!"_ZTSN6ngraph2op2OpE", !11, i64 0}
!11 = !{!"_ZTSN6ngraph4NodeE", !12, i64 8, !18, i64 24, !18, i64 80, !24, i64 136, !28, i64 160, !32, i64 184, !20, i64 216, !32, i64 224, !32, i64 256, !34, i64 288, !36, i64 344, !44, i64 392, !49, i64 472, !54, i64 552, !56, i64 608, !57, i64 616, !60, i64 632}
!12 = !{!"_ZTSSt23enable_shared_from_thisIN6ngraph4NodeEE", !13, i64 0}
!13 = !{!"_ZTSSt8weak_ptrIN6ngraph4NodeEE", !14, i64 0}
!14 = !{!"_ZTSSt10__weak_ptrIN6ngraph4NodeELN9__gnu_cxx12_Lock_policyE2EE", !15, i64 0, !17, i64 8}
!15 = !{!"any pointer", !16, i64 0}
!16 = !{!"omnipotent char", !7, i64 0}
!17 = !{!"_ZTSSt12__weak_countILN9__gnu_cxx12_Lock_policyE2EE", !15, i64 0}
!18 = !{!"_ZTSSt13unordered_setIPN6ngraph10descriptor6TensorESt4hashIS3_ESt8equal_toIS3_ESaIS3_EE", !19, i64 0}
!19 = !{!"_ZTSSt10_HashtableIPN6ngraph10descriptor6TensorES3_SaIS3_ENSt8__detail9_IdentityESt8equal_toIS3_ESt4hashIS3_ENS5_18_Mod_range_hashingENS5_20_Default_ranged_hashENS5_20_Prime_rehash_policyENS5_17_Hashtable_traitsILb0ELb1ELb1EEEE", !15, i64 0, !20, i64 8, !21, i64 16, !20, i64 24, !22, i64 32, !15, i64 48}
!20 = !{!"long", !16, i64 0}
!21 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !15, i64 0}
!22 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !23, i64 0, !20, i64 8}
!23 = !{!"float", !16, i64 0}
!24 = !{!"_ZTSSt6vectorIPN6ngraph4NodeESaIS2_EE", !25, i64 0}
!25 = !{!"_ZTSSt12_Vector_baseIPN6ngraph4NodeESaIS2_EE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseIPN6ngraph4NodeESaIS2_EE12_Vector_implE", !27, i64 0}
!27 = !{!"_ZTSNSt12_Vector_baseIPN6ngraph4NodeESaIS2_EE17_Vector_impl_dataE", !15, i64 0, !15, i64 8, !15, i64 16}
!28 = !{!"_ZTSSt6vectorISt10shared_ptrIN6ngraph4NodeEESaIS3_EE", !29, i64 0}
!29 = !{!"_ZTSSt12_Vector_baseISt10shared_ptrIN6ngraph4NodeEESaIS3_EE", !30, i64 0}
!30 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN6ngraph4NodeEESaIS3_EE12_Vector_implE", !31, i64 0}
!31 = !{!"_ZTSNSt12_Vector_baseISt10shared_ptrIN6ngraph4NodeEESaIS3_EE17_Vector_impl_dataE", !15, i64 0, !15, i64 8, !15, i64 16}
!32 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !33, i64 0, !20, i64 8, !16, i64 16}
!33 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !15, i64 0}
!34 = !{!"_ZTSSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EE", !35, i64 0}
!35 = !{!"_ZTSSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEE", !15, i64 0, !20, i64 8, !21, i64 16, !20, i64 24, !22, i64 32, !15, i64 48}
!36 = !{!"_ZTSSt3setISt10shared_ptrIN6ngraph4NodeEESt4lessIS3_ESaIS3_EE", !37, i64 0}
!37 = !{!"_ZTSSt8_Rb_treeISt10shared_ptrIN6ngraph4NodeEES3_St9_IdentityIS3_ESt4lessIS3_ESaIS3_EE", !38, i64 0}
!38 = !{!"_ZTSNSt8_Rb_treeISt10shared_ptrIN6ngraph4NodeEES3_St9_IdentityIS3_ESt4lessIS3_ESaIS3_EE13_Rb_tree_implIS7_Lb1EEE", !39, i64 0, !41, i64 8}
!39 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessISt10shared_ptrIN6ngraph4NodeEEEE", !40, i64 0}
!40 = !{!"_ZTSSt4lessISt10shared_ptrIN6ngraph4NodeEEE"}
!41 = !{!"_ZTSSt15_Rb_tree_header", !42, i64 0, !20, i64 32}
!42 = !{!"_ZTSSt18_Rb_tree_node_base", !43, i64 0, !15, i64 8, !15, i64 16, !15, i64 24}
!43 = !{!"_ZTSSt14_Rb_tree_color", !16, i64 0}
!44 = !{!"_ZTSSt5dequeIN6ngraph10descriptor5InputESaIS2_EE", !45, i64 0}
!45 = !{!"_ZTSSt11_Deque_baseIN6ngraph10descriptor5InputESaIS2_EE", !46, i64 0}
!46 = !{!"_ZTSNSt11_Deque_baseIN6ngraph10descriptor5InputESaIS2_EE11_Deque_implE", !47, i64 0}
!47 = !{!"_ZTSNSt11_Deque_baseIN6ngraph10descriptor5InputESaIS2_EE16_Deque_impl_dataE", !15, i64 0, !20, i64 8, !48, i64 16, !48, i64 48}
!48 = !{!"_ZTSSt15_Deque_iteratorIN6ngraph10descriptor5InputERS2_PS2_E", !15, i64 0, !15, i64 8, !15, i64 16, !15, i64 24}
!49 = !{!"_ZTSSt5dequeIN6ngraph10descriptor6OutputESaIS2_EE", !50, i64 0}
!50 = !{!"_ZTSSt11_Deque_baseIN6ngraph10descriptor6OutputESaIS2_EE", !51, i64 0}
!51 = !{!"_ZTSNSt11_Deque_baseIN6ngraph10descriptor6OutputESaIS2_EE11_Deque_implE", !52, i64 0}
!52 = !{!"_ZTSNSt11_Deque_baseIN6ngraph10descriptor6OutputESaIS2_EE16_Deque_impl_dataE", !15, i64 0, !20, i64 8, !53, i64 16, !53, i64 48}
!53 = !{!"_ZTSSt15_Deque_iteratorIN6ngraph10descriptor6OutputERS2_PS2_E", !15, i64 0, !15, i64 8, !15, i64 16, !15, i64 24}
!54 = !{!"_ZTSSt13unordered_mapIPN6ngraph4NodeENS0_8autodiff8AdjointsESt4hashIS2_ESt8equal_toIS2_ESaISt4pairIKS2_S4_EEE", !55, i64 0}
!55 = !{!"_ZTSSt10_HashtableIPN6ngraph4NodeESt4pairIKS2_NS0_8autodiff8AdjointsEESaIS7_ENSt8__detail10_Select1stESt8equal_toIS2_ESt4hashIS2_ENS9_18_Mod_range_hashingENS9_20_Default_ranged_hashENS9_20_Prime_rehash_policyENS9_17_Hashtable_traitsILb0ELb0ELb1EEEE", !15, i64 0, !20, i64 8, !21, i64 16, !20, i64 24, !22, i64 32, !15, i64 48}
!56 = !{!"int", !16, i64 0}
!57 = !{!"_ZTSSt10shared_ptrIN6ngraph2op4util13OpAnnotationsEE", !58, i64 0}
!58 = !{!"_ZTSSt12__shared_ptrIN6ngraph2op4util13OpAnnotationsELN9__gnu_cxx12_Lock_policyE2EE", !15, i64 0, !59, i64 8}
!59 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !15, i64 0}
!60 = !{!"_ZTSSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN6ngraph7VariantEESt4lessIS5_ESaISt4pairIKS5_S9_EEE", !61, i64 0}
!61 = !{!"_ZTSSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St10shared_ptrIN6ngraph7VariantEEESt10_Select1stISC_ESt4lessIS5_ESaISC_EE", !62, i64 0}
!62 = !{!"_ZTSNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St10shared_ptrIN6ngraph7VariantEEESt10_Select1stISC_ESt4lessIS5_ESaISC_EE13_Rb_tree_implISG_Lb1EEE", !63, i64 0, !41, i64 8}
!63 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE", !64, i64 0}
!64 = !{!"_ZTSSt4lessINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE"}
!65 = !{!"_ZTSN6ngraph2op8TopKModeE", !16, i64 0}
!66 = !{!"_ZTSN6ngraph2op12TopKSortTypeE", !16, i64 0}
!67 = !{!"_ZTSN6ngraph7element4TypeE", !68, i64 0}
!68 = !{!"_ZTSN6ngraph7element6Type_tE", !16, i64 0}
!69 = !{!20, !20, i64 0}
!70 = !{!71, !15, i64 0}
!71 = !{!"_ZTSN6ngraph12CheckLocInfoE", !15, i64 0, !56, i64 8, !15, i64 16}
!72 = !{!71, !56, i64 8}
!73 = !{!71, !15, i64 16}


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