; 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.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::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.23 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [24 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: nounwind
declare void @_ZN6ngraph5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { i64, i64 } @_ZNK6ngraph2op2v04TopK22get_top_k_axis_dynamicEv(ptr noundef nonnull align 8 dereferenceable(692)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK6ngraph9Dimension9is_staticEv(ptr noundef nonnull align 8 dereferenceable(16)) #3 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) #2 align 2

declare noundef i64 @_ZNK6ngraph9Dimension10get_lengthEv(ptr noundef nonnull align 8 dereferenceable(16)) #4

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #3 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 #2 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 #3 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)) #3 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 #3 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 #2 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 #2 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK6ngraph2op2v04TopK8evaluateERKSt6vectorISt10shared_ptrINS_7runtime10HostTensorEESaIS7_EESB_(ptr noundef nonnull align 8 dereferenceable(692) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) unnamed_addr #3 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 i64, align 8
  %9 = alloca %"class.ngraph::Dimension", align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %13 = alloca %"struct.ngraph::CheckLocInfo", align 8
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca %"class.std::allocator.10", align 1
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca i1, align 1
  %18 = alloca i8, align 1
  %19 = alloca i32, align 4
  %20 = alloca i64, align 8
  %21 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %22 = alloca %"struct.ngraph::CheckLocInfo", align 8
  %23 = alloca %"class.std::__cxx11::basic_string", align 8
  %24 = alloca %"class.std::allocator.10", align 1
  %25 = alloca %"class.std::__cxx11::basic_string", align 8
  %26 = alloca i1, align 1
  %27 = alloca %"class.ngraph::Shape", align 8
  %28 = alloca %"class.ngraph::Shape", align 8
  %29 = alloca %"class.ngraph::Shape", align 8
  %30 = 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
  %31 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #6
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  %33 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6ngraph7runtime10HostTensorEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %32, i64 noundef 0) #6
  %34 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6ngraph7runtime10HostTensorELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %33) #6
  %35 = load ptr, ptr %34, align 8, !tbaa !9
  %36 = getelementptr inbounds ptr, ptr %35, i64 2
  %37 = load ptr, ptr %36, align 8
  %38 = call noundef nonnull align 8 dereferenceable(24) ptr %37(ptr noundef nonnull align 8 dereferenceable(64) %34)
  call void @_ZN6ngraph5ShapeC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %38)
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store i64 0, ptr %8, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #6
  %39 = invoke { i64, i64 } @_ZNK6ngraph2op2v04TopK22get_top_k_axis_dynamicEv(ptr noundef nonnull align 8 dereferenceable(692) %31)
          to label %40 unwind label %51

40:                                               ; preds = %3
  %41 = getelementptr inbounds %"class.ngraph::Dimension", ptr %9, i32 0, i32 0
  %42 = getelementptr inbounds { i64, i64 }, ptr %41, i32 0, i32 0
  %43 = extractvalue { i64, i64 } %39, 0
  store i64 %43, ptr %42, align 8
  %44 = getelementptr inbounds { i64, i64 }, ptr %41, i32 0, i32 1
  %45 = extractvalue { i64, i64 } %39, 1
  store i64 %45, ptr %44, align 8
  %46 = invoke noundef zeroext i1 @_ZNK6ngraph9Dimension9is_staticEv(ptr noundef nonnull align 8 dereferenceable(16) %9)
          to label %47 unwind label %51

47:                                               ; preds = %40
  br i1 %46, label %48, label %55

48:                                               ; preds = %47
  %49 = invoke noundef i64 @_ZNK6ngraph9Dimension10get_lengthEv(ptr noundef nonnull align 8 dereferenceable(16) %9)
          to label %50 unwind label %51

50:                                               ; preds = %48
  store i64 %49, ptr %8, align 8, !tbaa !11
  br label %106

51:                                               ; preds = %55, %48, %40, %3
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %10, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %11, align 4
  br label %243

55:                                               ; preds = %47
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  %57 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6ngraph7runtime10HostTensorEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %56, i64 noundef 2) #6
  %58 = invoke noundef i64 @_ZN12_GLOBAL__N_132read_top_k_axis_from_host_tensorERKSt10shared_ptrIN6ngraph7runtime10HostTensorEE(ptr noundef nonnull align 8 dereferenceable(16) %57)
          to label %59 unwind label %51

59:                                               ; preds = %55
  store i64 %58, ptr %8, align 8, !tbaa !11
  br label %60

60:                                               ; preds = %59
  %61 = load i64, ptr %8, align 8, !tbaa !11
  %62 = call noundef i64 @_ZNKSt6vectorImSaImEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  %63 = icmp ule i64 %61, %62
  br i1 %63, label %103, label %64

64:                                               ; preds = %60
  call void @llvm.lifetime.start.p0(i64 392, ptr %12) #6
  invoke void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %12)
          to label %65 unwind label %76

65:                                               ; preds = %64
  %66 = getelementptr inbounds i8, ptr %12, i64 16
  %67 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN6ngraphL19write_all_to_streamIA27_cJEEERSoS2_RKT_DpOT0_(ptr noundef nonnull align 8 dereferenceable(8) %66, ptr noundef nonnull align 1 dereferenceable(27) @.str.23)
          to label %68 unwind label %80

