; LLVM IR from NervanaSystems/ngraph :: src/ngraph (shape_util)

; 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::PartialShape" = type { i8, %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<ngraph::Dimension, std::allocator<ngraph::Dimension>>::_Vector_impl" }
%"struct.std::_Vector_base<ngraph::Dimension, std::allocator<ngraph::Dimension>>::_Vector_impl" = type { %"struct.std::_Vector_base<ngraph::Dimension, std::allocator<ngraph::Dimension>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ngraph::Dimension, std::allocator<ngraph::Dimension>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.ngraph::Dimension" = type { %"class.ngraph::Interval" }
%"class.ngraph::Interval" = type { i64, i64 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%class.anon = type { i64 }
%"struct.std::pair.8" = type { i64, %"class.ngraph::Dimension" }

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

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

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

; 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 uwtable
declare dso_local void @_ZN6ngraph12PartialShapeC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

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

declare i32 @__gxx_personality_v0(...)

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

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6ngraph12PartialShapeixEm(ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #4

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6ngraph12inject_pairsINS_12PartialShapeENS_9DimensionEEET_RKS3_St6vectorISt4pairImT0_ESaIS9_EE(ptr dead_on_unwind noalias writable sret(%"class.ngraph::PartialShape") align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef %2) #1 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"class.ngraph::Dimension", align 8
  %8 = alloca %"class.std::vector", align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca %"class.ngraph::Dimension", align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %17 = alloca %class.anon, align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #6
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = call { i64, i64 } @_ZNK6ngraph12PartialShape4rankEv(ptr noundef nonnull align 8 dereferenceable(32) %19)
  %21 = getelementptr inbounds %"class.ngraph::Dimension", ptr %7, i32 0, i32 0
  %22 = getelementptr inbounds { i64, i64 }, ptr %21, i32 0, i32 0
  %23 = extractvalue { i64, i64 } %20, 0
  store i64 %23, ptr %22, align 8
  %24 = getelementptr inbounds { i64, i64 }, ptr %21, i32 0, i32 1
  %25 = extractvalue { i64, i64 } %20, 1
  store i64 %25, ptr %24, align 8
  %26 = call noundef zeroext i1 @_ZNK6ngraph9Dimension10is_dynamicEv(ptr noundef nonnull align 8 dereferenceable(16) %7)
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #6
  br i1 %26, label %27, label %29

27:                                               ; preds = %3
  %28 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN6ngraph12PartialShapeC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %28)
  br label %96

29:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 24, ptr %8) #6
  call void @_ZNSt6vectorIN6ngraph9DimensionESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  store i64 0, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  store i64 0, ptr %10, align 8, !tbaa !9
  br label %30

30:                                               ; preds = %85, %29
  %31 = load i64, ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #6
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = invoke { i64, i64 } @_ZNK6ngraph12PartialShape4rankEv(ptr noundef nonnull align 8 dereferenceable(32) %32)
          to label %34 unwind label %46

34:                                               ; preds = %30
  %35 = getelementptr inbounds %"class.ngraph::Dimension", ptr %11, i32 0, i32 0
  %36 = getelementptr inbounds { i64, i64 }, ptr %35, i32 0, i32 0
  %37 = extractvalue { i64, i64 } %33, 0
  store i64 %37, ptr %36, align 8
  %38 = getelementptr inbounds { i64, i64 }, ptr %35, i32 0, i32 1
  %39 = extractvalue { i64, i64 } %33, 1
  store i64 %39, ptr %38, align 8
  %40 = invoke noundef i64 @_ZNK6ngraph9Dimension10get_lengthEv(ptr noundef nonnull align 8 dereferenceable(16) %11)
          to label %41 unwind label %46

41:                                               ; preds = %34
  %42 = call noundef i64 @_ZNKSt6vectorISt4pairImN6ngraph9DimensionEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  %43 = add i64 %40, %42
  %44 = icmp ult i64 %31, %43
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #6
  br i1 %44, label %50, label %45

45:                                               ; preds = %41
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %89

46:                                               ; preds = %34, %30
  %47 = landingpad { ptr, i32 }
          cleanup
  %48 = extractvalue { ptr, i32 } %47, 0
  store ptr %48, ptr %12, align 8
  %49 = extractvalue { ptr, i32 } %47, 1
  store i32 %49, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #6
  br label %88

50:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  %51 = call ptr @_ZNSt6vectorISt4pairImN6ngraph9DimensionEESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  %52 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %15, i32 0, i32 0
  store ptr %51, ptr %52, align 8
  %53 = call ptr @_ZNSt6vectorISt4pairImN6ngraph9DimensionEESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  %54 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %16, i32 0, i32 0
  store ptr %53, ptr %54, align 8
  %55 = getelementptr inbounds %class.anon, ptr %17, i32 0, i32 0
  %56 = load i64, ptr %10, align 8, !tbaa !9
  store i64 %56, ptr %55, align 8, !tbaa !11
  %57 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %15, i32 0, i32 0
  %58 = load ptr, ptr %57, align 8
  %59 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %16, i32 0, i32 0
  %60 = load ptr, ptr %59, align 8
  %61 = getelementptr inbounds %class.anon, ptr %17, i32 0, i32 0
  %62 = load i64, ptr %61, align 8
  %63 = invoke ptr @"_ZSt7find_ifIN9__gnu_cxx17__normal_iteratorIPSt4pairImN6ngraph9DimensionEESt6vectorIS5_SaIS5_EEEEZNS3_12inject_pairsINS3_12PartialShapeES4_EET_RKSD_S7_IS2_ImT0_ESaISH_EEE3$_0ESD_SD_SD_SG_"(ptr %58, ptr %60, i64 %62)
          to label %64 unwind label %76

64:                                               ; preds = %50
  %65 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  store ptr %63, ptr %65, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #6
  %66 = call ptr @_ZNSt6vectorISt4pairImN6ngraph9DimensionEESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  %67 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %18, i32 0, i32 0
  store ptr %66, ptr %67, align 8
  %68 = call noundef zeroext i1 @_ZN9__gnu_cxxeqIPSt4pairImN6ngraph9DimensionEESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #6
  br i1 %68, label %69, label %80

69:                                               ; preds = %64
  %70 = load ptr, ptr %5, align 8, !tbaa !5
  %71 = load i64, ptr %9, align 8, !tbaa !9
  %72 = add i64 %71, 1
  store i64 %72, ptr %9, align 8, !tbaa !9
  %73 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6ngraph12PartialShapeixEm(ptr noundef nonnull align 8 dereferenceable(32) %70, i64 noundef %71)
          to label %74 unwind label %76

74:                                               ; preds = %69
  invoke void @_ZNSt6vectorIN6ngraph9DimensionESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(16) %73)
          to label %75 unwind label %76

