; LLVM IR from apache/mxnet :: src/lib_api.ll (ZNK5mxnet3ext5Graph3DFSESt8functionIFvPNS0_4NodeEEE)

; 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.std::unordered_set" = type { %"class.std::_Hashtable.79" }
%"class.std::_Hashtable.79" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.__gnu_cxx::__normal_iterator.75" = type { ptr }
%"struct.std::pair.99" = type <{ %"struct.std::__detail::_Node_iterator.101", i8, [7 x i8] }>
%"struct.std::__detail::_Node_iterator.101" = type { %"struct.std::__detail::_Node_iterator_base.102" }
%"struct.std::__detail::_Node_iterator_base.102" = type { ptr }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%"class.mxnet::ext::Graph" = type { %"class.std::vector.47", %"class.std::vector.23", %"class.std::map.52", %"class.std::vector.47", ptr }
%"class.std::vector.23" = type { %"struct.std::_Vector_base.24" }
%"struct.std::_Vector_base.24" = type { %"struct.std::_Vector_base<mxnet::ext::NodeEntry, std::allocator<mxnet::ext::NodeEntry>>::_Vector_impl" }
%"struct.std::_Vector_base<mxnet::ext::NodeEntry, std::allocator<mxnet::ext::NodeEntry>>::_Vector_impl" = type { %"struct.std::_Vector_base<mxnet::ext::NodeEntry, std::allocator<mxnet::ext::NodeEntry>>::_Vector_impl_data" }
%"struct.std::_Vector_base<mxnet::ext::NodeEntry, std::allocator<mxnet::ext::NodeEntry>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::map.52" = type { %"class.std::_Rb_tree.53" }
%"class.std::_Rb_tree.53" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, mxnet::ext::JsonVal>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, mxnet::ext::JsonVal>>, std::less<std::__cxx11::basic_string<char>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, mxnet::ext::JsonVal>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, mxnet::ext::JsonVal>>, std::less<std::__cxx11::basic_string<char>>>::_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::vector.47" = type { %"struct.std::_Vector_base.48" }
%"struct.std::_Vector_base.48" = type { %"struct.std::_Vector_base<mxnet::ext::Node *, std::allocator<mxnet::ext::Node *>>::_Vector_impl" }
%"struct.std::_Vector_base<mxnet::ext::Node *, std::allocator<mxnet::ext::Node *>>::_Vector_impl" = type { %"struct.std::_Vector_base<mxnet::ext::Node *, std::allocator<mxnet::ext::Node *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<mxnet::ext::Node *, std::allocator<mxnet::ext::Node *>>::_Vector_impl_data" = type { ptr, ptr, 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK5mxnet3ext5Graph9_dfs_utilEPNS0_4NodeEPSt13unordered_setIS3_St4hashIS3_ESt8equal_toIS3_ESaIS3_EESt8functionIFvS3_EE(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef, ptr noundef, ptr noundef) #3 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK5mxnet3ext5Graph3DFSESt8functionIFvPNS0_4NodeEEE(ptr noundef nonnull align 8 dereferenceable(128) %0, ptr noundef %1) #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.std::unordered_set", align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.75", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.75", align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"struct.std::pair.99", align 8
  %13 = alloca ptr, align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator.75", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator.75", align 8
  %16 = alloca ptr, align 8
  %17 = alloca %"class.std::function", align 8
  %18 = alloca %"struct.std::__detail::_Node_iterator.101", align 8
  %19 = alloca %"class.std::function", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %20 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 56, ptr %5) #4
  call void @_ZNSt13unordered_setIPN5mxnet3ext4NodeESt4hashIS3_ESt8equal_toIS3_ESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %5) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %21 = getelementptr inbounds %"class.mxnet::ext::Graph", ptr %20, i32 0, i32 3
  store ptr %21, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = call ptr @_ZNKSt6vectorIPN5mxnet3ext4NodeESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %22) #4
  %24 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.75", ptr %7, i32 0, i32 0
  store ptr %23, ptr %24, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  %26 = call ptr @_ZNKSt6vectorIPN5mxnet3ext4NodeESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %25) #4
  %27 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.75", ptr %8, i32 0, i32 0
  store ptr %26, ptr %27, align 8
  br label %28

