; LLVM IR from NervanaSystems/ngraph :: src/ngraph (graph_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"

%"struct.std::__detail::_Node_const_iterator" = type { %"struct.std::__detail::_Node_iterator_base.205" }
%"struct.std::__detail::_Node_iterator_base.205" = type { ptr }
%"class.std::shared_ptr.19" = type { %"class.std::__shared_ptr.20" }
%"class.std::__shared_ptr.20" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"struct.std::pair.206" = type { %"class.std::shared_ptr.19", %"class.std::shared_ptr.19" }

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6ngraph13replace_nodesERKSt10shared_ptrINS_8FunctionEERKSt13unordered_mapIS0_INS_2op2v09ParameterEES9_St4hashIS9_ESt8equal_toIS9_ESaISt4pairIKS9_S9_EEERKS5_IS0_INS_4NodeEESM_SA_ISM_ESC_ISM_ESaISE_IKSM_SM_EEE(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(56) %1, ptr noundef nonnull align 8 dereferenceable(56) %2) #2 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca %"struct.std::__detail::_Node_const_iterator", align 8
  %11 = alloca %"struct.std::__detail::_Node_const_iterator", align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca %"class.std::shared_ptr.19", align 8
  %16 = alloca %"class.std::shared_ptr.19", align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  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 8, ptr %7) #5
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6ngraph8FunctionELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %19) #5
  %21 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6ngraph6Lambda14get_parametersEv(ptr noundef nonnull align 8 dereferenceable(56) %20)
  store ptr %21, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  store i64 0, ptr %8, align 8, !tbaa !9
  br label %22

22:                                               ; preds = %55, %3
  %23 = load i64, ptr %8, align 8, !tbaa !9
  %24 = load ptr, ptr %7, align 8, !tbaa !5
  %25 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN6ngraph2op2v09ParameterEESaIS5_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %24) #5
  %26 = icmp ult i64 %23, %25
  br i1 %26, label %28, label %27

27:                                               ; preds = %22
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %58

28:                                               ; preds = %22
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = load ptr, ptr %7, align 8, !tbaa !5
  %31 = load i64, ptr %8, align 8, !tbaa !9
  %32 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6ngraph2op2v09ParameterEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %30, i64 noundef %31) #5
  %33 = call noundef i64 @_ZNKSt13unordered_mapISt10shared_ptrIN6ngraph2op2v09ParameterEES5_St4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S5_EEE5countERSB_(ptr noundef nonnull align 8 dereferenceable(56) %29, ptr noundef nonnull align 8 dereferenceable(16) %32)
  %34 = icmp ne i64 %33, 0
  br i1 %34, label %35, label %54

35:                                               ; preds = %28
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = load ptr, ptr %7, align 8, !tbaa !5
  %38 = load i64, ptr %8, align 8, !tbaa !9
  %39 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6ngraph2op2v09ParameterEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %37, i64 noundef %38) #5
  %40 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt13unordered_mapISt10shared_ptrIN6ngraph2op2v09ParameterEES5_St4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S5_EEE2atERSB_(ptr noundef nonnull align 8 dereferenceable(56) %36, ptr noundef nonnull align 8 dereferenceable(16) %39)
  %41 = load ptr, ptr %7, align 8, !tbaa !5
  %42 = load i64, ptr %8, align 8, !tbaa !9
  %43 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6ngraph2op2v09ParameterEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %41, i64 noundef %42) #5
  %44 = call noundef zeroext i1 @_ZStneIN6ngraph2op2v09ParameterES3_EbRKSt10shared_ptrIT_ERKS4_IT0_E(ptr noundef nonnull align 8 dereferenceable(16) %40, ptr noundef nonnull align 8 dereferenceable(16) %43) #5
  br i1 %44, label %45, label %54

45:                                               ; preds = %35
  %46 = load ptr, ptr %4, align 8, !tbaa !5
  %47 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6ngraph8FunctionELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %46) #5
  %48 = load i64, ptr %8, align 8, !tbaa !9
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = load ptr, ptr %7, align 8, !tbaa !5
  %51 = load i64, ptr %8, align 8, !tbaa !9
  %52 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6ngraph2op2v09ParameterEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %50, i64 noundef %51) #5
  %53 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt13unordered_mapISt10shared_ptrIN6ngraph2op2v09ParameterEES5_St4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S5_EEE2atERSB_(ptr noundef nonnull align 8 dereferenceable(56) %49, ptr noundef nonnull align 8 dereferenceable(16) %52)
  call void @_ZN6ngraph8Function17replace_parameterEmRKSt10shared_ptrINS_2op2v09ParameterEE(ptr noundef nonnull align 8 dereferenceable(176) %47, i64 noundef %48, ptr noundef nonnull align 8 dereferenceable(16) %53)
  br label %54