75:                                               ; preds = %74
  br label %84

76:                                               ; preds = %80, %74, %69, %50
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %12, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %88

80:                                               ; preds = %64
  %81 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairImN6ngraph9DimensionEESt6vectorIS4_SaIS4_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #6
  %82 = getelementptr inbounds %"struct.std::pair.8", ptr %81, i32 0, i32 1
  invoke void @_ZNSt6vectorIN6ngraph9DimensionESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(16) %82)
          to label %83 unwind label %76

83:                                               ; preds = %80
  br label %84

84:                                               ; preds = %83, %75
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  br label %85

85:                                               ; preds = %84
  %86 = load i64, ptr %10, align 8, !tbaa !9
  %87 = add i64 %86, 1
  store i64 %87, ptr %10, align 8, !tbaa !9
  br label %30, !llvm.loop !13

88:                                               ; preds = %76, %46
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %95

89:                                               ; preds = %45
  invoke void @_ZN6ngraph12PartialShapeC2ERKSt6vectorINS_9DimensionESaIS2_EE(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(24) %8)
          to label %90 unwind label %91

90:                                               ; preds = %89
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @_ZNSt6vectorIN6ngraph9DimensionESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #6
  br label %96

91:                                               ; preds = %89
  %92 = landingpad { ptr, i32 }
          cleanup
  %93 = extractvalue { ptr, i32 } %92, 0
  store ptr %93, ptr %12, align 8
  %94 = extractvalue { ptr, i32 } %92, 1
  store i32 %94, ptr %13, align 4
  br label %95

