; LLVM IR from NervanaSystems/ngraph :: src/ngraph/frontend/onnx_import/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::element::Type" = type { i32 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<ngraph::Output<Node>, std::allocator<ngraph::Output<Node>>>::_Vector_impl" }
%"struct.std::_Vector_base<ngraph::Output<Node>, std::allocator<ngraph::Output<Node>>>::_Vector_impl" = type { %"struct.std::_Vector_base<ngraph::Output<Node>, std::allocator<ngraph::Output<Node>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ngraph::Output<Node>, std::allocator<ngraph::Output<Node>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.ngraph::Output" = type { %"class.std::shared_ptr", i64 }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator.29" = type { i8 }
%"class.std::shared_ptr.32" = type { %"class.std::__shared_ptr.33" }
%"class.std::__shared_ptr.33" = type { ptr, %"class.std::__shared_count" }
%"class.ngraph::Shape" = type { %"class.std::vector.35" }
%"class.std::vector.35" = type { %"struct.std::_Vector_base.36" }
%"struct.std::_Vector_base.36" = 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.std::initializer_list" = type { ptr, i64 }
%"class.std::shared_ptr.40" = type { %"class.std::__shared_ptr.41" }
%"class.std::__shared_ptr.41" = type { ptr, %"class.std::__shared_count" }
%"class.std::initializer_list.43" = type { ptr, i64 }
%"class.std::allocator.24" = type { i8 }

@.str = external hidden unnamed_addr constant [2 x i8], align 1
@_ZN6ngraph7element3i64E = external global %"class.ngraph::element::Type", align 4

; 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: mustprogress uwtable
define dso_local void @_ZN6ngraph11onnx_import2op5set_14topkERKNS0_4NodeE(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8 %0, ptr noundef nonnull align 8 dereferenceable(16) %1) #1 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.ngraph::Output", align 8
  %6 = alloca %"class.std::vector", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i64, align 8
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::allocator.29", align 1
  %12 = alloca %"class.std::shared_ptr.32", align 8
  %13 = alloca %"class.ngraph::Shape", align 8
  %14 = alloca %"class.std::initializer_list", align 8
  %15 = alloca [1 x i64], align 8
  %16 = alloca i64, align 8
  %17 = alloca %"class.std::shared_ptr", align 8
  %18 = alloca %"class.std::shared_ptr.40", align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca %"class.std::initializer_list.43", align 8
  %22 = alloca [2 x %"class.ngraph::Output"], align 8
  %23 = alloca ptr, align 8
  %24 = alloca %"class.std::allocator.24", align 1
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #7
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZNK6ngraph11onnx_import4Node13get_ng_inputsEv(ptr dead_on_unwind writable sret(%"class.std::vector") align 8 %6, ptr noundef nonnull align 8 dereferenceable(16) %25)
  %26 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIN6ngraph6OutputINS0_4NodeEEESaIS3_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef 0)
          to label %27 unwind label %64

27:                                               ; preds = %2
  call void @_ZN6ngraph6OutputINS_4NodeEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %26) #7
  call void @_ZNSt6vectorIN6ngraph6OutputINS0_4NodeEEESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef @.str, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %29 unwind label %68

29:                                               ; preds = %27
  %30 = invoke noundef i64 @_ZNK6ngraph11onnx_import4Node19get_attribute_valueIlEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16) %28, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %31 unwind label %72

31:                                               ; preds = %29
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #7
  store i64 %30, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #7
  invoke void @_ZN6ngraph5ShapeC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %13)
          to label %32 unwind label %77

32:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %33 = load i64, ptr %9, align 8, !tbaa !9
  store i64 %33, ptr %15, align 8, !tbaa !9
  %34 = getelementptr inbounds %"class.std::initializer_list", ptr %14, i32 0, i32 0
  store ptr %15, ptr %34, align 8, !tbaa !11
  %35 = getelementptr inbounds %"class.std::initializer_list", ptr %14, i32 0, i32 1
  store i64 1, ptr %35, align 8, !tbaa !13
  %36 = getelementptr inbounds { ptr, i64 }, ptr %14, i32 0, i32 0
  %37 = load ptr, ptr %36, align 8
  %38 = getelementptr inbounds { ptr, i64 }, ptr %14, i32 0, i32 1
  %39 = load i64, ptr %38, align 8
  invoke void @_ZN6ngraph2op2v08Constant6createIlEESt10shared_ptrIS2_ERKNS_7element4TypeENS_5ShapeESt16initializer_listIT_E(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.32") align 8 %12, ptr noundef nonnull align 4 dereferenceable(4) @_ZN6ngraph7element3i64E, ptr noundef %13, ptr %37, i64 %39)
          to label %40 unwind label %81

40:                                               ; preds = %32
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @_ZN6ngraph5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %41 = load ptr, ptr %4, align 8, !tbaa !5
  %42 = invoke noundef i64 @_ZN12_GLOBAL__N_18get_axisERKN6ngraph11onnx_import4NodeE(ptr noundef nonnull align 8 dereferenceable(16) %41)
          to label %43 unwind label %85

43:                                               ; preds = %40
  store i64 %42, ptr %16, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #7
  store i32 0, ptr %19, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #7
  store i32 2, ptr %20, align 4, !tbaa !16
  invoke void @_ZSt11make_sharedIN6ngraph2op2v34TopKEJRNS0_6OutputINS0_4NodeEEERSt10shared_ptrINS1_2v08ConstantEERlNS1_8TopKModeENS1_12TopKSortTypeERKNS0_7element4TypeEEES8_INSt9enable_ifIXntsr8is_arrayIT_EE5valueESL_E4typeEEDpOT0_(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.40") align 8 %18, ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 4 dereferenceable(4) %19, ptr noundef nonnull align 4 dereferenceable(4) %20, ptr noundef nonnull align 4 dereferenceable(4) @_ZN6ngraph7element3i64E)
          to label %44 unwind label %89

44:                                               ; preds = %43
  call void @_ZNSt10shared_ptrIN6ngraph4NodeEEC2INS0_2op2v34TopKEvEEOS_IT_E(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(16) %18) #7
  call void @_ZNSt12__shared_ptrIN6ngraph2op2v34TopKELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 48, ptr %22) #7
  store ptr %22, ptr %23, align 8
  %45 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6ngraph4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %17) #7
  invoke void @_ZN6ngraph4Node6outputEm(ptr dead_on_unwind writable sret(%"class.ngraph::Output") align 8 %22, ptr noundef nonnull align 8 dereferenceable(680) %45, i64 noundef 0)
          to label %46 unwind label %93

46:                                               ; preds = %44
  %47 = getelementptr inbounds %"class.ngraph::Output", ptr %22, i64 1
  store ptr %47, ptr %23, align 8
  %48 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6ngraph4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %17) #7
  invoke void @_ZN6ngraph4Node6outputEm(ptr dead_on_unwind writable sret(%"class.ngraph::Output") align 8 %47, ptr noundef nonnull align 8 dereferenceable(680) %48, i64 noundef 1)
          to label %49 unwind label %93

49:                                               ; preds = %46
  %50 = getelementptr inbounds %"class.std::initializer_list.43", ptr %21, i32 0, i32 0
  store ptr %22, ptr %50, align 8, !tbaa !18
  %51 = getelementptr inbounds %"class.std::initializer_list.43", ptr %21, i32 0, i32 1
  store i64 2, ptr %51, align 8, !tbaa !20
  call void @llvm.lifetime.start.p0(i64 1, ptr %24) #7
  call void @_ZNSaIN6ngraph6OutputINS_4NodeEEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #7
  %52 = getelementptr inbounds { ptr, i64 }, ptr %21, i32 0, i32 0
  %53 = load ptr, ptr %52, align 8
  %54 = getelementptr inbounds { ptr, i64 }, ptr %21, i32 0, i32 1
  %55 = load i64, ptr %54, align 8
  invoke void @_ZNSt6vectorIN6ngraph6OutputINS0_4NodeEEESaIS3_EEC2ESt16initializer_listIS3_ERKS4_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr %53, i64 %55, ptr noundef nonnull align 1 dereferenceable(1) %24)
          to label %56 unwind label %104

56:                                               ; preds = %49
  call void @_ZNSt15__new_allocatorIN6ngraph6OutputINS0_4NodeEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #7
  %57 = getelementptr inbounds [2 x %"class.ngraph::Output"], ptr %22, i32 0, i32 0
  %58 = getelementptr inbounds %"class.ngraph::Output", ptr %57, i64 2
  br label %59

59:                                               ; preds = %59, %56
  %60 = phi ptr [ %58, %56 ], [ %61, %59 ]
  %61 = getelementptr inbounds %"class.ngraph::Output", ptr %60, i64 -1
  call void @_ZN6ngraph6OutputINS_4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %61) #7
  %62 = icmp eq ptr %61, %57
  br i1 %62, label %63, label %59

