; LLVM IR from AdaptiveCpp/AdaptiveCpp :: src/runtime (dag_unbound_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.anon = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<hipsycl::rt::device_id, std::allocator<hipsycl::rt::device_id>>::_Vector_impl" }
%"struct.std::_Vector_base<hipsycl::rt::device_id, std::allocator<hipsycl::rt::device_id>>::_Vector_impl" = type { %"struct.std::_Vector_base<hipsycl::rt::device_id, std::allocator<hipsycl::rt::device_id>>::_Vector_impl_data" }
%"struct.std::_Vector_base<hipsycl::rt::device_id, std::allocator<hipsycl::rt::device_id>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.hipsycl::rt::result" = type { %"class.std::unique_ptr.47" }
%"class.std::unique_ptr.47" = type { %"struct.std::__uniq_ptr_data.48" }
%"struct.std::__uniq_ptr_data.48" = type { %"class.std::__uniq_ptr_impl.49" }
%"class.std::__uniq_ptr_impl.49" = type { %"class.std::tuple.50" }
%"class.std::tuple.50" = type { %"struct.std::_Tuple_impl.51" }
%"struct.std::_Tuple_impl.51" = type { %"struct.std::_Head_base.54" }
%"struct.std::_Head_base.54" = 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.55" = 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.hipsycl::rt::device_id" = type { %"struct.hipsycl::rt::backend_descriptor", i32 }
%"struct.hipsycl::rt::backend_descriptor" = type { i32, i32, i32 }
%"class.hipsycl::rt::hints::bind_to_device" = type { %"class.hipsycl::rt::hints::execution_hint", %"class.hipsycl::rt::device_id" }
%"class.hipsycl::rt::hints::execution_hint" = type { i8 }
%"class.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::dag_unbound_scheduler" = type { %"class.std::vector", %"class.hipsycl::rt::dag_direct_scheduler", ptr }
%"class.hipsycl::rt::dag_direct_scheduler" = type { ptr }

@__func__._ZN7hipsycl2rt21dag_unbound_scheduler6submitESt10shared_ptrINS0_8dag_nodeEE = external hidden unnamed_addr constant [7 x i8], align 1
@.str = external hidden unnamed_addr constant [95 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [141 x i8], align 1
@_ZZN7hipsycl2rt21dag_unbound_scheduler6submitESt10shared_ptrINS0_8dag_nodeEEE3dev = external hidden global i64, align 8

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7hipsycl2rt21dag_unbound_scheduler6submitESt10shared_ptrINS0_8dag_nodeEE(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef %1) #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %class.anon, align 8
  %6 = alloca %"class.std::vector", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.hipsycl::rt::result", align 8
  %10 = alloca %"class.hipsycl::rt::source_location", align 8
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::allocator.55", align 1
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = alloca %"class.std::allocator.55", align 1
  %15 = alloca %"class.hipsycl::rt::error_info", align 8
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca %"class.std::allocator.55", align 1
  %18 = alloca i32, align 4
  %19 = alloca %"class.hipsycl::rt::device_id", align 4
  %20 = alloca %"class.hipsycl::rt::hints::bind_to_device", align 4
  %21 = alloca %"class.hipsycl::rt::device_id", align 4
  %22 = 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
  %23 = load ptr, ptr %3, align 8
  %24 = getelementptr inbounds %"class.hipsycl::rt::dag_unbound_scheduler", ptr %23, i32 0, i32 0
  %25 = call noundef zeroext i1 @_ZNKSt6vectorIN7hipsycl2rt9device_idESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %24) #6
  br i1 %25, label %26, label %33

26:                                               ; preds = %2
  %27 = getelementptr inbounds %"class.hipsycl::rt::dag_unbound_scheduler", ptr %23, i32 0, i32 2
  %28 = load ptr, ptr %27, align 8, !tbaa !9
  %29 = call noundef nonnull align 8 dereferenceable(72) ptr @_ZN7hipsycl2rt7runtime8backendsEv(ptr noundef nonnull align 8 dereferenceable(608) %28)
  %30 = getelementptr inbounds %class.anon, ptr %5, i32 0, i32 0
  store ptr %23, ptr %30, align 8, !tbaa !16
  %31 = getelementptr inbounds %class.anon, ptr %5, i32 0, i32 0
  %32 = load ptr, ptr %31, align 8
  call void @"_ZN7hipsycl2rt15backend_manager16for_each_backendIZNS0_21dag_unbound_scheduler6submitESt10shared_ptrINS0_8dag_nodeEEE3$_0EEvT_"(ptr noundef nonnull align 8 dereferenceable(72) %29, ptr %32)
  br label %33

33:                                               ; preds = %26, %2
  %34 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #6
  %35 = call noundef nonnull align 8 dereferenceable(132) ptr @_ZN7hipsycl2rt8dag_node19get_execution_hintsEv(ptr noundef nonnull align 8 dereferenceable(384) %34)
  %36 = call noundef zeroext i1 @_ZNK7hipsycl2rt15execution_hints8has_hintINS0_5hints14bind_to_deviceEEEbv(ptr noundef nonnull align 8 dereferenceable(132) %35)
  br i1 %36, label %130, label %37

37:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 24, ptr %6) #6
  call void @_ZNSt6vectorIN7hipsycl2rt9device_idESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  %38 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #6
  %39 = invoke noundef nonnull align 8 dereferenceable(132) ptr @_ZN7hipsycl2rt8dag_node19get_execution_hintsEv(ptr noundef nonnull align 8 dereferenceable(384) %38)
          to label %40 unwind label %53

