; 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::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 }

@_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

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

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

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

; 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) #1

; 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 #2 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 uwtable
define dso_local void @_ZN6ngraph11onnx_import2op6set_104topkERKNS0_4NodeE(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8 %0, ptr noundef nonnull align 8 dereferenceable(16) %1) #2 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 %"class.ngraph::Output", 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 %"class.std::initializer_list.43", align 8
  %16 = alloca [2 x %"class.ngraph::Output"], align 8
  %17 = alloca ptr, align 8
  %18 = 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) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #6
  %19 = 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) %19)
  %20 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIN6ngraph6OutputINS0_4NodeEEESaIS3_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef 0)
          to label %21 unwind label %47

21:                                               ; preds = %2
  call void @_ZN6ngraph6OutputINS_4NodeEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %20) #6
  call void @_ZNSt6vectorIN6ngraph6OutputINS0_4NodeEEESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #6
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZN12_GLOBAL__N_15get_kERKN6ngraph11onnx_import4NodeE(ptr dead_on_unwind writable sret(%"class.ngraph::Output") align 8 %9, ptr noundef nonnull align 8 dereferenceable(16) %22)
          to label %23 unwind label %51

23:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = invoke noundef i64 @_ZN12_GLOBAL__N_18get_axisERKN6ngraph11onnx_import4NodeE(ptr noundef nonnull align 8 dereferenceable(16) %24)
          to label %26 unwind label %55

26:                                               ; preds = %23
  store i64 %25, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #6
  store i32 0, ptr %13, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 2, ptr %14, align 4, !tbaa !13
  invoke void @_ZSt11make_sharedIN6ngraph2op2v34TopKEJRNS0_6OutputINS0_4NodeEEES7_RlNS1_8TopKModeENS1_12TopKSortTypeERKNS0_7element4TypeEEESt10shared_ptrINSt9enable_ifIXntsr8is_arrayIT_EE5valueESH_E4typeEEDpOT0_(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.40") align 8 %12, ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(24) %9, 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 %27 unwind label %59

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

29:                                               ; preds = %27
  %30 = getelementptr inbounds %"class.ngraph::Output", ptr %16, i64 1
  store ptr %30, ptr %17, align 8
  %31 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6ngraph4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  invoke void @_ZN6ngraph4Node6outputEm(ptr dead_on_unwind writable sret(%"class.ngraph::Output") align 8 %30, ptr noundef nonnull align 8 dereferenceable(680) %31, i64 noundef 1)
          to label %32 unwind label %63

32:                                               ; preds = %29
  %33 = getelementptr inbounds %"class.std::initializer_list.43", ptr %15, i32 0, i32 0
  store ptr %16, ptr %33, align 8, !tbaa !15
  %34 = getelementptr inbounds %"class.std::initializer_list.43", ptr %15, i32 0, i32 1
  store i64 2, ptr %34, align 8, !tbaa !17
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #6
  call void @_ZNSaIN6ngraph6OutputINS_4NodeEEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #6
  %35 = getelementptr inbounds { ptr, i64 }, ptr %15, i32 0, i32 0
  %36 = load ptr, ptr %35, align 8
  %37 = getelementptr inbounds { ptr, i64 }, ptr %15, i32 0, i32 1
  %38 = load i64, ptr %37, align 8
  invoke void @_ZNSt6vectorIN6ngraph6OutputINS0_4NodeEEESaIS3_EEC2ESt16initializer_listIS3_ERKS4_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr %36, i64 %38, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %39 unwind label %74

39:                                               ; preds = %32
  call void @_ZNSt15__new_allocatorIN6ngraph6OutputINS0_4NodeEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #6
  %40 = getelementptr inbounds [2 x %"class.ngraph::Output"], ptr %16, i32 0, i32 0
  %41 = getelementptr inbounds %"class.ngraph::Output", ptr %40, i64 2
  br label %42

42:                                               ; preds = %42, %39
  %43 = phi ptr [ %41, %39 ], [ %44, %42 ]
  %44 = getelementptr inbounds %"class.ngraph::Output", ptr %43, i64 -1
  call void @_ZN6ngraph6OutputINS_4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %44) #6
  %45 = icmp eq ptr %44, %40
  br i1 %45, label %46, label %42

46:                                               ; preds = %42
  call void @llvm.lifetime.end.p0(i64 48, ptr %16) #6
  call void @_ZNSt12__shared_ptrIN6ngraph4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @_ZN6ngraph6OutputINS_4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #6
  call void @_ZN6ngraph6OutputINS_4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #6
  ret void

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

51:                                               ; preds = %21
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %7, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %8, align 4
  br label %88

55:                                               ; preds = %23
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %7, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %8, align 4
  br label %87

59:                                               ; preds = %26
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %7, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #6
  br label %86