63:                                               ; preds = %59
  call void @llvm.lifetime.end.p0(i64 48, ptr %22) #7
  call void @_ZNSt12__shared_ptrIN6ngraph4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @_ZNSt12__shared_ptrIN6ngraph2op2v08ConstantELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @_ZN6ngraph6OutputINS_4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #7
  ret void

64:                                               ; preds = %2
  %65 = landingpad { ptr, i32 }
          cleanup
  %66 = extractvalue { ptr, i32 } %65, 0
  store ptr %66, ptr %7, align 8
  %67 = extractvalue { ptr, i32 } %65, 1
  store i32 %67, ptr %8, align 4
  call void @_ZNSt6vectorIN6ngraph6OutputINS0_4NodeEEESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #7
  br label %120

68:                                               ; preds = %27
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %7, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %8, align 4
  br label %76

72:                                               ; preds = %29
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %7, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %8, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #7
  br label %76

76:                                               ; preds = %72, %68
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %10) #7
  br label %119

77:                                               ; preds = %31
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %7, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %8, align 4
  br label %118

81:                                               ; preds = %32
  %82 = landingpad { ptr, i32 }
          cleanup
  %83 = extractvalue { ptr, i32 } %82, 0
  store ptr %83, ptr %7, align 8
  %84 = extractvalue { ptr, i32 } %82, 1
  store i32 %84, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @_ZN6ngraph5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #7
  br label %118

85:                                               ; preds = %40
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %7, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %8, align 4
  br label %117

89:                                               ; preds = %43
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %7, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #7
  br label %116

93:                                               ; preds = %46, %44
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %7, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %8, align 4
  %97 = load ptr, ptr %23, align 8
  %98 = icmp eq ptr %22, %97
  br i1 %98, label %103, label %99

99:                                               ; preds = %99, %93
  %100 = phi ptr [ %97, %93 ], [ %101, %99 ]
  %101 = getelementptr inbounds %"class.ngraph::Output", ptr %100, i64 -1
  call void @_ZN6ngraph6OutputINS_4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %101) #7
  %102 = icmp eq ptr %101, %22
  br i1 %102, label %103, label %99

103:                                              ; preds = %99, %93
  br label %115

104:                                              ; preds = %49
  %105 = landingpad { ptr, i32 }
          cleanup
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %7, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIN6ngraph6OutputINS0_4NodeEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %24) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #7
  %108 = getelementptr inbounds [2 x %"class.ngraph::Output"], ptr %22, i32 0, i32 0
  %109 = getelementptr inbounds %"class.ngraph::Output", ptr %108, i64 2
  br label %110

110:                                              ; preds = %110, %104
  %111 = phi ptr [ %109, %104 ], [ %112, %110 ]
  %112 = getelementptr inbounds %"class.ngraph::Output", ptr %111, i64 -1
  call void @_ZN6ngraph6OutputINS_4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %112) #7
  %113 = icmp eq ptr %112, %108
  br i1 %113, label %114, label %110

114:                                              ; preds = %110
  br label %115

115:                                              ; preds = %114, %103
  call void @llvm.lifetime.end.p0(i64 48, ptr %22) #7
  call void @_ZNSt12__shared_ptrIN6ngraph4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #7
  br label %116

116:                                              ; preds = %115, %89
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #7
  br label %117

117:                                              ; preds = %116, %85
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @_ZNSt12__shared_ptrIN6ngraph2op2v08ConstantELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #7
  br label %118

118:                                              ; preds = %117, %81, %77
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #7
  br label %119

119:                                              ; preds = %118, %76
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @_ZN6ngraph6OutputINS_4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #7
  br label %120

120:                                              ; preds = %119, %64
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #7
  br label %121

121:                                              ; preds = %120
  %122 = load ptr, ptr %7, align 8
  %123 = load i32, ptr %8, align 4
  %124 = insertvalue { ptr, i32 } poison, ptr %122, 0
  %125 = insertvalue { ptr, i32 } %124, i32 %123, 1
  resume { ptr, i32 } %125
}

declare void @_ZNK6ngraph11onnx_import4Node13get_ng_inputsEv(ptr dead_on_unwind writable sret(%"class.std::vector") align 8, ptr noundef nonnull align 8 dereferenceable(16)) #2

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

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

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