40:                                               ; preds = %37
  %41 = invoke noundef zeroext i1 @_ZNK7hipsycl2rt15execution_hints8has_hintINS0_5hints20bind_to_device_groupEEEbv(ptr noundef nonnull align 8 dereferenceable(132) %39)
          to label %42 unwind label %53

42:                                               ; preds = %40
  br i1 %41, label %43, label %57

43:                                               ; preds = %42
  %44 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #6
  %45 = invoke noundef nonnull align 8 dereferenceable(132) ptr @_ZN7hipsycl2rt8dag_node19get_execution_hintsEv(ptr noundef nonnull align 8 dereferenceable(384) %44)
          to label %46 unwind label %53

46:                                               ; preds = %43
  %47 = invoke noundef ptr @_ZNK7hipsycl2rt15execution_hints8get_hintINS0_5hints20bind_to_device_groupETnNSt9enable_ifIXsr3stdE12is_base_of_vINS3_14execution_hintET_EEiE4typeELi0EEEPKS7_v(ptr noundef nonnull align 8 dereferenceable(132) %45)
          to label %48 unwind label %53

48:                                               ; preds = %46
  %49 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7hipsycl2rt5hints20bind_to_device_group11get_devicesEv(ptr noundef nonnull align 8 dereferenceable(32) %47)
          to label %50 unwind label %53

50:                                               ; preds = %48
  %51 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIN7hipsycl2rt9device_idESaIS2_EEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %49)
          to label %52 unwind label %53

52:                                               ; preds = %50
  br label %61

53:                                               ; preds = %69, %57, %50, %48, %46, %43, %40, %37
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %7, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %8, align 4
  br label %129

57:                                               ; preds = %42
  %58 = getelementptr inbounds %"class.hipsycl::rt::dag_unbound_scheduler", ptr %23, i32 0, i32 0
  %59 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIN7hipsycl2rt9device_idESaIS2_EEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 8 dereferenceable(24) %58)
          to label %60 unwind label %53

60:                                               ; preds = %57
  br label %61

61:                                               ; preds = %60, %52
  %62 = call noundef zeroext i1 @_ZNKSt6vectorIN7hipsycl2rt9device_idESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  br i1 %62, label %63, label %101

63:                                               ; preds = %61
  call void @llvm.lifetime.start.p0(i64 72, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef @__func__._ZN7hipsycl2rt21dag_unbound_scheduler6submitESt10shared_ptrINS0_8dag_nodeEE, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %64 unwind label %72

64:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %14) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef @.str, ptr noundef nonnull align 1 dereferenceable(1) %14)
          to label %65 unwind label %76

65:                                               ; preds = %64
  invoke void @_ZN7hipsycl2rt15source_locationC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_i(ptr noundef nonnull align 8 dereferenceable(68) %10, ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull align 8 dereferenceable(32) %13, i32 noundef 52)
          to label %66 unwind label %80

