; LLVM IR from NervanaSystems/ngraph :: src/ngraph/op/gather.ll (ZNK6ngraph2op2v16Gather8get_axisEv)

; 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::shared_ptr.74" = type { %"class.std::__shared_ptr.75" }
%"class.std::__shared_ptr.75" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.ngraph::Output" = type { %"class.std::shared_ptr.74", i64 }
%"class.std::shared_ptr.86" = type { %"class.std::__shared_ptr.87" }
%"class.std::__shared_ptr.87" = type { ptr, %"class.std::__shared_count" }
%"class.std::vector.89" = type { %"struct.std::_Vector_base.90" }
%"struct.std::_Vector_base.90" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.ngraph::Dimension" = type { %"class.ngraph::Interval" }
%"class.ngraph::Interval" = type { i64, i64 }

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

declare i32 @__gxx_personality_v0(...)

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

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

declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNK6ngraph4Node23get_input_partial_shapeEm(ptr noundef nonnull align 8 dereferenceable(680), i64 noundef) #2

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

declare noundef i64 @_ZNK6ngraph9Dimension10get_lengthEv(ptr noundef nonnull align 8 dereferenceable(16)) #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 uwtable
define dso_local noundef i64 @_ZNK6ngraph2op2v16Gather8get_axisEv(ptr noundef nonnull align 8 dereferenceable(680) %0) #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i64, align 8
  %4 = alloca %"class.std::shared_ptr.74", align 8
  %5 = alloca %"class.ngraph::Output", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.std::shared_ptr.86", align 8
  %9 = alloca %"class.std::shared_ptr.74", align 8
  %10 = alloca %"class.std::vector.89", align 8
  %11 = alloca ptr, align 8
  %12 = alloca %"class.ngraph::Dimension", align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %13 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  store i64 9223372036854775807, ptr %3, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %4) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %5) #5
  call void @_ZNK6ngraph4Node11input_valueEm(ptr dead_on_unwind writable sret(%"class.ngraph::Output") align 8 %5, ptr noundef nonnull align 8 dereferenceable(680) %13, i64 noundef 2)
  invoke void @_ZNK6ngraph6OutputINS_4NodeEE19get_node_shared_ptrEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.74") align 8 %4, ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %14 unwind label %22

14:                                               ; preds = %1
  call void @_ZN6ngraph6OutputINS_4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #5
  call void @_ZNSt10shared_ptrIN6ngraph4NodeEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(16) %4) #5
  invoke void @_ZN6ngraph11as_type_ptrINS_2op2v08ConstantESt10shared_ptrINS_4NodeEEEENSt9enable_ifIXsr3std14is_convertibleIDTclsr3stdE19static_pointer_castIT_Eclsr3stdE7declvalIT0_EEEES4_IS8_EEE5valueESB_E4typeES9_(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.86") align 8 %8, ptr noundef %9)
          to label %15 unwind label %26

15:                                               ; preds = %14
  call void @_ZNSt12__shared_ptrIN6ngraph4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #5
  %16 = call noundef zeroext i1 @_ZNKSt12__shared_ptrIN6ngraph2op2v08ConstantELN9__gnu_cxx12_Lock_policyE2EEcvbEv(ptr noundef nonnull align 8 dereferenceable(16) %8) #5
  br i1 %16, label %17, label %34

17:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 24, ptr %10) #5
  %18 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6ngraph2op2v08ConstantELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %8) #5
  invoke void @_ZNK6ngraph2op2v08Constant11cast_vectorIlEESt6vectorIT_SaIS5_EEv(ptr dead_on_unwind writable sret(%"class.std::vector.89") align 8 %10, ptr noundef nonnull align 8 dereferenceable(729) %18)
          to label %19 unwind label %30

19:                                               ; preds = %17
  %20 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef 0) #5
  %21 = load i64, ptr %20, align 8, !tbaa !9
  store i64 %21, ptr %3, align 8, !tbaa !9
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #5
  br label %34

22:                                               ; preds = %1
  %23 = landingpad { ptr, i32 }
          cleanup
  %24 = extractvalue { ptr, i32 } %23, 0
  store ptr %24, ptr %6, align 8
  %25 = extractvalue { ptr, i32 } %23, 1
  store i32 %25, ptr %7, align 4
  call void @_ZN6ngraph6OutputINS_4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %5) #5
  br label %70

