; LLVM IR from AdaptiveCpp/AdaptiveCpp :: src/runtime (dag_direct_scheduler)

; 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.hipsycl::rt::result" = type { %"class.std::unique_ptr.10" }
%"class.std::unique_ptr.10" = type { %"struct.std::__uniq_ptr_data.11" }
%"struct.std::__uniq_ptr_data.11" = type { %"class.std::__uniq_ptr_impl.12" }
%"class.std::__uniq_ptr_impl.12" = type { %"class.std::tuple.13" }
%"class.std::tuple.13" = type { %"struct.std::_Tuple_impl.14" }
%"struct.std::_Tuple_impl.14" = type { %"struct.std::_Head_base.17" }
%"struct.std::_Head_base.17" = type { ptr }
%"class.hipsycl::rt::source_location" = type <{ %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i32, [4 x i8] }>
%"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.std::allocator.18" = type { i8 }
%"class.hipsycl::rt::error_info" = type <{ %"class.std::__cxx11::basic_string", %"class.hipsycl::rt::error_code", i32, [4 x i8] }>
%"class.hipsycl::rt::error_code" = type { %"class.std::__cxx11::basic_string", i8, i32 }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.hipsycl::rt::device_id" = type { %"struct.hipsycl::rt::backend_descriptor", i32 }
%"struct.hipsycl::rt::backend_descriptor" = type { i32, i32, i32 }
%"class.__gnu_cxx::__normal_iterator" = 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 }
%"struct.std::pair" = type { ptr, %"class.hipsycl::rt::device_id" }
%"class.hipsycl::rt::dag_direct_scheduler" = type { ptr }

@__func__._ZN7hipsycl2rt20dag_direct_scheduler6submitESt10shared_ptrINS0_8dag_nodeEE = external hidden unnamed_addr constant [7 x i8], align 1
@.str = external hidden unnamed_addr constant [94 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [88 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [94 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [41 x i8], align 1
@__PRETTY_FUNCTION__._ZN7hipsycl2rt20dag_direct_scheduler6submitESt10shared_ptrINS0_8dag_nodeEE = external hidden unnamed_addr constant [61 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7hipsycl2rt20dag_direct_scheduler6submitESt10shared_ptrINS0_8dag_nodeEE(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef %1) #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.hipsycl::rt::result", align 8
  %6 = alloca %"class.hipsycl::rt::source_location", align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::allocator.18", align 1
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::allocator.18", align 1
  %13 = alloca %"class.hipsycl::rt::error_info", align 8
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca %"class.std::allocator.18", align 1
  %16 = alloca %"class.std::shared_ptr", align 8
  %17 = alloca %"class.hipsycl::rt::device_id", align 4
  %18 = alloca %"class.hipsycl::rt::device_id", align 4
  %19 = alloca ptr, align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %21 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %22 = alloca %"class.std::weak_ptr", align 8
  %23 = alloca %"class.std::shared_ptr", align 8
  %24 = alloca %"class.std::shared_ptr", align 8
  %25 = alloca %"class.hipsycl::rt::device_id", align 4
  %26 = alloca ptr, align 8
  %27 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %28 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %29 = alloca i32, align 4
  %30 = alloca %"class.std::weak_ptr", align 8
  %31 = alloca %"class.std::shared_ptr", align 8
  %32 = alloca %"class.hipsycl::rt::result", align 8
  %33 = alloca %"class.hipsycl::rt::source_location", align 8
  %34 = alloca %"class.std::__cxx11::basic_string", align 8
  %35 = alloca %"class.std::allocator.18", align 1
  %36 = alloca %"class.std::__cxx11::basic_string", align 8
  %37 = alloca %"class.std::allocator.18", align 1
  %38 = alloca %"class.hipsycl::rt::error_info", align 8
  %39 = alloca %"class.std::__cxx11::basic_string", align 8
  %40 = alloca %"class.std::allocator.18", align 1
  %41 = alloca %"class.std::shared_ptr", align 8
  %42 = alloca %"class.hipsycl::rt::result", align 8
  %43 = alloca %"class.std::shared_ptr", align 8
  %44 = alloca %"class.std::shared_ptr", align 8
  %45 = alloca %"class.hipsycl::rt::result", align 8
  %46 = alloca %"class.std::shared_ptr", align 8
  %47 = alloca %"class.std::shared_ptr", align 8
  %48 = alloca %"struct.std::pair", align 8
  %49 = alloca %"class.std::shared_ptr", align 8
  %50 = alloca %"class.std::shared_ptr", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %51 = load ptr, ptr %3, align 8
  %52 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #7
  %53 = call noundef nonnull align 8 dereferenceable(132) ptr @_ZN7hipsycl2rt8dag_node19get_execution_hintsEv(ptr noundef nonnull align 8 dereferenceable(384) %52)
  %54 = call noundef zeroext i1 @_ZNK7hipsycl2rt15execution_hints8has_hintINS0_5hints14bind_to_deviceEEEbv(ptr noundef nonnull align 8 dereferenceable(132) %53)
  br i1 %54, label %96, label %55

55:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 72, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef @__func__._ZN7hipsycl2rt20dag_direct_scheduler6submitESt10shared_ptrINS0_8dag_nodeEE, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %56 unwind label %63

56:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef @.str, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %57 unwind label %67

57:                                               ; preds = %56
  invoke void @_ZN7hipsycl2rt15source_locationC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_i(ptr noundef nonnull align 8 dereferenceable(68) %6, ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull align 8 dereferenceable(32) %11, i32 noundef 340)
          to label %58 unwind label %71

58:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 80, ptr %13) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef @.str.1, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %59 unwind label %75

59:                                               ; preds = %58
  invoke void @_ZN7hipsycl2rt10error_infoC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10error_typeE(ptr noundef nonnull align 8 dereferenceable(76) %13, ptr noundef nonnull align 8 dereferenceable(32) %14, i32 noundef 14)
          to label %60 unwind label %79

60:                                               ; preds = %59
  invoke void @_ZN7hipsycl2rt14register_errorERKNS0_15source_locationERKNS0_10error_infoE(ptr dead_on_unwind writable sret(%"class.hipsycl::rt::result") align 8 %5, ptr noundef nonnull align 8 dereferenceable(68) %6, ptr noundef nonnull align 8 dereferenceable(76) %13)
          to label %61 unwind label %83

61:                                               ; preds = %60
  call void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  call void @_ZN7hipsycl2rt10error_infoD2Ev(ptr noundef nonnull align 8 dereferenceable(76) %13) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr %13) #7
  call void @_ZN7hipsycl2rt15source_locationD2Ev(ptr noundef nonnull align 8 dereferenceable(68) %6) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr %6) #7
  call void @_ZNSt10shared_ptrIN7hipsycl2rt8dag_nodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(16) %1) #7
  invoke void @_ZN7hipsycl2rt12_GLOBAL__N_116abort_submissionESt10shared_ptrINS0_8dag_nodeEE(ptr noundef %16)
          to label %62 unwind label %92

62:                                               ; preds = %61
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %16) #7
  br label %316

63:                                               ; preds = %55
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %9, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %10, align 4
  br label %91

67:                                               ; preds = %56
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %9, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %10, align 4
  br label %90

71:                                               ; preds = %57
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %9, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %10, align 4
  br label %89

75:                                               ; preds = %58
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %9, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %10, align 4
  br label %88

79:                                               ; preds = %59
  %80 = landingpad { ptr, i32 }
          cleanup
  %81 = extractvalue { ptr, i32 } %80, 0
  store ptr %81, ptr %9, align 8
  %82 = extractvalue { ptr, i32 } %80, 1
  store i32 %82, ptr %10, align 4
  br label %87

83:                                               ; preds = %60
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %9, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %10, align 4
  call void @_ZN7hipsycl2rt10error_infoD2Ev(ptr noundef nonnull align 8 dereferenceable(76) %13) #7
  br label %87

87:                                               ; preds = %83, %79
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  br label %88

88:                                               ; preds = %87, %75
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr %13) #7
  call void @_ZN7hipsycl2rt15source_locationD2Ev(ptr noundef nonnull align 8 dereferenceable(68) %6) #7
  br label %89

89:                                               ; preds = %88, %71
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #7
  br label %90

90:                                               ; preds = %89, %67
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  br label %91

91:                                               ; preds = %90, %63
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr %6) #7
  br label %318

92:                                               ; preds = %61
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %9, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %10, align 4
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %16) #7
  br label %318

96:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #7
  %97 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #7
  %98 = call noundef nonnull align 8 dereferenceable(132) ptr @_ZN7hipsycl2rt8dag_node19get_execution_hintsEv(ptr noundef nonnull align 8 dereferenceable(384) %97)
  %99 = call noundef ptr @_ZNK7hipsycl2rt15execution_hints8get_hintINS0_5hints14bind_to_deviceETnNSt9enable_ifIXsr3stdE12is_base_of_vINS3_14execution_hintET_EEiE4typeELi0EEEPKS7_v(ptr noundef nonnull align 8 dereferenceable(132) %98)
  %100 = call { i64, i64 } @_ZNK7hipsycl2rt5hints14bind_to_device13get_device_idEv(ptr noundef nonnull align 4 dereferenceable(20) %99)
  %101 = getelementptr inbounds { i64, i64 }, ptr %17, i32 0, i32 0
  %102 = extractvalue { i64, i64 } %100, 0
  store i64 %102, ptr %101, align 4
  %103 = getelementptr inbounds { i64, i64 }, ptr %17, i32 0, i32 1
  %104 = extractvalue { i64, i64 } %100, 1
  store i64 %104, ptr %103, align 4
  %105 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %18, ptr align 4 %17, i64 16, i1 false), !tbaa.struct !9
  %106 = getelementptr inbounds { i64, i64 }, ptr %18, i32 0, i32 0
  %107 = load i64, ptr %106, align 4
  %108 = getelementptr inbounds { i64, i64 }, ptr %18, i32 0, i32 1
  %109 = load i64, ptr %108, align 4
  call void @_ZN7hipsycl2rt8dag_node16assign_to_deviceENS0_9device_idE(ptr noundef nonnull align 8 dereferenceable(384) %105, i64 %107, i64 %109)
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %110 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #7
  %111 = call noundef nonnull align 8 dereferenceable(160) ptr @_ZNK7hipsycl2rt8dag_node16get_requirementsEv(ptr noundef nonnull align 8 dereferenceable(384) %110)
  store ptr %111, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #7
  %112 = load ptr, ptr %19, align 8, !tbaa !5
  %113 = call ptr @_ZNKSt6vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(160) %112) #7
  %114 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %20, i32 0, i32 0
  store ptr %113, ptr %114, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %115 = load ptr, ptr %19, align 8, !tbaa !5
  %116 = call ptr @_ZNKSt6vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(160) %115) #7
  %117 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %21, i32 0, i32 0
  store ptr %116, ptr %117, align 8
  br label %118

118:                                              ; preds = %135, %96
  %119 = 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) %20, ptr noundef nonnull align 8 dereferenceable(8) %21) #7
  br i1 %119, label %121, label %120

120:                                              ; preds = %118
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  br label %137

121:                                              ; preds = %118
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #7
  %122 = 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) %20) #7
  call void @_ZNSt8weak_ptrIN7hipsycl2rt8dag_nodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 8 dereferenceable(16) %122) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #7
  call void @_ZNKSt8weak_ptrIN7hipsycl2rt8dag_nodeEE4lockEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %23, ptr noundef nonnull align 8 dereferenceable(16) %22) #7
  %123 = call noundef zeroext i1 @_ZNKSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EEcvbEv(ptr noundef nonnull align 8 dereferenceable(16) %23) #7
  br i1 %123, label %124, label %134

124:                                              ; preds = %121
  call void @_ZNSt10shared_ptrIN7hipsycl2rt8dag_nodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %24, ptr noundef nonnull align 8 dereferenceable(16) %23) #7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %25, ptr align 4 %17, i64 16, i1 false), !tbaa.struct !9
  %125 = getelementptr inbounds { i64, i64 }, ptr %25, i32 0, i32 0
  %126 = load i64, ptr %125, align 4
  %127 = getelementptr inbounds { i64, i64 }, ptr %25, i32 0, i32 1
  %128 = load i64, ptr %127, align 4
  invoke void @_ZN7hipsycl2rt12_GLOBAL__N_125assign_devices_or_defaultESt10shared_ptrINS0_8dag_nodeEENS0_9device_idE(ptr noundef %24, i64 %126, i64 %128)
          to label %129 unwind label %130

129:                                              ; preds = %124
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %24) #7
  br label %134

130:                                              ; preds = %124
  %131 = landingpad { ptr, i32 }
          cleanup
  %132 = extractvalue { ptr, i32 } %131, 0
  store ptr %132, ptr %9, align 8
  %133 = extractvalue { ptr, i32 } %131, 1
  store i32 %133, ptr %10, align 4
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %24) #7
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %23) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #7
  call void @_ZNSt10__weak_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %22) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  br label %317

134:                                              ; preds = %129, %121
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %23) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #7
  call void @_ZNSt10__weak_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %22) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #7
  br label %135

135:                                              ; preds = %134
  %136 = 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) %20) #7
  br label %118

137:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  %138 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #7
  %139 = call noundef nonnull align 8 dereferenceable(160) ptr @_ZNK7hipsycl2rt8dag_node16get_requirementsEv(ptr noundef nonnull align 8 dereferenceable(384) %138)
  store ptr %139, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #7
  %140 = load ptr, ptr %26, align 8, !tbaa !5
  %141 = call ptr @_ZNKSt6vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(160) %140) #7
  %142 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %27, i32 0, i32 0
  store ptr %141, ptr %142, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #7
  %143 = load ptr, ptr %26, align 8, !tbaa !5
  %144 = call ptr @_ZNKSt6vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(160) %143) #7
  %145 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %28, i32 0, i32 0
  store ptr %144, ptr %145, align 8
  br label %146

146:                                              ; preds = %246, %137
  %147 = 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) %27, ptr noundef nonnull align 8 dereferenceable(8) %28) #7
  br i1 %147, label %149, label %148

148:                                              ; preds = %146
  store i32 4, ptr %29, align 4
  br label %249

149:                                              ; preds = %146
  call void @llvm.lifetime.start.p0(i64 16, ptr %30) #7
  %150 = 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) %27) #7
  call void @_ZNSt8weak_ptrIN7hipsycl2rt8dag_nodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %30, ptr noundef nonnull align 8 dereferenceable(16) %150) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr %31) #7
  call void @_ZNKSt8weak_ptrIN7hipsycl2rt8dag_nodeEE4lockEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr") align 8 %31, ptr noundef nonnull align 8 dereferenceable(16) %30) #7
  %151 = call noundef zeroext i1 @_ZNKSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EEcvbEv(ptr noundef nonnull align 8 dereferenceable(16) %31) #7
  br i1 %151, label %152, label %239

152:                                              ; preds = %149
  %153 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %31) #7
  %154 = invoke noundef ptr @_ZNK7hipsycl2rt8dag_node13get_operationEv(ptr noundef nonnull align 8 dereferenceable(384) %153)
          to label %155 unwind label %173

155:                                              ; preds = %152
  %156 = load ptr, ptr %154, align 8, !tbaa !18
  %157 = getelementptr inbounds ptr, ptr %156, i64 3
  %158 = load ptr, ptr %157, align 8
  %159 = invoke noundef zeroext i1 %158(ptr noundef nonnull align 8 dereferenceable(40) %154)
          to label %160 unwind label %173

160:                                              ; preds = %155
  br i1 %159, label %211, label %161

161:                                              ; preds = %160
  %162 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %31) #7
  %163 = invoke noundef zeroext i1 @_ZNK7hipsycl2rt8dag_node12is_submittedEv(ptr noundef nonnull align 8 dereferenceable(384) %162)
          to label %164 unwind label %173

164:                                              ; preds = %161
  br i1 %163, label %210, label %165

165:                                              ; preds = %164
  call void @llvm.lifetime.start.p0(i64 72, ptr %33) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %34) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %35) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %35) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %34, ptr noundef @__func__._ZN7hipsycl2rt20dag_direct_scheduler6submitESt10shared_ptrINS0_8dag_nodeEE, ptr noundef nonnull align 1 dereferenceable(1) %35)
          to label %166 unwind label %177

166:                                              ; preds = %165
  call void @llvm.lifetime.start.p0(i64 32, ptr %36) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %37) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %37) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %36, ptr noundef @.str, ptr noundef nonnull align 1 dereferenceable(1) %37)
          to label %167 unwind label %181

167:                                              ; preds = %166
  invoke void @_ZN7hipsycl2rt15source_locationC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_i(ptr noundef nonnull align 8 dereferenceable(68) %33, ptr noundef nonnull align 8 dereferenceable(32) %34, ptr noundef nonnull align 8 dereferenceable(32) %36, i32 noundef 362)
          to label %168 unwind label %185

168:                                              ; preds = %167
  call void @llvm.lifetime.start.p0(i64 80, ptr %38) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr %39) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %40) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %40) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %39, ptr noundef @.str.2, ptr noundef nonnull align 1 dereferenceable(1) %40)
          to label %169 unwind label %189

169:                                              ; preds = %168
  invoke void @_ZN7hipsycl2rt10error_infoC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10error_typeE(ptr noundef nonnull align 8 dereferenceable(76) %38, ptr noundef nonnull align 8 dereferenceable(32) %39, i32 noundef 14)
          to label %170 unwind label %193

170:                                              ; preds = %169
  invoke void @_ZN7hipsycl2rt14register_errorERKNS0_15source_locationERKNS0_10error_infoE(ptr dead_on_unwind writable sret(%"class.hipsycl::rt::result") align 8 %32, ptr noundef nonnull align 8 dereferenceable(68) %33, ptr noundef nonnull align 8 dereferenceable(76) %38)
          to label %171 unwind label %197