66:                                               ; preds = %65
  call void @llvm.lifetime.start.p0(i64 80, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef @.str.1, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %67 unwind label %84

67:                                               ; preds = %66
  invoke void @_ZN7hipsycl2rt10error_infoC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10error_typeE(ptr noundef nonnull align 8 dereferenceable(76) %15, ptr noundef nonnull align 8 dereferenceable(32) %16, i32 noundef 1)
          to label %68 unwind label %88

68:                                               ; preds = %67
  invoke void @_ZN7hipsycl2rt14register_errorERKNS0_15source_locationERKNS0_10error_infoE(ptr dead_on_unwind writable sret(%"class.hipsycl::rt::result") align 8 %9, ptr noundef nonnull align 8 dereferenceable(68) %10, ptr noundef nonnull align 8 dereferenceable(76) %15)
          to label %69 unwind label %92

69:                                               ; preds = %68
  call void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #6
  call void @_ZN7hipsycl2rt10error_infoD2Ev(ptr noundef nonnull align 8 dereferenceable(76) %15) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr %15) #6
  call void @_ZN7hipsycl2rt15source_locationD2Ev(ptr noundef nonnull align 8 dereferenceable(68) %10) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr %10) #6
  %70 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #6
  invoke void @_ZN7hipsycl2rt8dag_node6cancelEv(ptr noundef nonnull align 8 dereferenceable(384) %70)
          to label %71 unwind label %53

71:                                               ; preds = %69
  store i32 1, ptr %18, align 4
  br label %117

72:                                               ; preds = %63
  %73 = landingpad { ptr, i32 }
          cleanup
  %74 = extractvalue { ptr, i32 } %73, 0
  store ptr %74, ptr %7, align 8
  %75 = extractvalue { ptr, i32 } %73, 1
  store i32 %75, ptr %8, align 4
  br label %100

76:                                               ; preds = %64
  %77 = landingpad { ptr, i32 }
          cleanup
  %78 = extractvalue { ptr, i32 } %77, 0
  store ptr %78, ptr %7, align 8
  %79 = extractvalue { ptr, i32 } %77, 1
  store i32 %79, ptr %8, align 4
  br label %99

80:                                               ; preds = %65
  %81 = landingpad { ptr, i32 }
          cleanup
  %82 = extractvalue { ptr, i32 } %81, 0
  store ptr %82, ptr %7, align 8
  %83 = extractvalue { ptr, i32 } %81, 1
  store i32 %83, ptr %8, align 4
  br label %98

84:                                               ; preds = %66
  %85 = landingpad { ptr, i32 }
          cleanup
  %86 = extractvalue { ptr, i32 } %85, 0
  store ptr %86, ptr %7, align 8
  %87 = extractvalue { ptr, i32 } %85, 1
  store i32 %87, ptr %8, align 4
  br label %97

88:                                               ; preds = %67
  %89 = landingpad { ptr, i32 }
          cleanup
  %90 = extractvalue { ptr, i32 } %89, 0
  store ptr %90, ptr %7, align 8
  %91 = extractvalue { ptr, i32 } %89, 1
  store i32 %91, ptr %8, align 4
  br label %96

92:                                               ; preds = %68
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %7, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %8, align 4
  call void @_ZN7hipsycl2rt10error_infoD2Ev(ptr noundef nonnull align 8 dereferenceable(76) %15) #6
  br label %96

96:                                               ; preds = %92, %88
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #6
  br label %97

97:                                               ; preds = %96, %84
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 80, ptr %15) #6
  call void @_ZN7hipsycl2rt15source_locationD2Ev(ptr noundef nonnull align 8 dereferenceable(68) %10) #6
  br label %98

98:                                               ; preds = %97, %80
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #6
  br label %99

99:                                               ; preds = %98, %76
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %14) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #6
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #6
  br label %100

100:                                              ; preds = %99, %72
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 72, ptr %10) #6
  br label %129

101:                                              ; preds = %61
  %102 = load i64, ptr @_ZZN7hipsycl2rt21dag_unbound_scheduler6submitESt10shared_ptrINS0_8dag_nodeEEE3dev, align 8, !tbaa !18
  %103 = add i64 %102, 1
  store i64 %103, ptr @_ZZN7hipsycl2rt21dag_unbound_scheduler6submitESt10shared_ptrINS0_8dag_nodeEEE3dev, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #6
  %104 = load i64, ptr @_ZZN7hipsycl2rt21dag_unbound_scheduler6submitESt10shared_ptrINS0_8dag_nodeEEE3dev, align 8, !tbaa !18
  %105 = call noundef i64 @_ZNKSt6vectorIN7hipsycl2rt9device_idESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  %106 = urem i64 %104, %105
  %107 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNSt6vectorIN7hipsycl2rt9device_idESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %106) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %19, ptr align 4 %107, i64 16, i1 false), !tbaa.struct !20
  %108 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #6
  %109 = invoke noundef nonnull align 8 dereferenceable(132) ptr @_ZN7hipsycl2rt8dag_node19get_execution_hintsEv(ptr noundef nonnull align 8 dereferenceable(384) %108)
          to label %110 unwind label %120