26:                                               ; preds = %14
  %27 = landingpad { ptr, i32 }
          cleanup
  %28 = extractvalue { ptr, i32 } %27, 0
  store ptr %28, ptr %6, align 8
  %29 = extractvalue { ptr, i32 } %27, 1
  store i32 %29, ptr %7, align 4
  call void @_ZNSt12__shared_ptrIN6ngraph4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #5
  br label %56

30:                                               ; preds = %17
  %31 = landingpad { ptr, i32 }
          cleanup
  %32 = extractvalue { ptr, i32 } %31, 0
  store ptr %32, ptr %6, align 8
  %33 = extractvalue { ptr, i32 } %31, 1
  store i32 %33, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %10) #5
  call void @_ZNSt12__shared_ptrIN6ngraph2op2v08ConstantELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #5
  br label %56

34:                                               ; preds = %19, %15
  call void @_ZNSt12__shared_ptrIN6ngraph2op2v08ConstantELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #5
  %35 = load i64, ptr %3, align 8, !tbaa !9
  %36 = icmp slt i64 %35, 0
  br i1 %36, label %37, label %67

37:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #5
  %38 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK6ngraph4Node23get_input_partial_shapeEm(ptr noundef nonnull align 8 dereferenceable(680) %13, i64 noundef 0)
          to label %39 unwind label %57

39:                                               ; preds = %37
  %40 = invoke { i64, i64 } @_ZNK6ngraph12PartialShape4rankEv(ptr noundef nonnull align 8 dereferenceable(32) %38)
          to label %41 unwind label %57

41:                                               ; preds = %39
  %42 = getelementptr inbounds %"class.ngraph::Dimension", ptr %12, i32 0, i32 0
  %43 = getelementptr inbounds { i64, i64 }, ptr %42, i32 0, i32 0
  %44 = extractvalue { i64, i64 } %40, 0
  store i64 %44, ptr %43, align 8
  %45 = getelementptr inbounds { i64, i64 }, ptr %42, i32 0, i32 1
  %46 = extractvalue { i64, i64 } %40, 1
  store i64 %46, ptr %45, align 8
  store ptr %12, ptr %11, align 8, !tbaa !5
  %47 = load ptr, ptr %11, align 8, !tbaa !5
  %48 = invoke noundef zeroext i1 @_ZNK6ngraph9Dimension9is_staticEv(ptr noundef nonnull align 8 dereferenceable(16) %47)
          to label %49 unwind label %61

49:                                               ; preds = %41
  br i1 %48, label %50, label %65

50:                                               ; preds = %49
  %51 = load ptr, ptr %11, align 8, !tbaa !5
  %52 = invoke noundef i64 @_ZNK6ngraph9Dimension10get_lengthEv(ptr noundef nonnull align 8 dereferenceable(16) %51)
          to label %53 unwind label %61

53:                                               ; preds = %50
  %54 = load i64, ptr %3, align 8, !tbaa !9
  %55 = add nsw i64 %54, %52
  store i64 %55, ptr %3, align 8, !tbaa !9
  br label %65

56:                                               ; preds = %30, %26
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #5
  br label %69

57:                                               ; preds = %39, %37
  %58 = landingpad { ptr, i32 }
          cleanup
  %59 = extractvalue { ptr, i32 } %58, 0
  store ptr %59, ptr %6, align 8
  %60 = extractvalue { ptr, i32 } %58, 1
  store i32 %60, ptr %7, align 4
  br label %66

61:                                               ; preds = %50, %41
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %6, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #5
  br label %66

65:                                               ; preds = %53, %49
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %67

66:                                               ; preds = %61, %57
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %69

67:                                               ; preds = %65, %34
  %68 = load i64, ptr %3, align 8, !tbaa !9
  call void @_ZNSt12__shared_ptrIN6ngraph4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  ret i64 %68

69:                                               ; preds = %66, %56
  call void @_ZNSt12__shared_ptrIN6ngraph4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #5
  br label %70

