; LLVM IR from NervanaSystems/ngraph :: src/ngraph/partial_shape.ll (ZN6ngraphplERKNS_12PartialShapeES2_)

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

@.str.5 = external hidden unnamed_addr constant [14 x i8], align 1
@_ZTISt16invalid_argument = external constant ptr

declare i32 @__gxx_personality_v0(...)

; 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

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

declare ptr @__cxa_allocate_exception(i64)

declare void @__cxa_throw(ptr, ptr, ptr)

declare void @__cxa_free_exception(ptr)

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6ngraphplERKNS_12PartialShapeES2_(ptr dead_on_unwind noalias writable sret(%"class.ngraph::PartialShape") align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(32) %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.ngraph::Dimension", align 8
  %9 = alloca %"class.ngraph::Dimension", align 8
  %10 = alloca %"class.ngraph::Dimension", align 8
  %11 = alloca %"class.ngraph::Dimension", align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i1, align 1
  %15 = alloca i64, align 8
  %16 = alloca %"class.ngraph::Dimension", 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
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = call { i64, i64 } @_ZNK6ngraph12PartialShape4rankEv(ptr noundef nonnull align 8 dereferenceable(32) %17)
  %19 = getelementptr inbounds %"class.ngraph::Dimension", ptr %7, i32 0, i32 0
  %20 = getelementptr inbounds { i64, i64 }, ptr %19, i32 0, i32 0
  %21 = extractvalue { i64, i64 } %18, 0
  store i64 %21, ptr %20, align 8
  %22 = getelementptr inbounds { i64, i64 }, ptr %19, i32 0, i32 1
  %23 = extractvalue { i64, i64 } %18, 1
  store i64 %23, ptr %22, align 8
  %24 = call noundef zeroext i1 @_ZNK6ngraph9Dimension10is_dynamicEv(ptr noundef nonnull align 8 dereferenceable(16) %7)
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #6
  br i1 %24, label %34, label %25

25:                                               ; preds = %3
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  %27 = call { i64, i64 } @_ZNK6ngraph12PartialShape4rankEv(ptr noundef nonnull align 8 dereferenceable(32) %26)
  %28 = getelementptr inbounds %"class.ngraph::Dimension", ptr %8, i32 0, i32 0
  %29 = getelementptr inbounds { i64, i64 }, ptr %28, i32 0, i32 0
  %30 = extractvalue { i64, i64 } %27, 0
  store i64 %30, ptr %29, align 8
  %31 = getelementptr inbounds { i64, i64 }, ptr %28, i32 0, i32 1
  %32 = extractvalue { i64, i64 } %27, 1
  store i64 %32, ptr %31, align 8
  %33 = call noundef zeroext i1 @_ZNK6ngraph9Dimension10is_dynamicEv(ptr noundef nonnull align 8 dereferenceable(16) %8)
  br label %34

34:                                               ; preds = %25, %3
  %35 = phi i1 [ true, %3 ], [ %33, %25 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #6
  br i1 %35, label %36, label %47

36:                                               ; preds = %34
  %37 = call { i64, i64 } @_ZN6ngraph9Dimension7dynamicEv()
  %38 = getelementptr inbounds %"class.ngraph::Dimension", ptr %9, i32 0, i32 0
  %39 = getelementptr inbounds { i64, i64 }, ptr %38, i32 0, i32 0
  %40 = extractvalue { i64, i64 } %37, 0
  store i64 %40, ptr %39, align 8
  %41 = getelementptr inbounds { i64, i64 }, ptr %38, i32 0, i32 1
  %42 = extractvalue { i64, i64 } %37, 1
  store i64 %42, ptr %41, align 8
  %43 = getelementptr inbounds { i64, i64 }, ptr %9, i32 0, i32 0
  %44 = load i64, ptr %43, align 8
  %45 = getelementptr inbounds { i64, i64 }, ptr %9, i32 0, i32 1
  %46 = load i64, ptr %45, align 8
  call void @_ZN6ngraph12PartialShape7dynamicENS_9DimensionE(ptr dead_on_unwind writable sret(%"class.ngraph::PartialShape") align 8 %0, i64 %44, i64 %46)
  br label %109

47:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #6
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = call { i64, i64 } @_ZNK6ngraph12PartialShape4rankEv(ptr noundef nonnull align 8 dereferenceable(32) %48)
  %50 = getelementptr inbounds %"class.ngraph::Dimension", ptr %10, i32 0, i32 0
  %51 = getelementptr inbounds { i64, i64 }, ptr %50, i32 0, i32 0
  %52 = extractvalue { i64, i64 } %49, 0
  store i64 %52, ptr %51, align 8
  %53 = getelementptr inbounds { i64, i64 }, ptr %50, i32 0, i32 1
  %54 = extractvalue { i64, i64 } %49, 1
  store i64 %54, ptr %53, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #6
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  %56 = call { i64, i64 } @_ZNK6ngraph12PartialShape4rankEv(ptr noundef nonnull align 8 dereferenceable(32) %55)
  %57 = getelementptr inbounds %"class.ngraph::Dimension", ptr %11, i32 0, i32 0
  %58 = getelementptr inbounds { i64, i64 }, ptr %57, i32 0, i32 0
  %59 = extractvalue { i64, i64 } %56, 0
  store i64 %59, ptr %58, align 8
  %60 = getelementptr inbounds { i64, i64 }, ptr %57, i32 0, i32 1
  %61 = extractvalue { i64, i64 } %56, 1
  store i64 %61, ptr %60, align 8
  %62 = call noundef zeroext i1 @_ZNK6ngraph9Dimension10compatibleERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %11)
  %63 = xor i1 %62, true
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #6
  br i1 %63, label %64, label %71

64:                                               ; preds = %47
  %65 = call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZNSt16invalid_argumentC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %65, ptr noundef @.str.5)
          to label %66 unwind label %67