171:                                              ; preds = %170
  call void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %32) #7
  call void @_ZN7hipsycl2rt10error_infoD2Ev(ptr noundef nonnull align 8 dereferenceable(76) %38) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %39) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %40) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %40) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %39) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr %38) #7
  call void @_ZN7hipsycl2rt15source_locationD2Ev(ptr noundef nonnull align 8 dereferenceable(68) %33) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %36) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %37) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %37) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %36) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %34) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %35) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %35) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %34) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr %33) #7
  call void @_ZNSt10shared_ptrIN7hipsycl2rt8dag_nodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %41, ptr noundef nonnull align 8 dereferenceable(16) %1) #7
  invoke void @_ZN7hipsycl2rt12_GLOBAL__N_116abort_submissionESt10shared_ptrINS0_8dag_nodeEE(ptr noundef %41)
          to label %172 unwind label %206

172:                                              ; preds = %171
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %41) #7
  store i32 1, ptr %29, align 4
  br label %240

173:                                              ; preds = %161, %155, %152
  %174 = landingpad { ptr, i32 }
          cleanup
  %175 = extractvalue { ptr, i32 } %174, 0
  store ptr %175, ptr %9, align 8
  %176 = extractvalue { ptr, i32 } %174, 1
  store i32 %176, ptr %10, align 4
  br label %248

177:                                              ; preds = %165
  %178 = landingpad { ptr, i32 }
          cleanup
  %179 = extractvalue { ptr, i32 } %178, 0
  store ptr %179, ptr %9, align 8
  %180 = extractvalue { ptr, i32 } %178, 1
  store i32 %180, ptr %10, align 4
  br label %205

181:                                              ; preds = %166
  %182 = landingpad { ptr, i32 }
          cleanup
  %183 = extractvalue { ptr, i32 } %182, 0
  store ptr %183, ptr %9, align 8
  %184 = extractvalue { ptr, i32 } %182, 1
  store i32 %184, ptr %10, align 4
  br label %204

185:                                              ; preds = %167
  %186 = landingpad { ptr, i32 }
          cleanup
  %187 = extractvalue { ptr, i32 } %186, 0
  store ptr %187, ptr %9, align 8
  %188 = extractvalue { ptr, i32 } %186, 1
  store i32 %188, ptr %10, align 4
  br label %203

189:                                              ; preds = %168
  %190 = landingpad { ptr, i32 }
          cleanup
  %191 = extractvalue { ptr, i32 } %190, 0
  store ptr %191, ptr %9, align 8
  %192 = extractvalue { ptr, i32 } %190, 1
  store i32 %192, ptr %10, align 4
  br label %202

193:                                              ; preds = %169
  %194 = landingpad { ptr, i32 }
          cleanup
  %195 = extractvalue { ptr, i32 } %194, 0
  store ptr %195, ptr %9, align 8
  %196 = extractvalue { ptr, i32 } %194, 1
  store i32 %196, ptr %10, align 4
  br label %201

197:                                              ; preds = %170
  %198 = landingpad { ptr, i32 }
          cleanup
  %199 = extractvalue { ptr, i32 } %198, 0
  store ptr %199, ptr %9, align 8
  %200 = extractvalue { ptr, i32 } %198, 1
  store i32 %200, ptr %10, align 4
  call void @_ZN7hipsycl2rt10error_infoD2Ev(ptr noundef nonnull align 8 dereferenceable(76) %38) #7
  br label %201

201:                                              ; preds = %197, %193
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %39) #7
  br label %202

202:                                              ; preds = %201, %189
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %40) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %40) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %39) #7
  call void @llvm.lifetime.end.p0(i64 80, ptr %38) #7
  call void @_ZN7hipsycl2rt15source_locationD2Ev(ptr noundef nonnull align 8 dereferenceable(68) %33) #7
  br label %203

203:                                              ; preds = %202, %185
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %36) #7
  br label %204

204:                                              ; preds = %203, %181
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %37) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %37) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %36) #7
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %34) #7
  br label %205

205:                                              ; preds = %204, %177
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %35) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %35) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %34) #7
  call void @llvm.lifetime.end.p0(i64 72, ptr %33) #7
  br label %248

206:                                              ; preds = %171
  %207 = landingpad { ptr, i32 }
          cleanup
  %208 = extractvalue { ptr, i32 } %207, 0
  store ptr %208, ptr %9, align 8
  %209 = extractvalue { ptr, i32 } %207, 1
  store i32 %209, ptr %10, align 4
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %41) #7
  br label %248

210:                                              ; preds = %164
  br label %238

211:                                              ; preds = %160
  call void @llvm.lifetime.start.p0(i64 8, ptr %42) #7
  %212 = getelementptr inbounds %"class.hipsycl::rt::dag_direct_scheduler", ptr %51, i32 0, i32 0
  %213 = load ptr, ptr %212, align 8, !tbaa !20
  call void @_ZNSt10shared_ptrIN7hipsycl2rt8dag_nodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %43, ptr noundef nonnull align 8 dereferenceable(16) %31) #7
  invoke void @_ZN7hipsycl2rt12_GLOBAL__N_118submit_requirementEPNS0_7runtimeESt10shared_ptrINS0_8dag_nodeEE(ptr dead_on_unwind writable sret(%"class.hipsycl::rt::result") align 8 %42, ptr noundef %213, ptr noundef %43)
          to label %214 unwind label %220

214:                                              ; preds = %211
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %43) #7
  %215 = invoke noundef zeroext i1 @_ZNK7hipsycl2rt6result10is_successEv(ptr noundef nonnull align 8 dereferenceable(8) %42)
          to label %216 unwind label %224

216:                                              ; preds = %214
  br i1 %215, label %232, label %217

217:                                              ; preds = %216
  invoke void @_ZN7hipsycl2rt14register_errorERKNS0_6resultE(ptr noundef nonnull align 8 dereferenceable(8) %42)
          to label %218 unwind label %224

218:                                              ; preds = %217
  call void @_ZNSt10shared_ptrIN7hipsycl2rt8dag_nodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %44, ptr noundef nonnull align 8 dereferenceable(16) %1) #7
  invoke void @_ZN7hipsycl2rt12_GLOBAL__N_116abort_submissionESt10shared_ptrINS0_8dag_nodeEE(ptr noundef %44)
          to label %219 unwind label %228

219:                                              ; preds = %218
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %44) #7
  store i32 1, ptr %29, align 4
  br label %233

220:                                              ; preds = %211
  %221 = landingpad { ptr, i32 }
          cleanup
  %222 = extractvalue { ptr, i32 } %221, 0
  store ptr %222, ptr %9, align 8
  %223 = extractvalue { ptr, i32 } %221, 1
  store i32 %223, ptr %10, align 4
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %43) #7
  br label %237

224:                                              ; preds = %217, %214
  %225 = landingpad { ptr, i32 }
          cleanup
  %226 = extractvalue { ptr, i32 } %225, 0
  store ptr %226, ptr %9, align 8
  %227 = extractvalue { ptr, i32 } %225, 1
  store i32 %227, ptr %10, align 4
  br label %236

228:                                              ; preds = %218
  %229 = landingpad { ptr, i32 }
          cleanup
  %230 = extractvalue { ptr, i32 } %229, 0
  store ptr %230, ptr %9, align 8
  %231 = extractvalue { ptr, i32 } %229, 1
  store i32 %231, ptr %10, align 4
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %44) #7
  br label %236

232:                                              ; preds = %216
  store i32 0, ptr %29, align 4
  br label %233

233:                                              ; preds = %232, %219
  call void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %42) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #7
  %234 = load i32, ptr %29, align 4
  switch i32 %234, label %240 [
    i32 0, label %235
  ]

235:                                              ; preds = %233
  br label %238

236:                                              ; preds = %228, %224
  call void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %42) #7
  br label %237

237:                                              ; preds = %236, %220
  call void @llvm.lifetime.end.p0(i64 8, ptr %42) #7
  br label %248

238:                                              ; preds = %235, %210
  br label %239

239:                                              ; preds = %238, %149
  store i32 0, ptr %29, align 4
  br label %240

240:                                              ; preds = %239, %233, %172
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %31) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %31) #7
  %241 = load i32, ptr %29, align 4
  switch i32 %241, label %243 [
    i32 0, label %242
  ]

242:                                              ; preds = %240
  store i32 0, ptr %29, align 4
  br label %243

243:                                              ; preds = %242, %240
  call void @_ZNSt10__weak_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %30) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #7
  %244 = load i32, ptr %29, align 4
  switch i32 %244, label %249 [
    i32 0, label %245
  ]

245:                                              ; preds = %243
  br label %246

246:                                              ; preds = %245
  %247 = 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) %27) #7
  br label %146

248:                                              ; preds = %237, %206, %205, %173
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %31) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %31) #7
  call void @_ZNSt10__weak_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %30) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  br label %317

249:                                              ; preds = %243, %148
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  %250 = load i32, ptr %29, align 4
  switch i32 %250, label %314 [
    i32 4, label %251
  ]

251:                                              ; preds = %249
  %252 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #7
  %253 = call noundef ptr @_ZNK7hipsycl2rt8dag_node13get_operationEv(ptr noundef nonnull align 8 dereferenceable(384) %252)
  %254 = load ptr, ptr %253, align 8, !tbaa !18
  %255 = getelementptr inbounds ptr, ptr %254, i64 3
  %256 = load ptr, ptr %255, align 8
  %257 = call noundef zeroext i1 %256(ptr noundef nonnull align 8 dereferenceable(40) %253)
  br i1 %257, label %258, label %285