28:                                               ; preds = %40, %2
  %29 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKPN5mxnet3ext4NodeESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESF_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  br i1 %29, label %31, label %30

30:                                               ; preds = %28
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  br label %46

31:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKPN5mxnet3ext4NodeESt6vectorIS4_SaIS4_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  store ptr %32, ptr %9, align 8, !tbaa !5
  %33 = load ptr, ptr %9, align 8, !tbaa !5
  %34 = invoke { ptr, i8 } @_ZNSt13unordered_setIPN5mxnet3ext4NodeESt4hashIS3_ESt8equal_toIS3_ESaIS3_EE6insertERKS3_(ptr noundef nonnull align 8 dereferenceable(56) %5, ptr noundef nonnull align 8 dereferenceable(8) %33)
          to label %35 unwind label %42

35:                                               ; preds = %31
  %36 = getelementptr inbounds { ptr, i8 }, ptr %12, i32 0, i32 0
  %37 = extractvalue { ptr, i8 } %34, 0
  store ptr %37, ptr %36, align 8
  %38 = getelementptr inbounds { ptr, i8 }, ptr %12, i32 0, i32 1
  %39 = extractvalue { ptr, i8 } %34, 1
  store i8 %39, ptr %38, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br label %40

40:                                               ; preds = %35
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKPN5mxnet3ext4NodeESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  br label %28

42:                                               ; preds = %31
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %10, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  br label %102

46:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #4
  %47 = getelementptr inbounds %"class.mxnet::ext::Graph", ptr %20, i32 0, i32 0
  store ptr %47, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  %48 = load ptr, ptr %13, align 8, !tbaa !5
  %49 = call ptr @_ZNKSt6vectorIPN5mxnet3ext4NodeESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %48) #4
  %50 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.75", ptr %14, i32 0, i32 0
  store ptr %49, ptr %50, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %51 = load ptr, ptr %13, align 8, !tbaa !5
  %52 = call ptr @_ZNKSt6vectorIPN5mxnet3ext4NodeESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %51) #4
  %53 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.75", ptr %15, i32 0, i32 0
  store ptr %52, ptr %53, align 8
  br label %54

54:                                               ; preds = %77, %46
  %55 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKPN5mxnet3ext4NodeESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESF_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #4
  br i1 %55, label %57, label %56

56:                                               ; preds = %54
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br label %80

57:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKPN5mxnet3ext4NodeESt6vectorIS4_SaIS4_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #4
  store ptr %58, ptr %16, align 8, !tbaa !5
  %59 = load ptr, ptr %16, align 8, !tbaa !5
  %60 = invoke noundef i64 @_ZNKSt13unordered_setIPN5mxnet3ext4NodeESt4hashIS3_ESt8equal_toIS3_ESaIS3_EE5countERKS3_(ptr noundef nonnull align 8 dereferenceable(56) %5, ptr noundef nonnull align 8 dereferenceable(8) %59)
          to label %61 unwind label %68

61:                                               ; preds = %57
  %62 = icmp ne i64 %60, 0
  br i1 %62, label %63, label %76

63:                                               ; preds = %61
  %64 = load ptr, ptr %16, align 8, !tbaa !5
  %65 = load ptr, ptr %64, align 8, !tbaa !5
  invoke void @_ZNSt8functionIFvPN5mxnet3ext4NodeEEEC2ERKS5_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef nonnull align 8 dereferenceable(32) %1)
          to label %66 unwind label %68

66:                                               ; preds = %63
  invoke void @_ZNK5mxnet3ext5Graph9_dfs_utilEPNS0_4NodeEPSt13unordered_setIS3_St4hashIS3_ESt8equal_toIS3_ESaIS3_EESt8functionIFvS3_EE(ptr noundef nonnull align 8 dereferenceable(128) %20, ptr noundef %65, ptr noundef %5, ptr noundef %17)
          to label %67 unwind label %72

