; LLVM IR from AdaptiveCpp/AdaptiveCpp :: src/runtime/dag_node.ll (ZN7hipsycl2rt8dag_node24mark_virtually_submittedEv)

; 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::shared_ptr.4" = type { %"class.std::__shared_ptr.5" }
%"class.std::__shared_ptr.5" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::vector.15" = type { %"struct.std::_Vector_base.16" }
%"struct.std::_Vector_base.16" = type { %"struct.std::_Vector_base<std::shared_ptr<hipsycl::rt::dag_node_event>, std::allocator<std::shared_ptr<hipsycl::rt::dag_node_event>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<hipsycl::rt::dag_node_event>, std::allocator<std::shared_ptr<hipsycl::rt::dag_node_event>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<hipsycl::rt::dag_node_event>, std::allocator<std::shared_ptr<hipsycl::rt::dag_node_event>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<hipsycl::rt::dag_node_event>, std::allocator<std::shared_ptr<hipsycl::rt::dag_node_event>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.20" = type { ptr }
%"class.std::weak_ptr" = type { %"class.std::__weak_ptr" }
%"class.std::__weak_ptr" = type { ptr, %"class.std::__weak_count" }
%"class.std::__weak_count" = type { ptr }
%"class.std::shared_ptr.12" = type { %"class.std::__shared_ptr.13" }
%"class.std::__shared_ptr.13" = type { ptr, %"class.std::__shared_count" }
%"class.std::shared_ptr.21" = type { %"class.std::__shared_ptr.22" }
%"class.std::__shared_ptr.22" = type { ptr, %"class.std::__shared_count" }
%"class.hipsycl::rt::dag_node" = type { %"class.hipsycl::rt::execution_hints", %"class.sbo::small_vector", %"class.hipsycl::rt::device_id", ptr, ptr, i64, %"class.std::shared_ptr.4", %"class.std::unique_ptr", %"class.std::unique_ptr", %"struct.std::atomic", %"struct.std::atomic", i8, %"struct.std::atomic", ptr }
%"class.hipsycl::rt::execution_hints" = type <{ %"class.hipsycl::rt::hints::bind_to_device", [4 x i8], %"class.hipsycl::rt::hints::bind_to_device_group", %"class.hipsycl::rt::hints::prefer_execution_lane", %"class.hipsycl::rt::hints::node_group", %"class.hipsycl::rt::hints::coarse_grained_synchronization", [7 x i8], %"class.hipsycl::rt::hints::prefer_executor", %"class.hipsycl::rt::hints::request_instrumentation_submission_timestamp", %"class.hipsycl::rt::hints::request_instrumentation_start_timestamp", %"class.hipsycl::rt::hints::request_instrumentation_finish_timestamp", %"class.hipsycl::rt::hints::instant_execution", [4 x i8] }>
%"class.hipsycl::rt::hints::bind_to_device" = type { %"class.hipsycl::rt::hints::execution_hint", %"class.hipsycl::rt::device_id" }
%"class.hipsycl::rt::hints::execution_hint" = type { i8 }
%"class.hipsycl::rt::hints::bind_to_device_group" = type { %"class.hipsycl::rt::hints::execution_hint", %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<hipsycl::rt::device_id, std::allocator<hipsycl::rt::device_id>>::_Vector_impl" }
%"struct.std::_Vector_base<hipsycl::rt::device_id, std::allocator<hipsycl::rt::device_id>>::_Vector_impl" = type { %"struct.std::_Vector_base<hipsycl::rt::device_id, std::allocator<hipsycl::rt::device_id>>::_Vector_impl_data" }
%"struct.std::_Vector_base<hipsycl::rt::device_id, std::allocator<hipsycl::rt::device_id>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.hipsycl::rt::hints::prefer_execution_lane" = type { %"class.hipsycl::rt::hints::execution_hint", i64 }
%"class.hipsycl::rt::hints::node_group" = type { %"class.hipsycl::rt::hints::execution_hint", i64 }
%"class.hipsycl::rt::hints::coarse_grained_synchronization" = type { %"class.hipsycl::rt::hints::execution_hint" }
%"class.hipsycl::rt::hints::prefer_executor" = type { %"class.hipsycl::rt::hints::execution_hint", ptr, %"class.std::shared_ptr" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.hipsycl::rt::hints::request_instrumentation_submission_timestamp" = type { %"class.hipsycl::rt::hints::execution_hint" }
%"class.hipsycl::rt::hints::request_instrumentation_start_timestamp" = type { %"class.hipsycl::rt::hints::execution_hint" }
%"class.hipsycl::rt::hints::request_instrumentation_finish_timestamp" = type { %"class.hipsycl::rt::hints::execution_hint" }
%"class.hipsycl::rt::hints::instant_execution" = type { %"class.hipsycl::rt::hints::execution_hint" }
%"class.sbo::small_vector" = type { %"class.std::vector.2" }
%"class.std::vector.2" = type { %"struct.std::_Vector_base.3" }
%"struct.std::_Vector_base.3" = type { %"struct.std::_Vector_base<std::weak_ptr<hipsycl::rt::dag_node>, sbo::small_buffer_vector_allocator<std::weak_ptr<hipsycl::rt::dag_node>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::weak_ptr<hipsycl::rt::dag_node>, sbo::small_buffer_vector_allocator<std::weak_ptr<hipsycl::rt::dag_node>>>::_Vector_impl" = type { %"struct.sbo::small_buffer_vector_allocator.base", %"struct.std::_Vector_base<std::weak_ptr<hipsycl::rt::dag_node>, sbo::small_buffer_vector_allocator<std::weak_ptr<hipsycl::rt::dag_node>>>::_Vector_impl_data" }
%"struct.sbo::small_buffer_vector_allocator.base" = type { [128 x i8], i8, i8 }
%"struct.std::_Vector_base<std::weak_ptr<hipsycl::rt::dag_node>, sbo::small_buffer_vector_allocator<std::weak_ptr<hipsycl::rt::dag_node>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.hipsycl::rt::device_id" = type { %"struct.hipsycl::rt::backend_descriptor", i32 }
%"struct.hipsycl::rt::backend_descriptor" = type { i32, i32, i32 }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.1" }
%"struct.std::_Head_base.1" = type { ptr }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i8 }

@.str = external hidden unnamed_addr constant [18 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [82 x i8], align 1
@__PRETTY_FUNCTION__._ZN7hipsycl2rt8dag_node24mark_virtually_submittedEv = external hidden unnamed_addr constant [55 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

declare i32 @__gxx_personality_v0(...)

; 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 noundef zeroext i1 @_ZNK7hipsycl2rt8dag_node12is_submittedEv(ptr noundef nonnull align 8 dereferenceable(384)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK7hipsycl2rt8dag_node9get_eventEv(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.4") align 8, ptr noundef nonnull align 8 dereferenceable(384)) #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7hipsycl2rt8dag_node24mark_virtually_submittedEv(ptr noundef nonnull align 8 dereferenceable(384) %0) #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %"class.std::vector.15", align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.20", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.20", align 8
  %9 = alloca %"class.std::weak_ptr", align 8
  %10 = alloca %"class.std::shared_ptr.12", align 8
  %11 = alloca %"class.std::shared_ptr.4", align 8
  %12 = alloca %"class.std::shared_ptr.4", align 8
  %13 = alloca %"class.std::shared_ptr.21", align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %14 = load ptr, ptr %2, align 8
  %15 = getelementptr inbounds %"class.hipsycl::rt::dag_node", ptr %14, i32 0, i32 11
  store i8 1, ptr %15, align 2, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %3) #6
  call void @_ZNSt6vectorISt10shared_ptrIN7hipsycl2rt14dag_node_eventEESaIS4_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  %16 = invoke noundef nonnull align 8 dereferenceable(160) ptr @_ZNK7hipsycl2rt8dag_node16get_requirementsEv(ptr noundef nonnull align 8 dereferenceable(384) %14)
          to label %17 unwind label %27

17:                                               ; preds = %1
  store ptr %16, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = call ptr @_ZNKSt6vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(160) %18) #6
  %20 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.20", ptr %7, i32 0, i32 0
  store ptr %19, ptr %20, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %21 = load ptr, ptr %4, align 8, !tbaa !5
  %22 = call ptr @_ZNKSt6vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(160) %21) #6
  %23 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.20", ptr %8, i32 0, i32 0
  store ptr %22, ptr %23, align 8
  br label %24

24:                                               ; preds = %54, %17
  %25 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKSt8weak_ptrIN7hipsycl2rt8dag_nodeEESt6vectorIS5_N3sbo29small_buffer_vector_allocatorIS5_Lm8ES5_EEEEEbRKNS_17__normal_iteratorIT_T0_EESI_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #6
  br i1 %25, label %31, label %26

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

27:                                               ; preds = %1
  %28 = landingpad { ptr, i32 }
          cleanup
  %29 = extractvalue { ptr, i32 } %28, 0
  store ptr %29, ptr %5, align 8
  %30 = extractvalue { ptr, i32 } %28, 1
  store i32 %30, ptr %6, align 4
  br label %56

31:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #6
  %32 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKSt8weak_ptrIN7hipsycl2rt8dag_nodeEESt6vectorIS5_N3sbo29small_buffer_vector_allocatorIS5_Lm8ES5_EEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  call void @_ZNSt8weak_ptrIN7hipsycl2rt8dag_nodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(16) %32) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #6
  call void @_ZNKSt8weak_ptrIN7hipsycl2rt8dag_nodeEE4lockEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.12") align 8 %10, ptr noundef nonnull align 8 dereferenceable(16) %9) #6
  %33 = call noundef zeroext i1 @_ZNKSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EEcvbEv(ptr noundef nonnull align 8 dereferenceable(16) %10) #6
  br i1 %33, label %34, label %53

34:                                               ; preds = %31
  %35 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %10) #6
  %36 = call noundef zeroext i1 @_ZNK7hipsycl2rt8dag_node12is_submittedEv(ptr noundef nonnull align 8 dereferenceable(384) %35)
  br i1 %36, label %37, label %38

37:                                               ; preds = %34
  br label %40

38:                                               ; preds = %34
  call void @__assert_fail(ptr noundef @.str, ptr noundef @.str.1, i32 noundef 78, ptr noundef @__PRETTY_FUNCTION__._ZN7hipsycl2rt8dag_node24mark_virtually_submittedEv) #7
  unreachable

39:                                               ; No predecessors!
  br label %40

40:                                               ; preds = %39, %37
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #6
  %41 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %10) #6
  invoke void @_ZNK7hipsycl2rt8dag_node9get_eventEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.4") align 8 %11, ptr noundef nonnull align 8 dereferenceable(384) %41)
          to label %42 unwind label %44

42:                                               ; preds = %40
  invoke void @_ZNSt6vectorISt10shared_ptrIN7hipsycl2rt14dag_node_eventEESaIS4_EE9push_backEOS4_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(16) %11)
          to label %43 unwind label %48