68:                                               ; preds = %65
  store i1 true, ptr %17, align 1
  %69 = call ptr @__cxa_allocate_exception(i64 16) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #6
  %70 = getelementptr inbounds %"struct.ngraph::CheckLocInfo", ptr %13, i32 0, i32 0
  store ptr @.str.1, ptr %70, align 8, !tbaa !13
  %71 = getelementptr inbounds %"struct.ngraph::CheckLocInfo", ptr %13, i32 0, i32 1
  store i32 413, ptr %71, align 8, !tbaa !16
  %72 = getelementptr inbounds %"struct.ngraph::CheckLocInfo", ptr %13, i32 0, i32 2
  store ptr @.str.24, ptr %72, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %73 unwind label %84

73:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #6
  invoke void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %16, ptr noundef nonnull align 8 dereferenceable(128) %12)
          to label %74 unwind label %88

74:                                               ; preds = %73
  invoke void @_ZN6ngraph12CheckFailureC2ERKNS_12CheckLocInfoERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESB_(ptr noundef nonnull align 8 dereferenceable(16) %69, ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull align 8 dereferenceable(32) %16)
          to label %75 unwind label %92

75:                                               ; preds = %74
  store i1 false, ptr %17, align 1
  invoke void @__cxa_throw(ptr %69, ptr @_ZTIN6ngraph12CheckFailureE, ptr @_ZNSt13runtime_errorD2Ev) #7
          to label %249 unwind label %92

76:                                               ; preds = %64
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %10, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %11, align 4
  br label %102

80:                                               ; preds = %65
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %10, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %11, align 4
  br label %101

84:                                               ; preds = %68
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %10, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %11, align 4
  br label %97

88:                                               ; preds = %73
  %89 = landingpad { ptr, i32 }
          cleanup
  %90 = extractvalue { ptr, i32 } %89, 0
  store ptr %90, ptr %10, align 8
  %91 = extractvalue { ptr, i32 } %89, 1
  store i32 %91, ptr %11, align 4
  br label %96

92:                                               ; preds = %75, %74
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %10, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %11, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #6
  br label %96

96:                                               ; preds = %92, %88
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #6
  br label %97

97:                                               ; preds = %96, %84
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #6
  %98 = load i1, ptr %17, align 1
  br i1 %98, label %99, label %100

99:                                               ; preds = %97
  call void @__cxa_free_exception(ptr %69) #6
  br label %100

100:                                              ; preds = %99, %97
  br label %101

101:                                              ; preds = %100, %80
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %12) #6
  br label %102

102:                                              ; preds = %101, %76
  call void @llvm.lifetime.end.p0(i64 392, ptr %12) #6
  br label %243

103:                                              ; preds = %60
  br label %104

104:                                              ; preds = %103
  br label %105

105:                                              ; preds = %104
  br label %106

106:                                              ; preds = %105, %50
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #6
  %107 = invoke noundef zeroext i1 @_ZNK6ngraph2op2v04TopK15get_compute_maxEv(ptr noundef nonnull align 8 dereferenceable(692) %31)
          to label %108 unwind label %127

108:                                              ; preds = %106
  %109 = zext i1 %107 to i8
  store i8 %109, ptr %18, align 1, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #6
  %110 = invoke noundef i32 @_ZNK6ngraph2op2v04TopK8get_sortEv(ptr noundef nonnull align 8 dereferenceable(692) %31)
          to label %111 unwind label %131

111:                                              ; preds = %108
  store i32 %110, ptr %19, align 4, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #6
  %112 = invoke noundef i64 @_ZNK6ngraph2op2v04TopK5get_kEv(ptr noundef nonnull align 8 dereferenceable(692) %31)
          to label %113 unwind label %135

113:                                              ; preds = %111
  store i64 %112, ptr %20, align 8, !tbaa !11
  %114 = load i64, ptr %20, align 8, !tbaa !11
  %115 = icmp eq i64 %114, 0
  br i1 %115, label %116, label %140

116:                                              ; preds = %113
  %117 = load ptr, ptr %6, align 8, !tbaa !5
  %118 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6ngraph7runtime10HostTensorEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %117, i64 noundef 1) #6
  %119 = invoke noundef i64 @_ZN12_GLOBAL__N_123read_k_from_host_tensorERKSt10shared_ptrIN6ngraph7runtime10HostTensorEE(ptr noundef nonnull align 8 dereferenceable(16) %118)
          to label %120 unwind label %135

120:                                              ; preds = %116
  store i64 %119, ptr %20, align 8, !tbaa !11
  %121 = load i64, ptr %20, align 8, !tbaa !11
  %122 = icmp eq i64 %121, 0
  br i1 %122, label %123, label %139

123:                                              ; preds = %120
  %124 = load i64, ptr %8, align 8, !tbaa !11
  %125 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %124) #6
  %126 = load i64, ptr %125, align 8, !tbaa !11
  store i64 %126, ptr %20, align 8, !tbaa !11
  br label %139

127:                                              ; preds = %106
  %128 = landingpad { ptr, i32 }
          cleanup
  %129 = extractvalue { ptr, i32 } %128, 0
  store ptr %129, ptr %10, align 8
  %130 = extractvalue { ptr, i32 } %128, 1
  store i32 %130, ptr %11, align 4
  br label %242