63:                                               ; preds = %29, %27
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %7, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %8, align 4
  %67 = load ptr, ptr %17, align 8
  %68 = icmp eq ptr %16, %67
  br i1 %68, label %73, label %69

69:                                               ; preds = %69, %63
  %70 = phi ptr [ %67, %63 ], [ %71, %69 ]
  %71 = getelementptr inbounds %"class.ngraph::Output", ptr %70, i64 -1
  call void @_ZN6ngraph6OutputINS_4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %71) #6
  %72 = icmp eq ptr %71, %16
  br i1 %72, label %73, label %69

73:                                               ; preds = %69, %63
  br label %85

74:                                               ; preds = %32
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %7, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIN6ngraph6OutputINS0_4NodeEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #6
  %78 = getelementptr inbounds [2 x %"class.ngraph::Output"], ptr %16, i32 0, i32 0
  %79 = getelementptr inbounds %"class.ngraph::Output", ptr %78, i64 2
  br label %80

80:                                               ; preds = %80, %74
  %81 = phi ptr [ %79, %74 ], [ %82, %80 ]
  %82 = getelementptr inbounds %"class.ngraph::Output", ptr %81, i64 -1
  call void @_ZN6ngraph6OutputINS_4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %82) #6
  %83 = icmp eq ptr %82, %78
  br i1 %83, label %84, label %80

84:                                               ; preds = %80
  br label %85

85:                                               ; preds = %84, %73
  call void @llvm.lifetime.end.p0(i64 48, ptr %16) #6
  call void @_ZNSt12__shared_ptrIN6ngraph4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #6
  br label %86

86:                                               ; preds = %85, %59
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #6
  br label %87

87:                                               ; preds = %86, %55
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @_ZN6ngraph6OutputINS_4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  br label %88

88:                                               ; preds = %87, %51
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #6
  call void @_ZN6ngraph6OutputINS_4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  br label %89

89:                                               ; preds = %88, %47
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #6
  br label %90

90:                                               ; preds = %89
  %91 = load ptr, ptr %7, align 8
  %92 = load i32, ptr %8, align 4
  %93 = insertvalue { ptr, i32 } poison, ptr %91, 0
  %94 = insertvalue { ptr, i32 } %93, i32 %92, 1
  resume { ptr, i32 } %94
}

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_15get_kERKN6ngraph11onnx_import4NodeE(ptr dead_on_unwind noalias writable sret(%"class.ngraph::Output") align 8, ptr noundef nonnull align 8 dereferenceable(16)) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt11make_sharedIN6ngraph2op2v34TopKEJRNS0_6OutputINS0_4NodeEEES7_RlNS1_8TopKModeENS1_12TopKSortTypeERKNS0_7element4TypeEEESt10shared_ptrINSt9enable_ifIXntsr8is_arrayIT_EE5valueESH_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(24), 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)) #5

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

!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, !12, i64 0}
!12 = !{!"_ZTSN6ngraph2op8TopKModeE", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"_ZTSN6ngraph2op12TopKSortTypeE", !7, i64 0}
!15 = !{!16, !6, i64 0}
!16 = !{!"_ZTSSt16initializer_listIN6ngraph6OutputINS0_4NodeEEEE", !6, i64 0, !10, i64 8}
!17 = !{!16, !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::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 }

@_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

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 #1

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

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

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

; 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 #2 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 uwtable
define dso_local void @_ZN6ngraph11onnx_import2op6set_104topkERKNS0_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 #2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.ngraph::Output", align 8
  %4 = alloca %"class.std::vector", align 8
  %5 = alloca %"class.ngraph::Output", align 8
  %6 = alloca i64, align 8
  %7 = alloca %"class.std::shared_ptr", align 8
  %8 = alloca %"class.std::shared_ptr.40", align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca [2 x %"class.ngraph::Output"], align 8
  %12 = alloca %"class.std::allocator.24", align 1
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %4) #6
  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)
  %13 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIN6ngraph6OutputINS0_4NodeEEESaIS3_EE2atEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef 0)
          to label %14 unwind label %27

14:                                               ; preds = %2
  call void @_ZN6ngraph6OutputINS_4NodeEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %13) #6
  call void @_ZNSt6vectorIN6ngraph6OutputINS0_4NodeEEESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #6
  invoke void @_ZN12_GLOBAL__N_15get_kERKN6ngraph11onnx_import4NodeE(ptr dead_on_unwind nonnull writable sret(%"class.ngraph::Output") align 8 %5, ptr noundef nonnull align 8 dereferenceable(16) %1)
          to label %15 unwind label %29

15:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %16 = invoke noundef i64 @_ZN12_GLOBAL__N_18get_axisERKN6ngraph11onnx_import4NodeE(ptr noundef nonnull align 8 dereferenceable(16) %1)
          to label %17 unwind label %31

