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

; 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.ngraph::AxisSet" = type { %"class.std::set" }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<unsigned long, unsigned long, std::_Identity<unsigned long>, std::less<unsigned long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned long, unsigned long, std::_Identity<unsigned long>, std::less<unsigned long>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"struct.std::pair" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6ngraph7projectINS_12PartialShapeEEET_RKS2_RKNS_7AxisSetE(ptr dead_on_unwind noalias writable sret(%"class.ngraph::PartialShape") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(48)) #0

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

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

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

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

; 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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNKSt3setImSt4lessImESaImEE4findERKm(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6ngraph6reduceINS_12PartialShapeEEET_RKS2_RKNS_7AxisSetE(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(48) %2) #0 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::AxisSet", align 8
  %9 = alloca i64, align 8
  %10 = alloca %"class.ngraph::Dimension", align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %14 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %15 = alloca %"struct.std::pair", 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) #5
  %16 = load ptr, ptr %5, align 8, !tbaa !5
  %17 = call { i64, i64 } @_ZNK6ngraph12PartialShape4rankEv(ptr noundef nonnull align 8 dereferenceable(32) %16)
  %18 = getelementptr inbounds %"class.ngraph::Dimension", ptr %7, i32 0, i32 0
  %19 = getelementptr inbounds { i64, i64 }, ptr %18, i32 0, i32 0
  %20 = extractvalue { i64, i64 } %17, 0
  store i64 %20, ptr %19, align 8
  %21 = getelementptr inbounds { i64, i64 }, ptr %18, i32 0, i32 1
  %22 = extractvalue { i64, i64 } %17, 1
  store i64 %22, ptr %21, align 8
  %23 = call noundef zeroext i1 @_ZNK6ngraph9Dimension10is_dynamicEv(ptr noundef nonnull align 8 dereferenceable(16) %7)
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #5
  br i1 %23, label %24, label %26

24:                                               ; preds = %3
  %25 = 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) %25)
  br label %82

26:                                               ; preds = %3
  call void @llvm.lifetime.start.p0(i64 48, ptr %8) #5
  call void @_ZN6ngraph7AxisSetC1Ev(ptr noundef nonnull align 8 dereferenceable(48) %8)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  store i64 0, ptr %9, align 8, !tbaa !9
  br label %27

27:                                               ; preds = %70, %26
  %28 = load i64, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #5
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = invoke { i64, i64 } @_ZNK6ngraph12PartialShape4rankEv(ptr noundef nonnull align 8 dereferenceable(32) %29)
          to label %31 unwind label %41

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

38:                                               ; preds = %31
  %39 = icmp ult i64 %28, %37
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #5
  br i1 %39, label %45, label %40

40:                                               ; preds = %38
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %74

41:                                               ; preds = %31, %27
  %42 = landingpad { ptr, i32 }
          cleanup
  %43 = extractvalue { ptr, i32 } %42, 0
  store ptr %43, ptr %11, align 8
  %44 = extractvalue { ptr, i32 } %42, 1
  store i32 %44, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #5
  br label %73

45:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %46 = load ptr, ptr %6, align 8, !tbaa !5
  %47 = invoke ptr @_ZNKSt3setImSt4lessImESaImEE4findERKm(ptr noundef nonnull align 8 dereferenceable(48) %46, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %48 unwind label %61

48:                                               ; preds = %45
  %49 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %13, i32 0, i32 0
  store ptr %47, ptr %49, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %50 = load ptr, ptr %6, align 8, !tbaa !5
  %51 = call ptr @_ZNKSt3setImSt4lessImESaImEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %50) #5
  %52 = getelementptr inbounds %"struct.std::_Rb_tree_const_iterator", ptr %14, i32 0, i32 0
  store ptr %51, ptr %52, align 8
  %53 = call noundef zeroext i1 @_ZSteqRKSt23_Rb_tree_const_iteratorImES2_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br i1 %53, label %54, label %69

54:                                               ; preds = %48
  %55 = invoke { ptr, i8 } @_ZNSt3setImSt4lessImESaImEE6insertERKm(ptr noundef nonnull align 8 dereferenceable(48) %8, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %56 unwind label %65

56:                                               ; preds = %54
  %57 = getelementptr inbounds { ptr, i8 }, ptr %15, i32 0, i32 0
  %58 = extractvalue { ptr, i8 } %55, 0
  store ptr %58, ptr %57, align 8
  %59 = getelementptr inbounds { ptr, i8 }, ptr %15, i32 0, i32 1
  %60 = extractvalue { ptr, i8 } %55, 1
  store i8 %60, ptr %59, align 8
  br label %69

61:                                               ; preds = %45
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %11, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %73

65:                                               ; preds = %54
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %11, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %12, align 4
  br label %73

69:                                               ; preds = %56, %48
  br label %70

70:                                               ; preds = %69
  %71 = load i64, ptr %9, align 8, !tbaa !9
  %72 = add i64 %71, 1
  store i64 %72, ptr %9, align 8, !tbaa !9
  br label %27, !llvm.loop !11

73:                                               ; preds = %65, %61, %41
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %81

74:                                               ; preds = %40
  %75 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZN6ngraph7projectINS_12PartialShapeEEET_RKS2_RKNS_7AxisSetE(ptr dead_on_unwind writable sret(%"class.ngraph::PartialShape") align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %75, ptr noundef nonnull align 8 dereferenceable(48) %8)
          to label %76 unwind label %77

76:                                               ; preds = %74
  call void @_ZNSt3setImSt4lessImESaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %8) #5
  br label %82

77:                                               ; preds = %74
  %78 = landingpad { ptr, i32 }
          cleanup
  %79 = extractvalue { ptr, i32 } %78, 0
  store ptr %79, ptr %11, align 8
  %80 = extractvalue { ptr, i32 } %78, 1
  store i32 %80, ptr %12, align 4
  br label %81

81:                                               ; preds = %77, %73
  call void @_ZNSt3setImSt4lessImESaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %8) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr %8) #5
  br label %83

82:                                               ; preds = %76, %24
  ret void

83:                                               ; preds = %81
  %84 = load ptr, ptr %11, align 8
  %85 = load i32, ptr %12, align 4
  %86 = insertvalue { ptr, i32 } poison, ptr %84, 0
  %87 = insertvalue { ptr, i32 } %86, i32 %85, 1
  resume { ptr, i32 } %87
}

declare void @_ZN6ngraph7AxisSetC1Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setImSt4lessImESaImEE6insertERKm(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) #0 align 2

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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}
!11 = distinct !{!11, !12}
!12 = !{!"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.ngraph::AxisSet" = type { %"class.std::set" }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<unsigned long, unsigned long, std::_Identity<unsigned long>, std::less<unsigned long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned long, unsigned long, std::_Identity<unsigned long>, std::less<unsigned long>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"struct.std::_Rb_tree_const_iterator" = type { ptr }

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN6ngraph7projectINS_12PartialShapeEEET_RKS2_RKNS_7AxisSetE(ptr dead_on_unwind noalias writable sret(%"class.ngraph::PartialShape") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #0

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

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

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

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

; 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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZNKSt3setImSt4lessImESaImEE4findERKm(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6ngraph6reduceINS_12PartialShapeEEET_RKS2_RKNS_7AxisSetE(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(48) %2) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.ngraph::Dimension", align 8
  %5 = alloca %"class.ngraph::AxisSet", align 8
  %6 = alloca i64, align 8
  %7 = alloca %"class.ngraph::Dimension", align 8
  %8 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  %9 = alloca %"struct.std::_Rb_tree_const_iterator", align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #5
  %10 = tail call { i64, i64 } @_ZNK6ngraph12PartialShape4rankEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
  %11 = extractvalue { i64, i64 } %10, 0
  store i64 %11, ptr %4, align 8
  %12 = getelementptr inbounds i8, ptr %4, i64 8
  %13 = extractvalue { i64, i64 } %10, 1
  store i64 %13, ptr %12, align 8
  %14 = 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) #5
  br i1 %14, label %15, label %16

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

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

18:                                               ; preds = %40, %16
  %storemerge = phi i64 [ 0, %16 ], [ %42, %40 ]
  store i64 %storemerge, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #5
  %19 = invoke { i64, i64 } @_ZNK6ngraph12PartialShape4rankEv(ptr noundef nonnull align 8 dereferenceable(32) %1)
          to label %20 unwind label %27

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

24:                                               ; preds = %20
  %25 = icmp ult i64 %storemerge, %23
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #5
  br i1 %25, label %29, label %26

26:                                               ; preds = %24
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  invoke void @_ZN6ngraph7projectINS_12PartialShapeEEET_RKS2_RKNS_7AxisSetE(ptr dead_on_unwind writable sret(%"class.ngraph::PartialShape") align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1, ptr noundef nonnull align 8 dereferenceable(48) %5)
          to label %44 unwind label %45

27:                                               ; preds = %20, %18
  %28 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #5
  br label %43

29:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  %30 = invoke ptr @_ZNKSt3setImSt4lessImESaImEE4findERKm(ptr noundef nonnull align 8 dereferenceable(48) %2, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %31 unwind label %36

31:                                               ; preds = %29
  store ptr %30, ptr %8, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  %32 = call ptr @_ZNKSt3setImSt4lessImESaImEE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %2) #5
  store ptr %32, ptr %9, align 8
  %33 = call noundef zeroext i1 @_ZSteqRKSt23_Rb_tree_const_iteratorImES2_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  br i1 %33, label %34, label %40

34:                                               ; preds = %31
  %35 = invoke { ptr, i8 } @_ZNSt3setImSt4lessImESaImEE6insertERKm(ptr noundef nonnull align 8 dereferenceable(48) %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %40 unwind label %38

36:                                               ; preds = %29
  %37 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  br label %43

38:                                               ; preds = %34
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %43

40:                                               ; preds = %34, %31
  %41 = load i64, ptr %6, align 8, !tbaa !5
  %42 = add i64 %41, 1
  br label %18, !llvm.loop !9

43:                                               ; preds = %38, %36, %27
  %.pn = phi { ptr, i32 } [ %39, %38 ], [ %37, %36 ], [ %28, %27 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #5
  br label %47

44:                                               ; preds = %26
  call void @_ZNSt3setImSt4lessImESaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #5
  br label %48

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

47:                                               ; preds = %45, %43
  %.pn.pn = phi { ptr, i32 } [ %.pn, %43 ], [ %46, %45 ]
  call void @_ZNSt3setImSt4lessImESaImEED2Ev(ptr noundef nonnull align 8 dereferenceable(48) %5) #5
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %5) #5
  resume { ptr, i32 } %.pn.pn

48:                                               ; preds = %44, %15
  ret void
}

declare void @_ZN6ngraph7AxisSetC1Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setImSt4lessImESaImEE6insertERKm(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #0 align 2

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


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