95:                                               ; preds = %91, %88
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @_ZNSt6vectorIN6ngraph9DimensionESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %8) #6
  br label %97

96:                                               ; preds = %90, %27
  ret void

97:                                               ; preds = %95
  %98 = load ptr, ptr %12, align 8
  %99 = load i32, ptr %13, align 4
  %100 = insertvalue { ptr, i32 } poison, ptr %98, 0
  %101 = insertvalue { ptr, i32 } %100, i32 %99, 1
  resume { ptr, i32 } %101
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden ptr @"_ZSt7find_ifIN9__gnu_cxx17__normal_iteratorIPSt4pairImN6ngraph9DimensionEESt6vectorIS5_SaIS5_EEEEZNS3_12inject_pairsINS3_12PartialShapeES4_EET_RKSD_S7_IS2_ImT0_ESaISH_EEE3$_0ESD_SD_SD_SG_"(ptr, ptr, i64) #2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxeqIPSt4pairImN6ngraph9DimensionEESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairImN6ngraph9DimensionEESt6vectorIS4_SaIS4_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8)) #3 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 = { 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 #3 = { 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 = { "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 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 #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, !10, i64 0}
!12 = !{!"_ZTSZN6ngraph12inject_pairsINS_12PartialShapeENS_9DimensionEEET_RKS3_St6vectorISt4pairImT0_ESaIS9_EEE3$_0", !10, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


; 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::PartialShape" = type { i8, %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<ngraph::Dimension, std::allocator<ngraph::Dimension>>::_Vector_impl" }
%"struct.std::_Vector_base<ngraph::Dimension, std::allocator<ngraph::Dimension>>::_Vector_impl" = type { %"struct.std::_Vector_base<ngraph::Dimension, std::allocator<ngraph::Dimension>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ngraph::Dimension, std::allocator<ngraph::Dimension>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.ngraph::Dimension" = type { %"class.ngraph::Interval" }
%"class.ngraph::Interval" = type { i64, i64 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

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

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

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

; 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 uwtable
declare dso_local void @_ZN6ngraph12PartialShapeC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #2 align 2

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6ngraph12inject_pairsINS_12PartialShapeENS_9DimensionEEET_RKS3_St6vectorISt4pairImT0_ESaIS9_EE(ptr dead_on_unwind noalias writable sret(%"class.ngraph::PartialShape") align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef %2) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.ngraph::Dimension", align 8
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca %"class.ngraph::Dimension", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #6
  %9 = tail call { i64, i64 } @_ZNK6ngraph12PartialShape4rankEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  %10 = extractvalue { i64, i64 } %9, 0
  store i64 %10, ptr %4, align 8
  %11 = getelementptr inbounds i8, ptr %4, i64 8
  %12 = extractvalue { i64, i64 } %9, 1
  store i64 %12, ptr %11, align 8
  %13 = call noundef zeroext i1 @_ZNK6ngraph9Dimension10is_dynamicEv(ptr noundef nonnull align 8 dereferenceable(16) %4)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #6
  br i1 %13, label %14, label %15

14:                                               ; preds = %3
  call void @_ZN6ngraph12PartialShapeC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(32) %1)
  br label %52

15:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #6
  call void @_ZNSt6vectorIN6ngraph9DimensionESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  %16 = getelementptr inbounds i8, ptr %6, i64 8
  br label %17

17:                                               ; preds = %46, %15
  %.011 = phi i64 [ 0, %15 ], [ %47, %46 ]
  %.0 = phi i64 [ 0, %15 ], [ %.1, %46 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #6
  %18 = invoke { i64, i64 } @_ZNK6ngraph12PartialShape4rankEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
          to label %19 unwind label %28

19:                                               ; preds = %17
  %20 = extractvalue { i64, i64 } %18, 0
  store i64 %20, ptr %6, align 8
  %21 = extractvalue { i64, i64 } %18, 1
  store i64 %21, ptr %16, align 8
  %22 = invoke noundef i64 @_ZNK6ngraph9Dimension10get_lengthEv(ptr noundef nonnull align 8 dereferenceable(16) %6)
          to label %23 unwind label %28

23:                                               ; preds = %19
  %24 = call noundef i64 @_ZNKSt6vectorISt4pairImN6ngraph9DimensionEESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  %25 = add i64 %24, %22
  %26 = icmp ult i64 %.011, %25
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #6
  br i1 %26, label %30, label %27

27:                                               ; preds = %23
  invoke void @_ZN6ngraph12PartialShapeC2ERKSt6vectorINS_9DimensionESaIS2_EE(ptr noundef nonnull align 8 dereferenceable(32) %0, ptr noundef nonnull align 8 dereferenceable(24) %5)
          to label %48 unwind label %49

28:                                               ; preds = %19, %17
  %29 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #6
  br label %51

30:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %31 = call ptr @_ZNSt6vectorISt4pairImN6ngraph9DimensionEESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  %32 = call ptr @_ZNSt6vectorISt4pairImN6ngraph9DimensionEESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  %33 = invoke ptr @"_ZSt7find_ifIN9__gnu_cxx17__normal_iteratorIPSt4pairImN6ngraph9DimensionEESt6vectorIS5_SaIS5_EEEEZNS3_12inject_pairsINS3_12PartialShapeES4_EET_RKSD_S7_IS2_ImT0_ESaISH_EEE3$_0ESD_SD_SD_SG_"(ptr %31, ptr %32, i64 %.011)
          to label %34 unwind label %41

34:                                               ; preds = %30
  store ptr %33, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  %35 = call ptr @_ZNSt6vectorISt4pairImN6ngraph9DimensionEESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  store ptr %35, ptr %8, align 8
  %36 = call noundef zeroext i1 @_ZN9__gnu_cxxeqIPSt4pairImN6ngraph9DimensionEESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  br i1 %36, label %37, label %43

37:                                               ; preds = %34
  %38 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNK6ngraph12PartialShapeixEm(ptr noundef nonnull align 8 dereferenceable(32) %1, i64 noundef %.0)
          to label %39 unwind label %41

39:                                               ; preds = %37
  %40 = add i64 %.0, 1
  invoke void @_ZNSt6vectorIN6ngraph9DimensionESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(16) %38)
          to label %46 unwind label %41

41:                                               ; preds = %43, %39, %37, %30
  %42 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  br label %51

43:                                               ; preds = %34
  %44 = call noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairImN6ngraph9DimensionEESt6vectorIS4_SaIS4_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  %45 = getelementptr inbounds i8, ptr %44, i64 8
  invoke void @_ZNSt6vectorIN6ngraph9DimensionESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %5, ptr noundef nonnull align 8 dereferenceable(16) %45)
          to label %46 unwind label %41