43:                                               ; preds = %42
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt14dag_node_eventELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #6
  br label %53

44:                                               ; preds = %40
  %45 = landingpad { ptr, i32 }
          cleanup
  %46 = extractvalue { ptr, i32 } %45, 0
  store ptr %46, ptr %5, align 8
  %47 = extractvalue { ptr, i32 } %45, 1
  store i32 %47, ptr %6, align 4
  br label %52

48:                                               ; preds = %42
  %49 = landingpad { ptr, i32 }
          cleanup
  %50 = extractvalue { ptr, i32 } %49, 0
  store ptr %50, ptr %5, align 8
  %51 = extractvalue { ptr, i32 } %49, 1
  store i32 %51, ptr %6, align 4
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt14dag_node_eventELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #6
  br label %52

52:                                               ; preds = %48, %44
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #6
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #6
  call void @_ZNSt10__weak_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %56

53:                                               ; preds = %43, %31
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #6
  call void @_ZNSt10__weak_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #6
  br label %54

54:                                               ; preds = %53
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKSt8weak_ptrIN7hipsycl2rt8dag_nodeEESt6vectorIS5_N3sbo29small_buffer_vector_allocatorIS5_Lm8ES5_EEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  br label %24

56:                                               ; preds = %52, %27
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  br label %63

57:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #6
  invoke void @_ZSt11make_sharedIN7hipsycl2rt20dag_multi_node_eventEJRSt6vectorISt10shared_ptrINS1_14dag_node_eventEESaIS6_EEEES4_INSt9enable_ifIXntsr8is_arrayIT_EE5valueESB_E4typeEEDpOT0_(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.21") align 8 %13, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %58 unwind label %59

58:                                               ; preds = %57
  call void @_ZNSt10shared_ptrIN7hipsycl2rt14dag_node_eventEEC2INS1_20dag_multi_node_eventEvEEOS_IT_E(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(16) %13) #6
  call void @_ZN7hipsycl2rt8dag_node14mark_submittedESt10shared_ptrINS0_14dag_node_eventEE(ptr noundef nonnull align 8 dereferenceable(384) %14, ptr noundef %12)
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt14dag_node_eventELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #6
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt20dag_multi_node_eventELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #6
  call void @_ZNSt6vectorISt10shared_ptrIN7hipsycl2rt14dag_node_eventEESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #6
  ret void

59:                                               ; preds = %57
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %5, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %6, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #6
  br label %63

63:                                               ; preds = %59, %56
  call void @_ZNSt6vectorISt10shared_ptrIN7hipsycl2rt14dag_node_eventEESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %3) #6
  br label %64