70:                                               ; preds = %69, %22
  call void @llvm.lifetime.end.p0(i64 16, ptr %4) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  br label %71

71:                                               ; preds = %70
  %72 = load ptr, ptr %6, align 8
  %73 = load i32, ptr %7, align 4
  %74 = insertvalue { ptr, i32 } poison, ptr %72, 0
  %75 = insertvalue { ptr, i32 } %74, i32 %73, 1
  resume { ptr, i32 } %75
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6ngraph11as_type_ptrINS_2op2v08ConstantESt10shared_ptrINS_4NodeEEEENSt9enable_ifIXsr3std14is_convertibleIDTclsr3stdE19static_pointer_castIT_Eclsr3stdE7declvalIT0_EEEES4_IS8_EEE5valueESB_E4typeES9_(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.86") align 8, ptr noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt10shared_ptrIN6ngraph4NodeEEC2ERKS2_(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_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 noundef zeroext i1 @_ZNKSt12__shared_ptrIN6ngraph2op2v08ConstantELN9__gnu_cxx12_Lock_policyE2EEcvbEv(ptr noundef nonnull align 8 dereferenceable(16)) #4 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK6ngraph2op2v08Constant11cast_vectorIlEESt6vectorIT_SaIS5_EEv(ptr dead_on_unwind noalias writable sret(%"class.std::vector.89") align 8, ptr noundef nonnull align 8 dereferenceable(729)) #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) 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

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

!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}


; 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::shared_ptr.74" = type { %"class.std::__shared_ptr.75" }
%"class.std::__shared_ptr.75" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.ngraph::Output" = type { %"class.std::shared_ptr.74", i64 }
%"class.std::shared_ptr.86" = type { %"class.std::__shared_ptr.87" }
%"class.std::__shared_ptr.87" = type { ptr, %"class.std::__shared_count" }
%"class.std::vector.89" = type { %"struct.std::_Vector_base.90" }
%"struct.std::_Vector_base.90" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.ngraph::Dimension" = type { %"class.ngraph::Interval" }
%"class.ngraph::Interval" = type { i64, i64 }

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

declare noundef i64 @_ZNK6ngraph9Dimension10get_lengthEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #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 uwtable
define dso_local noundef i64 @_ZNK6ngraph2op2v16Gather8get_axisEv(ptr noundef nonnull align 8 dereferenceable(680) %0) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::shared_ptr.74", align 8
  %3 = alloca %"class.ngraph::Output", align 8
  %4 = alloca %"class.std::shared_ptr.86", align 8
  %5 = alloca %"class.std::shared_ptr.74", align 8
  %6 = alloca %"class.std::vector.89", align 8
  %7 = alloca %"class.ngraph::Dimension", align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #5
  call void @_ZNK6ngraph4Node11input_valueEm(ptr dead_on_unwind nonnull writable sret(%"class.ngraph::Output") align 8 %3, ptr noundef nonnull align 8 dereferenceable(680) %0, i64 noundef 2)
  invoke void @_ZNK6ngraph6OutputINS_4NodeEE19get_node_shared_ptrEv(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.74") align 8 %2, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %8 unwind label %13

8:                                                ; preds = %1
  call void @_ZN6ngraph6OutputINS_4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #5
  call void @_ZNSt10shared_ptrIN6ngraph4NodeEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %2) #5
  invoke void @_ZN6ngraph11as_type_ptrINS_2op2v08ConstantESt10shared_ptrINS_4NodeEEEENSt9enable_ifIXsr3std14is_convertibleIDTclsr3stdE19static_pointer_castIT_Eclsr3stdE7declvalIT0_EEEES4_IS8_EEE5valueESB_E4typeES9_(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.86") align 8 %4, ptr noundef nonnull %5)
          to label %9 unwind label %15

9:                                                ; preds = %8
  call void @_ZNSt12__shared_ptrIN6ngraph4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #5
  %10 = call noundef zeroext i1 @_ZNKSt12__shared_ptrIN6ngraph2op2v08ConstantELN9__gnu_cxx12_Lock_policyE2EEcvbEv(ptr noundef nonnull align 8 dereferenceable(16) %4) #5
  br i1 %10, label %11, label %.thread

.thread:                                          ; preds = %9
  call void @_ZNSt12__shared_ptrIN6ngraph2op2v08ConstantELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  br label %43

11:                                               ; preds = %9
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #5
  %12 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6ngraph2op2v08ConstantELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %4) #5
  invoke void @_ZNK6ngraph2op2v08Constant11cast_vectorIlEESt6vectorIT_SaIS5_EEv(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.89") align 8 %6, ptr noundef nonnull align 8 dereferenceable(729) %12)
          to label %19 unwind label %17

13:                                               ; preds = %1
  %14 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN6ngraph6OutputINS_4NodeEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  br label %45

15:                                               ; preds = %8
  %16 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN6ngraph4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #5
  br label %37

17:                                               ; preds = %11
  %18 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #5
  call void @_ZNSt12__shared_ptrIN6ngraph2op2v08ConstantELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #5
  br label %37

19:                                               ; preds = %11
  %20 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIlSaIlEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef 0) #5
  %21 = load i64, ptr %20, align 8, !tbaa !5
  call void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #5
  call void @_ZNSt12__shared_ptrIN6ngraph2op2v08ConstantELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  %22 = icmp slt i64 %21, 0
  br i1 %22, label %23, label %43