110:                                              ; preds = %101
  call void @llvm.lifetime.start.p0(i64 20, ptr %20) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %21, ptr align 4 %19, i64 16, i1 false), !tbaa.struct !20
  %111 = getelementptr inbounds { i64, i64 }, ptr %21, i32 0, i32 0
  %112 = load i64, ptr %111, align 4
  %113 = getelementptr inbounds { i64, i64 }, ptr %21, i32 0, i32 1
  %114 = load i64, ptr %113, align 4
  invoke void @_ZN7hipsycl2rt5hints14bind_to_deviceC2ENS0_9device_idE(ptr noundef nonnull align 4 dereferenceable(20) %20, i64 %112, i64 %114)
          to label %115 unwind label %124

115:                                              ; preds = %110
  invoke void @_ZN7hipsycl2rt15execution_hints8set_hintINS0_5hints14bind_to_deviceETnNSt9enable_ifIXsr3stdE12is_base_of_vINS3_14execution_hintET_EEiE4typeELi0EEEvOS7_(ptr noundef nonnull align 8 dereferenceable(132) %109, ptr noundef nonnull align 4 dereferenceable(20) %20)
          to label %116 unwind label %124

116:                                              ; preds = %115
  call void @llvm.lifetime.end.p0(i64 20, ptr %20) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #6
  store i32 0, ptr %18, align 4
  br label %117

117:                                              ; preds = %116, %71
  call void @_ZNSt6vectorIN7hipsycl2rt9device_idESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #6
  %118 = load i32, ptr %18, align 4
  switch i32 %118, label %143 [
    i32 0, label %119
    i32 1, label %133
  ]

119:                                              ; preds = %117
  br label %130

120:                                              ; preds = %101
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %7, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %8, align 4
  br label %128

124:                                              ; preds = %115, %110
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %7, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 20, ptr %20) #6
  br label %128

128:                                              ; preds = %124, %120
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #6
  br label %129

129:                                              ; preds = %128, %100, %53
  call void @_ZNSt6vectorIN7hipsycl2rt9device_idESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  call void @llvm.lifetime.end.p0(i64 24, ptr %6) #6
  br label %138

130:                                              ; preds = %119, %33
  %131 = getelementptr inbounds %"class.hipsycl::rt::dag_unbound_scheduler", ptr %23, i32 0, i32 1
  call void @_ZNSt10shared_ptrIN7hipsycl2rt8dag_nodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 8 dereferenceable(16) %1) #6
  invoke void @_ZN7hipsycl2rt20dag_direct_scheduler6submitESt10shared_ptrINS0_8dag_nodeEE(ptr noundef nonnull align 8 dereferenceable(8) %131, ptr noundef %22)
          to label %132 unwind label %134

132:                                              ; preds = %130
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %22) #6
  br label %133

133:                                              ; preds = %132, %117
  ret void

134:                                              ; preds = %130
  %135 = landingpad { ptr, i32 }
          cleanup
  %136 = extractvalue { ptr, i32 } %135, 0
  store ptr %136, ptr %7, align 8
  %137 = extractvalue { ptr, i32 } %135, 1
  store i32 %137, ptr %8, align 4
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %22) #6
  br label %138

138:                                              ; preds = %134, %129
  %139 = load ptr, ptr %7, align 8
  %140 = load i32, ptr %8, align 4
  %141 = insertvalue { ptr, i32 } poison, ptr %139, 0
  %142 = insertvalue { ptr, i32 } %141, i32 %140, 1
  resume { ptr, i32 } %142

143:                                              ; preds = %117
  unreachable
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(72) ptr @_ZN7hipsycl2rt7runtime8backendsEv(ptr noundef nonnull align 8 dereferenceable(608)) #0 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZN7hipsycl2rt15backend_manager16for_each_backendIZNS0_21dag_unbound_scheduler6submitESt10shared_ptrINS0_8dag_nodeEEE3$_0EEvT_"(ptr noundef nonnull align 8 dereferenceable(72), ptr) #1 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIN7hipsycl2rt9device_idESaIS2_EEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #1 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: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 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 #1 align 2

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIN7hipsycl2rt9device_idESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #0 align 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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7hipsycl2rt15execution_hints8set_hintINS0_5hints14bind_to_deviceETnNSt9enable_ifIXsr3stdE12is_base_of_vINS3_14execution_hintET_EEiE4typeELi0EEEvOS7_(ptr noundef nonnull align 8 dereferenceable(132), ptr noundef nonnull align 4 dereferenceable(20)) #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7hipsycl2rt5hints14bind_to_deviceC2ENS0_9device_idE(ptr noundef nonnull align 4 dereferenceable(20), i64, i64) unnamed_addr #0 align 2

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

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

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