258:                                              ; preds = %251
  call void @llvm.lifetime.start.p0(i64 8, ptr %45) #7
  %259 = getelementptr inbounds %"class.hipsycl::rt::dag_direct_scheduler", ptr %51, i32 0, i32 0
  %260 = load ptr, ptr %259, align 8, !tbaa !20
  call void @_ZNSt10shared_ptrIN7hipsycl2rt8dag_nodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %46, ptr noundef nonnull align 8 dereferenceable(16) %1) #7
  invoke void @_ZN7hipsycl2rt12_GLOBAL__N_118submit_requirementEPNS0_7runtimeESt10shared_ptrINS0_8dag_nodeEE(ptr dead_on_unwind writable sret(%"class.hipsycl::rt::result") align 8 %45, ptr noundef %260, ptr noundef %46)
          to label %261 unwind label %267

261:                                              ; preds = %258
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %46) #7
  %262 = invoke noundef zeroext i1 @_ZNK7hipsycl2rt6result10is_successEv(ptr noundef nonnull align 8 dereferenceable(8) %45)
          to label %263 unwind label %271

263:                                              ; preds = %261
  br i1 %262, label %279, label %264

264:                                              ; preds = %263
  invoke void @_ZN7hipsycl2rt14register_errorERKNS0_6resultE(ptr noundef nonnull align 8 dereferenceable(8) %45)
          to label %265 unwind label %271

265:                                              ; preds = %264
  call void @_ZNSt10shared_ptrIN7hipsycl2rt8dag_nodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %47, ptr noundef nonnull align 8 dereferenceable(16) %1) #7
  invoke void @_ZN7hipsycl2rt12_GLOBAL__N_116abort_submissionESt10shared_ptrINS0_8dag_nodeEE(ptr noundef %47)
          to label %266 unwind label %275

266:                                              ; preds = %265
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %47) #7
  store i32 1, ptr %29, align 4
  br label %280

267:                                              ; preds = %258
  %268 = landingpad { ptr, i32 }
          cleanup
  %269 = extractvalue { ptr, i32 } %268, 0
  store ptr %269, ptr %9, align 8
  %270 = extractvalue { ptr, i32 } %268, 1
  store i32 %270, ptr %10, align 4
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %46) #7
  br label %284

271:                                              ; preds = %264, %261
  %272 = landingpad { ptr, i32 }
          cleanup
  %273 = extractvalue { ptr, i32 } %272, 0
  store ptr %273, ptr %9, align 8
  %274 = extractvalue { ptr, i32 } %272, 1
  store i32 %274, ptr %10, align 4
  br label %283

275:                                              ; preds = %265
  %276 = landingpad { ptr, i32 }
          cleanup
  %277 = extractvalue { ptr, i32 } %276, 0
  store ptr %277, ptr %9, align 8
  %278 = extractvalue { ptr, i32 } %276, 1
  store i32 %278, ptr %10, align 4
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %47) #7
  br label %283

279:                                              ; preds = %263
  store i32 0, ptr %29, align 4
  br label %280

280:                                              ; preds = %279, %266
  call void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %45) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #7
  %281 = load i32, ptr %29, align 4
  switch i32 %281, label %314 [
    i32 0, label %282
  ]

282:                                              ; preds = %280
  br label %313

283:                                              ; preds = %275, %271
  call void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %45) #7
  br label %284

284:                                              ; preds = %283, %267
  call void @llvm.lifetime.end.p0(i64 8, ptr %45) #7
  br label %317

285:                                              ; preds = %251
  call void @llvm.lifetime.start.p0(i64 24, ptr %48) #7
  %286 = getelementptr inbounds %"class.hipsycl::rt::dag_direct_scheduler", ptr %51, i32 0, i32 0
  %287 = load ptr, ptr %286, align 8, !tbaa !20
  call void @_ZNSt10shared_ptrIN7hipsycl2rt8dag_nodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %49, ptr noundef nonnull align 8 dereferenceable(16) %1) #7
  %288 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #7
  %289 = invoke noundef ptr @_ZNK7hipsycl2rt8dag_node13get_operationEv(ptr noundef nonnull align 8 dereferenceable(384) %288)
          to label %290 unwind label %296

290:                                              ; preds = %285
  invoke void @_ZN7hipsycl2rt12_GLOBAL__N_115select_executorEPNS0_7runtimeESt10shared_ptrINS0_8dag_nodeEEPNS0_9operationE(ptr dead_on_unwind writable sret(%"struct.std::pair") align 8 %48, ptr noundef %287, ptr noundef %49, ptr noundef %289)
          to label %291 unwind label %296

291:                                              ; preds = %290
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %49) #7
  %292 = getelementptr inbounds %"struct.std::pair", ptr %48, i32 0, i32 1
  %293 = call noundef zeroext i1 @_ZN7hipsycl2rteqERKNS0_9device_idES3_(ptr noundef nonnull align 4 dereferenceable(16) %292, ptr noundef nonnull align 4 dereferenceable(16) %17)
  br i1 %293, label %294, label %295

294:                                              ; preds = %291
  br label %301

295:                                              ; preds = %291
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str, i32 noundef 397, ptr noundef @__PRETTY_FUNCTION__._ZN7hipsycl2rt20dag_direct_scheduler6submitESt10shared_ptrINS0_8dag_nodeEE) #8
  unreachable

296:                                              ; preds = %290, %285
  %297 = landingpad { ptr, i32 }
          cleanup
  %298 = extractvalue { ptr, i32 } %297, 0
  store ptr %298, ptr %9, align 8
  %299 = extractvalue { ptr, i32 } %297, 1
  store i32 %299, ptr %10, align 4
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %49) #7
  br label %312

300:                                              ; No predecessors!
  br label %301

301:                                              ; preds = %300, %294
  %302 = getelementptr inbounds %"struct.std::pair", ptr %48, i32 0, i32 0
  %303 = load ptr, ptr %302, align 8, !tbaa !22
  call void @_ZNSt10shared_ptrIN7hipsycl2rt8dag_nodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %50, ptr noundef nonnull align 8 dereferenceable(16) %1) #7
  %304 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #7
  %305 = invoke noundef ptr @_ZNK7hipsycl2rt8dag_node13get_operationEv(ptr noundef nonnull align 8 dereferenceable(384) %304)
          to label %306 unwind label %308

306:                                              ; preds = %301
  invoke void @_ZN7hipsycl2rt12_GLOBAL__N_16submitEPNS0_16backend_executorESt10shared_ptrINS0_8dag_nodeEEPNS0_9operationE(ptr noundef %303, ptr noundef %50, ptr noundef %305)
          to label %307 unwind label %308

307:                                              ; preds = %306
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %50) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %48) #7
  br label %313

308:                                              ; preds = %306, %301
  %309 = landingpad { ptr, i32 }
          cleanup
  %310 = extractvalue { ptr, i32 } %309, 0
  store ptr %310, ptr %9, align 8
  %311 = extractvalue { ptr, i32 } %309, 1
  store i32 %311, ptr %10, align 4
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %50) #7
  br label %312

312:                                              ; preds = %308, %296
  call void @llvm.lifetime.end.p0(i64 24, ptr %48) #7
  br label %317

313:                                              ; preds = %307, %282
  store i32 0, ptr %29, align 4
  br label %314

314:                                              ; preds = %313, %280, %249
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #7
  %315 = load i32, ptr %29, align 4
  switch i32 %315, label %323 [
    i32 0, label %316
    i32 1, label %316
  ]

316:                                              ; preds = %314, %314, %62
  ret void

317:                                              ; preds = %312, %284, %248, %130
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #7
  br label %318

318:                                              ; preds = %317, %92, %91
  %319 = load ptr, ptr %9, align 8
  %320 = load i32, ptr %10, align 4
  %321 = insertvalue { ptr, i32 } poison, ptr %319, 0
  %322 = insertvalue { ptr, i32 } %321, i32 %320, 1
  resume { ptr, i32 } %322

323:                                              ; preds = %314
  unreachable
}

; 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

declare noundef nonnull align 8 dereferenceable(132) ptr @_ZN7hipsycl2rt8dag_node19get_execution_hintsEv(ptr noundef nonnull align 8 dereferenceable(384)) #2

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

declare void @_ZN7hipsycl2rt14register_errorERKNS0_15source_locationERKNS0_10error_infoE(ptr dead_on_unwind writable sret(%"class.hipsycl::rt::result") align 8, ptr noundef nonnull align 8 dereferenceable(68), ptr noundef nonnull align 8 dereferenceable(76)) #2

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7hipsycl2rt15source_locationC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_i(ptr noundef nonnull align 8 dereferenceable(68), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7hipsycl2rt10error_infoC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10error_typeE(ptr noundef nonnull align 8 dereferenceable(76), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) unnamed_addr #0 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN7hipsycl2rt12_GLOBAL__N_116abort_submissionESt10shared_ptrINS0_8dag_nodeEE(ptr noundef) #0

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { i64, i64 } @_ZNK7hipsycl2rt5hints14bind_to_device13get_device_idEv(ptr noundef nonnull align 4 dereferenceable(20)) #1 align 2

declare void @_ZN7hipsycl2rt8dag_node16assign_to_deviceENS0_9device_idE(ptr noundef nonnull align 8 dereferenceable(384), i64, i64) #2

; 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) #5

declare noundef nonnull align 8 dereferenceable(160) ptr @_ZNK7hipsycl2rt8dag_node16get_requirementsEv(ptr noundef nonnull align 8 dereferenceable(384)) #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)) #4

; 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") 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 uwtable
declare hidden void @_ZN7hipsycl2rt12_GLOBAL__N_125assign_devices_or_defaultESt10shared_ptrINS0_8dag_nodeEENS0_9device_idE(ptr noundef, i64, i64) #0

; 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 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

declare noundef ptr @_ZNK7hipsycl2rt8dag_node13get_operationEv(ptr noundef nonnull align 8 dereferenceable(384)) #2

declare noundef zeroext i1 @_ZNK7hipsycl2rt8dag_node12is_submittedEv(ptr noundef nonnull align 8 dereferenceable(384)) #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN7hipsycl2rt12_GLOBAL__N_118submit_requirementEPNS0_7runtimeESt10shared_ptrINS0_8dag_nodeEE(ptr dead_on_unwind noalias writable sret(%"class.hipsycl::rt::result") align 8, ptr noundef, ptr noundef) #0

declare noundef zeroext i1 @_ZNK7hipsycl2rt6result10is_successEv(ptr noundef nonnull align 8 dereferenceable(8)) #2

declare void @_ZN7hipsycl2rt14register_errorERKNS0_6resultE(ptr noundef nonnull align 8 dereferenceable(8)) #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN7hipsycl2rt12_GLOBAL__N_115select_executorEPNS0_7runtimeESt10shared_ptrINS0_8dag_nodeEEPNS0_9operationE(ptr dead_on_unwind noalias writable sret(%"struct.std::pair") align 8, ptr noundef, ptr noundef, ptr noundef) #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7hipsycl2rteqERKNS0_9device_idES3_(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(16)) #0

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN7hipsycl2rt12_GLOBAL__N_16submitEPNS0_16backend_executorESt10shared_ptrINS0_8dag_nodeEEPNS0_9operationE(ptr noundef, ptr noundef, ptr noundef) #0

; 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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress 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 = { "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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { 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 #7 = { nounwind }
attributes #8 = { 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 = !{i64 0, i64 4, !10, i64 4, i64 4, !12, i64 8, i64 4, !14, i64 12, i64 4, !16}
!10 = !{!11, !11, i64 0}
!11 = !{!"_ZTSN7hipsycl2rt10backend_idE", !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"_ZTSN7hipsycl2rt17hardware_platformE", !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"_ZTSN7hipsycl2rt12api_platformE", !7, i64 0}
!16 = !{!17, !17, i64 0}
!17 = !{!"int", !7, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"vtable pointer", !8, i64 0}
!20 = !{!21, !6, i64 0}
!21 = !{!"_ZTSN7hipsycl2rt20dag_direct_schedulerE", !6, i64 0}
!22 = !{!23, !6, i64 0}
!23 = !{!"_ZTSSt4pairIPN7hipsycl2rt16backend_executorENS1_9device_idEE", !6, i64 0, !24, i64 8}
!24 = !{!"_ZTSN7hipsycl2rt9device_idE", !25, i64 0, !17, i64 12}
!25 = !{!"_ZTSN7hipsycl2rt18backend_descriptorE", !11, i64 0, !13, i64 4, !15, i64 8}


; 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.hipsycl::rt::result" = type { %"class.std::unique_ptr.10" }
%"class.std::unique_ptr.10" = type { %"struct.std::__uniq_ptr_data.11" }
%"struct.std::__uniq_ptr_data.11" = type { %"class.std::__uniq_ptr_impl.12" }
%"class.std::__uniq_ptr_impl.12" = type { %"class.std::tuple.13" }
%"class.std::tuple.13" = type { %"struct.std::_Tuple_impl.14" }
%"struct.std::_Tuple_impl.14" = type { %"struct.std::_Head_base.17" }
%"struct.std::_Head_base.17" = type { ptr }
%"class.hipsycl::rt::source_location" = type <{ %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i32, [4 x i8] }>
%"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.std::allocator.18" = type { i8 }
%"class.hipsycl::rt::error_info" = type <{ %"class.std::__cxx11::basic_string", %"class.hipsycl::rt::error_code", i32, [4 x i8] }>
%"class.hipsycl::rt::error_code" = type { %"class.std::__cxx11::basic_string", i8, i32 }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.hipsycl::rt::device_id" = type { %"struct.hipsycl::rt::backend_descriptor", i32 }
%"struct.hipsycl::rt::backend_descriptor" = type { i32, i32, i32 }
%"class.__gnu_cxx::__normal_iterator" = 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 }
%"struct.std::pair" = type { ptr, %"class.hipsycl::rt::device_id" }

@__func__._ZN7hipsycl2rt20dag_direct_scheduler6submitESt10shared_ptrINS0_8dag_nodeEE = external hidden unnamed_addr constant [7 x i8], align 1
@.str = external hidden unnamed_addr constant [94 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [88 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [94 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [41 x i8], align 1
@__PRETTY_FUNCTION__._ZN7hipsycl2rt20dag_direct_scheduler6submitESt10shared_ptrINS0_8dag_nodeEE = external hidden unnamed_addr constant [61 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7hipsycl2rt20dag_direct_scheduler6submitESt10shared_ptrINS0_8dag_nodeEE(ptr nocapture noundef nonnull readonly align 8 dereferenceable(8) %0, ptr noundef nonnull %1) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.hipsycl::rt::result", align 8
  %4 = alloca %"class.hipsycl::rt::source_location", align 8
  %5 = alloca %"class.std::__cxx11::basic_string", align 8
  %6 = alloca %"class.std::allocator.18", align 1
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::allocator.18", align 1
  %9 = alloca %"class.hipsycl::rt::error_info", align 8
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::allocator.18", align 1
  %12 = alloca %"class.std::shared_ptr", align 8
  %13 = alloca %"class.hipsycl::rt::device_id", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca %"class.std::weak_ptr", align 8
  %17 = alloca %"class.std::shared_ptr", align 8
  %18 = alloca %"class.std::shared_ptr", align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %21 = alloca %"class.std::weak_ptr", align 8
  %22 = alloca %"class.std::shared_ptr", align 8
  %23 = alloca %"class.hipsycl::rt::result", align 8
  %24 = alloca %"class.hipsycl::rt::source_location", align 8
  %25 = alloca %"class.std::__cxx11::basic_string", align 8
  %26 = alloca %"class.std::allocator.18", align 1
  %27 = alloca %"class.std::__cxx11::basic_string", align 8
  %28 = alloca %"class.std::allocator.18", align 1
  %29 = alloca %"class.hipsycl::rt::error_info", align 8
  %30 = alloca %"class.std::__cxx11::basic_string", align 8
  %31 = alloca %"class.std::allocator.18", align 1
  %32 = alloca %"class.std::shared_ptr", align 8
  %33 = alloca %"class.hipsycl::rt::result", align 8
  %34 = alloca %"class.std::shared_ptr", align 8
  %35 = alloca %"class.std::shared_ptr", align 8
  %36 = alloca %"class.hipsycl::rt::result", align 8
  %37 = alloca %"class.std::shared_ptr", align 8
  %38 = alloca %"class.std::shared_ptr", align 8
  %39 = alloca %"struct.std::pair", align 8
  %40 = alloca %"class.std::shared_ptr", align 8
  %41 = alloca %"class.std::shared_ptr", align 8
  %42 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #6
  %43 = tail call noundef nonnull align 8 dereferenceable(132) ptr @_ZN7hipsycl2rt8dag_node19get_execution_hintsEv(ptr noundef nonnull align 8 dereferenceable(384) %42)
  %44 = tail call noundef zeroext i1 @_ZNK7hipsycl2rt15execution_hints8has_hintINS0_5hints14bind_to_deviceEEEbv(ptr noundef nonnull align 8 dereferenceable(132) %43)
  br i1 %44, label %72, label %45

45:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull @__func__._ZN7hipsycl2rt20dag_direct_scheduler6submitESt10shared_ptrINS0_8dag_nodeEE, ptr noundef nonnull align 1 dereferenceable(1) %6)
          to label %46 unwind label %53

46:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull @.str, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %47 unwind label %55

47:                                               ; preds = %46
  invoke void @_ZN7hipsycl2rt15source_locationC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_i(ptr noundef nonnull align 8 dereferenceable(68) %4, ptr noundef nonnull align 8 dereferenceable(32) %5, ptr noundef nonnull align 8 dereferenceable(32) %7, i32 noundef 340)
          to label %48 unwind label %57

48:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull @.str.1, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %49 unwind label %59

49:                                               ; preds = %48
  invoke void @_ZN7hipsycl2rt10error_infoC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10error_typeE(ptr noundef nonnull align 8 dereferenceable(76) %9, ptr noundef nonnull align 8 dereferenceable(32) %10, i32 noundef 14)
          to label %50 unwind label %61

50:                                               ; preds = %49
  invoke void @_ZN7hipsycl2rt14register_errorERKNS0_15source_locationERKNS0_10error_infoE(ptr dead_on_unwind nonnull writable sret(%"class.hipsycl::rt::result") align 8 %3, ptr noundef nonnull align 8 dereferenceable(68) %4, ptr noundef nonnull align 8 dereferenceable(76) %9)
          to label %51 unwind label %63

51:                                               ; preds = %50
  call void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  call void @_ZN7hipsycl2rt10error_infoD2Ev(ptr noundef nonnull align 8 dereferenceable(76) %9) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %9) #6
  call void @_ZN7hipsycl2rt15source_locationD2Ev(ptr noundef nonnull align 8 dereferenceable(68) %4) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %4) #6
  call void @_ZNSt10shared_ptrIN7hipsycl2rt8dag_nodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(16) %1) #6
  invoke void @_ZN7hipsycl2rt12_GLOBAL__N_116abort_submissionESt10shared_ptrINS0_8dag_nodeEE(ptr noundef nonnull %12)
          to label %52 unwind label %70

52:                                               ; preds = %51
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #6
  br label %205

53:                                               ; preds = %45
  %54 = landingpad { ptr, i32 }
          cleanup
  br label %69

55:                                               ; preds = %46
  %56 = landingpad { ptr, i32 }
          cleanup
  br label %68

57:                                               ; preds = %47
  %58 = landingpad { ptr, i32 }
          cleanup
  br label %67

59:                                               ; preds = %48
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %66

61:                                               ; preds = %49
  %62 = landingpad { ptr, i32 }
          cleanup
  br label %65

63:                                               ; preds = %50
  %64 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7hipsycl2rt10error_infoD2Ev(ptr noundef nonnull align 8 dereferenceable(76) %9) #6
  br label %65

65:                                               ; preds = %63, %61
  %.pn = phi { ptr, i32 } [ %64, %63 ], [ %62, %61 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  br label %66

66:                                               ; preds = %65, %59
  %.pn.pn = phi { ptr, i32 } [ %.pn, %65 ], [ %60, %59 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %9) #6
  call void @_ZN7hipsycl2rt15source_locationD2Ev(ptr noundef nonnull align 8 dereferenceable(68) %4) #6
  br label %67

67:                                               ; preds = %66, %57
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %66 ], [ %58, %57 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #6
  br label %68

68:                                               ; preds = %67, %55
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %67 ], [ %56, %55 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #6
  br label %69

69:                                               ; preds = %68, %53
  %.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn.pn, %68 ], [ %54, %53 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %4) #6
  br label %207

70:                                               ; preds = %51
  %71 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #6
  br label %207

72:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #6
  %73 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #6
  %74 = tail call noundef nonnull align 8 dereferenceable(132) ptr @_ZN7hipsycl2rt8dag_node19get_execution_hintsEv(ptr noundef nonnull align 8 dereferenceable(384) %73)
  %75 = tail call noundef ptr @_ZNK7hipsycl2rt15execution_hints8get_hintINS0_5hints14bind_to_deviceETnNSt9enable_ifIXsr3stdE12is_base_of_vINS3_14execution_hintET_EEiE4typeELi0EEEPKS7_v(ptr noundef nonnull align 8 dereferenceable(132) %74)
  %76 = tail call { i64, i64 } @_ZNK7hipsycl2rt5hints14bind_to_device13get_device_idEv(ptr noundef nonnull align 4 dereferenceable(20) %75)
  %77 = extractvalue { i64, i64 } %76, 0
  store i64 %77, ptr %13, align 8
  %78 = getelementptr inbounds i8, ptr %13, i64 8
  %79 = extractvalue { i64, i64 } %76, 1
  store i64 %79, ptr %78, align 8
  %80 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #6
  tail call void @_ZN7hipsycl2rt8dag_node16assign_to_deviceENS0_9device_idE(ptr noundef nonnull align 8 dereferenceable(384) %80, i64 %77, i64 %79)
  %81 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #6
  %82 = tail call noundef nonnull align 8 dereferenceable(160) ptr @_ZNK7hipsycl2rt8dag_node16get_requirementsEv(ptr noundef nonnull align 8 dereferenceable(384) %81)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #6
  %83 = tail call ptr @_ZNKSt6vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(160) %82) #6
  store ptr %83, ptr %14, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #6
  %84 = tail call ptr @_ZNKSt6vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(160) %82) #6
  store ptr %84, ptr %15, align 8
  %85 = 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) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #6
  br i1 %85, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %97, %72
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #6
  %86 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #6
  %87 = call noundef nonnull align 8 dereferenceable(160) ptr @_ZNK7hipsycl2rt8dag_node16get_requirementsEv(ptr noundef nonnull align 8 dereferenceable(384) %86)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %19) #6
  %88 = call ptr @_ZNKSt6vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(160) %87) #6
  store ptr %88, ptr %19, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #6
  %89 = call ptr @_ZNKSt6vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(160) %87) #6
  store ptr %89, ptr %20, align 8
  %90 = 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) %19, ptr noundef nonnull align 8 dereferenceable(8) %20) #6
  br i1 %90, label %.lr.ph69, label %._crit_edge70

.lr.ph:                                           ; preds = %72, %97
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %16) #6
  %91 = 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) %14) #6
  call void @_ZNSt8weak_ptrIN7hipsycl2rt8dag_nodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(16) %91) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %17) #6
  call void @_ZNKSt8weak_ptrIN7hipsycl2rt8dag_nodeEE4lockEv(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr") align 8 %17, ptr noundef nonnull align 8 dereferenceable(16) %16) #6
  %92 = call noundef zeroext i1 @_ZNKSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EEcvbEv(ptr noundef nonnull align 8 dereferenceable(16) %17) #6
  br i1 %92, label %93, label %97

93:                                               ; preds = %.lr.ph
  call void @_ZNSt10shared_ptrIN7hipsycl2rt8dag_nodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(16) %17) #6
  invoke void @_ZN7hipsycl2rt12_GLOBAL__N_125assign_devices_or_defaultESt10shared_ptrINS0_8dag_nodeEENS0_9device_idE(ptr noundef nonnull %18, i64 %77, i64 %79)
          to label %94 unwind label %95

94:                                               ; preds = %93
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #6
  br label %97

95:                                               ; preds = %93
  %96 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #6
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #6
  call void @_ZNSt10__weak_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %16) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #6
  br label %206

97:                                               ; preds = %94, %.lr.ph
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #6
  call void @_ZNSt10__weak_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %16) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %16) #6
  %98 = 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) %14) #6
  %99 = 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) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #6
  br i1 %99, label %.lr.ph, label %._crit_edge

.lr.ph69:                                         ; preds = %._crit_edge, %.critedge63
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %21) #6
  %100 = 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) %19) #6
  call void @_ZNSt8weak_ptrIN7hipsycl2rt8dag_nodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(16) %100) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %22) #6
  call void @_ZNKSt8weak_ptrIN7hipsycl2rt8dag_nodeEE4lockEv(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr") align 8 %22, ptr noundef nonnull align 8 dereferenceable(16) %21) #6
  %101 = call noundef zeroext i1 @_ZNKSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EEcvbEv(ptr noundef nonnull align 8 dereferenceable(16) %22) #6
  br i1 %101, label %102, label %.critedge63

102:                                              ; preds = %.lr.ph69
  %103 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %22) #6
  %104 = invoke noundef ptr @_ZNK7hipsycl2rt8dag_node13get_operationEv(ptr noundef nonnull align 8 dereferenceable(384) %103)
          to label %105 unwind label %123

105:                                              ; preds = %102
  %106 = load ptr, ptr %104, align 8, !tbaa !5
  %107 = getelementptr inbounds i8, ptr %106, i64 24
  %108 = load ptr, ptr %107, align 8
  %109 = invoke noundef zeroext i1 %108(ptr noundef nonnull align 8 dereferenceable(40) %104)
          to label %110 unwind label %123

110:                                              ; preds = %105
  br i1 %109, label %144, label %111

111:                                              ; preds = %110
  %112 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %22) #6
  %113 = invoke noundef zeroext i1 @_ZNK7hipsycl2rt8dag_node12is_submittedEv(ptr noundef nonnull align 8 dereferenceable(384) %112)
          to label %114 unwind label %123

114:                                              ; preds = %111
  br i1 %113, label %.critedge63, label %115

115:                                              ; preds = %114
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %24) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %25) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %26) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %25, ptr noundef nonnull @__func__._ZN7hipsycl2rt20dag_direct_scheduler6submitESt10shared_ptrINS0_8dag_nodeEE, ptr noundef nonnull align 1 dereferenceable(1) %26)
          to label %116 unwind label %125

116:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %27) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %28) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %27, ptr noundef nonnull @.str, ptr noundef nonnull align 1 dereferenceable(1) %28)
          to label %117 unwind label %127

117:                                              ; preds = %116
  invoke void @_ZN7hipsycl2rt15source_locationC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_i(ptr noundef nonnull align 8 dereferenceable(68) %24, ptr noundef nonnull align 8 dereferenceable(32) %25, ptr noundef nonnull align 8 dereferenceable(32) %27, i32 noundef 362)
          to label %118 unwind label %129