66:                                               ; preds = %64
  call void @__cxa_throw(ptr %65, ptr @_ZTISt16invalid_argument, ptr @_ZNSt16invalid_argumentD1Ev) #7
  unreachable

67:                                               ; preds = %64
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %12, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %13, align 4
  call void @__cxa_free_exception(ptr %65) #6
  br label %110

71:                                               ; preds = %47
  store i1 false, ptr %14, align 1
  call void @_ZN6ngraph12PartialShapeC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0)
  %72 = getelementptr inbounds %"class.ngraph::PartialShape", ptr %0, i32 0, i32 0
  store i8 1, ptr %72, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #6
  store i64 0, ptr %15, align 8, !tbaa !16
  br label %73

73:                                               ; preds = %98, %71
  %74 = load i64, ptr %15, align 8, !tbaa !16
  %75 = load ptr, ptr %5, align 8, !tbaa !5
  %76 = getelementptr inbounds %"class.ngraph::PartialShape", ptr %75, i32 0, i32 1
  %77 = call noundef i64 @_ZNKSt6vectorIN6ngraph9DimensionESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %76) #6
  %78 = icmp ult i64 %74, %77
  br i1 %78, label %80, label %79

79:                                               ; preds = %73
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  br label %105

80:                                               ; preds = %73
  %81 = getelementptr inbounds %"class.ngraph::PartialShape", ptr %0, i32 0, i32 1
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #6
  %82 = load ptr, ptr %5, align 8, !tbaa !5
  %83 = getelementptr inbounds %"class.ngraph::PartialShape", ptr %82, i32 0, i32 1
  %84 = load i64, ptr %15, align 8, !tbaa !16
  %85 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN6ngraph9DimensionESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %83, i64 noundef %84) #6
  %86 = load ptr, ptr %6, align 8, !tbaa !5
  %87 = getelementptr inbounds %"class.ngraph::PartialShape", ptr %86, i32 0, i32 1
  %88 = load i64, ptr %15, align 8, !tbaa !16
  %89 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN6ngraph9DimensionESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %87, i64 noundef %88) #6
  %90 = invoke { i64, i64 } @_ZNK6ngraph9DimensionplERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %85, ptr noundef nonnull align 8 dereferenceable(16) %89)
          to label %91 unwind label %101

91:                                               ; preds = %80
  %92 = getelementptr inbounds %"class.ngraph::Dimension", ptr %16, i32 0, i32 0
  %93 = getelementptr inbounds { i64, i64 }, ptr %92, i32 0, i32 0
  %94 = extractvalue { i64, i64 } %90, 0
  store i64 %94, ptr %93, align 8
  %95 = getelementptr inbounds { i64, i64 }, ptr %92, i32 0, i32 1
  %96 = extractvalue { i64, i64 } %90, 1
  store i64 %96, ptr %95, align 8
  invoke void @_ZNSt6vectorIN6ngraph9DimensionESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %81, ptr noundef nonnull align 8 dereferenceable(16) %16)
          to label %97 unwind label %101

97:                                               ; preds = %91
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #6
  br label %98

98:                                               ; preds = %97
  %99 = load i64, ptr %15, align 8, !tbaa !16
  %100 = add i64 %99, 1
  store i64 %100, ptr %15, align 8, !tbaa !16
  br label %73, !llvm.loop !18

101:                                              ; preds = %91, %80
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %12, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #6
  call void @_ZN6ngraph12PartialShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #6
  br label %110