64:                                               ; preds = %63
  %65 = load ptr, ptr %5, align 8
  %66 = load i32, ptr %6, align 4
  %67 = insertvalue { ptr, i32 } poison, ptr %65, 0
  %68 = insertvalue { ptr, i32 } %67, i32 %66, 1
  resume { ptr, i32 } %68
}

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNKSt8weak_ptrIN7hipsycl2rt8dag_nodeEE4lockEv(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.12") align 8, ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt11make_sharedIN7hipsycl2rt20dag_multi_node_eventEJRSt6vectorISt10shared_ptrINS1_14dag_node_eventEESaIS6_EEEES4_INSt9enable_ifIXntsr8is_arrayIT_EE5valueESB_E4typeEEDpOT0_(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.21") align 8, ptr noundef nonnull align 8 dereferenceable(24)) #5

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt12__shared_ptrIN7hipsycl2rt14dag_node_eventELN9__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 = { 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 = { 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 #6 = { nounwind }
attributes #7 = { 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, !14, i64 370}
!10 = !{!"_ZTSN7hipsycl2rt8dag_nodeE", !11, i64 0, !38, i64 136, !15, i64 296, !6, i64 312, !6, i64 320, !27, i64 328, !45, i64 336, !47, i64 352, !47, i64 360, !53, i64 368, !53, i64 369, !14, i64 370, !53, i64 371, !6, i64 376}
!11 = !{!"_ZTSN7hipsycl2rt15execution_hintsE", !12, i64 0, !21, i64 24, !26, i64 56, !28, i64 72, !29, i64 88, !30, i64 96, !34, i64 128, !35, i64 129, !36, i64 130, !37, i64 131}
!12 = !{!"_ZTSN7hipsycl2rt5hints14bind_to_deviceE", !13, i64 0, !15, i64 4}
!13 = !{!"_ZTSN7hipsycl2rt5hints14execution_hintE", !14, i64 0}
!14 = !{!"bool", !7, i64 0}
!15 = !{!"_ZTSN7hipsycl2rt9device_idE", !16, i64 0, !20, i64 12}
!16 = !{!"_ZTSN7hipsycl2rt18backend_descriptorE", !17, i64 0, !18, i64 4, !19, i64 8}
!17 = !{!"_ZTSN7hipsycl2rt10backend_idE", !7, i64 0}
!18 = !{!"_ZTSN7hipsycl2rt17hardware_platformE", !7, i64 0}
!19 = !{!"_ZTSN7hipsycl2rt12api_platformE", !7, i64 0}
!20 = !{!"int", !7, i64 0}
!21 = !{!"_ZTSN7hipsycl2rt5hints20bind_to_device_groupE", !13, i64 0, !22, i64 8}
!22 = !{!"_ZTSSt6vectorIN7hipsycl2rt9device_idESaIS2_EE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseIN7hipsycl2rt9device_idESaIS2_EE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseIN7hipsycl2rt9device_idESaIS2_EE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseIN7hipsycl2rt9device_idESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!26 = !{!"_ZTSN7hipsycl2rt5hints21prefer_execution_laneE", !13, i64 0, !27, i64 8}
!27 = !{!"long", !7, i64 0}
!28 = !{!"_ZTSN7hipsycl2rt5hints10node_groupE", !13, i64 0, !27, i64 8}
!29 = !{!"_ZTSN7hipsycl2rt5hints30coarse_grained_synchronizationE", !13, i64 0}
!30 = !{!"_ZTSN7hipsycl2rt5hints15prefer_executorE", !13, i64 0, !6, i64 8, !31, i64 16}
!31 = !{!"_ZTSSt10shared_ptrIN7hipsycl2rt16backend_executorEE", !32, i64 0}
!32 = !{!"_ZTSSt12__shared_ptrIN7hipsycl2rt16backend_executorELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !33, i64 8}
!33 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0}
!34 = !{!"_ZTSN7hipsycl2rt5hints44request_instrumentation_submission_timestampE", !13, i64 0}
!35 = !{!"_ZTSN7hipsycl2rt5hints39request_instrumentation_start_timestampE", !13, i64 0}
!36 = !{!"_ZTSN7hipsycl2rt5hints40request_instrumentation_finish_timestampE", !13, i64 0}
!37 = !{!"_ZTSN7hipsycl2rt5hints17instant_executionE", !13, i64 0}
!38 = !{!"_ZTSN3sbo12small_vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEELm8EEE", !39, i64 0}
!39 = !{!"_ZTSSt6vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE", !40, i64 0}
!40 = !{!"_ZTSSt12_Vector_baseISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE", !41, i64 0}
!41 = !{!"_ZTSNSt12_Vector_baseISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE12_Vector_implE", !42, i64 0, !44, i64 136}
!42 = !{!"_ZTSN3sbo29small_buffer_vector_allocatorISt8weak_ptrIN7hipsycl2rt8dag_nodeEELm8ES5_EE", !7, i64 0, !43, i64 128, !14, i64 129}
!43 = !{!"_ZTSSaISt8weak_ptrIN7hipsycl2rt8dag_nodeEEE"}
!44 = !{!"_ZTSNSt12_Vector_baseISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!45 = !{!"_ZTSSt10shared_ptrIN7hipsycl2rt14dag_node_eventEE", !46, i64 0}
!46 = !{!"_ZTSSt12__shared_ptrIN7hipsycl2rt14dag_node_eventELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !33, i64 8}
!47 = !{!"_ZTSSt10unique_ptrIN7hipsycl2rt9operationESt14default_deleteIS2_EE", !48, i64 0}
!48 = !{!"_ZTSSt15__uniq_ptr_dataIN7hipsycl2rt9operationESt14default_deleteIS2_ELb1ELb1EE", !49, i64 0}
!49 = !{!"_ZTSSt15__uniq_ptr_implIN7hipsycl2rt9operationESt14default_deleteIS2_EE", !50, i64 0}
!50 = !{!"_ZTSSt5tupleIJPN7hipsycl2rt9operationESt14default_deleteIS2_EEE", !51, i64 0}
!51 = !{!"_ZTSSt11_Tuple_implILm0EJPN7hipsycl2rt9operationESt14default_deleteIS2_EEE", !52, i64 0}
!52 = !{!"_ZTSSt10_Head_baseILm0EPN7hipsycl2rt9operationELb0EE", !6, i64 0}
!53 = !{!"_ZTSSt6atomicIbE", !54, i64 0}
!54 = !{!"_ZTSSt13__atomic_baseIbE", !14, 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"

%"class.std::shared_ptr.4" = type { %"class.std::__shared_ptr.5" }
%"class.std::__shared_ptr.5" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::vector.15" = type { %"struct.std::_Vector_base.16" }
%"struct.std::_Vector_base.16" = type { %"struct.std::_Vector_base<std::shared_ptr<hipsycl::rt::dag_node_event>, std::allocator<std::shared_ptr<hipsycl::rt::dag_node_event>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<hipsycl::rt::dag_node_event>, std::allocator<std::shared_ptr<hipsycl::rt::dag_node_event>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<hipsycl::rt::dag_node_event>, std::allocator<std::shared_ptr<hipsycl::rt::dag_node_event>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<hipsycl::rt::dag_node_event>, std::allocator<std::shared_ptr<hipsycl::rt::dag_node_event>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.__gnu_cxx::__normal_iterator.20" = type { ptr }
%"class.std::weak_ptr" = type { %"class.std::__weak_ptr" }
%"class.std::__weak_ptr" = type { ptr, %"class.std::__weak_count" }
%"class.std::__weak_count" = type { ptr }
%"class.std::shared_ptr.12" = type { %"class.std::__shared_ptr.13" }
%"class.std::__shared_ptr.13" = type { ptr, %"class.std::__shared_count" }
%"class.std::shared_ptr.21" = type { %"class.std::__shared_ptr.22" }
%"class.std::__shared_ptr.22" = type { ptr, %"class.std::__shared_count" }

@.str = external hidden unnamed_addr constant [18 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [82 x i8], align 1
@__PRETTY_FUNCTION__._ZN7hipsycl2rt8dag_node24mark_virtually_submittedEv = external hidden unnamed_addr constant [55 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

; 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 noundef zeroext i1 @_ZNK7hipsycl2rt8dag_node12is_submittedEv(ptr noundef nonnull align 8 dereferenceable(384)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNK7hipsycl2rt8dag_node9get_eventEv(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.4") align 8, ptr noundef nonnull align 8 dereferenceable(384)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7hipsycl2rt8dag_node24mark_virtually_submittedEv(ptr noundef nonnull align 8 dereferenceable(384) %0) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::vector.15", align 8
  %3 = alloca %"class.__gnu_cxx::__normal_iterator.20", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator.20", align 8
  %5 = alloca %"class.std::weak_ptr", align 8
  %6 = alloca %"class.std::shared_ptr.12", align 8
  %7 = alloca %"class.std::shared_ptr.4", align 8
  %8 = alloca %"class.std::shared_ptr.4", align 8
  %9 = alloca %"class.std::shared_ptr.21", align 8
  %10 = getelementptr inbounds i8, ptr %0, i64 370
  store i8 1, ptr %10, align 2, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %2) #6
  call void @_ZNSt6vectorISt10shared_ptrIN7hipsycl2rt14dag_node_eventEESaIS4_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  %11 = call noundef nonnull align 8 dereferenceable(160) ptr @_ZNK7hipsycl2rt8dag_node16get_requirementsEv(ptr noundef nonnull align 8 dereferenceable(384) %0)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %12 = call ptr @_ZNKSt6vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(160) %11) #6
  store ptr %12, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  %13 = call ptr @_ZNKSt6vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(160) %11) #6
  store ptr %13, ptr %4, align 8
  %14 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKSt8weak_ptrIN7hipsycl2rt8dag_nodeEESt6vectorIS5_N3sbo29small_buffer_vector_allocatorIS5_Lm8ES5_EEEEEbRKNS_17__normal_iteratorIT_T0_EESI_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  br i1 %14, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %26, %1
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #6
  invoke void @_ZSt11make_sharedIN7hipsycl2rt20dag_multi_node_eventEJRSt6vectorISt10shared_ptrINS1_14dag_node_eventEESaIS6_EEEES4_INSt9enable_ifIXntsr8is_arrayIT_EE5valueESB_E4typeEEDpOT0_(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.21") align 8 %9, ptr noundef nonnull align 8 dereferenceable(24) %2)
          to label %29 unwind label %30

.lr.ph:                                           ; preds = %1, %26
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #6
  %15 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKSt8weak_ptrIN7hipsycl2rt8dag_nodeEESt6vectorIS5_N3sbo29small_buffer_vector_allocatorIS5_Lm8ES5_EEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  call void @_ZNSt8weak_ptrIN7hipsycl2rt8dag_nodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %15) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #6
  call void @_ZNKSt8weak_ptrIN7hipsycl2rt8dag_nodeEE4lockEv(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.12") align 8 %6, ptr noundef nonnull align 8 dereferenceable(16) %5) #6
  %16 = call noundef zeroext i1 @_ZNKSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EEcvbEv(ptr noundef nonnull align 8 dereferenceable(16) %6) #6
  br i1 %16, label %17, label %26

17:                                               ; preds = %.lr.ph
  %18 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  %19 = call noundef zeroext i1 @_ZNK7hipsycl2rt8dag_node12is_submittedEv(ptr noundef nonnull align 8 dereferenceable(384) %18)
  br i1 %19, label %21, label %20

20:                                               ; preds = %17
  call void @__assert_fail(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 78, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN7hipsycl2rt8dag_node24mark_virtually_submittedEv) #7
  unreachable

21:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #6
  %22 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @_ZNK7hipsycl2rt8dag_node9get_eventEv(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.4") align 8 %7, ptr noundef nonnull align 8 dereferenceable(384) %22)
  invoke void @_ZNSt6vectorISt10shared_ptrIN7hipsycl2rt14dag_node_eventEESaIS4_EE9push_backEOS4_(ptr noundef nonnull align 8 dereferenceable(24) %2, ptr noundef nonnull align 8 dereferenceable(16) %7)
          to label %23 unwind label %24

23:                                               ; preds = %21
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt14dag_node_eventELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #6
  br label %26

24:                                               ; preds = %21
  %25 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt14dag_node_eventELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %7) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #6
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #6
  call void @_ZNSt10__weak_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  br label %32

26:                                               ; preds = %23, %.lr.ph
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #6
  call void @_ZNSt10__weak_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  %27 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKSt8weak_ptrIN7hipsycl2rt8dag_nodeEESt6vectorIS5_N3sbo29small_buffer_vector_allocatorIS5_Lm8ES5_EEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %28 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKSt8weak_ptrIN7hipsycl2rt8dag_nodeEESt6vectorIS5_N3sbo29small_buffer_vector_allocatorIS5_Lm8ES5_EEEEEbRKNS_17__normal_iteratorIT_T0_EESI_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  br i1 %28, label %.lr.ph, label %._crit_edge

29:                                               ; preds = %._crit_edge
  call void @_ZNSt10shared_ptrIN7hipsycl2rt14dag_node_eventEEC2INS1_20dag_multi_node_eventEvEEOS_IT_E(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %9) #6
  call void @_ZN7hipsycl2rt8dag_node14mark_submittedESt10shared_ptrINS0_14dag_node_eventEE(ptr noundef nonnull align 8 dereferenceable(384) %0, ptr noundef nonnull %8)
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt14dag_node_eventELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #6
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt20dag_multi_node_eventELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %9) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #6
  call void @_ZNSt6vectorISt10shared_ptrIN7hipsycl2rt14dag_node_eventEESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #6
  ret void

30:                                               ; preds = %._crit_edge
  %31 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #6
  br label %32

32:                                               ; preds = %30, %24
  %.pn = phi { ptr, i32 } [ %25, %24 ], [ %31, %30 ]
  call void @_ZNSt6vectorISt10shared_ptrIN7hipsycl2rt14dag_node_eventEESaIS4_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %2) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %2) #6
  resume { ptr, i32 } %.pn
}

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNKSt8weak_ptrIN7hipsycl2rt8dag_nodeEE4lockEv(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.12") align 8, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt11make_sharedIN7hipsycl2rt20dag_multi_node_eventEJRSt6vectorISt10shared_ptrINS1_14dag_node_eventEESaIS6_EEEES4_INSt9enable_ifIXntsr8is_arrayIT_EE5valueESB_E4typeEEDpOT0_(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.21") align 8, ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #5

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt12__shared_ptrIN7hipsycl2rt14dag_node_eventELN9__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 = { 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 = { 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 #6 = { nounwind }
attributes #7 = { 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, !10, i64 370}
!6 = !{!"_ZTSN7hipsycl2rt8dag_nodeE", !7, i64 0, !37, i64 136, !13, i64 296, !24, i64 312, !24, i64 320, !26, i64 328, !44, i64 336, !46, i64 352, !46, i64 360, !52, i64 368, !52, i64 369, !10, i64 370, !52, i64 371, !24, i64 376}
!7 = !{!"_ZTSN7hipsycl2rt15execution_hintsE", !8, i64 0, !19, i64 24, !25, i64 56, !27, i64 72, !28, i64 88, !29, i64 96, !33, i64 128, !34, i64 129, !35, i64 130, !36, i64 131}
!8 = !{!"_ZTSN7hipsycl2rt5hints14bind_to_deviceE", !9, i64 0, !13, i64 4}
!9 = !{!"_ZTSN7hipsycl2rt5hints14execution_hintE", !10, i64 0}
!10 = !{!"bool", !11, i64 0}
!11 = !{!"omnipotent char", !12, i64 0}
!12 = !{!"Simple C++ TBAA"}
!13 = !{!"_ZTSN7hipsycl2rt9device_idE", !14, i64 0, !18, i64 12}
!14 = !{!"_ZTSN7hipsycl2rt18backend_descriptorE", !15, i64 0, !16, i64 4, !17, i64 8}
!15 = !{!"_ZTSN7hipsycl2rt10backend_idE", !11, i64 0}
!16 = !{!"_ZTSN7hipsycl2rt17hardware_platformE", !11, i64 0}
!17 = !{!"_ZTSN7hipsycl2rt12api_platformE", !11, i64 0}
!18 = !{!"int", !11, i64 0}
!19 = !{!"_ZTSN7hipsycl2rt5hints20bind_to_device_groupE", !9, i64 0, !20, i64 8}
!20 = !{!"_ZTSSt6vectorIN7hipsycl2rt9device_idESaIS2_EE", !21, i64 0}
!21 = !{!"_ZTSSt12_Vector_baseIN7hipsycl2rt9device_idESaIS2_EE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIN7hipsycl2rt9device_idESaIS2_EE12_Vector_implE", !23, i64 0}
!23 = !{!"_ZTSNSt12_Vector_baseIN7hipsycl2rt9device_idESaIS2_EE17_Vector_impl_dataE", !24, i64 0, !24, i64 8, !24, i64 16}
!24 = !{!"any pointer", !11, i64 0}
!25 = !{!"_ZTSN7hipsycl2rt5hints21prefer_execution_laneE", !9, i64 0, !26, i64 8}
!26 = !{!"long", !11, i64 0}
!27 = !{!"_ZTSN7hipsycl2rt5hints10node_groupE", !9, i64 0, !26, i64 8}
!28 = !{!"_ZTSN7hipsycl2rt5hints30coarse_grained_synchronizationE", !9, i64 0}
!29 = !{!"_ZTSN7hipsycl2rt5hints15prefer_executorE", !9, i64 0, !24, i64 8, !30, i64 16}
!30 = !{!"_ZTSSt10shared_ptrIN7hipsycl2rt16backend_executorEE", !31, i64 0}
!31 = !{!"_ZTSSt12__shared_ptrIN7hipsycl2rt16backend_executorELN9__gnu_cxx12_Lock_policyE2EE", !24, i64 0, !32, i64 8}
!32 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !24, i64 0}
!33 = !{!"_ZTSN7hipsycl2rt5hints44request_instrumentation_submission_timestampE", !9, i64 0}
!34 = !{!"_ZTSN7hipsycl2rt5hints39request_instrumentation_start_timestampE", !9, i64 0}
!35 = !{!"_ZTSN7hipsycl2rt5hints40request_instrumentation_finish_timestampE", !9, i64 0}
!36 = !{!"_ZTSN7hipsycl2rt5hints17instant_executionE", !9, i64 0}
!37 = !{!"_ZTSN3sbo12small_vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEELm8EEE", !38, i64 0}
!38 = !{!"_ZTSSt6vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE", !39, i64 0}
!39 = !{!"_ZTSSt12_Vector_baseISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE", !40, i64 0}
!40 = !{!"_ZTSNSt12_Vector_baseISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE12_Vector_implE", !41, i64 0, !43, i64 136}
!41 = !{!"_ZTSN3sbo29small_buffer_vector_allocatorISt8weak_ptrIN7hipsycl2rt8dag_nodeEELm8ES5_EE", !11, i64 0, !42, i64 128, !10, i64 129}
!42 = !{!"_ZTSSaISt8weak_ptrIN7hipsycl2rt8dag_nodeEEE"}
!43 = !{!"_ZTSNSt12_Vector_baseISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE17_Vector_impl_dataE", !24, i64 0, !24, i64 8, !24, i64 16}
!44 = !{!"_ZTSSt10shared_ptrIN7hipsycl2rt14dag_node_eventEE", !45, i64 0}
!45 = !{!"_ZTSSt12__shared_ptrIN7hipsycl2rt14dag_node_eventELN9__gnu_cxx12_Lock_policyE2EE", !24, i64 0, !32, i64 8}
!46 = !{!"_ZTSSt10unique_ptrIN7hipsycl2rt9operationESt14default_deleteIS2_EE", !47, i64 0}
!47 = !{!"_ZTSSt15__uniq_ptr_dataIN7hipsycl2rt9operationESt14default_deleteIS2_ELb1ELb1EE", !48, i64 0}
!48 = !{!"_ZTSSt15__uniq_ptr_implIN7hipsycl2rt9operationESt14default_deleteIS2_EE", !49, i64 0}
!49 = !{!"_ZTSSt5tupleIJPN7hipsycl2rt9operationESt14default_deleteIS2_EEE", !50, i64 0}
!50 = !{!"_ZTSSt11_Tuple_implILm0EJPN7hipsycl2rt9operationESt14default_deleteIS2_EEE", !51, i64 0}
!51 = !{!"_ZTSSt10_Head_baseILm0EPN7hipsycl2rt9operationELb0EE", !24, i64 0}
!52 = !{!"_ZTSSt6atomicIbE", !53, i64 0}
!53 = !{!"_ZTSSt13__atomic_baseIbE", !10, i64 0}


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