54:                                               ; preds = %45, %35, %28
  br label %55

55:                                               ; preds = %54
  %56 = load i64, ptr %8, align 8, !tbaa !9
  %57 = add i64 %56, 1
  store i64 %57, ptr %8, align 8, !tbaa !9
  br label %22, !llvm.loop !11

58:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %59 = load ptr, ptr %6, align 8, !tbaa !5
  store ptr %59, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %60 = load ptr, ptr %9, align 8, !tbaa !5
  %61 = call ptr @_ZNKSt13unordered_mapISt10shared_ptrIN6ngraph4NodeEES3_St4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_S3_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %60) #5
  %62 = getelementptr inbounds %"struct.std::__detail::_Node_const_iterator", ptr %10, i32 0, i32 0
  %63 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base.205", ptr %62, i32 0, i32 0
  store ptr %61, ptr %63, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %64 = load ptr, ptr %9, align 8, !tbaa !5
  %65 = call ptr @_ZNKSt13unordered_mapISt10shared_ptrIN6ngraph4NodeEES3_St4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_S3_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %64) #5
  %66 = getelementptr inbounds %"struct.std::__detail::_Node_const_iterator", ptr %11, i32 0, i32 0
  %67 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base.205", ptr %66, i32 0, i32 0
  store ptr %65, ptr %67, align 8
  br label %68

68:                                               ; preds = %91, %58
  %69 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKSt10shared_ptrIN6ngraph4NodeEES5_ELb0EEESA_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #5
  br i1 %69, label %71, label %70

70:                                               ; preds = %68
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %93

71:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %72 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt8__detail20_Node_const_iteratorISt4pairIKSt10shared_ptrIN6ngraph4NodeEES5_ELb0ELb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  store ptr %72, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %73 = load ptr, ptr %12, align 8, !tbaa !5
  %74 = getelementptr inbounds %"struct.std::pair.206", ptr %73, i32 0, i32 0
  store ptr %74, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %75 = load ptr, ptr %12, align 8, !tbaa !5
  %76 = getelementptr inbounds %"struct.std::pair.206", ptr %75, i32 0, i32 1
  store ptr %76, ptr %14, align 8, !tbaa !5
  %77 = load ptr, ptr %13, align 8, !tbaa !5
  %78 = load ptr, ptr %14, align 8, !tbaa !5
  %79 = call noundef zeroext i1 @_ZStneIN6ngraph4NodeES1_EbRKSt10shared_ptrIT_ERKS2_IT0_E(ptr noundef nonnull align 8 dereferenceable(16) %77, ptr noundef nonnull align 8 dereferenceable(16) %78) #5
  br i1 %79, label %80, label %90

80:                                               ; preds = %71
  %81 = load ptr, ptr %4, align 8, !tbaa !5
  %82 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6ngraph8FunctionELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %81) #5
  %83 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZNSt10shared_ptrIN6ngraph4NodeEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef nonnull align 8 dereferenceable(16) %83) #5
  %84 = load ptr, ptr %14, align 8, !tbaa !5
  call void @_ZNSt10shared_ptrIN6ngraph4NodeEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(16) %84) #5
  invoke void @_ZN6ngraph8Function12replace_nodeESt10shared_ptrINS_4NodeEES3_(ptr noundef nonnull align 8 dereferenceable(176) %82, ptr noundef %15, ptr noundef %16)
          to label %85 unwind label %86

85:                                               ; preds = %80
  call void @_ZNSt12__shared_ptrIN6ngraph4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %16) #5
  call void @_ZNSt12__shared_ptrIN6ngraph4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %15) #5
  br label %90

86:                                               ; preds = %80
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %17, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %18, align 4
  call void @_ZNSt12__shared_ptrIN6ngraph4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %16) #5
  call void @_ZNSt12__shared_ptrIN6ngraph4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  br label %94

90:                                               ; preds = %85, %71
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  br label %91

91:                                               ; preds = %90
  %92 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail20_Node_const_iteratorISt4pairIKSt10shared_ptrIN6ngraph4NodeEES5_ELb0ELb0EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #5
  br label %68

93:                                               ; preds = %70
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #5
  ret void

94:                                               ; preds = %86
  %95 = load ptr, ptr %17, align 8
  %96 = load i32, ptr %18, align 4
  %97 = insertvalue { ptr, i32 } poison, ptr %95, 0
  %98 = insertvalue { ptr, i32 } %97, i32 %96, 1
  resume { ptr, i32 } %98
}

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt13unordered_mapISt10shared_ptrIN6ngraph2op2v09ParameterEES5_St4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S5_EEE2atERSB_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

declare void @_ZN6ngraph8Function17replace_parameterEmRKSt10shared_ptrINS_2op2v09ParameterEE(ptr noundef nonnull align 8 dereferenceable(176), i64 noundef, ptr noundef nonnull align 8 dereferenceable(16)) #4

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

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

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

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

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

declare void @_ZN6ngraph8Function12replace_nodeESt10shared_ptrINS_4NodeEES3_(ptr noundef nonnull align 8 dereferenceable(176), ptr noundef, ptr noundef) #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail20_Node_const_iteratorISt4pairIKSt10shared_ptrIN6ngraph4NodeEES5_ELb0ELb0EEppEv(ptr noundef nonnull align 8 dereferenceable(8)) #1 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 #1 align 2

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

%"struct.std::__detail::_Node_const_iterator" = type { %"struct.std::__detail::_Node_iterator_base.205" }
%"struct.std::__detail::_Node_iterator_base.205" = type { ptr }
%"class.std::shared_ptr.19" = type { %"class.std::__shared_ptr.20" }
%"class.std::__shared_ptr.20" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6ngraph13replace_nodesERKSt10shared_ptrINS_8FunctionEERKSt13unordered_mapIS0_INS_2op2v09ParameterEES9_St4hashIS9_ESt8equal_toIS9_ESaISt4pairIKS9_S9_EEERKS5_IS0_INS_4NodeEESM_SA_ISM_ESC_ISM_ESaISE_IKSM_SM_EEE(ptr noundef nonnull align 8 dereferenceable(16) %0, ptr noundef nonnull align 8 dereferenceable(56) %1, ptr noundef nonnull align 8 dereferenceable(56) %2) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"struct.std::__detail::_Node_const_iterator", align 8
  %5 = alloca %"struct.std::__detail::_Node_const_iterator", align 8
  %6 = alloca %"class.std::shared_ptr.19", align 8
  %7 = alloca %"class.std::shared_ptr.19", align 8
  %8 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN6ngraph8FunctionELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #5
  %9 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK6ngraph6Lambda14get_parametersEv(ptr noundef nonnull align 8 dereferenceable(56) %8)
  %10 = tail call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN6ngraph2op2v09ParameterEESaIS5_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  %.not32 = icmp eq i64 %10, 0
  br i1 %.not32, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %25, %3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #5
  %11 = tail call ptr @_ZNKSt13unordered_mapISt10shared_ptrIN6ngraph4NodeEES3_St4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_S3_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %2) #5
  store ptr %11, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #5
  %12 = tail call ptr @_ZNKSt13unordered_mapISt10shared_ptrIN6ngraph4NodeEES3_St4hashIS3_ESt8equal_toIS3_ESaISt4pairIKS3_S3_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %2) #5
  store ptr %12, ptr %5, align 8
  %13 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKSt10shared_ptrIN6ngraph4NodeEES5_ELb0EEESA_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  br i1 %13, label %.lr.ph30, label %._crit_edge31

.lr.ph:                                           ; preds = %3, %25
  %.028 = phi i64 [ %26, %25 ], [ 0, %3 ]
  %14 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6ngraph2op2v09ParameterEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %.028) #5
  %15 = tail call noundef i64 @_ZNKSt13unordered_mapISt10shared_ptrIN6ngraph2op2v09ParameterEES5_St4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S5_EEE5countERSB_(ptr noundef nonnull align 8 dereferenceable(56) %1, ptr noundef nonnull align 8 dereferenceable(16) %14)
  %.not = icmp eq i64 %15, 0
  br i1 %.not, label %25, label %16