17:                                               ; preds = %15
  store i64 %16, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #6
  store i32 0, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #6
  store i32 2, ptr %10, align 4, !tbaa !11
  invoke void @_ZSt11make_sharedIN6ngraph2op2v34TopKEJRNS0_6OutputINS0_4NodeEEES7_RlNS1_8TopKModeENS1_12TopKSortTypeERKNS0_7element4TypeEEESt10shared_ptrINSt9enable_ifIXntsr8is_arrayIT_EE5valueESH_E4typeEEDpOT0_(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.40") align 8 %8, ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 4 dereferenceable(4) %9, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 4 dereferenceable(4) @_ZN6ngraph7element3i64E)
          to label %18 unwind label %33

18:                                               ; preds = %17
  call void @_ZNSt10shared_ptrIN6ngraph4NodeEEC2INS0_2op2v34TopKEvEEOS_IT_E(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %8) #6
  call void @_ZNSt12__shared_ptrIN6ngraph2op2v34TopKELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %11) #6
  %19 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6ngraph4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %7) #6
  invoke void @_ZN6ngraph4Node6outputEm(ptr dead_on_unwind nonnull writable sret(%"class.ngraph::Output") align 8 %11, ptr noundef nonnull align 8 dereferenceable(680) %19, i64 noundef 0)
          to label %21 unwind label %.thread

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

21:                                               ; preds = %18
  %22 = getelementptr inbounds i8, ptr %11, i64 24
  %23 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6ngraph4NodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %7) #6
  invoke void @_ZN6ngraph4Node6outputEm(ptr dead_on_unwind nonnull writable sret(%"class.ngraph::Output") align 8 %22, ptr noundef nonnull align 8 dereferenceable(680) %23, i64 noundef 1)
          to label %24 unwind label %.loopexit.loopexit19

24:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #6
  call void @_ZNSaIN6ngraph6OutputINS_4NodeEEEEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  invoke void @_ZNSt6vectorIN6ngraph6OutputINS0_4NodeEEESaIS3_EEC2ESt16initializer_listIS3_ERKS4_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr nonnull %11, i64 2, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %25 unwind label %.loopexit.loopexit

25:                                               ; preds = %24
  call void @_ZNSt15__new_allocatorIN6ngraph6OutputINS0_4NodeEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #6
  %26 = getelementptr inbounds i8, ptr %11, i64 24
  call void @_ZN6ngraph6OutputINS_4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %26) #6
  call void @_ZN6ngraph6OutputINS_4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %11) #6
  call void @_ZNSt12__shared_ptrIN6ngraph4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @_ZN6ngraph6OutputINS_4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  call void @_ZN6ngraph6OutputINS_4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  ret void

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

29:                                               ; preds = %14
  %30 = landingpad { ptr, i32 }
          cleanup
  br label %40

31:                                               ; preds = %15
  %32 = landingpad { ptr, i32 }
          cleanup
  br label %39

33:                                               ; preds = %17
  %34 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #6
  br label %38

.loopexit.loopexit19:                             ; preds = %21
  %35 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6ngraph6OutputINS_4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  br label %.loopexit

.loopexit.loopexit:                               ; preds = %24
  %36 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIN6ngraph6OutputINS0_4NodeEEEED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #6
  %37 = getelementptr inbounds i8, ptr %11, i64 24
  call void @_ZN6ngraph6OutputINS_4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %37) #6
  call void @_ZN6ngraph6OutputINS_4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #6
  br label %.loopexit

.loopexit:                                        ; preds = %.loopexit.loopexit19, %.loopexit.loopexit, %.thread
  %.pn = phi { ptr, i32 } [ %20, %.thread ], [ %36, %.loopexit.loopexit ], [ %35, %.loopexit.loopexit19 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %11) #6
  call void @_ZNSt12__shared_ptrIN6ngraph4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #6
  br label %38

38:                                               ; preds = %.loopexit, %33
  %.pn.pn = phi { ptr, i32 } [ %.pn, %.loopexit ], [ %34, %33 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #6
  br label %39

39:                                               ; preds = %38, %31
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %38 ], [ %32, %31 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @_ZN6ngraph6OutputINS_4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  br label %40

40:                                               ; preds = %39, %29
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %39 ], [ %30, %29 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  call void @_ZN6ngraph6OutputINS_4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  br label %41

41:                                               ; preds = %40, %27
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %40 ], [ %28, %27 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #6
  resume { ptr, i32 } %.pn.pn.pn.pn.pn
}

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_15get_kERKN6ngraph11onnx_import4NodeE(ptr dead_on_unwind noalias writable sret(%"class.ngraph::Output") align 8, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt11make_sharedIN6ngraph2op2v34TopKEJRNS0_6OutputINS0_4NodeEEES7_RlNS1_8TopKModeENS1_12TopKSortTypeERKNS0_7element4TypeEEESt10shared_ptrINSt9enable_ifIXntsr8is_arrayIT_EE5valueESH_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(24), 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 #5

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

!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