131:                                              ; preds = %108
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %10, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %11, align 4
  br label %241

135:                                              ; preds = %141, %116, %111
  %136 = landingpad { ptr, i32 }
          cleanup
  %137 = extractvalue { ptr, i32 } %136, 0
  store ptr %137, ptr %10, align 8
  %138 = extractvalue { ptr, i32 } %136, 1
  store i32 %138, ptr %11, align 4
  br label %240

139:                                              ; preds = %123, %120
  br label %140

140:                                              ; preds = %139, %113
  br label %141

141:                                              ; preds = %140
  %142 = load i64, ptr %20, align 8, !tbaa !11
  %143 = load i64, ptr %8, align 8, !tbaa !11
  %144 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %143)
          to label %145 unwind label %135

145:                                              ; preds = %141
  %146 = load i64, ptr %144, align 8, !tbaa !11
  %147 = icmp ule i64 %142, %146
  br i1 %147, label %187, label %148

148:                                              ; preds = %145
  call void @llvm.lifetime.start.p0(i64 392, ptr %21) #6
  invoke void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %21)
          to label %149 unwind label %160

149:                                              ; preds = %148
  %150 = getelementptr inbounds i8, ptr %21, i64 16
  %151 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN6ngraphL19write_all_to_streamIA41_cJEEERSoS2_RKT_DpOT0_(ptr noundef nonnull align 8 dereferenceable(8) %150, ptr noundef nonnull align 1 dereferenceable(41) @.str.25)
          to label %152 unwind label %164

152:                                              ; preds = %149
  store i1 true, ptr %26, align 1
  %153 = call ptr @__cxa_allocate_exception(i64 16) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %22) #6
  %154 = getelementptr inbounds %"struct.ngraph::CheckLocInfo", ptr %22, i32 0, i32 0
  store ptr @.str.1, ptr %154, align 8, !tbaa !13
  %155 = getelementptr inbounds %"struct.ngraph::CheckLocInfo", ptr %22, i32 0, i32 1
  store i32 429, ptr %155, align 8, !tbaa !16
  %156 = getelementptr inbounds %"struct.ngraph::CheckLocInfo", ptr %22, i32 0, i32 2
  store ptr @.str.26, ptr %156, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 32, ptr %23) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %24) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %23, ptr noundef @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %24)
          to label %157 unwind label %168

157:                                              ; preds = %152
  call void @llvm.lifetime.start.p0(i64 32, ptr %25) #6
  invoke void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %25, ptr noundef nonnull align 8 dereferenceable(128) %21)
          to label %158 unwind label %172

158:                                              ; preds = %157
  invoke void @_ZN6ngraph12CheckFailureC2ERKNS_12CheckLocInfoERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESB_(ptr noundef nonnull align 8 dereferenceable(16) %153, ptr noundef nonnull align 8 dereferenceable(24) %22, ptr noundef nonnull align 8 dereferenceable(32) %23, ptr noundef nonnull align 8 dereferenceable(32) %25)
          to label %159 unwind label %176

159:                                              ; preds = %158
  store i1 false, ptr %26, align 1
  invoke void @__cxa_throw(ptr %153, ptr @_ZTIN6ngraph12CheckFailureE, ptr @_ZNSt13runtime_errorD2Ev) #7
          to label %249 unwind label %176

160:                                              ; preds = %148
  %161 = landingpad { ptr, i32 }
          cleanup
  %162 = extractvalue { ptr, i32 } %161, 0
  store ptr %162, ptr %10, align 8
  %163 = extractvalue { ptr, i32 } %161, 1
  store i32 %163, ptr %11, align 4
  br label %186

164:                                              ; preds = %149
  %165 = landingpad { ptr, i32 }
          cleanup
  %166 = extractvalue { ptr, i32 } %165, 0
  store ptr %166, ptr %10, align 8
  %167 = extractvalue { ptr, i32 } %165, 1
  store i32 %167, ptr %11, align 4
  br label %185

168:                                              ; preds = %152
  %169 = landingpad { ptr, i32 }
          cleanup
  %170 = extractvalue { ptr, i32 } %169, 0
  store ptr %170, ptr %10, align 8
  %171 = extractvalue { ptr, i32 } %169, 1
  store i32 %171, ptr %11, align 4
  br label %181

172:                                              ; preds = %157
  %173 = landingpad { ptr, i32 }
          cleanup
  %174 = extractvalue { ptr, i32 } %173, 0
  store ptr %174, ptr %10, align 8
  %175 = extractvalue { ptr, i32 } %173, 1
  store i32 %175, ptr %11, align 4
  br label %180

176:                                              ; preds = %159, %158
  %177 = landingpad { ptr, i32 }
          cleanup
  %178 = extractvalue { ptr, i32 } %177, 0
  store ptr %178, ptr %10, align 8
  %179 = extractvalue { ptr, i32 } %177, 1
  store i32 %179, ptr %11, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #6
  br label %180

180:                                              ; preds = %176, %172
  call void @llvm.lifetime.end.p0(i64 32, ptr %25) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %23) #6
  br label %181