declare noundef i64 @_ZNK6ngraph11onnx_import4Node19get_attribute_valueIlEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) #2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6ngraph2op2v08Constant6createIlEESt10shared_ptrIS2_ERKNS_7element4TypeENS_5ShapeESt16initializer_listIT_E(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.32") align 8, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef, ptr, i64) #1 align 2

declare void @_ZN6ngraph5ShapeC1Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt11make_sharedIN6ngraph2op2v34TopKEJRNS0_6OutputINS0_4NodeEEERSt10shared_ptrINS1_2v08ConstantEERlNS1_8TopKModeENS1_12TopKSortTypeERKNS0_7element4TypeEEES8_INSt9enable_ifIXntsr8is_arrayIT_EE5valueESL_E4typeEEDpOT0_(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.40") align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #6

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

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

; 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 void @_ZN6ngraph4Node6outputEm(ptr dead_on_unwind writable sret(%"class.ngraph::Output") align 8, ptr noundef nonnull align 8 dereferenceable(680), i64 noundef) #2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN6ngraph6OutputINS0_4NodeEEESaIS3_EEC2ESt16initializer_listIS3_ERKS4_(ptr noundef nonnull align 8 dereferenceable(24), ptr, i64, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

; 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 @_ZNSt12__shared_ptrIN6ngraph2op2v08ConstantELN9__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 @_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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "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 = { 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 #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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"_ZTSSt16initializer_listIlE", !6, i64 0, !10, i64 8}
!13 = !{!12, !10, i64 8}
!14 = !{!15, !15, i64 0}
!15 = !{!"_ZTSN6ngraph2op8TopKModeE", !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"_ZTSN6ngraph2op12TopKSortTypeE", !7, i64 0}
!18 = !{!19, !6, i64 0}
!19 = !{!"_ZTSSt16initializer_listIN6ngraph6OutputINS0_4NodeEEEE", !6, i64 0, !10, i64 8}
!20 = !{!19, !10, i64 8}


; 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::element::Type" = type { i32 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<ngraph::Output<Node>, std::allocator<ngraph::Output<Node>>>::_Vector_impl" }
%"struct.std::_Vector_base<ngraph::Output<Node>, std::allocator<ngraph::Output<Node>>>::_Vector_impl" = type { %"struct.std::_Vector_base<ngraph::Output<Node>, std::allocator<ngraph::Output<Node>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ngraph::Output<Node>, std::allocator<ngraph::Output<Node>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.ngraph::Output" = type { %"class.std::shared_ptr", i64 }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::allocator.29" = type { i8 }
%"class.std::shared_ptr.32" = type { %"class.std::__shared_ptr.33" }
%"class.std::__shared_ptr.33" = type { ptr, %"class.std::__shared_count" }
%"class.ngraph::Shape" = type { %"class.std::vector.35" }
%"class.std::vector.35" = type { %"struct.std::_Vector_base.36" }
%"struct.std::_Vector_base.36" = 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.std::shared_ptr.40" = type { %"class.std::__shared_ptr.41" }
%"class.std::__shared_ptr.41" = type { ptr, %"class.std::__shared_count" }
%"class.std::allocator.24" = type { i8 }

@.str = external hidden unnamed_addr constant [2 x i8], align 1
@_ZN6ngraph7element3i64E = external global %"class.ngraph::element::Type", align 4

; 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: mustprogress uwtable
define dso_local void @_ZN6ngraph11onnx_import2op5set_14topkERKNS0_4NodeE(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8 %0, ptr noundef nonnull align 8 dereferenceable(16) %1) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.ngraph::Output", align 8
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::allocator.29", align 1
  %7 = alloca %"class.std::shared_ptr.32", align 8
  %8 = alloca %"class.ngraph::Shape", align 8
  %9 = alloca [1 x i64], align 8
  %10 = alloca i64, align 8
  %11 = alloca %"class.std::shared_ptr", align 8
  %12 = alloca %"class.std::shared_ptr.40", align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca [2 x %"class.ngraph::Output"], align 8
  %16 = alloca %"class.std::allocator.24", align 1
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #7
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #7
  call void @_ZNK6ngraph11onnx_import4Node13get_ng_inputsEv(ptr dead_on_unwind nonnull writable sret(%"class.std::vector") align 8 %4, ptr noundef nonnull align 8 dereferenceable(16) %1)
  %17 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIN6ngraph6OutputINS0_4NodeEEESaIS3_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef 0)
          to label %18 unwind label %35