67:                                               ; preds = %66
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #4
  br label %76

68:                                               ; preds = %63, %57
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %10, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %11, align 4
  br label %79

72:                                               ; preds = %66
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %10, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %11, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #4
  br label %79

76:                                               ; preds = %67, %61
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  br label %77

77:                                               ; preds = %76
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKPN5mxnet3ext4NodeESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %14) #4
  br label %54

79:                                               ; preds = %72, %68
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  br label %102

80:                                               ; preds = %56
  br label %81

81:                                               ; preds = %91, %80
  %82 = call noundef i64 @_ZNKSt13unordered_setIPN5mxnet3ext4NodeESt4hashIS3_ESt8equal_toIS3_ESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(56) %5) #4
  %83 = icmp ugt i64 %82, 0
  br i1 %83, label %84, label %101

84:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  %85 = call ptr @_ZNSt13unordered_setIPN5mxnet3ext4NodeESt4hashIS3_ESt8equal_toIS3_ESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %5) #4
  %86 = getelementptr inbounds %"struct.std::__detail::_Node_iterator.101", ptr %18, i32 0, i32 0
  %87 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base.102", ptr %86, i32 0, i32 0
  store ptr %85, ptr %87, align 8
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt8__detail14_Node_iteratorIPN5mxnet3ext4NodeELb1ELb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #4
  %89 = load ptr, ptr %88, align 8, !tbaa !5
  invoke void @_ZNSt8functionIFvPN5mxnet3ext4NodeEEEC2ERKS5_(ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef nonnull align 8 dereferenceable(32) %1)
          to label %90 unwind label %92

90:                                               ; preds = %84
  invoke void @_ZNK5mxnet3ext5Graph9_dfs_utilEPNS0_4NodeEPSt13unordered_setIS3_St4hashIS3_ESt8equal_toIS3_ESaIS3_EESt8functionIFvS3_EE(ptr noundef nonnull align 8 dereferenceable(128) %20, ptr noundef %89, ptr noundef %5, ptr noundef %19)
          to label %91 unwind label %96

91:                                               ; preds = %90
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  br label %81, !llvm.loop !9

92:                                               ; preds = %84
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %10, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %11, align 4
  br label %100

96:                                               ; preds = %90
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %10, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %11, align 4
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #4
  br label %100

100:                                              ; preds = %96, %92
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  br label %102

101:                                              ; preds = %81
  call void @_ZNSt13unordered_setIPN5mxnet3ext4NodeESt4hashIS3_ESt8equal_toIS3_ESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %5) #4
  call void @llvm.lifetime.end.p0(i64 56, ptr %5) #4
  ret void

102:                                              ; preds = %100, %79, %42
  call void @_ZNSt13unordered_setIPN5mxnet3ext4NodeESt4hashIS3_ESt8equal_toIS3_ESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %5) #4
  call void @llvm.lifetime.end.p0(i64 56, ptr %5) #4
  br label %103