23:                                               ; preds = %19
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #5
  %24 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK6ngraph4Node23get_input_partial_shapeEm(ptr noundef nonnull align 8 dereferenceable(680) %0, i64 noundef 0)
          to label %25 unwind label %38

25:                                               ; preds = %23
  %26 = invoke { i64, i64 } @_ZNK6ngraph12PartialShape4rankEv(ptr noundef nonnull align 8 dereferenceable(32) %24)
          to label %27 unwind label %38

27:                                               ; preds = %25
  %28 = extractvalue { i64, i64 } %26, 0
  store i64 %28, ptr %7, align 8
  %29 = getelementptr inbounds i8, ptr %7, 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) %7)
          to label %32 unwind label %40

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

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

35:                                               ; preds = %33
  %36 = add nsw i64 %34, %21
  br label %42

37:                                               ; preds = %17, %15
  %.pn = phi { ptr, i32 } [ %18, %17 ], [ %16, %15 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #5
  br label %44

38:                                               ; preds = %25, %23
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %44

40:                                               ; preds = %33, %27
  %41 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #5
  br label %44

42:                                               ; preds = %35, %32
  %.1 = phi i64 [ %36, %35 ], [ %21, %32 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #5
  br label %43

43:                                               ; preds = %.thread, %42, %19
  %.2 = phi i64 [ %.1, %42 ], [ %21, %19 ], [ 9223372036854775807, %.thread ]
  call void @_ZNSt12__shared_ptrIN6ngraph4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %2) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #5
  ret i64 %.2

44:                                               ; preds = %38, %40, %37
  %.pn15.pn = phi { ptr, i32 } [ %.pn, %37 ], [ %41, %40 ], [ %39, %38 ]
  call void @_ZNSt12__shared_ptrIN6ngraph4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %2) #5
  br label %45

45:                                               ; preds = %44, %13
  %.pn15.pn.pn = phi { ptr, i32 } [ %.pn15.pn, %44 ], [ %14, %13 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #5
  resume { ptr, i32 } %.pn15.pn.pn
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6ngraph11as_type_ptrINS_2op2v08ConstantESt10shared_ptrINS_4NodeEEEENSt9enable_ifIXsr3std14is_convertibleIDTclsr3stdE19static_pointer_castIT_Eclsr3stdE7declvalIT0_EEEES4_IS8_EEE5valueESB_E4typeES9_(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.86") align 8, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt10shared_ptrIN6ngraph4NodeEEC2ERKS2_(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_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 noundef zeroext i1 @_ZNKSt12__shared_ptrIN6ngraph2op2v08ConstantELN9__gnu_cxx12_Lock_policyE2EEcvbEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK6ngraph2op2v08Constant11cast_vectorIlEESt6vectorIT_SaIS5_EEv(ptr dead_on_unwind noalias writable sret(%"class.std::vector.89") align 8, ptr noundef nonnull align 8 dereferenceable(729)) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIlSaIlEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) 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

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

!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"}


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