18:                                               ; preds = %2
  call void @_ZN6ngraph6OutputINS_4NodeEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %17) #7
  call void @_ZNSt6vectorIN6ngraph6OutputINS0_4NodeEEESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull @.str, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %19 unwind label %37

19:                                               ; preds = %18
  %20 = invoke noundef i64 @_ZNK6ngraph11onnx_import4Node19get_attribute_valueIlEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(32) %5)
          to label %21 unwind label %39

21:                                               ; preds = %19
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #7
  invoke void @_ZN6ngraph5ShapeC1Ev(ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %22 unwind label %42

22:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  store i64 %20, ptr %9, align 8, !tbaa !5
  invoke void @_ZN6ngraph2op2v08Constant6createIlEESt10shared_ptrIS2_ERKNS_7element4TypeENS_5ShapeESt16initializer_listIT_E(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.32") align 8 %7, ptr noundef nonnull align 4 dereferenceable(4) @_ZN6ngraph7element3i64E, ptr noundef nonnull %8, ptr nonnull %9, i64 1)
          to label %23 unwind label %44

23:                                               ; preds = %22
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  call void @_ZN6ngraph5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  %24 = invoke noundef i64 @_ZN12_GLOBAL__N_18get_axisERKN6ngraph11onnx_import4NodeE(ptr noundef nonnull align 8 dereferenceable(16) %1)
          to label %25 unwind label %46

25:                                               ; preds = %23
  store i64 %24, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %13) #7
  store i32 0, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %14) #7
  store i32 2, ptr %14, align 4, !tbaa !11
  invoke void @_ZSt11make_sharedIN6ngraph2op2v34TopKEJRNS0_6OutputINS0_4NodeEEERSt10shared_ptrINS1_2v08ConstantEERlNS1_8TopKModeENS1_12TopKSortTypeERKNS0_7element4TypeEEES8_INSt9enable_ifIXntsr8is_arrayIT_EE5valueESL_E4typeEEDpOT0_(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.40") align 8 %12, ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 4 dereferenceable(4) %13, ptr noundef nonnull align 4 dereferenceable(4) %14, ptr noundef nonnull align 4 dereferenceable(4) @_ZN6ngraph7element3i64E)
          to label %26 unwind label %48

26:                                               ; preds = %25
  call void @_ZNSt10shared_ptrIN6ngraph4NodeEEC2INS0_2op2v34TopKEvEEOS_IT_E(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(16) %12) #7
  call void @_ZNSt12__shared_ptrIN6ngraph2op2v34TopKELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #7
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %15) #7
  %27 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6ngraph4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %11) #7
  invoke void @_ZN6ngraph4Node6outputEm(ptr dead_on_unwind nonnull writable sret(%"class.ngraph::Output") align 8 %15, ptr noundef nonnull align 8 dereferenceable(680) %27, i64 noundef 0)
          to label %29 unwind label %.thread

.thread:                                          ; preds = %26
  %28 = landingpad { ptr, i32 }
          cleanup
  br label %.loopexit

29:                                               ; preds = %26
  %30 = getelementptr inbounds i8, ptr %15, i64 24
  %31 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6ngraph4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %11) #7
  invoke void @_ZN6ngraph4Node6outputEm(ptr dead_on_unwind nonnull writable sret(%"class.ngraph::Output") align 8 %30, ptr noundef nonnull align 8 dereferenceable(680) %31, i64 noundef 1)
          to label %32 unwind label %.loopexit.loopexit27

32:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %16) #7
  call void @_ZNSaIN6ngraph6OutputINS_4NodeEEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #7
  invoke void @_ZNSt6vectorIN6ngraph6OutputINS0_4NodeEEESaIS3_EEC2ESt16initializer_listIS3_ERKS4_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr nonnull %15, i64 2, ptr noundef nonnull align 1 dereferenceable(1) %16)
          to label %33 unwind label %.loopexit.loopexit

33:                                               ; preds = %32
  call void @_ZNSt15__new_allocatorIN6ngraph6OutputINS0_4NodeEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #7
  %34 = getelementptr inbounds i8, ptr %15, i64 24
  call void @_ZN6ngraph6OutputINS_4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %34) #7
  call void @_ZN6ngraph6OutputINS_4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #7
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %15) #7
  call void @_ZNSt12__shared_ptrIN6ngraph4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  call void @_ZNSt12__shared_ptrIN6ngraph2op2v08ConstantELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #7
  call void @_ZN6ngraph6OutputINS_4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #7
  ret void