118:                                              ; preds = %117
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %29) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %30) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %31) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %31) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %30, ptr noundef nonnull @.str.2, ptr noundef nonnull align 1 dereferenceable(1) %31)
          to label %119 unwind label %131

119:                                              ; preds = %118
  invoke void @_ZN7hipsycl2rt10error_infoC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10error_typeE(ptr noundef nonnull align 8 dereferenceable(76) %29, ptr noundef nonnull align 8 dereferenceable(32) %30, i32 noundef 14)
          to label %120 unwind label %133

120:                                              ; preds = %119
  invoke void @_ZN7hipsycl2rt14register_errorERKNS0_15source_locationERKNS0_10error_infoE(ptr dead_on_unwind nonnull writable sret(%"class.hipsycl::rt::result") align 8 %23, ptr noundef nonnull align 8 dereferenceable(68) %24, ptr noundef nonnull align 8 dereferenceable(76) %29)
          to label %121 unwind label %135

121:                                              ; preds = %120
  call void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %23) #6
  call void @_ZN7hipsycl2rt10error_infoD2Ev(ptr noundef nonnull align 8 dereferenceable(76) %29) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %30) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %31) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %31) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %30) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %29) #6
  call void @_ZN7hipsycl2rt15source_locationD2Ev(ptr noundef nonnull align 8 dereferenceable(68) %24) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %28) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %27) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %26) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %25) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %24) #6
  call void @_ZNSt10shared_ptrIN7hipsycl2rt8dag_nodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %32, ptr noundef nonnull align 8 dereferenceable(16) %1) #6
  invoke void @_ZN7hipsycl2rt12_GLOBAL__N_116abort_submissionESt10shared_ptrINS0_8dag_nodeEE(ptr noundef nonnull %32)
          to label %122 unwind label %142

122:                                              ; preds = %121
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %32) #6
  br label %160

123:                                              ; preds = %111, %105, %102
  %124 = landingpad { ptr, i32 }
          cleanup
  br label %161

125:                                              ; preds = %115
  %126 = landingpad { ptr, i32 }
          cleanup
  br label %141

127:                                              ; preds = %116
  %128 = landingpad { ptr, i32 }
          cleanup
  br label %140

129:                                              ; preds = %117
  %130 = landingpad { ptr, i32 }
          cleanup
  br label %139

131:                                              ; preds = %118
  %132 = landingpad { ptr, i32 }
          cleanup
  br label %138

133:                                              ; preds = %119
  %134 = landingpad { ptr, i32 }
          cleanup
  br label %137

135:                                              ; preds = %120
  %136 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7hipsycl2rt10error_infoD2Ev(ptr noundef nonnull align 8 dereferenceable(76) %29) #6
  br label %137

137:                                              ; preds = %135, %133
  %.pn44 = phi { ptr, i32 } [ %136, %135 ], [ %134, %133 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %30) #6
  br label %138

138:                                              ; preds = %137, %131
  %.pn44.pn = phi { ptr, i32 } [ %.pn44, %137 ], [ %132, %131 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %31) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %31) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %30) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %29) #6
  call void @_ZN7hipsycl2rt15source_locationD2Ev(ptr noundef nonnull align 8 dereferenceable(68) %24) #6
  br label %139

139:                                              ; preds = %138, %129
  %.pn44.pn.pn = phi { ptr, i32 } [ %.pn44.pn, %138 ], [ %130, %129 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #6
  br label %140

140:                                              ; preds = %139, %127
  %.pn44.pn.pn.pn = phi { ptr, i32 } [ %.pn44.pn.pn, %139 ], [ %128, %127 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %28) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %28) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %27) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %25) #6
  br label %141

141:                                              ; preds = %140, %125
  %.pn44.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn44.pn.pn.pn, %140 ], [ %126, %125 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %26) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %26) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %25) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %24) #6
  br label %161

142:                                              ; preds = %121
  %143 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %32) #6
  br label %161

144:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %33) #6
  %145 = load ptr, ptr %0, align 8, !tbaa !8
  call void @_ZNSt10shared_ptrIN7hipsycl2rt8dag_nodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %34, ptr noundef nonnull align 8 dereferenceable(16) %22) #6
  invoke void @_ZN7hipsycl2rt12_GLOBAL__N_118submit_requirementEPNS0_7runtimeESt10shared_ptrINS0_8dag_nodeEE(ptr dead_on_unwind nonnull writable sret(%"class.hipsycl::rt::result") align 8 %33, ptr noundef %145, ptr noundef nonnull %34)
          to label %146 unwind label %152

146:                                              ; preds = %144
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %34) #6
  %147 = invoke noundef zeroext i1 @_ZNK7hipsycl2rt6result10is_successEv(ptr noundef nonnull align 8 dereferenceable(8) %33)
          to label %148 unwind label %.loopexit

148:                                              ; preds = %146
  br i1 %147, label %.critedge, label %149

149:                                              ; preds = %148
  invoke void @_ZN7hipsycl2rt14register_errorERKNS0_6resultE(ptr noundef nonnull align 8 dereferenceable(8) %33)
          to label %150 unwind label %.loopexit.split-lp

150:                                              ; preds = %149
  call void @_ZNSt10shared_ptrIN7hipsycl2rt8dag_nodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %35, ptr noundef nonnull align 8 dereferenceable(16) %1) #6
  invoke void @_ZN7hipsycl2rt12_GLOBAL__N_116abort_submissionESt10shared_ptrINS0_8dag_nodeEE(ptr noundef nonnull %35)
          to label %151 unwind label %154

151:                                              ; preds = %150
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %35) #6
  call void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %33) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %33) #6
  br label %160

152:                                              ; preds = %144
  %153 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %34) #6
  br label %157

.loopexit:                                        ; preds = %146
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %156

.loopexit.split-lp:                               ; preds = %149
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %156

154:                                              ; preds = %150
  %155 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %35) #6
  br label %156

156:                                              ; preds = %.loopexit, %.loopexit.split-lp, %154
  %.pn50 = phi { ptr, i32 } [ %155, %154 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %33) #6
  br label %157

157:                                              ; preds = %156, %152
  %.pn50.pn = phi { ptr, i32 } [ %.pn50, %156 ], [ %153, %152 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %33) #6
  br label %161

.critedge:                                        ; preds = %148
  call void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %33) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %33) #6
  br label %.critedge63

.critedge63:                                      ; preds = %.critedge, %114, %.lr.ph69
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %22) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %22) #6
  call void @_ZNSt10__weak_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %21) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %21) #6
  %158 = 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) %19) #6
  %159 = 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) %19, ptr noundef nonnull align 8 dereferenceable(8) %20) #6
  br i1 %159, label %.lr.ph69, label %._crit_edge70

160:                                              ; preds = %151, %122
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %22) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %22) #6
  call void @_ZNSt10__weak_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %21) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #6
  br label %204

161:                                              ; preds = %157, %142, %141, %123
  %.pn50.pn.pn = phi { ptr, i32 } [ %.pn50.pn, %157 ], [ %143, %142 ], [ %.pn44.pn.pn.pn.pn, %141 ], [ %124, %123 ]
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %22) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %22) #6
  call void @_ZNSt10__weak_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %21) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %21) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #6
  br label %206

._crit_edge70:                                    ; preds = %.critedge63, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %19) #6
  %162 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #6
  %163 = call noundef ptr @_ZNK7hipsycl2rt8dag_node13get_operationEv(ptr noundef nonnull align 8 dereferenceable(384) %162)
  %164 = load ptr, ptr %163, align 8, !tbaa !5
  %165 = getelementptr inbounds i8, ptr %164, i64 24
  %166 = load ptr, ptr %165, align 8
  %167 = call noundef zeroext i1 %166(ptr noundef nonnull align 8 dereferenceable(40) %163)
  br i1 %167, label %168, label %184

168:                                              ; preds = %._crit_edge70
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %36) #6
  %169 = load ptr, ptr %0, align 8, !tbaa !8
  call void @_ZNSt10shared_ptrIN7hipsycl2rt8dag_nodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %37, ptr noundef nonnull align 8 dereferenceable(16) %1) #6
  invoke void @_ZN7hipsycl2rt12_GLOBAL__N_118submit_requirementEPNS0_7runtimeESt10shared_ptrINS0_8dag_nodeEE(ptr dead_on_unwind nonnull writable sret(%"class.hipsycl::rt::result") align 8 %36, ptr noundef %169, ptr noundef nonnull %37)
          to label %170 unwind label %176

170:                                              ; preds = %168
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %37) #6
  %171 = invoke noundef zeroext i1 @_ZNK7hipsycl2rt6result10is_successEv(ptr noundef nonnull align 8 dereferenceable(8) %36)
          to label %172 unwind label %178

172:                                              ; preds = %170
  br i1 %171, label %.critedge67, label %173

173:                                              ; preds = %172
  invoke void @_ZN7hipsycl2rt14register_errorERKNS0_6resultE(ptr noundef nonnull align 8 dereferenceable(8) %36)
          to label %174 unwind label %178