103:                                              ; preds = %102
  %104 = load ptr, ptr %10, align 8
  %105 = load i32, ptr %11, align 4
  %106 = insertvalue { ptr, i32 } poison, ptr %104, 0
  %107 = insertvalue { ptr, i32 } %106, i32 %105, 1
  resume { ptr, i32 } %107
}

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt13unordered_setIPN5mxnet3ext4NodeESt4hashIS3_ESt8equal_toIS3_ESaIS3_EE6insertERKS3_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(8)) #3 align 2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt13unordered_setIPN5mxnet3ext4NodeESt4hashIS3_ESt8equal_toIS3_ESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #2 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 = { 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 #3 = { 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 = { 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 = distinct !{!9, !10}
!10 = !{!"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.std::unordered_set" = type { %"class.std::_Hashtable.79" }
%"class.std::_Hashtable.79" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.__gnu_cxx::__normal_iterator.75" = type { ptr }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%"struct.std::__detail::_Node_iterator.101" = type { %"struct.std::__detail::_Node_iterator_base.102" }
%"struct.std::__detail::_Node_iterator_base.102" = type { 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK5mxnet3ext5Graph9_dfs_utilEPNS0_4NodeEPSt13unordered_setIS3_St4hashIS3_ESt8equal_toIS3_ESaIS3_EESt8functionIFvS3_EE(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK5mxnet3ext5Graph3DFSESt8functionIFvPNS0_4NodeEEE(ptr noundef nonnull align 8 dereferenceable(128) %0, ptr noundef %1) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::unordered_set", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator.75", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator.75", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator.75", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.75", align 8
  %8 = alloca %"class.std::function", align 8
  %9 = alloca %"struct.std::__detail::_Node_iterator.101", align 8
  %10 = alloca %"class.std::function", align 8
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %3) #4
  call void @_ZNSt13unordered_setIPN5mxnet3ext4NodeESt4hashIS3_ESt8equal_toIS3_ESaIS3_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %3) #4
  %11 = getelementptr inbounds i8, ptr %0, i64 96
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %12 = call ptr @_ZNKSt6vectorIPN5mxnet3ext4NodeESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  store ptr %12, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  %13 = call ptr @_ZNKSt6vectorIPN5mxnet3ext4NodeESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  store ptr %13, ptr %5, align 8
  %14 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKPN5mxnet3ext4NodeESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESF_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  br i1 %14, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %20, %2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  %15 = call ptr @_ZNKSt6vectorIPN5mxnet3ext4NodeESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  store ptr %15, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  %16 = call ptr @_ZNKSt6vectorIPN5mxnet3ext4NodeESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  store ptr %16, ptr %7, align 8
  %17 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKPN5mxnet3ext4NodeESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESF_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  br i1 %17, label %.lr.ph19, label %._crit_edge20

.lr.ph:                                           ; preds = %2, %20
  %18 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKPN5mxnet3ext4NodeESt6vectorIS4_SaIS4_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %19 = invoke { ptr, i8 } @_ZNSt13unordered_setIPN5mxnet3ext4NodeESt4hashIS3_ESt8equal_toIS3_ESaIS3_EE6insertERKS3_(ptr noundef nonnull align 8 dereferenceable(56) %3, ptr noundef nonnull align 8 dereferenceable(8) %18)
          to label %20 unwind label %23

20:                                               ; preds = %.lr.ph
  %21 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKPN5mxnet3ext4NodeESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %22 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKPN5mxnet3ext4NodeESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESF_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  br i1 %22, label %.lr.ph, label %._crit_edge

23:                                               ; preds = %.lr.ph
  %24 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  br label %52

._crit_edge20:                                    ; preds = %37, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  %25 = call noundef i64 @_ZNKSt13unordered_setIPN5mxnet3ext4NodeESt4hashIS3_ESt8equal_toIS3_ESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(56) %3) #4
  %.not21 = icmp eq i64 %25, 0
  br i1 %.not21, label %._crit_edge24, label %.lr.ph23

.lr.ph19:                                         ; preds = %._crit_edge, %37
  %26 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKPN5mxnet3ext4NodeESt6vectorIS4_SaIS4_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  %27 = invoke noundef i64 @_ZNKSt13unordered_setIPN5mxnet3ext4NodeESt4hashIS3_ESt8equal_toIS3_ESaIS3_EE5countERKS3_(ptr noundef nonnull align 8 dereferenceable(56) %3, ptr noundef nonnull align 8 dereferenceable(8) %26)
          to label %28 unwind label %33

28:                                               ; preds = %.lr.ph19
  %.not13 = icmp eq i64 %27, 0
  br i1 %.not13, label %37, label %29

29:                                               ; preds = %28
  %30 = load ptr, ptr %26, align 8, !tbaa !5
  invoke void @_ZNSt8functionIFvPN5mxnet3ext4NodeEEEC2ERKS5_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull align 8 dereferenceable(32) %1)
          to label %31 unwind label %33