16:                                               ; preds = %.lr.ph
  %17 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6ngraph2op2v09ParameterEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %.028) #5
  %18 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt13unordered_mapISt10shared_ptrIN6ngraph2op2v09ParameterEES5_St4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S5_EEE2atERSB_(ptr noundef nonnull align 8 dereferenceable(56) %1, ptr noundef nonnull align 8 dereferenceable(16) %17)
  %19 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6ngraph2op2v09ParameterEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %.028) #5
  %20 = tail call noundef zeroext i1 @_ZStneIN6ngraph2op2v09ParameterES3_EbRKSt10shared_ptrIT_ERKS4_IT0_E(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(16) %19) #5
  br i1 %20, label %21, label %25

21:                                               ; preds = %16
  %22 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN6ngraph8FunctionELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #5
  %23 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorISt10shared_ptrIN6ngraph2op2v09ParameterEESaIS5_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %.028) #5
  %24 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt13unordered_mapISt10shared_ptrIN6ngraph2op2v09ParameterEES5_St4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S5_EEE2atERSB_(ptr noundef nonnull align 8 dereferenceable(56) %1, ptr noundef nonnull align 8 dereferenceable(16) %23)
  tail call void @_ZN6ngraph8Function17replace_parameterEmRKSt10shared_ptrINS_2op2v09ParameterEE(ptr noundef nonnull align 8 dereferenceable(176) %22, i64 noundef %.028, ptr noundef nonnull align 8 dereferenceable(16) %24)
  br label %25

25:                                               ; preds = %.lr.ph, %16, %21
  %26 = add nuw i64 %.028, 1
  %27 = tail call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN6ngraph2op2v09ParameterEESaIS5_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  %28 = icmp ult i64 %26, %27
  br i1 %28, label %.lr.ph, label %._crit_edge, !llvm.loop !5

._crit_edge31:                                    ; preds = %37, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  ret void

.lr.ph30:                                         ; preds = %._crit_edge, %37
  %29 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt8__detail20_Node_const_iteratorISt4pairIKSt10shared_ptrIN6ngraph4NodeEES5_ELb0ELb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  %30 = getelementptr inbounds i8, ptr %29, i64 16
  %31 = call noundef zeroext i1 @_ZStneIN6ngraph4NodeES1_EbRKSt10shared_ptrIT_ERKS2_IT0_E(ptr noundef nonnull align 8 dereferenceable(16) %29, ptr noundef nonnull align 8 dereferenceable(16) %30) #5
  br i1 %31, label %32, label %37

32:                                               ; preds = %.lr.ph30
  %33 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN6ngraph8FunctionELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %0) #5
  call void @_ZNSt10shared_ptrIN6ngraph4NodeEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %29) #5
  call void @_ZNSt10shared_ptrIN6ngraph4NodeEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %30) #5
  invoke void @_ZN6ngraph8Function12replace_nodeESt10shared_ptrINS_4NodeEES3_(ptr noundef nonnull align 8 dereferenceable(176) %33, ptr noundef nonnull %6, ptr noundef nonnull %7)
          to label %34 unwind label %35

34:                                               ; preds = %32
  call void @_ZNSt12__shared_ptrIN6ngraph4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #5
  call void @_ZNSt12__shared_ptrIN6ngraph4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #5
  br label %37

35:                                               ; preds = %32
  %36 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN6ngraph4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #5
  call void @_ZNSt12__shared_ptrIN6ngraph4NodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #5
  resume { ptr, i32 } %36

37:                                               ; preds = %34, %.lr.ph30
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail20_Node_const_iteratorISt4pairIKSt10shared_ptrIN6ngraph4NodeEES5_ELb0ELb0EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  %39 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKSt10shared_ptrIN6ngraph4NodeEES5_ELb0EEESA_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #5
  br i1 %39, label %.lr.ph30, label %._crit_edge31
}

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNKSt13unordered_mapISt10shared_ptrIN6ngraph2op2v09ParameterEES5_St4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S5_EEE5countERSB_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt13unordered_mapISt10shared_ptrIN6ngraph2op2v09ParameterEES5_St4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S5_EEE2atERSB_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #2 align 2

declare void @_ZN6ngraph8Function17replace_parameterEmRKSt10shared_ptrINS_2op2v09ParameterEE(ptr noundef nonnull align 8 dereferenceable(176), i64 noundef, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #4

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

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

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

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

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

declare void @_ZN6ngraph8Function12replace_nodeESt10shared_ptrINS_4NodeEES3_(ptr noundef nonnull align 8 dereferenceable(176), ptr noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail20_Node_const_iteratorISt4pairIKSt10shared_ptrIN6ngraph4NodeEES5_ELb0ELb0EEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 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 #1 align 2

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


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