174:                                              ; preds = %173
  call void @_ZNSt10shared_ptrIN7hipsycl2rt8dag_nodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %38, ptr noundef nonnull align 8 dereferenceable(16) %1) #6
  invoke void @_ZN7hipsycl2rt12_GLOBAL__N_116abort_submissionESt10shared_ptrINS0_8dag_nodeEE(ptr noundef nonnull %38)
          to label %175 unwind label %180

175:                                              ; preds = %174
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %38) #6
  call void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %36) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %36) #6
  br label %204

176:                                              ; preds = %168
  %177 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %37) #6
  br label %183

178:                                              ; preds = %173, %170
  %179 = landingpad { ptr, i32 }
          cleanup
  br label %182

180:                                              ; preds = %174
  %181 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %38) #6
  br label %182

182:                                              ; preds = %180, %178
  %.pn56 = phi { ptr, i32 } [ %181, %180 ], [ %179, %178 ]
  call void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %36) #6
  br label %183

183:                                              ; preds = %182, %176
  %.pn56.pn = phi { ptr, i32 } [ %.pn56, %182 ], [ %177, %176 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %36) #6
  br label %206

184:                                              ; preds = %._crit_edge70
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %39) #6
  %185 = load ptr, ptr %0, align 8, !tbaa !8
  call void @_ZNSt10shared_ptrIN7hipsycl2rt8dag_nodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %40, ptr noundef nonnull align 8 dereferenceable(16) %1) #6
  %186 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #6
  %187 = invoke noundef ptr @_ZNK7hipsycl2rt8dag_node13get_operationEv(ptr noundef nonnull align 8 dereferenceable(384) %186)
          to label %188 unwind label %193

188:                                              ; preds = %184
  invoke void @_ZN7hipsycl2rt12_GLOBAL__N_115select_executorEPNS0_7runtimeESt10shared_ptrINS0_8dag_nodeEEPNS0_9operationE(ptr dead_on_unwind nonnull writable sret(%"struct.std::pair") align 8 %39, ptr noundef %185, ptr noundef nonnull %40, ptr noundef %187)
          to label %189 unwind label %193

189:                                              ; preds = %188
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %40) #6
  %190 = getelementptr inbounds i8, ptr %39, i64 8
  %191 = call noundef zeroext i1 @_ZN7hipsycl2rteqERKNS0_9device_idES3_(ptr noundef nonnull align 4 dereferenceable(16) %190, ptr noundef nonnull align 4 dereferenceable(16) %13)
  br i1 %191, label %195, label %192

192:                                              ; preds = %189
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str, i32 noundef 397, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN7hipsycl2rt20dag_direct_scheduler6submitESt10shared_ptrINS0_8dag_nodeEE) #7
  unreachable

193:                                              ; preds = %188, %184
  %194 = landingpad { ptr, i32 }
          cleanup
  br label %203

195:                                              ; preds = %189
  %196 = load ptr, ptr %39, align 8, !tbaa !12
  call void @_ZNSt10shared_ptrIN7hipsycl2rt8dag_nodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %41, ptr noundef nonnull align 8 dereferenceable(16) %1) #6
  %197 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #6
  %198 = invoke noundef ptr @_ZNK7hipsycl2rt8dag_node13get_operationEv(ptr noundef nonnull align 8 dereferenceable(384) %197)
          to label %199 unwind label %201

199:                                              ; preds = %195
  invoke void @_ZN7hipsycl2rt12_GLOBAL__N_16submitEPNS0_16backend_executorESt10shared_ptrINS0_8dag_nodeEEPNS0_9operationE(ptr noundef %196, ptr noundef nonnull %41, ptr noundef %198)
          to label %200 unwind label %201

200:                                              ; preds = %199
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %41) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %39) #6
  br label %204

201:                                              ; preds = %199, %195
  %202 = landingpad { ptr, i32 }
          cleanup
  br label %203

203:                                              ; preds = %201, %193
  %.sink = phi ptr [ %41, %201 ], [ %40, %193 ]
  %.pn54 = phi { ptr, i32 } [ %202, %201 ], [ %194, %193 ]
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %.sink) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %39) #6
  br label %206

.critedge67:                                      ; preds = %172
  call void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %36) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %36) #6
  br label %204

204:                                              ; preds = %160, %175, %200, %.critedge67
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #6
  br label %205

205:                                              ; preds = %204, %52
  ret void

206:                                              ; preds = %203, %183, %161, %95
  %.pn59 = phi { ptr, i32 } [ %96, %95 ], [ %.pn56.pn, %183 ], [ %.pn54, %203 ], [ %.pn50.pn.pn, %161 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #6
  br label %207

207:                                              ; preds = %206, %70, %69
  %.pn59.pn = phi { ptr, i32 } [ %.pn59, %206 ], [ %71, %70 ], [ %.pn.pn.pn.pn.pn, %69 ]
  resume { ptr, i32 } %.pn59.pn
}

; 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

declare noundef nonnull align 8 dereferenceable(132) ptr @_ZN7hipsycl2rt8dag_node19get_execution_hintsEv(ptr noundef nonnull align 8 dereferenceable(384)) local_unnamed_addr #2

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

declare void @_ZN7hipsycl2rt14register_errorERKNS0_15source_locationERKNS0_10error_infoE(ptr dead_on_unwind writable sret(%"class.hipsycl::rt::result") align 8, ptr noundef nonnull align 8 dereferenceable(68), ptr noundef nonnull align 8 dereferenceable(76)) local_unnamed_addr #2

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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7hipsycl2rt15source_locationC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_i(ptr noundef nonnull align 8 dereferenceable(68), ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7hipsycl2rt10error_infoC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10error_typeE(ptr noundef nonnull align 8 dereferenceable(76), ptr noundef nonnull align 8 dereferenceable(32), i32 noundef) unnamed_addr #0 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN7hipsycl2rt12_GLOBAL__N_116abort_submissionESt10shared_ptrINS0_8dag_nodeEE(ptr noundef) local_unnamed_addr #0

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { i64, i64 } @_ZNK7hipsycl2rt5hints14bind_to_device13get_device_idEv(ptr noundef nonnull align 4 dereferenceable(20)) local_unnamed_addr #1 align 2

declare void @_ZN7hipsycl2rt8dag_node16assign_to_deviceENS0_9device_idE(ptr noundef nonnull align 8 dereferenceable(384), i64, i64) local_unnamed_addr #2

declare noundef nonnull align 8 dereferenceable(160) ptr @_ZNK7hipsycl2rt8dag_node16get_requirementsEv(ptr noundef nonnull align 8 dereferenceable(384)) local_unnamed_addr #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 #4

; 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") 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 uwtable
declare hidden void @_ZN7hipsycl2rt12_GLOBAL__N_125assign_devices_or_defaultESt10shared_ptrINS0_8dag_nodeEENS0_9device_idE(ptr noundef, i64, i64) local_unnamed_addr #0

; 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 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

declare noundef ptr @_ZNK7hipsycl2rt8dag_node13get_operationEv(ptr noundef nonnull align 8 dereferenceable(384)) local_unnamed_addr #2

declare noundef zeroext i1 @_ZNK7hipsycl2rt8dag_node12is_submittedEv(ptr noundef nonnull align 8 dereferenceable(384)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN7hipsycl2rt12_GLOBAL__N_118submit_requirementEPNS0_7runtimeESt10shared_ptrINS0_8dag_nodeEE(ptr dead_on_unwind noalias writable sret(%"class.hipsycl::rt::result") align 8, ptr noundef, ptr noundef) local_unnamed_addr #0

declare noundef zeroext i1 @_ZNK7hipsycl2rt6result10is_successEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

declare void @_ZN7hipsycl2rt14register_errorERKNS0_6resultE(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN7hipsycl2rt12_GLOBAL__N_115select_executorEPNS0_7runtimeESt10shared_ptrINS0_8dag_nodeEEPNS0_9operationE(ptr dead_on_unwind noalias writable sret(%"struct.std::pair") align 8, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZN7hipsycl2rteqERKNS0_9device_idES3_(ptr noundef nonnull align 4 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #0

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN7hipsycl2rt12_GLOBAL__N_16submitEPNS0_16backend_executorESt10shared_ptrINS0_8dag_nodeEEPNS0_9operationE(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; 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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress 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 = { "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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { 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 #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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !10, i64 0}
!9 = !{!"_ZTSN7hipsycl2rt20dag_direct_schedulerE", !10, i64 0}
!10 = !{!"any pointer", !11, i64 0}
!11 = !{!"omnipotent char", !7, i64 0}
!12 = !{!13, !10, i64 0}
!13 = !{!"_ZTSSt4pairIPN7hipsycl2rt16backend_executorENS1_9device_idEE", !10, i64 0, !14, i64 8}
!14 = !{!"_ZTSN7hipsycl2rt9device_idE", !15, i64 0, !19, i64 12}
!15 = !{!"_ZTSN7hipsycl2rt18backend_descriptorE", !16, i64 0, !17, i64 4, !18, i64 8}
!16 = !{!"_ZTSN7hipsycl2rt10backend_idE", !11, i64 0}
!17 = !{!"_ZTSN7hipsycl2rt17hardware_platformE", !11, i64 0}
!18 = !{!"_ZTSN7hipsycl2rt12api_platformE", !11, i64 0}
!19 = !{!"int", !11, i64 0}


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