181:                                              ; preds = %180, %168
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %23) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #6
  %182 = load i1, ptr %26, align 1
  br i1 %182, label %183, label %184

183:                                              ; preds = %181
  call void @__cxa_free_exception(ptr %153) #6
  br label %184

184:                                              ; preds = %183, %181
  br label %185

185:                                              ; preds = %184, %164
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %21) #6
  br label %186

186:                                              ; preds = %185, %160
  call void @llvm.lifetime.end.p0(i64 392, ptr %21) #6
  br label %240

187:                                              ; preds = %145
  br label %188

188:                                              ; preds = %187
  br label %189

189:                                              ; preds = %188
  call void @llvm.lifetime.start.p0(i64 24, ptr %27) #6
  %190 = load ptr, ptr %6, align 8, !tbaa !5
  %191 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6ngraph7runtime10HostTensorEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %190, i64 noundef 0) #6
  %192 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6ngraph7runtime10HostTensorELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %191) #6
  %193 = load ptr, ptr %192, align 8, !tbaa !9
  %194 = getelementptr inbounds ptr, ptr %193, i64 2
  %195 = load ptr, ptr %194, align 8
  %196 = invoke noundef nonnull align 8 dereferenceable(24) ptr %195(ptr noundef nonnull align 8 dereferenceable(64) %192)
          to label %197 unwind label %217

197:                                              ; preds = %189
  invoke void @_ZN6ngraph5ShapeC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %28, ptr noundef nonnull align 8 dereferenceable(24) %196)
          to label %198 unwind label %217

198:                                              ; preds = %197
  %199 = load i64, ptr %20, align 8, !tbaa !11
  %200 = load i64, ptr %8, align 8, !tbaa !11
  invoke void @_ZNK6ngraph2op2v04TopK20compute_output_shapeENS_5ShapeElm(ptr dead_on_unwind writable sret(%"class.ngraph::Shape") align 8 %27, ptr noundef nonnull align 8 dereferenceable(692) %31, ptr noundef %28, i64 noundef %199, i64 noundef %200)
          to label %201 unwind label %221

201:                                              ; preds = %198
  call void @_ZN6ngraph5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %28) #6
  %202 = load ptr, ptr %6, align 8, !tbaa !5
  %203 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6ngraph7runtime10HostTensorEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %202, i64 noundef 0) #6
  %204 = load ptr, ptr %5, align 8, !tbaa !5
  %205 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6ngraph7runtime10HostTensorEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %204, i64 noundef 0) #6
  %206 = load ptr, ptr %5, align 8, !tbaa !5
  %207 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6ngraph7runtime10HostTensorEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %206, i64 noundef 1) #6
  invoke void @_ZN6ngraph5ShapeC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %29, ptr noundef nonnull align 8 dereferenceable(24) %27)
          to label %208 unwind label %225

208:                                              ; preds = %201
  %209 = load i64, ptr %8, align 8, !tbaa !11
  %210 = load i64, ptr %20, align 8, !tbaa !11
  %211 = load i8, ptr %18, align 1, !tbaa !18, !range !22, !noundef !23
  %212 = trunc i8 %211 to i1
  %213 = load i32, ptr %19, align 4, !tbaa !20
  invoke void @_ZNK6ngraph2op2v04TopK22get_index_element_typeEv(ptr dead_on_unwind writable sret(%"class.ngraph::element::Type") align 4 %30, ptr noundef nonnull align 8 dereferenceable(692) %31)
          to label %214 unwind label %229

214:                                              ; preds = %208
  %215 = invoke noundef zeroext i1 @_ZN12_GLOBAL__N_113evaluate_topkERKSt10shared_ptrIN6ngraph7runtime10HostTensorEES6_S6_NS1_5ShapeEmmbNS1_2op12TopKSortTypeENS1_7element4TypeE(ptr noundef nonnull align 8 dereferenceable(16) %203, ptr noundef nonnull align 8 dereferenceable(16) %205, ptr noundef nonnull align 8 dereferenceable(16) %207, ptr noundef %29, i64 noundef %209, i64 noundef %210, i1 noundef zeroext %212, i32 noundef %213, ptr noundef %30)
          to label %216 unwind label %233

216:                                              ; preds = %214
  call void @_ZN6ngraph7element4TypeD2Ev(ptr noundef nonnull align 4 dereferenceable(4) %30) #6
  call void @_ZN6ngraph5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %29) #6
  call void @_ZN6ngraph5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %27) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %27) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @_ZN6ngraph5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #6
  ret i1 %215

217:                                              ; preds = %197, %189
  %218 = landingpad { ptr, i32 }
          cleanup
  %219 = extractvalue { ptr, i32 } %218, 0
  store ptr %219, ptr %10, align 8
  %220 = extractvalue { ptr, i32 } %218, 1
  store i32 %220, ptr %11, align 4
  br label %239

221:                                              ; preds = %198
  %222 = landingpad { ptr, i32 }
          cleanup
  %223 = extractvalue { ptr, i32 } %222, 0
  store ptr %223, ptr %10, align 8
  %224 = extractvalue { ptr, i32 } %222, 1
  store i32 %224, ptr %11, align 4
  call void @_ZN6ngraph5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %28) #6
  br label %239

225:                                              ; preds = %201
  %226 = landingpad { ptr, i32 }
          cleanup
  %227 = extractvalue { ptr, i32 } %226, 0
  store ptr %227, ptr %10, align 8
  %228 = extractvalue { ptr, i32 } %226, 1
  store i32 %228, ptr %11, align 4
  br label %238

229:                                              ; preds = %208
  %230 = landingpad { ptr, i32 }
          cleanup
  %231 = extractvalue { ptr, i32 } %230, 0
  store ptr %231, ptr %10, align 8
  %232 = extractvalue { ptr, i32 } %230, 1
  store i32 %232, ptr %11, align 4
  br label %237

233:                                              ; preds = %214
  %234 = landingpad { ptr, i32 }
          cleanup
  %235 = extractvalue { ptr, i32 } %234, 0
  store ptr %235, ptr %10, align 8
  %236 = extractvalue { ptr, i32 } %234, 1
  store i32 %236, ptr %11, align 4
  call void @_ZN6ngraph7element4TypeD2Ev(ptr noundef nonnull align 4 dereferenceable(4) %30) #6
  br label %237

237:                                              ; preds = %233, %229
  call void @_ZN6ngraph5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %29) #6
  br label %238

238:                                              ; preds = %237, %225
  call void @_ZN6ngraph5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %27) #6
  br label %239

239:                                              ; preds = %238, %221, %217
  call void @llvm.lifetime.end.p0(i64 24, ptr %27) #6
  br label %240

240:                                              ; preds = %239, %186, %135
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #6
  br label %241

241:                                              ; preds = %240, %131
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #6
  br label %242

242:                                              ; preds = %241, %127
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #6
  br label %243

243:                                              ; preds = %242, %102, %51
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @_ZN6ngraph5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #6
  br label %244

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

249:                                              ; preds = %159, %75
  unreachable
}

; 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) #2 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)) #2 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef nonnull align 8 dereferenceable(8) ptr @_ZN6ngraphL19write_all_to_streamIA27_cJEEERSoS2_RKT_DpOT0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(27)) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK6ngraph2op2v04TopK15get_compute_maxEv(ptr noundef nonnull align 8 dereferenceable(692)) #2 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef nonnull align 8 dereferenceable(8) ptr @_ZN6ngraphL19write_all_to_streamIA41_cJEEERSoS2_RKT_DpOT0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(41)) #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) #3

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "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 = { 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 #6 = { nounwind }
attributes #7 = { 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, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"_ZTSN6ngraph12CheckLocInfoE", !6, i64 0, !15, i64 8, !6, i64 16}
!15 = !{!"int", !7, i64 0}
!16 = !{!14, !15, i64 8}
!17 = !{!14, !6, i64 16}
!18 = !{!19, !19, i64 0}
!19 = !{!"bool", !7, i64 0}
!20 = !{!21, !21, i64 0}
!21 = !{!"_ZTSN6ngraph2op12TopKSortTypeE", !7, i64 0}
!22 = !{i8 0, i8 2}
!23 = !{}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::__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::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.23 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [24 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: nounwind
declare void @_ZN6ngraph5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK6ngraph9Dimension9is_staticEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3 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 #2 align 2

declare noundef i64 @_ZNK6ngraph9Dimension10get_lengthEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128)) unnamed_addr #3 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 #2 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 #3 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 #3 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 #3 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 #2 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 #2 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK6ngraph2op2v04TopK8evaluateERKSt6vectorISt10shared_ptrINS_7runtime10HostTensorEESaIS7_EESB_(ptr noundef nonnull align 8 dereferenceable(692) %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) unnamed_addr #3 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::__cxx11::basic_stringstream", align 8
  %7 = alloca %"struct.ngraph::CheckLocInfo", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::allocator.10", align 1
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::__cxx11::basic_stringstream", align 8
  %12 = alloca %"struct.ngraph::CheckLocInfo", align 8
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = alloca %"class.std::allocator.10", align 1
  %15 = alloca %"class.std::__cxx11::basic_string", align 8
  %16 = alloca %"class.ngraph::Shape", align 8
  %17 = alloca %"class.ngraph::Shape", align 8
  %18 = alloca %"class.ngraph::Shape", align 8
  %19 = alloca %"class.ngraph::element::Type", align 4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #6
  %20 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6ngraph7runtime10HostTensorEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 0) #6
  %21 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN6ngraph7runtime10HostTensorELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %20) #6
  %22 = load ptr, ptr %21, align 8, !tbaa !5
  %23 = getelementptr inbounds i8, ptr %22, i64 16
  %24 = load ptr, ptr %23, align 8
  %25 = tail call noundef nonnull align 8 dereferenceable(24) ptr %24(ptr noundef nonnull align 8 dereferenceable(64) %21)
  call void @_ZN6ngraph5ShapeC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %4, ptr noundef nonnull align 8 dereferenceable(24) %25)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #6
  %26 = invoke { i64, i64 } @_ZNK6ngraph2op2v04TopK22get_top_k_axis_dynamicEv(ptr noundef nonnull align 8 dereferenceable(692) %0)
          to label %27 unwind label %35

27:                                               ; preds = %3
  %28 = extractvalue { i64, i64 } %26, 0
  store i64 %28, ptr %5, align 8
  %29 = getelementptr inbounds i8, ptr %5, i64 8
  %30 = extractvalue { i64, i64 } %26, 1
  store i64 %30, ptr %29, align 8
  %31 = invoke noundef zeroext i1 @_ZNK6ngraph9Dimension9is_staticEv(ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %32 unwind label %35

32:                                               ; preds = %27
  br i1 %31, label %33, label %37

33:                                               ; preds = %32
  %34 = invoke noundef i64 @_ZNK6ngraph9Dimension10get_lengthEv(ptr noundef nonnull align 8 dereferenceable(16) %5)
          to label %66 unwind label %35

35:                                               ; preds = %37, %33, %27, %3
  %36 = landingpad { ptr, i32 }
          cleanup
  br label %136

37:                                               ; preds = %32
  %38 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6ngraph7runtime10HostTensorEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 2) #6
  %39 = invoke noundef i64 @_ZN12_GLOBAL__N_132read_top_k_axis_from_host_tensorERKSt10shared_ptrIN6ngraph7runtime10HostTensorEE(ptr noundef nonnull align 8 dereferenceable(16) %38)
          to label %40 unwind label %35

40:                                               ; preds = %37
  %41 = call noundef i64 @_ZNKSt6vectorImSaImEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  %.not = icmp ugt i64 %39, %41
  br i1 %.not, label %42, label %66

42:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 392, ptr nonnull %6) #6
  invoke void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %6)
          to label %43 unwind label %53

43:                                               ; preds = %42
  %44 = getelementptr inbounds i8, ptr %6, i64 16
  %45 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN6ngraphL19write_all_to_streamIA27_cJEEERSoS2_RKT_DpOT0_(ptr noundef nonnull align 8 dereferenceable(8) %44, ptr noundef nonnull align 1 dereferenceable(27) @.str.23)
          to label %46 unwind label %55

46:                                               ; preds = %43
  %47 = call ptr @__cxa_allocate_exception(i64 16) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %7) #6
  store ptr @.str.1, ptr %7, align 8, !tbaa !8
  %48 = getelementptr inbounds i8, ptr %7, i64 8
  store i32 413, ptr %48, align 8, !tbaa !13
  %49 = getelementptr inbounds i8, ptr %7, i64 16
  store ptr @.str.24, ptr %49, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %50 unwind label %.thread

50:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #6
  invoke void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %10, ptr noundef nonnull align 8 dereferenceable(128) %6)
          to label %51 unwind label %58

51:                                               ; preds = %50
  invoke void @_ZN6ngraph12CheckFailureC2ERKNS_12CheckLocInfoERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESB_(ptr noundef nonnull align 8 dereferenceable(16) %47, ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %52 unwind label %60

52:                                               ; preds = %51
  invoke void @__cxa_throw(ptr nonnull %47, ptr nonnull @_ZTIN6ngraph12CheckFailureE, ptr nonnull @_ZNSt13runtime_errorD2Ev) #7
          to label %137 unwind label %60

53:                                               ; preds = %42
  %54 = landingpad { ptr, i32 }
          cleanup
  br label %65

55:                                               ; preds = %43
  %56 = landingpad { ptr, i32 }
          cleanup
  br label %64

.thread:                                          ; preds = %46
  %57 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  br label %63

58:                                               ; preds = %50
  %59 = landingpad { ptr, i32 }
          cleanup
  br label %62

60:                                               ; preds = %52, %51
  %.028 = phi i1 [ false, %52 ], [ true, %51 ]
  %61 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  br label %62

62:                                               ; preds = %58, %60
  %.pn = phi { ptr, i32 } [ %61, %60 ], [ %59, %58 ]
  %.129 = phi i1 [ %.028, %60 ], [ true, %58 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %7) #6
  br i1 %.129, label %63, label %64

63:                                               ; preds = %.thread, %62
  %.pn.pn63 = phi { ptr, i32 } [ %57, %.thread ], [ %.pn, %62 ]
  call void @__cxa_free_exception(ptr %47) #6
  br label %64

64:                                               ; preds = %62, %63, %55
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn63, %63 ], [ %.pn, %62 ], [ %56, %55 ]
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %6) #6
  br label %65

65:                                               ; preds = %64, %53
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %64 ], [ %54, %53 ]
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %6) #6
  br label %136

66:                                               ; preds = %33, %40
  %.024 = phi i64 [ %39, %40 ], [ %34, %33 ]
  %67 = call noundef zeroext i1 @_ZNK6ngraph2op2v04TopK15get_compute_maxEv(ptr noundef nonnull align 8 dereferenceable(692) %0)
  %68 = call noundef i32 @_ZNK6ngraph2op2v04TopK8get_sortEv(ptr noundef nonnull align 8 dereferenceable(692) %0)
  %69 = invoke noundef i64 @_ZNK6ngraph2op2v04TopK5get_kEv(ptr noundef nonnull align 8 dereferenceable(692) %0)
          to label %70 unwind label %80

70:                                               ; preds = %66
  %71 = icmp eq i64 %69, 0
  br i1 %71, label %72, label %82