attributes #0 = { 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 #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "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 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !6, i64 32}
!10 = !{!"_ZTSN7hipsycl2rt21dag_unbound_schedulerE", !11, i64 0, !15, i64 24, !6, i64 32}
!11 = !{!"_ZTSSt6vectorIN7hipsycl2rt9device_idESaIS2_EE", !12, i64 0}
!12 = !{!"_ZTSSt12_Vector_baseIN7hipsycl2rt9device_idESaIS2_EE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseIN7hipsycl2rt9device_idESaIS2_EE12_Vector_implE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIN7hipsycl2rt9device_idESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!15 = !{!"_ZTSN7hipsycl2rt20dag_direct_schedulerE", !6, i64 0}
!16 = !{!17, !6, i64 0}
!17 = !{!"_ZTSZN7hipsycl2rt21dag_unbound_scheduler6submitESt10shared_ptrINS0_8dag_nodeEEE3$_0", !6, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"long", !7, i64 0}
!20 = !{i64 0, i64 4, !21, i64 4, i64 4, !23, i64 8, i64 4, !25, i64 12, i64 4, !27}
!21 = !{!22, !22, i64 0}
!22 = !{!"_ZTSN7hipsycl2rt10backend_idE", !7, i64 0}
!23 = !{!24, !24, i64 0}
!24 = !{!"_ZTSN7hipsycl2rt17hardware_platformE", !7, i64 0}
!25 = !{!26, !26, i64 0}
!26 = !{!"_ZTSN7hipsycl2rt12api_platformE", !7, i64 0}
!27 = !{!28, !28, i64 0}
!28 = !{!"int", !7, i64 0}


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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<hipsycl::rt::device_id, std::allocator<hipsycl::rt::device_id>>::_Vector_impl" }
%"struct.std::_Vector_base<hipsycl::rt::device_id, std::allocator<hipsycl::rt::device_id>>::_Vector_impl" = type { %"struct.std::_Vector_base<hipsycl::rt::device_id, std::allocator<hipsycl::rt::device_id>>::_Vector_impl_data" }
%"struct.std::_Vector_base<hipsycl::rt::device_id, std::allocator<hipsycl::rt::device_id>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.hipsycl::rt::result" = type { %"class.std::unique_ptr.47" }
%"class.std::unique_ptr.47" = type { %"struct.std::__uniq_ptr_data.48" }
%"struct.std::__uniq_ptr_data.48" = type { %"class.std::__uniq_ptr_impl.49" }
%"class.std::__uniq_ptr_impl.49" = type { %"class.std::tuple.50" }
%"class.std::tuple.50" = type { %"struct.std::_Tuple_impl.51" }
%"struct.std::_Tuple_impl.51" = type { %"struct.std::_Head_base.54" }
%"struct.std::_Head_base.54" = 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.55" = 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.hipsycl::rt::hints::bind_to_device" = type { %"class.hipsycl::rt::hints::execution_hint", %"class.hipsycl::rt::device_id" }
%"class.hipsycl::rt::hints::execution_hint" = type { i8 }
%"class.hipsycl::rt::device_id" = type { %"struct.hipsycl::rt::backend_descriptor", i32 }
%"struct.hipsycl::rt::backend_descriptor" = type { i32, i32, 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 }

@__func__._ZN7hipsycl2rt21dag_unbound_scheduler6submitESt10shared_ptrINS0_8dag_nodeEE = external hidden unnamed_addr constant [7 x i8], align 1
@.str = external hidden unnamed_addr constant [95 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [141 x i8], align 1
@_ZZN7hipsycl2rt21dag_unbound_scheduler6submitESt10shared_ptrINS0_8dag_nodeEEE3dev = external hidden local_unnamed_addr global i64, align 8

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7hipsycl2rt21dag_unbound_scheduler6submitESt10shared_ptrINS0_8dag_nodeEE(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef %1) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::vector", align 8
  %4 = alloca %"class.hipsycl::rt::result", align 8
  %5 = alloca %"class.hipsycl::rt::source_location", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::allocator.55", align 1
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::allocator.55", align 1
  %10 = alloca %"class.hipsycl::rt::error_info", align 8
  %11 = alloca %"class.std::__cxx11::basic_string", align 8
  %12 = alloca %"class.std::allocator.55", align 1
  %13 = alloca %"class.hipsycl::rt::hints::bind_to_device", align 4
  %14 = alloca %"class.std::shared_ptr", align 8
  %15 = tail call noundef zeroext i1 @_ZNKSt6vectorIN7hipsycl2rt9device_idESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  br i1 %15, label %16, label %20

16:                                               ; preds = %2
  %17 = getelementptr inbounds i8, ptr %0, i64 32
  %18 = load ptr, ptr %17, align 8, !tbaa !5
  %19 = tail call noundef nonnull align 8 dereferenceable(72) ptr @_ZN7hipsycl2rt7runtime8backendsEv(ptr noundef nonnull align 8 dereferenceable(608) %18)
  tail call void @"_ZN7hipsycl2rt15backend_manager16for_each_backendIZNS0_21dag_unbound_scheduler6submitESt10shared_ptrINS0_8dag_nodeEEE3$_0EEvT_"(ptr noundef nonnull align 8 dereferenceable(72) %19, ptr nonnull %0)
  br label %20

20:                                               ; preds = %16, %2
  %21 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #5
  %22 = tail call noundef nonnull align 8 dereferenceable(132) ptr @_ZN7hipsycl2rt8dag_node19get_execution_hintsEv(ptr noundef nonnull align 8 dereferenceable(384) %21)
  %23 = tail call noundef zeroext i1 @_ZNK7hipsycl2rt15execution_hints8has_hintINS0_5hints14bind_to_deviceEEEbv(ptr noundef nonnull align 8 dereferenceable(132) %22)
  br i1 %23, label %82, label %24

24:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #5
  call void @_ZNSt6vectorIN7hipsycl2rt9device_idESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  %25 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #5
  %26 = invoke noundef nonnull align 8 dereferenceable(132) ptr @_ZN7hipsycl2rt8dag_node19get_execution_hintsEv(ptr noundef nonnull align 8 dereferenceable(384) %25)
          to label %27 unwind label %36

27:                                               ; preds = %24
  %28 = invoke noundef zeroext i1 @_ZNK7hipsycl2rt15execution_hints8has_hintINS0_5hints20bind_to_device_groupEEEbv(ptr noundef nonnull align 8 dereferenceable(132) %26)
          to label %29 unwind label %36

29:                                               ; preds = %27
  br i1 %28, label %30, label %.invoke

30:                                               ; preds = %29
  %31 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #5
  %32 = invoke noundef nonnull align 8 dereferenceable(132) ptr @_ZN7hipsycl2rt8dag_node19get_execution_hintsEv(ptr noundef nonnull align 8 dereferenceable(384) %31)
          to label %33 unwind label %36

33:                                               ; preds = %30
  %34 = call noundef ptr @_ZNK7hipsycl2rt15execution_hints8get_hintINS0_5hints20bind_to_device_groupETnNSt9enable_ifIXsr3stdE12is_base_of_vINS3_14execution_hintET_EEiE4typeELi0EEEPKS7_v(ptr noundef nonnull align 8 dereferenceable(132) %32)
  %35 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNK7hipsycl2rt5hints20bind_to_device_group11get_devicesEv(ptr noundef nonnull align 8 dereferenceable(32) %34)
  br label %.invoke

36:                                               ; preds = %.invoke, %48, %30, %27, %24
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %81

.invoke:                                          ; preds = %29, %33
  %38 = phi ptr [ %35, %33 ], [ %0, %29 ]
  %39 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIN7hipsycl2rt9device_idESaIS2_EEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef nonnull align 8 dereferenceable(24) %38)
          to label %40 unwind label %36

40:                                               ; preds = %.invoke
  %41 = call noundef zeroext i1 @_ZNKSt6vectorIN7hipsycl2rt9device_idESaIS2_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  br i1 %41, label %42, label %67

42:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull @__func__._ZN7hipsycl2rt21dag_unbound_scheduler6submitESt10shared_ptrINS0_8dag_nodeEE, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %43 unwind label %50

43:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull @.str, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %44 unwind label %52

44:                                               ; preds = %43
  invoke void @_ZN7hipsycl2rt15source_locationC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_i(ptr noundef nonnull align 8 dereferenceable(68) %5, ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(32) %8, i32 noundef 52)
          to label %45 unwind label %54

45:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %11) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %12) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull @.str.1, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %46 unwind label %56

46:                                               ; preds = %45
  invoke void @_ZN7hipsycl2rt10error_infoC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10error_typeE(ptr noundef nonnull align 8 dereferenceable(76) %10, ptr noundef nonnull align 8 dereferenceable(32) %11, i32 noundef 1)
          to label %47 unwind label %58

47:                                               ; preds = %46
  invoke void @_ZN7hipsycl2rt14register_errorERKNS0_15source_locationERKNS0_10error_infoE(ptr dead_on_unwind nonnull writable sret(%"class.hipsycl::rt::result") align 8 %4, ptr noundef nonnull align 8 dereferenceable(68) %5, ptr noundef nonnull align 8 dereferenceable(76) %10)
          to label %48 unwind label %60

48:                                               ; preds = %47
  call void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4) #5
  call void @_ZN7hipsycl2rt10error_infoD2Ev(ptr noundef nonnull align 8 dereferenceable(76) %10) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %10) #5
  call void @_ZN7hipsycl2rt15source_locationD2Ev(ptr noundef nonnull align 8 dereferenceable(68) %5) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %5) #5
  %49 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #5
  invoke void @_ZN7hipsycl2rt8dag_node6cancelEv(ptr noundef nonnull align 8 dereferenceable(384) %49)
          to label %76 unwind label %36