105:                                              ; preds = %79
  store i1 true, ptr %14, align 1
  %106 = load i1, ptr %14, align 1
  br i1 %106, label %108, label %107

107:                                              ; preds = %105
  call void @_ZN6ngraph12PartialShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #6
  br label %108

108:                                              ; preds = %107, %105
  br label %109

109:                                              ; preds = %108, %36
  ret void

110:                                              ; preds = %101, %67
  %111 = load ptr, ptr %12, align 8
  %112 = load i32, ptr %13, align 4
  %113 = insertvalue { ptr, i32 } poison, ptr %111, 0
  %114 = insertvalue { ptr, i32 } %113, i32 %112, 1
  resume { ptr, i32 } %114
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6ngraph12PartialShape7dynamicENS_9DimensionE(ptr dead_on_unwind noalias writable sret(%"class.ngraph::PartialShape") align 8, i64, i64) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { i64, i64 } @_ZN6ngraph9Dimension7dynamicEv() #2 align 2

declare noundef zeroext i1 @_ZNK6ngraph9Dimension10compatibleERKS0_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #3

declare void @_ZNSt16invalid_argumentC1EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #3

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

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

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

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

declare { i64, i64 } @_ZNK6ngraph9DimensionplERKS0_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6ngraph12PartialShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #5 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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 }
attributes #7 = { noreturn }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"_ZTSN6ngraph12PartialShapeE", !11, i64 0, !12, i64 8}
!11 = !{!"bool", !7, i64 0}
!12 = !{!"_ZTSSt6vectorIN6ngraph9DimensionESaIS1_EE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseIN6ngraph9DimensionESaIS1_EE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIN6ngraph9DimensionESaIS1_EE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIN6ngraph9DimensionESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!16 = !{!17, !17, i64 0}
!17 = !{!"long", !7, i64 0}
!18 = distinct !{!18, !19}
!19 = !{!"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 }

@.str.5 = external hidden unnamed_addr constant [14 x i8], align 1
@_ZTISt16invalid_argument = external constant ptr

declare i32 @__gxx_personality_v0(...)

; 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; 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 nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN6ngraph9DimensionESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #2 align 2

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

declare void @__cxa_free_exception(ptr) local_unnamed_addr

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6ngraphplERKNS_12PartialShapeES2_(ptr dead_on_unwind noalias writable sret(%"class.ngraph::PartialShape") align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(32) %2) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.ngraph::Dimension", align 8
  %5 = alloca %"class.ngraph::Dimension", align 8
  %6 = alloca %"class.ngraph::Dimension", align 8
  %7 = alloca %"class.ngraph::Dimension", align 8
  %8 = alloca %"class.ngraph::Dimension", 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.start.p0(i64 16, ptr nonnull %5) #6
  br i1 %13, label %.critedge, label %14

14:                                               ; preds = %3
  %15 = call { i64, i64 } @_ZNK6ngraph12PartialShape4rankEv(ptr noundef nonnull align 8 dereferenceable(32) %2)
  %16 = extractvalue { i64, i64 } %15, 0
  store i64 %16, ptr %5, align 8
  %17 = getelementptr inbounds i8, ptr %5, i64 8
  %18 = extractvalue { i64, i64 } %15, 1
  store i64 %18, ptr %17, align 8
  %19 = call noundef zeroext i1 @_ZNK6ngraph9Dimension10is_dynamicEv(ptr noundef nonnull align 8 dereferenceable(16) %5)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #6
  br i1 %19, label %20, label %24

.critedge:                                        ; preds = %3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #6
  br label %20

20:                                               ; preds = %.critedge, %14
  %21 = call { i64, i64 } @_ZN6ngraph9Dimension7dynamicEv()
  %22 = extractvalue { i64, i64 } %21, 0
  %23 = extractvalue { i64, i64 } %21, 1
  call void @_ZN6ngraph12PartialShape7dynamicENS_9DimensionE(ptr dead_on_unwind writable sret(%"class.ngraph::PartialShape") align 8 %0, i64 %22, i64 %23)
  br label %.loopexit

24:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #6
  %25 = call { i64, i64 } @_ZNK6ngraph12PartialShape4rankEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  %26 = extractvalue { i64, i64 } %25, 0
  store i64 %26, ptr %6, align 8
  %27 = getelementptr inbounds i8, ptr %6, i64 8
  %28 = extractvalue { i64, i64 } %25, 1
  store i64 %28, ptr %27, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #6
  %29 = call { i64, i64 } @_ZNK6ngraph12PartialShape4rankEv(ptr noundef nonnull align 8 dereferenceable(32) %2)
  %30 = extractvalue { i64, i64 } %29, 0
  store i64 %30, ptr %7, align 8
  %31 = getelementptr inbounds i8, ptr %7, i64 8
  %32 = extractvalue { i64, i64 } %29, 1
  store i64 %32, ptr %31, align 8
  %33 = call noundef zeroext i1 @_ZNK6ngraph9Dimension10compatibleERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %7)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #6
  br i1 %33, label %39, label %34

34:                                               ; preds = %24
  %35 = call ptr @__cxa_allocate_exception(i64 16) #6
  invoke void @_ZNSt16invalid_argumentC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %35, ptr noundef nonnull @.str.5)
          to label %36 unwind label %37

36:                                               ; preds = %34
  call void @__cxa_throw(ptr nonnull %35, ptr nonnull @_ZTISt16invalid_argument, ptr nonnull @_ZNSt16invalid_argumentD1Ev) #7
  unreachable

37:                                               ; preds = %34
  %38 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %35) #6
  br label %58

39:                                               ; preds = %24
  call void @_ZN6ngraph12PartialShapeC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0)
  store i8 1, ptr %0, align 8, !tbaa !5
  %40 = getelementptr inbounds i8, ptr %1, i64 8
  %41 = call noundef i64 @_ZNKSt6vectorIN6ngraph9DimensionESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %40) #6
  %.not = icmp eq i64 %41, 0
  br i1 %.not, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %39
  %42 = getelementptr inbounds i8, ptr %2, i64 8
  %43 = getelementptr inbounds i8, ptr %0, i64 8
  %44 = getelementptr inbounds i8, ptr %8, i64 8
  br label %45

45:                                               ; preds = %.lr.ph, %52
  %.016 = phi i64 [ 0, %.lr.ph ], [ %53, %52 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #6
  %46 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN6ngraph9DimensionESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %40, i64 noundef %.016) #6
  %47 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN6ngraph9DimensionESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %42, i64 noundef %.016) #6
  %48 = invoke { i64, i64 } @_ZNK6ngraph9DimensionplERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %46, ptr noundef nonnull align 8 dereferenceable(16) %47)
          to label %49 unwind label %56

49:                                               ; preds = %45
  %50 = extractvalue { i64, i64 } %48, 0
  store i64 %50, ptr %8, align 8
  %51 = extractvalue { i64, i64 } %48, 1
  store i64 %51, ptr %44, align 8
  invoke void @_ZNSt6vectorIN6ngraph9DimensionESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(24) %43, ptr noundef nonnull align 8 dereferenceable(16) %8)
          to label %52 unwind label %56

52:                                               ; preds = %49
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #6
  %53 = add nuw i64 %.016, 1
  %54 = call noundef i64 @_ZNKSt6vectorIN6ngraph9DimensionESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %40) #6
  %55 = icmp ult i64 %53, %54
  br i1 %55, label %45, label %.loopexit, !llvm.loop !15

56:                                               ; preds = %49, %45
  %57 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #6
  call void @_ZN6ngraph12PartialShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %0) #6
  br label %58

.loopexit:                                        ; preds = %52, %39, %20
  ret void

58:                                               ; preds = %56, %37
  %.pn = phi { ptr, i32 } [ %38, %37 ], [ %57, %56 ]
  resume { ptr, i32 } %.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6ngraph12PartialShape7dynamicENS_9DimensionE(ptr dead_on_unwind noalias writable sret(%"class.ngraph::PartialShape") align 8, i64, i64) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { i64, i64 } @_ZN6ngraph9Dimension7dynamicEv() local_unnamed_addr #2 align 2

declare noundef zeroext i1 @_ZNK6ngraph9Dimension10compatibleERKS0_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3

declare void @_ZNSt16invalid_argumentC1EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #3

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

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

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

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

declare { i64, i64 } @_ZNK6ngraph9DimensionplERKS0_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6ngraph12PartialShapeD2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #5 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 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 }
attributes #7 = { noreturn }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_ZTSN6ngraph12PartialShapeE", !7, i64 0, !10, i64 8}
!7 = !{!"bool", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt6vectorIN6ngraph9DimensionESaIS1_EE", !11, i64 0}
!11 = !{!"_ZTSSt12_Vector_baseIN6ngraph9DimensionESaIS1_EE", !12, i64 0}
!12 = !{!"_ZTSNSt12_Vector_baseIN6ngraph9DimensionESaIS1_EE12_Vector_implE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIN6ngraph9DimensionESaIS1_EE17_Vector_impl_dataE", !14, i64 0, !14, i64 8, !14, i64 16}
!14 = !{!"any pointer", !8, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass