; LLVM IR from NVIDIA/DALI :: dali/pipeline/graph (op_graph2)

; 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.anon = type { ptr }
%"struct.dali::graph::DataEdge" = type <{ ptr, i32, [4 x i8] }>
%"struct.dali::graph::OpNode" = type { %"struct.std::_List_iterator", i8, i8, %"class.std::__cxx11::basic_string", %"class.dali::OpSpec", i32, i8, %"class.dali::SmallVector", %"class.dali::SmallVector.62" }
%"struct.std::_List_iterator" = type { ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.dali::OpSpec" = type { %"class.std::__cxx11::basic_string", ptr, %"class.std::vector", %"class.std::map", %"class.std::vector.6", %"class.std::map", %"class.std::map.11", %"class.std::vector.16", %"class.std::vector.16", %"class.std::map.21" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::shared_ptr<dali::Argument>, std::allocator<std::shared_ptr<dali::Argument>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<dali::Argument>, std::allocator<std::shared_ptr<dali::Argument>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<dali::Argument>, std::allocator<std::shared_ptr<dali::Argument>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<dali::Argument>, std::allocator<std::shared_ptr<dali::Argument>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.6" = type { %"struct.std::_Vector_base.7" }
%"struct.std::_Vector_base.7" = type { %"struct.std::_Vector_base<std::pair<std::__cxx11::basic_string<char>, int>, std::allocator<std::pair<std::__cxx11::basic_string<char>, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<std::__cxx11::basic_string<char>, int>, std::allocator<std::pair<std::__cxx11::basic_string<char>, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<std::__cxx11::basic_string<char>, int>, std::allocator<std::pair<std::__cxx11::basic_string<char>, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<std::__cxx11::basic_string<char>, int>, std::allocator<std::pair<std::__cxx11::basic_string<char>, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, int>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, int>>, std::less<void>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, int>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, int>>, std::less<void>>::_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 }
%"class.std::map.11" = type { %"class.std::_Rb_tree.12" }
%"class.std::_Rb_tree.12" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>>, std::less<void>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>>, std::less<void>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::vector.16" = type { %"struct.std::_Vector_base.17" }
%"struct.std::_Vector_base.17" = type { %"struct.std::_Vector_base<dali::OpSpec::InOutDeviceDesc, std::allocator<dali::OpSpec::InOutDeviceDesc>>::_Vector_impl" }
%"struct.std::_Vector_base<dali::OpSpec::InOutDeviceDesc, std::allocator<dali::OpSpec::InOutDeviceDesc>>::_Vector_impl" = type { %"struct.std::_Vector_base<dali::OpSpec::InOutDeviceDesc, std::allocator<dali::OpSpec::InOutDeviceDesc>>::_Vector_impl_data" }
%"struct.std::_Vector_base<dali::OpSpec::InOutDeviceDesc, std::allocator<dali::OpSpec::InOutDeviceDesc>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::map.21" = type { %"class.std::_Rb_tree.22" }
%"class.std::_Rb_tree.22" = type { %"struct.std::_Rb_tree<dali::OpSpec::InOutDeviceDesc, std::pair<const dali::OpSpec::InOutDeviceDesc, int>, std::_Select1st<std::pair<const dali::OpSpec::InOutDeviceDesc, int>>, std::less<void>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<dali::OpSpec::InOutDeviceDesc, std::pair<const dali::OpSpec::InOutDeviceDesc, int>, std::_Select1st<std::pair<const dali::OpSpec::InOutDeviceDesc, int>>, std::less<void>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.dali::SmallVector" = type { %union.anon.61, i64 }
%union.anon.61 = type { %struct.anon, [48 x i8] }
%struct.anon = type { ptr, i64 }
%"class.dali::SmallVector.62" = type { %union.anon.63, i64 }
%union.anon.63 = type { %struct.anon.64, [16 x i8] }
%struct.anon.64 = type { ptr, i64 }
%"struct.dali::graph::DataNode" = type <{ %"struct.std::_List_iterator.95", i8, i8, [6 x i8], %"class.std::__cxx11::basic_string", i32, [4 x i8], %"struct.dali::graph::DataEdge", %"class.dali::SmallVector.96", i8, [7 x i8] }>
%"struct.std::_List_iterator.95" = type { ptr }
%"class.dali::SmallVector.96" = type { %union.anon.99, i64 }
%union.anon.99 = type { %struct.anon.100, [48 x i8] }
%struct.anon.100 = type { ptr, i64 }

@.str.5 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [78 x i8], align 1
@__PRETTY_FUNCTION__._ZN4dali5graph7OpGraph24RemoveDataNodeReferencesERNS0_6OpNodeE = external hidden unnamed_addr constant [62 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [25 x i8], align 1

; 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 nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

; 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
define dso_local void @_ZN4dali5graph7OpGraph24RemoveDataNodeReferencesERNS0_6OpNodeE(ptr noundef nonnull align 8 dereferenceable(184) %0, ptr noundef nonnull align 8 dereferenceable(496) %1) #2 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca %class.anon, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca %"struct.dali::graph::DataEdge", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %16 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = getelementptr inbounds %"struct.dali::graph::OpNode", ptr %17, i32 0, i32 7
  store ptr %18, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = call noundef ptr @_ZN4dali11SmallVectorIPNS_5graph8DataNodeELm8ESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(72) %19)
  store ptr %20, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #5
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = call noundef ptr @_ZN4dali11SmallVectorIPNS_5graph8DataNodeELm8ESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(72) %21)
  store ptr %22, ptr %7, align 8, !tbaa !5
  br label %23

23:                                               ; preds = %58, %2
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = load ptr, ptr %7, align 8, !tbaa !5
  %26 = icmp ne ptr %24, %25
  br i1 %26, label %28, label %27

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

28:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #5
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = load ptr, ptr %29, align 8, !tbaa !5
  store ptr %30, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %31 = load ptr, ptr %8, align 8, !tbaa !5
  %32 = getelementptr inbounds %"struct.dali::graph::DataNode", ptr %31, i32 0, i32 8
  %33 = call noundef ptr @_ZN4dali11SmallVectorINS_5graph8DataEdgeELm4ESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(72) %32)
  %34 = load ptr, ptr %8, align 8, !tbaa !5
  %35 = getelementptr inbounds %"struct.dali::graph::DataNode", ptr %34, i32 0, i32 8
  %36 = call noundef ptr @_ZN4dali11SmallVectorINS_5graph8DataEdgeELm4ESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(72) %35)
  %37 = getelementptr inbounds %class.anon, ptr %10, i32 0, i32 0
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %38, ptr %37, align 8, !tbaa !5
  %39 = getelementptr inbounds %class.anon, ptr %10, i32 0, i32 0
  %40 = load ptr, ptr %39, align 8
  %41 = call noundef ptr @"_ZSt9remove_ifIPN4dali5graph8DataEdgeEZNS1_7OpGraph24RemoveDataNodeReferencesERNS1_6OpNodeEE3$_0ET_S8_S8_T0_"(ptr noundef %33, ptr noundef %36, ptr %40)
  store ptr %41, ptr %9, align 8, !tbaa !5
  %42 = load ptr, ptr %9, align 8, !tbaa !5
  %43 = load ptr, ptr %8, align 8, !tbaa !5
  %44 = getelementptr inbounds %"struct.dali::graph::DataNode", ptr %43, i32 0, i32 8
  %45 = call noundef ptr @_ZN4dali11SmallVectorINS_5graph8DataEdgeELm4ESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(72) %44)
  %46 = icmp ne ptr %42, %45
  br i1 %46, label %47, label %48

47:                                               ; preds = %28
  br label %50

48:                                               ; preds = %28
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.6, i32 noundef 64, ptr noundef @__PRETTY_FUNCTION__._ZN4dali5graph7OpGraph24RemoveDataNodeReferencesERNS0_6OpNodeE) #6
  unreachable

49:                                               ; No predecessors!
  br label %50

50:                                               ; preds = %49, %47
  %51 = load ptr, ptr %8, align 8, !tbaa !5
  %52 = getelementptr inbounds %"struct.dali::graph::DataNode", ptr %51, i32 0, i32 8
  %53 = load ptr, ptr %9, align 8, !tbaa !5
  %54 = load ptr, ptr %8, align 8, !tbaa !5
  %55 = getelementptr inbounds %"struct.dali::graph::DataNode", ptr %54, i32 0, i32 8
  %56 = call noundef ptr @_ZN4dali11SmallVectorINS_5graph8DataEdgeELm4ESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(72) %55)
  %57 = call noundef ptr @_ZN4dali11SmallVectorINS_5graph8DataEdgeELm4ESaIS2_EE5eraseEPKS2_S6_(ptr noundef nonnull align 8 dereferenceable(72) %52, ptr noundef %53, ptr noundef %56)
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #5
  br label %58

58:                                               ; preds = %50
  %59 = load ptr, ptr %6, align 8, !tbaa !5
  %60 = getelementptr inbounds ptr, ptr %59, i32 1
  store ptr %60, ptr %6, align 8, !tbaa !5
  br label %23

61:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %62 = load ptr, ptr %4, align 8, !tbaa !5
  %63 = getelementptr inbounds %"struct.dali::graph::OpNode", ptr %62, i32 0, i32 8
  store ptr %63, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %64 = load ptr, ptr %11, align 8, !tbaa !5
  %65 = call noundef ptr @_ZN4dali11SmallVectorIPNS_5graph8DataNodeELm4ESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(40) %64)
  store ptr %65, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %66 = load ptr, ptr %11, align 8, !tbaa !5
  %67 = call noundef ptr @_ZN4dali11SmallVectorIPNS_5graph8DataNodeELm4ESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(40) %66)
  store ptr %67, ptr %13, align 8, !tbaa !5
  br label %68

68:                                               ; preds = %90, %61
  %69 = load ptr, ptr %12, align 8, !tbaa !5
  %70 = load ptr, ptr %13, align 8, !tbaa !5
  %71 = icmp ne ptr %69, %70
  br i1 %71, label %73, label %72

72:                                               ; preds = %68
  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
  br label %93

73:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %74 = load ptr, ptr %12, align 8, !tbaa !5
  %75 = load ptr, ptr %74, align 8, !tbaa !5
  store ptr %75, ptr %14, align 8, !tbaa !5
  %76 = load ptr, ptr %14, align 8, !tbaa !5
  %77 = getelementptr inbounds %"struct.dali::graph::DataNode", ptr %76, i32 0, i32 7
  %78 = getelementptr inbounds %"struct.dali::graph::DataEdge", ptr %77, i32 0, i32 0
  %79 = load ptr, ptr %78, align 8, !tbaa !9
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  %81 = icmp eq ptr %79, %80
  br i1 %81, label %82, label %83

82:                                               ; preds = %73
  br label %85

83:                                               ; preds = %73
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.6, i32 noundef 69, ptr noundef @__PRETTY_FUNCTION__._ZN4dali5graph7OpGraph24RemoveDataNodeReferencesERNS0_6OpNodeE) #6
  unreachable

84:                                               ; No predecessors!
  br label %85

85:                                               ; preds = %84, %82
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #5
  %86 = getelementptr inbounds %"struct.dali::graph::DataEdge", ptr %15, i32 0, i32 0
  store ptr null, ptr %86, align 8, !tbaa !20
  %87 = getelementptr inbounds %"struct.dali::graph::DataEdge", ptr %15, i32 0, i32 1
  store i32 0, ptr %87, align 8, !tbaa !21
  %88 = load ptr, ptr %14, align 8, !tbaa !5
  %89 = getelementptr inbounds %"struct.dali::graph::DataNode", ptr %88, i32 0, i32 7
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %89, ptr align 8 %15, i64 12, i1 false), !tbaa.struct !22
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %90

90:                                               ; preds = %85
  %91 = load ptr, ptr %12, align 8, !tbaa !5
  %92 = getelementptr inbounds ptr, ptr %91, i32 1
  store ptr %92, ptr %12, align 8, !tbaa !5
  br label %68