50:                                               ; preds = %42
  %51 = landingpad { ptr, i32 }
          cleanup
  br label %66

52:                                               ; preds = %43
  %53 = landingpad { ptr, i32 }
          cleanup
  br label %65

54:                                               ; preds = %44
  %55 = landingpad { ptr, i32 }
          cleanup
  br label %64

56:                                               ; preds = %45
  %57 = landingpad { ptr, i32 }
          cleanup
  br label %63

58:                                               ; preds = %46
  %59 = landingpad { ptr, i32 }
          cleanup
  br label %62

60:                                               ; preds = %47
  %61 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7hipsycl2rt10error_infoD2Ev(ptr noundef nonnull align 8 dereferenceable(76) %10) #5
  br label %62

62:                                               ; preds = %60, %58
  %.pn15 = phi { ptr, i32 } [ %61, %60 ], [ %59, %58 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %11) #5
  br label %63

63:                                               ; preds = %62, %56
  %.pn15.pn = phi { ptr, i32 } [ %.pn15, %62 ], [ %57, %56 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %10) #5
  call void @_ZN7hipsycl2rt15source_locationD2Ev(ptr noundef nonnull align 8 dereferenceable(68) %5) #5
  br label %64

64:                                               ; preds = %63, %54
  %.pn15.pn.pn = phi { ptr, i32 } [ %.pn15.pn, %63 ], [ %55, %54 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #5
  br label %65

65:                                               ; preds = %64, %52
  %.pn15.pn.pn.pn = phi { ptr, i32 } [ %.pn15.pn.pn, %64 ], [ %53, %52 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  br label %66

66:                                               ; preds = %65, %50
  %.pn15.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn15.pn.pn.pn, %65 ], [ %51, %50 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %5) #5
  br label %81

67:                                               ; preds = %40
  %68 = load i64, ptr @_ZZN7hipsycl2rt21dag_unbound_scheduler6submitESt10shared_ptrINS0_8dag_nodeEEE3dev, align 8, !tbaa !15
  %69 = add i64 %68, 1
  store i64 %69, ptr @_ZZN7hipsycl2rt21dag_unbound_scheduler6submitESt10shared_ptrINS0_8dag_nodeEEE3dev, align 8, !tbaa !15
  %70 = call noundef i64 @_ZNKSt6vectorIN7hipsycl2rt9device_idESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  %71 = urem i64 %69, %70
  %72 = call noundef nonnull align 4 dereferenceable(16) ptr @_ZNSt6vectorIN7hipsycl2rt9device_idESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %71) #5
  %.sroa.01.0.copyload = load i64, ptr %72, align 4
  %.sroa.5.0..sroa_idx = getelementptr inbounds i8, ptr %72, i64 8
  %.sroa.5.0.copyload = load i64, ptr %.sroa.5.0..sroa_idx, align 4
  %73 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #5
  %74 = invoke noundef nonnull align 8 dereferenceable(132) ptr @_ZN7hipsycl2rt8dag_node19get_execution_hintsEv(ptr noundef nonnull align 8 dereferenceable(384) %73)
          to label %75 unwind label %77

75:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %13) #5
  call void @_ZN7hipsycl2rt5hints14bind_to_deviceC2ENS0_9device_idE(ptr noundef nonnull align 4 dereferenceable(20) %13, i64 %.sroa.01.0.copyload, i64 %.sroa.5.0.copyload)
  invoke void @_ZN7hipsycl2rt15execution_hints8set_hintINS0_5hints14bind_to_deviceETnNSt9enable_ifIXsr3stdE12is_base_of_vINS3_14execution_hintET_EEiE4typeELi0EEEvOS7_(ptr noundef nonnull align 8 dereferenceable(132) %74, ptr noundef nonnull align 4 dereferenceable(20) %13)
          to label %.thread unwind label %79

.thread:                                          ; preds = %75
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %13) #5
  call void @_ZNSt6vectorIN7hipsycl2rt9device_idESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  br label %82

76:                                               ; preds = %48
  call void @_ZNSt6vectorIN7hipsycl2rt9device_idESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  br label %85

77:                                               ; preds = %67
  %78 = landingpad { ptr, i32 }
          cleanup
  br label %81

79:                                               ; preds = %75
  %80 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %13) #5
  br label %81

81:                                               ; preds = %77, %79, %66, %36
  %.pn21 = phi { ptr, i32 } [ %37, %36 ], [ %.pn15.pn.pn.pn.pn, %66 ], [ %80, %79 ], [ %78, %77 ]
  call void @_ZNSt6vectorIN7hipsycl2rt9device_idESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  br label %88

82:                                               ; preds = %.thread, %20
  %83 = getelementptr inbounds i8, ptr %0, i64 24
  call void @_ZNSt10shared_ptrIN7hipsycl2rt8dag_nodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 8 dereferenceable(16) %1) #5
  invoke void @_ZN7hipsycl2rt20dag_direct_scheduler6submitESt10shared_ptrINS0_8dag_nodeEE(ptr noundef nonnull align 8 dereferenceable(8) %83, ptr noundef nonnull %14)
          to label %84 unwind label %86

84:                                               ; preds = %82
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %14) #5
  br label %85

85:                                               ; preds = %76, %84
  ret void

86:                                               ; preds = %82
  %87 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %14) #5
  br label %88

88:                                               ; preds = %86, %81
  %.pn23 = phi { ptr, i32 } [ %87, %86 ], [ %.pn21, %81 ]
  resume { ptr, i32 } %.pn23
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(72) ptr @_ZN7hipsycl2rt7runtime8backendsEv(ptr noundef nonnull align 8 dereferenceable(608)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZN7hipsycl2rt15backend_manager16for_each_backendIZNS0_21dag_unbound_scheduler6submitESt10shared_ptrINS0_8dag_nodeEEE3$_0EEvT_"(ptr noundef nonnull align 8 dereferenceable(72), ptr) local_unnamed_addr #1 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIN7hipsycl2rt9device_idESaIS2_EEaSERKS4_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 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 nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #0 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 #1 align 2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7hipsycl2rt15execution_hints8set_hintINS0_5hints14bind_to_deviceETnNSt9enable_ifIXsr3stdE12is_base_of_vINS3_14execution_hintET_EEiE4typeELi0EEEvOS7_(ptr noundef nonnull align 8 dereferenceable(132), ptr noundef nonnull align 4 dereferenceable(20)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7hipsycl2rt5hints14bind_to_deviceC2ENS0_9device_idE(ptr noundef nonnull align 4 dereferenceable(20), i64, i64) unnamed_addr #0 align 2

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

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

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

attributes #0 = { 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 #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "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 = { 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, !11, i64 32}
!6 = !{!"_ZTSN7hipsycl2rt21dag_unbound_schedulerE", !7, i64 0, !14, i64 24, !11, i64 32}
!7 = !{!"_ZTSSt6vectorIN7hipsycl2rt9device_idESaIS2_EE", !8, i64 0}
!8 = !{!"_ZTSSt12_Vector_baseIN7hipsycl2rt9device_idESaIS2_EE", !9, i64 0}
!9 = !{!"_ZTSNSt12_Vector_baseIN7hipsycl2rt9device_idESaIS2_EE12_Vector_implE", !10, i64 0}
!10 = !{!"_ZTSNSt12_Vector_baseIN7hipsycl2rt9device_idESaIS2_EE17_Vector_impl_dataE", !11, i64 0, !11, i64 8, !11, i64 16}
!11 = !{!"any pointer", !12, i64 0}
!12 = !{!"omnipotent char", !13, i64 0}
!13 = !{!"Simple C++ TBAA"}
!14 = !{!"_ZTSN7hipsycl2rt20dag_direct_schedulerE", !11, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"long", !12, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass,TailCallElimPass