31:                                               ; preds = %29
  invoke void @_ZNK5mxnet3ext5Graph9_dfs_utilEPNS0_4NodeEPSt13unordered_setIS3_St4hashIS3_ESt8equal_toIS3_ESaIS3_EESt8functionIFvS3_EE(ptr noundef nonnull align 8 dereferenceable(128) %0, ptr noundef %30, ptr noundef nonnull %3, ptr noundef nonnull %8)
          to label %32 unwind label %35

32:                                               ; preds = %31
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #4
  br label %37

33:                                               ; preds = %29, %.lr.ph19
  %34 = landingpad { ptr, i32 }
          cleanup
  br label %40

35:                                               ; preds = %31
  %36 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #4
  br label %40

37:                                               ; preds = %32, %28
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKPN5mxnet3ext4NodeESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  %39 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKPN5mxnet3ext4NodeESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESF_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  br i1 %39, label %.lr.ph19, label %._crit_edge20

40:                                               ; preds = %35, %33
  %.pn14 = phi { ptr, i32 } [ %36, %35 ], [ %34, %33 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #4
  br label %52

.lr.ph23:                                         ; preds = %._crit_edge20, %45
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #4
  %41 = call ptr @_ZNSt13unordered_setIPN5mxnet3ext4NodeESt4hashIS3_ESt8equal_toIS3_ESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %3) #4
  store ptr %41, ptr %9, align 8
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt8__detail14_Node_iteratorIPN5mxnet3ext4NodeELb1ELb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %9) #4
  %43 = load ptr, ptr %42, align 8, !tbaa !5
  invoke void @_ZNSt8functionIFvPN5mxnet3ext4NodeEEEC2ERKS5_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull align 8 dereferenceable(32) %1)
          to label %44 unwind label %47

44:                                               ; preds = %.lr.ph23
  invoke void @_ZNK5mxnet3ext5Graph9_dfs_utilEPNS0_4NodeEPSt13unordered_setIS3_St4hashIS3_ESt8equal_toIS3_ESaIS3_EESt8functionIFvS3_EE(ptr noundef nonnull align 8 dereferenceable(128) %0, ptr noundef %43, ptr noundef nonnull %3, ptr noundef nonnull %10)
          to label %45 unwind label %49

45:                                               ; preds = %44
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  %46 = call noundef i64 @_ZNKSt13unordered_setIPN5mxnet3ext4NodeESt4hashIS3_ESt8equal_toIS3_ESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(56) %3) #4
  %.not = icmp eq i64 %46, 0
  br i1 %.not, label %._crit_edge24, label %.lr.ph23, !llvm.loop !9

47:                                               ; preds = %.lr.ph23
  %48 = landingpad { ptr, i32 }
          cleanup
  br label %51

49:                                               ; preds = %44
  %50 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt14_Function_baseD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #4
  br label %51

51:                                               ; preds = %49, %47
  %.pn = phi { ptr, i32 } [ %50, %49 ], [ %48, %47 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  br label %52

._crit_edge24:                                    ; preds = %45, %._crit_edge20
  call void @_ZNSt13unordered_setIPN5mxnet3ext4NodeESt4hashIS3_ESt8equal_toIS3_ESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %3) #4
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %3) #4
  ret void

52:                                               ; preds = %51, %40, %23
  %.pn16 = phi { ptr, i32 } [ %24, %23 ], [ %.pn14, %40 ], [ %.pn, %51 ]
  call void @_ZNSt13unordered_setIPN5mxnet3ext4NodeESt4hashIS3_ESt8equal_toIS3_ESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %3) #4
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %3) #4
  resume { ptr, i32 } %.pn16
}

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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt13unordered_setIPN5mxnet3ext4NodeESt4hashIS3_ESt8equal_toIS3_ESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #2 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 = { 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 #3 = { 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 = { 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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}


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