93:                                               ; preds = %72
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN4dali11SmallVectorIPNS_5graph8DataNodeELm8ESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(72)) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN4dali11SmallVectorIPNS_5graph8DataNodeELm8ESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(72)) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef ptr @"_ZSt9remove_ifIPN4dali5graph8DataEdgeEZNS1_7OpGraph24RemoveDataNodeReferencesERNS1_6OpNodeEE3$_0ET_S8_S8_T0_"(ptr noundef, ptr noundef, ptr) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN4dali11SmallVectorINS_5graph8DataEdgeELm4ESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(72)) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN4dali11SmallVectorINS_5graph8DataEdgeELm4ESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(72)) #3 align 2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN4dali11SmallVectorINS_5graph8DataEdgeELm4ESaIS2_EE5eraseEPKS2_S6_(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef, ptr noundef) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN4dali11SmallVectorIPNS_5graph8DataNodeELm4ESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(40)) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN4dali11SmallVectorIPNS_5graph8DataNodeELm4ESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(40)) #3 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 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 = { noreturn 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 = { nounwind }
attributes #6 = { noreturn 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, !6, i64 56}
!10 = !{!"_ZTSN4dali5graph8DataNodeE", !11, i64 0, !12, i64 8, !12, i64 9, !13, i64 16, !16, i64 48, !17, i64 56, !19, i64 72, !12, i64 144}
!11 = !{!"_ZTSSt14_List_iteratorIN4dali5graph8DataNodeEE", !6, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !14, i64 0, !15, i64 8, !7, i64 16}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!"_ZTSN4dali13StorageDeviceE", !7, i64 0}
!17 = !{!"_ZTSN4dali5graph8DataEdgeE", !6, i64 0, !18, i64 8}
!18 = !{!"int", !7, i64 0}
!19 = !{!"_ZTSN4dali11SmallVectorINS_5graph8DataEdgeELm4ESaIS2_EEE", !7, i64 0, !15, i64 64}
!20 = !{!17, !6, i64 0}
!21 = !{!17, !18, i64 8}
!22 = !{i64 0, i64 8, !5, i64 8, i64 4, !23}
!23 = !{!18, !18, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str.5 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [78 x i8], align 1
@__PRETTY_FUNCTION__._ZN4dali5graph7OpGraph24RemoveDataNodeReferencesERNS0_6OpNodeE = external hidden unnamed_addr constant [62 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [25 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4dali5graph7OpGraph24RemoveDataNodeReferencesERNS0_6OpNodeE(ptr nocapture noundef nonnull readnone align 8 dereferenceable(184) %0, ptr noundef nonnull align 8 dereferenceable(496) %1) local_unnamed_addr #0 align 2 {
  %3 = getelementptr inbounds i8, ptr %1, i64 384
  %4 = tail call noundef ptr @_ZN4dali11SmallVectorIPNS_5graph8DataNodeELm8ESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(72) %3)
  %5 = tail call noundef ptr @_ZN4dali11SmallVectorIPNS_5graph8DataNodeELm8ESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(72) %3)
  %.not31 = icmp eq ptr %4, %5
  br i1 %.not31, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %16, %2
  %6 = getelementptr inbounds i8, ptr %1, i64 456
  %7 = tail call noundef ptr @_ZN4dali11SmallVectorIPNS_5graph8DataNodeELm4ESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(40) %6)
  %8 = tail call noundef ptr @_ZN4dali11SmallVectorIPNS_5graph8DataNodeELm4ESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(40) %6)
  %.not2933 = icmp eq ptr %7, %8
  br i1 %.not2933, label %._crit_edge37, label %.lr.ph36

.lr.ph:                                           ; preds = %2, %16
  %.032 = phi ptr [ %19, %16 ], [ %4, %2 ]
  %9 = load ptr, ptr %.032, align 8, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %9, i64 72
  %11 = tail call noundef ptr @_ZN4dali11SmallVectorINS_5graph8DataEdgeELm4ESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(72) %10)
  %12 = tail call noundef ptr @_ZN4dali11SmallVectorINS_5graph8DataEdgeELm4ESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(72) %10)
  %13 = tail call noundef ptr @"_ZSt9remove_ifIPN4dali5graph8DataEdgeEZNS1_7OpGraph24RemoveDataNodeReferencesERNS1_6OpNodeEE3$_0ET_S8_S8_T0_"(ptr noundef %11, ptr noundef %12, ptr nonnull %1)
  %14 = tail call noundef ptr @_ZN4dali11SmallVectorINS_5graph8DataEdgeELm4ESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(72) %10)
  %.not30 = icmp eq ptr %13, %14
  br i1 %.not30, label %15, label %16

15:                                               ; preds = %.lr.ph
  tail call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.6, i32 noundef 64, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN4dali5graph7OpGraph24RemoveDataNodeReferencesERNS0_6OpNodeE) #3
  unreachable

16:                                               ; preds = %.lr.ph
  %17 = tail call noundef ptr @_ZN4dali11SmallVectorINS_5graph8DataEdgeELm4ESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(72) %10)
  %18 = tail call noundef ptr @_ZN4dali11SmallVectorINS_5graph8DataEdgeELm4ESaIS2_EE5eraseEPKS2_S6_(ptr noundef nonnull align 8 dereferenceable(72) %10, ptr noundef %13, ptr noundef %17)
  %19 = getelementptr inbounds i8, ptr %.032, i64 8
  %.not = icmp eq ptr %19, %5
  br i1 %.not, label %._crit_edge, label %.lr.ph

._crit_edge37:                                    ; preds = %25, %._crit_edge
  ret void

.lr.ph36:                                         ; preds = %._crit_edge, %25
  %.02734 = phi ptr [ %26, %25 ], [ %7, %._crit_edge ]
  %20 = load ptr, ptr %.02734, align 8, !tbaa !5
  %21 = getelementptr inbounds i8, ptr %20, i64 56
  %22 = load ptr, ptr %21, align 8, !tbaa !9
  %23 = icmp eq ptr %22, %1
  br i1 %23, label %25, label %24

24:                                               ; preds = %.lr.ph36
  tail call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.6, i32 noundef 69, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN4dali5graph7OpGraph24RemoveDataNodeReferencesERNS0_6OpNodeE) #3
  unreachable

25:                                               ; preds = %.lr.ph36
  store ptr null, ptr %21, align 8, !tbaa !5
  %.sroa.4.0..sroa_idx = getelementptr inbounds i8, ptr %20, i64 64
  store i32 0, ptr %.sroa.4.0..sroa_idx, align 8, !tbaa !20
  %26 = getelementptr inbounds i8, ptr %.02734, i64 8
  %.not29 = icmp eq ptr %26, %8
  br i1 %.not29, label %._crit_edge37, label %.lr.ph36
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN4dali11SmallVectorIPNS_5graph8DataNodeELm8ESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN4dali11SmallVectorIPNS_5graph8DataNodeELm8ESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare hidden noundef ptr @"_ZSt9remove_ifIPN4dali5graph8DataEdgeEZNS1_7OpGraph24RemoveDataNodeReferencesERNS1_6OpNodeEE3$_0ET_S8_S8_T0_"(ptr noundef, ptr noundef, ptr) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN4dali11SmallVectorINS_5graph8DataEdgeELm4ESaIS2_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN4dali11SmallVectorINS_5graph8DataEdgeELm4ESaIS2_EE3endEv(ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #1 align 2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN4dali11SmallVectorINS_5graph8DataEdgeELm4ESaIS2_EE5eraseEPKS2_S6_(ptr noundef nonnull align 8 dereferenceable(72), ptr noundef, ptr noundef) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN4dali11SmallVectorIPNS_5graph8DataNodeELm4ESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN4dali11SmallVectorIPNS_5graph8DataNodeELm4ESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #1 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 = { 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 #2 = { noreturn 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 #3 = { noreturn 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, !6, i64 56}
!10 = !{!"_ZTSN4dali5graph8DataNodeE", !11, i64 0, !12, i64 8, !12, i64 9, !13, i64 16, !16, i64 48, !17, i64 56, !19, i64 72, !12, i64 144}
!11 = !{!"_ZTSSt14_List_iteratorIN4dali5graph8DataNodeEE", !6, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !14, i64 0, !15, i64 8, !7, i64 16}
!14 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!15 = !{!"long", !7, i64 0}
!16 = !{!"_ZTSN4dali13StorageDeviceE", !7, i64 0}
!17 = !{!"_ZTSN4dali5graph8DataEdgeE", !6, i64 0, !18, i64 8}
!18 = !{!"int", !7, i64 0}
!19 = !{!"_ZTSN4dali11SmallVectorINS_5graph8DataEdgeELm4ESaIS2_EEE", !7, i64 0, !15, i64 64}
!20 = !{!18, !18, i64 0}


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