35:                                               ; preds = %2
  %36 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIN6ngraph6OutputINS0_4NodeEEESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #7
  br label %57

37:                                               ; preds = %18
  %38 = landingpad { ptr, i32 }
          cleanup
  br label %41

39:                                               ; preds = %19
  %40 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #7
  br label %41

41:                                               ; preds = %39, %37
  %.pn = phi { ptr, i32 } [ %40, %39 ], [ %38, %37 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #7
  br label %56

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

44:                                               ; preds = %22
  %45 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  call void @_ZN6ngraph5ShapeD1Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  br label %55

46:                                               ; preds = %23
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %54

48:                                               ; preds = %25
  %49 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %14) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %13) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #7
  br label %53

.loopexit.loopexit27:                             ; preds = %29
  %50 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6ngraph6OutputINS_4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #7
  br label %.loopexit

.loopexit.loopexit:                               ; preds = %32
  %51 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIN6ngraph6OutputINS0_4NodeEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %16) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #7
  %52 = getelementptr inbounds i8, ptr %15, i64 24
  call void @_ZN6ngraph6OutputINS_4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %52) #7
  call void @_ZN6ngraph6OutputINS_4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %15) #7
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit27, %.loopexit.loopexit, %.thread
  %.pn18 = phi { ptr, i32 } [ %28, %.thread ], [ %51, %.loopexit.loopexit ], [ %50, %.loopexit.loopexit27 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %15) #7
  call void @_ZNSt12__shared_ptrIN6ngraph4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #7
  br label %53

53:                                               ; preds = %.loopexit, %48
  %.pn18.pn = phi { ptr, i32 } [ %.pn18, %.loopexit ], [ %49, %48 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #7
  br label %54

54:                                               ; preds = %53, %46
  %.pn18.pn.pn = phi { ptr, i32 } [ %.pn18.pn, %53 ], [ %47, %46 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  call void @_ZNSt12__shared_ptrIN6ngraph2op2v08ConstantELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #7
  br label %55

55:                                               ; preds = %54, %44, %42
  %.pn18.pn.pn.pn = phi { ptr, i32 } [ %.pn18.pn.pn, %54 ], [ %45, %44 ], [ %43, %42 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #7
  br label %56

56:                                               ; preds = %55, %41
  %.pn18.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn18.pn.pn.pn, %55 ], [ %.pn, %41 ]
  call void @_ZN6ngraph6OutputINS_4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  br label %57

57:                                               ; preds = %56, %35
  %.pn18.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn18.pn.pn.pn.pn, %56 ], [ %36, %35 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #7
  resume { ptr, i32 } %.pn18.pn.pn.pn.pn.pn
}

declare void @_ZNK6ngraph11onnx_import4Node13get_ng_inputsEv(ptr dead_on_unwind writable sret(%"class.std::vector") align 8, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2

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

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

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

declare noundef i64 @_ZNK6ngraph11onnx_import4Node19get_attribute_valueIlEET_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6ngraph2op2v08Constant6createIlEESt10shared_ptrIS2_ERKNS_7element4TypeENS_5ShapeESt16initializer_listIT_E(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.32") align 8, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef, ptr, i64) local_unnamed_addr #1 align 2

declare void @_ZN6ngraph5ShapeC1Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt11make_sharedIN6ngraph2op2v34TopKEJRNS0_6OutputINS0_4NodeEEERSt10shared_ptrINS1_2v08ConstantEERlNS1_8TopKModeENS1_12TopKSortTypeERKNS0_7element4TypeEEES8_INSt9enable_ifIXntsr8is_arrayIT_EE5valueESL_E4typeEEDpOT0_(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.40") align 8, ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #6

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

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

; 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 void @_ZN6ngraph4Node6outputEm(ptr dead_on_unwind writable sret(%"class.ngraph::Output") align 8, ptr noundef nonnull align 8 dereferenceable(680), i64 noundef) local_unnamed_addr #2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN6ngraph6OutputINS0_4NodeEEESaIS3_EEC2ESt16initializer_listIS3_ERKS4_(ptr noundef nonnull align 8 dereferenceable(24), ptr, i64, ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

; 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 @_ZNSt12__shared_ptrIN6ngraph2op2v08ConstantELN9__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 @_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 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "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 = { 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 #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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { 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 }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"_ZTSN6ngraph2op8TopKModeE", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_ZTSN6ngraph2op12TopKSortTypeE", !7, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopSimplifyPass,SROAPass,SimplifyCFGPass