72:                                               ; preds = %70
  %73 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6ngraph7runtime10HostTensorEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 1) #6
  %74 = invoke noundef i64 @_ZN12_GLOBAL__N_123read_k_from_host_tensorERKSt10shared_ptrIN6ngraph7runtime10HostTensorEE(ptr noundef nonnull align 8 dereferenceable(16) %73)
          to label %75 unwind label %80

75:                                               ; preds = %72
  %76 = icmp eq i64 %74, 0
  br i1 %76, label %77, label %82

77:                                               ; preds = %75
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.024) #6
  %79 = load i64, ptr %78, align 8, !tbaa !15
  br label %82

80:                                               ; preds = %82, %72, %66
  %81 = landingpad { ptr, i32 }
          cleanup
  br label %136

82:                                               ; preds = %70, %77, %75
  %.023 = phi i64 [ %79, %77 ], [ %74, %75 ], [ %69, %70 ]
  %83 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorImSaImEE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.024)
          to label %84 unwind label %80

84:                                               ; preds = %82
  %85 = load i64, ptr %83, align 8, !tbaa !15
  %.not50 = icmp ugt i64 %.023, %85
  br i1 %.not50, label %86, label %110

86:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 392, ptr nonnull %11) #6
  invoke void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev(ptr noundef nonnull align 8 dereferenceable(128) %11)
          to label %87 unwind label %97

87:                                               ; preds = %86
  %88 = getelementptr inbounds i8, ptr %11, i64 16
  %89 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN6ngraphL19write_all_to_streamIA41_cJEEERSoS2_RKT_DpOT0_(ptr noundef nonnull align 8 dereferenceable(8) %88, ptr noundef nonnull align 1 dereferenceable(41) @.str.25)
          to label %90 unwind label %99

90:                                               ; preds = %87
  %91 = call ptr @__cxa_allocate_exception(i64 16) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %12) #6
  store ptr @.str.1, ptr %12, align 8, !tbaa !8
  %92 = getelementptr inbounds i8, ptr %12, i64 8
  store i32 429, ptr %92, align 8, !tbaa !13
  %93 = getelementptr inbounds i8, ptr %12, i64 16
  store ptr @.str.26, ptr %93, align 8, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %13) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %14) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull @.str.3, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %94 unwind label %.thread64

94:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %15) #6
  invoke void @_ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %15, ptr noundef nonnull align 8 dereferenceable(128) %11)
          to label %95 unwind label %102

95:                                               ; preds = %94
  invoke void @_ZN6ngraph12CheckFailureC2ERKNS_12CheckLocInfoERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESB_(ptr noundef nonnull align 8 dereferenceable(16) %91, ptr noundef nonnull align 8 dereferenceable(24) %12, ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull align 8 dereferenceable(32) %15)
          to label %96 unwind label %104

96:                                               ; preds = %95
  invoke void @__cxa_throw(ptr nonnull %91, ptr nonnull @_ZTIN6ngraph12CheckFailureE, ptr nonnull @_ZNSt13runtime_errorD2Ev) #7
          to label %137 unwind label %104

97:                                               ; preds = %86
  %98 = landingpad { ptr, i32 }
          cleanup
  br label %109

99:                                               ; preds = %87
  %100 = landingpad { ptr, i32 }
          cleanup
  br label %108

.thread64:                                        ; preds = %90
  %101 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #6
  br label %107

102:                                              ; preds = %94
  %103 = landingpad { ptr, i32 }
          cleanup
  br label %106

104:                                              ; preds = %96, %95
  %.0 = phi i1 [ false, %96 ], [ true, %95 ]
  %105 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #6
  br label %106

106:                                              ; preds = %102, %104
  %.pn51 = phi { ptr, i32 } [ %105, %104 ], [ %103, %102 ]
  %.1 = phi i1 [ %.0, %104 ], [ true, %102 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %15) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %12) #6
  br i1 %.1, label %107, label %108

107:                                              ; preds = %.thread64, %106
  %.pn51.pn67 = phi { ptr, i32 } [ %101, %.thread64 ], [ %.pn51, %106 ]
  call void @__cxa_free_exception(ptr %91) #6
  br label %108

108:                                              ; preds = %106, %107, %99
  %.pn51.pn.pn = phi { ptr, i32 } [ %.pn51.pn67, %107 ], [ %.pn51, %106 ], [ %100, %99 ]
  call void @_ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev(ptr noundef nonnull align 8 dereferenceable(128) %11) #6
  br label %109

109:                                              ; preds = %108, %97
  %.pn51.pn.pn.pn = phi { ptr, i32 } [ %.pn51.pn.pn, %108 ], [ %98, %97 ]
  call void @llvm.lifetime.end.p0(i64 392, ptr nonnull %11) #6
  br label %136

110:                                              ; preds = %84
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %16) #6
  %111 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6ngraph7runtime10HostTensorEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 0) #6
  %112 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6ngraph7runtime10HostTensorELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %111) #6
  %113 = load ptr, ptr %112, align 8, !tbaa !5
  %114 = getelementptr inbounds i8, ptr %113, i64 16
  %115 = load ptr, ptr %114, align 8
  %116 = invoke noundef nonnull align 8 dereferenceable(24) ptr %115(ptr noundef nonnull align 8 dereferenceable(64) %112)
          to label %117 unwind label %126

117:                                              ; preds = %110
  invoke void @_ZN6ngraph5ShapeC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %17, ptr noundef nonnull align 8 dereferenceable(24) %116)
          to label %118 unwind label %126

118:                                              ; preds = %117
  invoke void @_ZNK6ngraph2op2v04TopK20compute_output_shapeENS_5ShapeElm(ptr dead_on_unwind nonnull writable sret(%"class.ngraph::Shape") align 8 %16, ptr noundef nonnull align 8 dereferenceable(692) %0, ptr noundef nonnull %17, i64 noundef %.023, i64 noundef %.024)
          to label %119 unwind label %128

119:                                              ; preds = %118
  call void @_ZN6ngraph5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #6
  %120 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6ngraph7runtime10HostTensorEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 0) #6
  %121 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6ngraph7runtime10HostTensorEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #6
  %122 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6ngraph7runtime10HostTensorEESaIS4_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 1) #6
  invoke void @_ZN6ngraph5ShapeC1ERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %18, ptr noundef nonnull align 8 dereferenceable(24) %16)
          to label %123 unwind label %130

123:                                              ; preds = %119
  call void @_ZNK6ngraph2op2v04TopK22get_index_element_typeEv(ptr dead_on_unwind nonnull writable sret(%"class.ngraph::element::Type") align 4 %19, ptr noundef nonnull align 8 dereferenceable(692) %0)
  %124 = invoke noundef zeroext i1 @_ZN12_GLOBAL__N_113evaluate_topkERKSt10shared_ptrIN6ngraph7runtime10HostTensorEES6_S6_NS1_5ShapeEmmbNS1_2op12TopKSortTypeENS1_7element4TypeE(ptr noundef nonnull align 8 dereferenceable(16) %120, ptr noundef nonnull align 8 dereferenceable(16) %121, ptr noundef nonnull align 8 dereferenceable(16) %122, ptr noundef nonnull %18, i64 noundef %.024, i64 noundef %.023, i1 noundef zeroext %67, i32 noundef %68, ptr noundef nonnull %19)
          to label %125 unwind label %132

125:                                              ; preds = %123
  call void @_ZN6ngraph7element4TypeD2Ev(ptr noundef nonnull align 4 dereferenceable(4) %19) #6
  call void @_ZN6ngraph5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #6
  call void @_ZN6ngraph5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  call void @_ZN6ngraph5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  ret i1 %124

126:                                              ; preds = %117, %110
  %127 = landingpad { ptr, i32 }
          cleanup
  br label %135

128:                                              ; preds = %118
  %129 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6ngraph5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %17) #6
  br label %135

130:                                              ; preds = %119
  %131 = landingpad { ptr, i32 }
          cleanup
  br label %134

132:                                              ; preds = %123
  %133 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6ngraph7element4TypeD2Ev(ptr noundef nonnull align 4 dereferenceable(4) %19) #6
  call void @_ZN6ngraph5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #6
  br label %134

134:                                              ; preds = %132, %130
  %.pn56 = phi { ptr, i32 } [ %133, %132 ], [ %131, %130 ]
  call void @_ZN6ngraph5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %16) #6
  br label %135

135:                                              ; preds = %134, %128, %126
  %.pn56.pn = phi { ptr, i32 } [ %.pn56, %134 ], [ %129, %128 ], [ %127, %126 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %16) #6
  br label %136

136:                                              ; preds = %80, %109, %135, %65, %35
  %.pn56.pn.pn.pn = phi { ptr, i32 } [ %36, %35 ], [ %.pn.pn.pn.pn, %65 ], [ %.pn56.pn, %135 ], [ %.pn51.pn.pn.pn, %109 ], [ %81, %80 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  call void @_ZN6ngraph5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  resume { ptr, i32 } %.pn56.pn.pn.pn

137:                                              ; preds = %96, %52
  unreachable
}

; 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 #2 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 #2 align 2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef nonnull align 8 dereferenceable(8) ptr @_ZN6ngraphL19write_all_to_streamIA27_cJEEERSoS2_RKT_DpOT0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(27)) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK6ngraph2op2v04TopK15get_compute_maxEv(ptr noundef nonnull align 8 dereferenceable(692)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK6ngraph2op2v04TopK8get_sortEv(ptr noundef nonnull align 8 dereferenceable(692)) local_unnamed_addr #2 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 #3

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef nonnull align 8 dereferenceable(8) ptr @_ZN6ngraphL19write_all_to_streamIA41_cJEEERSoS2_RKT_DpOT0_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 1 dereferenceable(41)) 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 #3

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { "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 = { 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 #6 = { nounwind }
attributes #7 = { 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, !10, i64 0}
!9 = !{!"_ZTSN6ngraph12CheckLocInfoE", !10, i64 0, !12, i64 8, !10, i64 16}
!10 = !{!"any pointer", !11, i64 0}
!11 = !{!"omnipotent char", !7, i64 0}
!12 = !{!"int", !11, i64 0}
!13 = !{!9, !12, i64 8}
!14 = !{!9, !10, i64 16}
!15 = !{!16, !16, i64 0}
!16 = !{!"long", !11, i64 0}


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