46:                                               ; preds = %43, %39
  %.1 = phi i64 [ %40, %39 ], [ %.0, %43 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  %47 = add nuw i64 %.011, 1
  br label %17, !llvm.loop !5

48:                                               ; preds = %27
  call void @_ZNSt6vectorIN6ngraph9DimensionESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  br label %52

49:                                               ; preds = %27
  %50 = landingpad { ptr, i32 }
          cleanup
  br label %51

51:                                               ; preds = %28, %41, %49
  %.pn.pn = phi { ptr, i32 } [ %50, %49 ], [ %42, %41 ], [ %29, %28 ]
  call void @_ZNSt6vectorIN6ngraph9DimensionESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #6
  resume { ptr, i32 } %.pn.pn

52:                                               ; preds = %48, %14
  ret void
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare hidden ptr @"_ZSt7find_ifIN9__gnu_cxx17__normal_iteratorIPSt4pairImN6ngraph9DimensionEESt6vectorIS5_SaIS5_EEEEZNS3_12inject_pairsINS3_12PartialShapeES4_EET_RKSD_S7_IS2_ImT0_ESaISH_EEE3$_0ESD_SD_SD_SG_"(ptr, ptr, i64) local_unnamed_addr #2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN9__gnu_cxxeqIPSt4pairImN6ngraph9DimensionEESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #5

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt4pairImN6ngraph9DimensionEESt6vectorIS4_SaIS4_EEEptEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 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 = { 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 #3 = { 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 = { "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 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 #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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass