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

; 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.30" }
%"class.std::unique_ptr.30" = type { %"struct.std::__uniq_ptr_data.31" }
%"struct.std::__uniq_ptr_data.31" = type { %"class.std::__uniq_ptr_impl.32" }
%"class.std::__uniq_ptr_impl.32" = type { %"class.std::tuple.33" }
%"class.std::tuple.33" = type { %"struct.std::_Tuple_impl.34" }
%"struct.std::_Tuple_impl.34" = type { %"struct.std::_Head_base.37" }
%"struct.std::_Head_base.37" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"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.std::shared_ptr.12" = type { %"class.std::__shared_ptr.13" }
%"class.std::__shared_ptr.13" = type { ptr, %"class.std::__shared_count" }
%"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.hipsycl::rt::(anonymous namespace)::queue_operation_dispatcher" = type { %"class.hipsycl::rt::operation_dispatcher", ptr }
%"class.hipsycl::rt::operation_dispatcher" = type { ptr }
%"class.hipsycl::rt::inorder_executor" = type { %"class.hipsycl::rt::backend_executor", %"class.std::unique_ptr", %"struct.std::atomic" }
%"class.hipsycl::rt::backend_executor" = type { ptr }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.1" }
%"struct.std::_Head_base.1" = type { ptr }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i64 }

@.str = external hidden unnamed_addr constant [30 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [90 x i8], align 1
@__PRETTY_FUNCTION__._ZN7hipsycl2rt16inorder_executor15submit_directlyERKSt10shared_ptrINS0_8dag_nodeEEPNS0_9operationERKN3sbo12small_vectorIS4_Lm8EEE = external hidden unnamed_addr constant [116 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [100 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7hipsycl2rt16inorder_executor15submit_directlyERKSt10shared_ptrINS0_8dag_nodeEEPNS0_9operationERKN3sbo12small_vectorIS4_Lm8EEE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef %2, ptr noundef nonnull align 8 dereferenceable(160) %3) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"class.hipsycl::rt::result", align 8
  %10 = alloca ptr, align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = alloca i32, align 4
  %14 = alloca %"class.std::shared_ptr", align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca %"class.hipsycl::rt::device_id", align 4
  %18 = alloca %"class.hipsycl::rt::device_id", align 4
  %19 = alloca %"class.hipsycl::rt::result", align 8
  %20 = alloca %"class.std::shared_ptr.12", align 8
  %21 = alloca ptr, align 8
  %22 = alloca i64, align 8
  %23 = alloca %"class.hipsycl::rt::result", align 8
  %24 = alloca %"class.std::__cxx11::basic_string", align 8
  %25 = alloca %"class.hipsycl::rt::(anonymous namespace)::queue_operation_dispatcher", align 8
  %26 = alloca %"class.hipsycl::rt::result", align 8
  %27 = alloca %"class.std::shared_ptr.12", align 8
  %28 = alloca %"class.std::shared_ptr.12", align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  %29 = load ptr, ptr %5, align 8
  %30 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
  %31 = call noundef i32 @_ZNK7hipsycl6common13output_stream15get_debug_levelEv(ptr noundef nonnull align 8 dereferenceable(16) %30)
  %32 = icmp sgt i32 3, %31
  br i1 %32, label %33, label %34

33:                                               ; preds = %4
  br label %54

34:                                               ; preds = %4
  %35 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
  %36 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7hipsycl6common13output_stream10get_streamEv(ptr noundef nonnull align 8 dereferenceable(16) %35)
  %37 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef @.str)
  %38 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %37, ptr noundef @.str.1)
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  %40 = call noundef ptr @_ZNKSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EE3getEv(ptr noundef nonnull align 8 dereferenceable(16) %39) #7
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPKv(ptr noundef nonnull align 8 dereferenceable(8) %38, ptr noundef %40)
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %41, ptr noundef @.str.2)
  %43 = load ptr, ptr %8, align 8, !tbaa !5
  %44 = call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(160) %43) #7
  %45 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %42, i64 noundef %44)
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %45, ptr noundef @.str.3)
  %47 = load ptr, ptr %6, align 8, !tbaa !5
  %48 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %47) #7
  %49 = call noundef nonnull align 8 dereferenceable(160) ptr @_ZNK7hipsycl2rt8dag_node16get_requirementsEv(ptr noundef nonnull align 8 dereferenceable(384) %48)
  %50 = call noundef i64 @_ZNKSt6vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(160) %49) #7
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %46, i64 noundef %50)
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %51, ptr noundef @.str.4)
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %52, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %54

54:                                               ; preds = %34, %33
  %55 = load ptr, ptr %7, align 8, !tbaa !5
  %56 = load ptr, ptr %55, align 8, !tbaa !9
  %57 = getelementptr inbounds ptr, ptr %56, i64 3
  %58 = load ptr, ptr %57, align 8
  %59 = call noundef zeroext i1 %58(ptr noundef nonnull align 8 dereferenceable(40) %55)
  %60 = xor i1 %59, true
  br i1 %60, label %61, label %62

61:                                               ; preds = %54
  br label %64

62:                                               ; preds = %54
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.6, i32 noundef 98, ptr noundef @__PRETTY_FUNCTION__._ZN7hipsycl2rt16inorder_executor15submit_directlyERKSt10shared_ptrINS0_8dag_nodeEEPNS0_9operationERKN3sbo12small_vectorIS4_Lm8EEE) #8
  unreachable

63:                                               ; No predecessors!
  br label %64

64:                                               ; preds = %63, %61
  %65 = load ptr, ptr %6, align 8, !tbaa !5
  %66 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %65) #7
  %67 = call noundef zeroext i1 @_ZNK7hipsycl2rt8dag_node12is_submittedEv(ptr noundef nonnull align 8 dereferenceable(384) %66)
  br i1 %67, label %68, label %69

68:                                               ; preds = %64
  br label %440

69:                                               ; preds = %64
  %70 = load ptr, ptr %6, align 8, !tbaa !5
  %71 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %70) #7
  %72 = getelementptr inbounds %"class.hipsycl::rt::inorder_executor", ptr %29, i32 0, i32 1
  %73 = call noundef ptr @_ZNKSt10unique_ptrIN7hipsycl2rt13inorder_queueESt14default_deleteIS2_EE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %72) #7
  call void @_ZN7hipsycl2rt8dag_node24assign_to_execution_laneEPv(ptr noundef nonnull align 8 dereferenceable(384) %71, ptr noundef %73)
  %74 = load ptr, ptr %6, align 8, !tbaa !5
  %75 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %74) #7
  %76 = getelementptr inbounds %"class.hipsycl::rt::inorder_executor", ptr %29, i32 0, i32 2
  %77 = call noundef i64 @_ZNSt13__atomic_baseImEppEv(ptr noundef nonnull align 8 dereferenceable(8) %76) #7
  call void @_ZN7hipsycl2rt8dag_node22assign_execution_indexEm(ptr noundef nonnull align 8 dereferenceable(384) %75, i64 noundef %77)
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  call void @_ZN7hipsycl2rt6resultC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %78 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %78, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %79 = load ptr, ptr %10, align 8, !tbaa !5
  %80 = call ptr @_ZNKSt6vectorISt10shared_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(160) %79) #7
  %81 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %11, i32 0, i32 0
  store ptr %80, ptr %81, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %82 = load ptr, ptr %10, align 8, !tbaa !5
  %83 = call ptr @_ZNKSt6vectorISt10shared_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(160) %82) #7
  %84 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %12, i32 0, i32 0
  store ptr %83, ptr %84, align 8
  br label %85

85:                                               ; preds = %319, %69
  %86 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKSt10shared_ptrIN7hipsycl2rt8dag_nodeEESt6vectorIS5_N3sbo29small_buffer_vector_allocatorIS5_Lm8ES5_EEEEEbRKNS_17__normal_iteratorIT_T0_EESI_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  br i1 %86, label %88, label %87

87:                                               ; preds = %85
  store i32 2, ptr %13, align 4
  br label %322

88:                                               ; preds = %85
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #7
  %89 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKSt10shared_ptrIN7hipsycl2rt8dag_nodeEESt6vectorIS5_N3sbo29small_buffer_vector_allocatorIS5_Lm8ES5_EEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  call void @_ZNSt10shared_ptrIN7hipsycl2rt8dag_nodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 8 dereferenceable(16) %89) #7
  %90 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %14) #7
  %91 = invoke noundef zeroext i1 @_ZNK7hipsycl2rt8dag_node10is_virtualEv(ptr noundef nonnull align 8 dereferenceable(384) %90)
          to label %92 unwind label %96

92:                                               ; preds = %88
  %93 = xor i1 %91, true
  br i1 %93, label %94, label %95

94:                                               ; preds = %92
  br label %101

95:                                               ; preds = %92
  call void @__assert_fail(ptr noundef @.str.7, ptr noundef @.str.6, i32 noundef 111, ptr noundef @__PRETTY_FUNCTION__._ZN7hipsycl2rt16inorder_executor15submit_directlyERKSt10shared_ptrINS0_8dag_nodeEEPNS0_9operationERKN3sbo12small_vectorIS4_Lm8EEE) #8
  unreachable

96:                                               ; preds = %310, %309, %306, %241, %239, %237, %235, %233, %231, %226, %224, %209, %207, %205, %203, %201, %199, %197, %192, %190, %183, %162, %160, %158, %156, %154, %152, %138, %136, %108, %101, %88
  %97 = landingpad { ptr, i32 }
          cleanup
  %98 = extractvalue { ptr, i32 } %97, 0
  store ptr %98, ptr %15, align 8
  %99 = extractvalue { ptr, i32 } %97, 1
  store i32 %99, ptr %16, align 4
  br label %321

100:                                              ; No predecessors!
  br label %101

101:                                              ; preds = %100, %94
  %102 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %14) #7
  %103 = invoke noundef zeroext i1 @_ZNK7hipsycl2rt8dag_node12is_submittedEv(ptr noundef nonnull align 8 dereferenceable(384) %102)
          to label %104 unwind label %96

104:                                              ; preds = %101
  br i1 %103, label %105, label %106

105:                                              ; preds = %104
  br label %108

106:                                              ; preds = %104
  call void @__assert_fail(ptr noundef @.str.8, ptr noundef @.str.6, i32 noundef 112, ptr noundef @__PRETTY_FUNCTION__._ZN7hipsycl2rt16inorder_executor15submit_directlyERKSt10shared_ptrINS0_8dag_nodeEEPNS0_9operationERKN3sbo12small_vectorIS4_Lm8EEE) #8
  unreachable

107:                                              ; No predecessors!
  br label %108

108:                                              ; preds = %107, %105
  %109 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %14) #7
  %110 = invoke noundef zeroext i1 @_ZNK7hipsycl2rt8dag_node17is_known_completeEv(ptr noundef nonnull align 8 dereferenceable(384) %109)
          to label %111 unwind label %96

111:                                              ; preds = %108
  br i1 %110, label %315, label %112

112:                                              ; preds = %111
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #7
  %113 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %14) #7
  %114 = invoke { i64, i64 } @_ZNK7hipsycl2rt8dag_node19get_assigned_deviceEv(ptr noundef nonnull align 8 dereferenceable(384) %113)
          to label %115 unwind label %143

115:                                              ; preds = %112
  %116 = getelementptr inbounds { i64, i64 }, ptr %17, i32 0, i32 0
  %117 = extractvalue { i64, i64 } %114, 0
  store i64 %117, ptr %116, align 4
  %118 = getelementptr inbounds { i64, i64 }, ptr %17, i32 0, i32 1
  %119 = extractvalue { i64, i64 } %114, 1
  store i64 %119, ptr %118, align 4
  %120 = invoke noundef i32 @_ZNK7hipsycl2rt9device_id11get_backendEv(ptr noundef nonnull align 4 dereferenceable(16) %17)
          to label %121 unwind label %143

121:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #7
  %122 = getelementptr inbounds %"class.hipsycl::rt::inorder_executor", ptr %29, i32 0, i32 1
  %123 = call noundef ptr @_ZNKSt10unique_ptrIN7hipsycl2rt13inorder_queueESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %122) #7
  %124 = load ptr, ptr %123, align 8, !tbaa !9
  %125 = getelementptr inbounds ptr, ptr %124, i64 9
  %126 = load ptr, ptr %125, align 8
  %127 = invoke { i64, i64 } %126(ptr noundef nonnull align 8 dereferenceable(8) %123)
          to label %128 unwind label %147

128:                                              ; preds = %121
  %129 = getelementptr inbounds { i64, i64 }, ptr %18, i32 0, i32 0
  %130 = extractvalue { i64, i64 } %127, 0
  store i64 %130, ptr %129, align 4
  %131 = getelementptr inbounds { i64, i64 }, ptr %18, i32 0, i32 1
  %132 = extractvalue { i64, i64 } %127, 1
  store i64 %132, ptr %131, align 4
  %133 = invoke noundef i32 @_ZNK7hipsycl2rt9device_id11get_backendEv(ptr noundef nonnull align 4 dereferenceable(16) %18)
          to label %134 unwind label %147

134:                                              ; preds = %128
  %135 = icmp ne i32 %120, %133
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #7
  br i1 %135, label %136, label %183

136:                                              ; preds = %134
  %137 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %138 unwind label %96

138:                                              ; preds = %136
  %139 = invoke noundef i32 @_ZNK7hipsycl6common13output_stream15get_debug_levelEv(ptr noundef nonnull align 8 dereferenceable(16) %137)
          to label %140 unwind label %96

140:                                              ; preds = %138
  %141 = icmp sgt i32 3, %139
  br i1 %141, label %142, label %152

142:                                              ; preds = %140
  br label %165

143:                                              ; preds = %115, %112
  %144 = landingpad { ptr, i32 }
          cleanup
  %145 = extractvalue { ptr, i32 } %144, 0
  store ptr %145, ptr %15, align 8
  %146 = extractvalue { ptr, i32 } %144, 1
  store i32 %146, ptr %16, align 4
  br label %151

147:                                              ; preds = %128, %121
  %148 = landingpad { ptr, i32 }
          cleanup
  %149 = extractvalue { ptr, i32 } %148, 0
  store ptr %149, ptr %15, align 8
  %150 = extractvalue { ptr, i32 } %148, 1
  store i32 %150, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #7
  br label %151

151:                                              ; preds = %147, %143
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #7
  br label %321

152:                                              ; preds = %140
  %153 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %154 unwind label %96

154:                                              ; preds = %152
  %155 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7hipsycl6common13output_stream10get_streamEv(ptr noundef nonnull align 8 dereferenceable(16) %153)
          to label %156 unwind label %96

156:                                              ; preds = %154
  %157 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %155, ptr noundef @.str)
          to label %158 unwind label %96

158:                                              ; preds = %156
  %159 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %157, ptr noundef @.str.9)
          to label %160 unwind label %96

160:                                              ; preds = %158
  %161 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EERSt13basic_ostreamIT_T0_ESB_RKSt12__shared_ptrIT1_XT2_EE(ptr noundef nonnull align 8 dereferenceable(8) %159, ptr noundef nonnull align 8 dereferenceable(16) %14)
          to label %162 unwind label %96

162:                                              ; preds = %160
  %163 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %161, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %164 unwind label %96

164:                                              ; preds = %162
  br label %165

165:                                              ; preds = %164, %142
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %166 = getelementptr inbounds %"class.hipsycl::rt::inorder_executor", ptr %29, i32 0, i32 1
  %167 = call noundef ptr @_ZNKSt10unique_ptrIN7hipsycl2rt13inorder_queueESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %166) #7
  %168 = load ptr, ptr %167, align 8, !tbaa !9
  %169 = getelementptr inbounds ptr, ptr %168, i64 7
  %170 = load ptr, ptr %169, align 8
  invoke void %170(ptr dead_on_unwind writable sret(%"class.hipsycl::rt::result") align 8 %19, ptr noundef nonnull align 8 dereferenceable(8) %167, ptr noundef nonnull align 8 dereferenceable(16) %14)
          to label %171 unwind label %174

171:                                              ; preds = %165
  %172 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7hipsycl2rt6resultaSEOS1_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %19)
          to label %173 unwind label %178

173:                                              ; preds = %171
  call void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  br label %306

174:                                              ; preds = %165
  %175 = landingpad { ptr, i32 }
          cleanup
  %176 = extractvalue { ptr, i32 } %175, 0
  store ptr %176, ptr %15, align 8
  %177 = extractvalue { ptr, i32 } %175, 1
  store i32 %177, ptr %16, align 4
  br label %182

178:                                              ; preds = %171
  %179 = landingpad { ptr, i32 }
          cleanup
  %180 = extractvalue { ptr, i32 } %179, 0
  store ptr %180, ptr %15, align 8
  %181 = extractvalue { ptr, i32 } %179, 1
  store i32 %181, ptr %16, align 4
  call void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %19) #7
  br label %182

182:                                              ; preds = %178, %174
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  br label %321

183:                                              ; preds = %134
  %184 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %14) #7
  %185 = invoke noundef ptr @_ZNK7hipsycl2rt8dag_node27get_assigned_execution_laneEv(ptr noundef nonnull align 8 dereferenceable(384) %184)
          to label %186 unwind label %96

186:                                              ; preds = %183
  %187 = getelementptr inbounds %"class.hipsycl::rt::inorder_executor", ptr %29, i32 0, i32 1
  %188 = call noundef ptr @_ZNKSt10unique_ptrIN7hipsycl2rt13inorder_queueESt14default_deleteIS2_EE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %187) #7
  %189 = icmp eq ptr %185, %188
  br i1 %189, label %190, label %213

190:                                              ; preds = %186
  %191 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %192 unwind label %96

192:                                              ; preds = %190
  %193 = invoke noundef i32 @_ZNK7hipsycl6common13output_stream15get_debug_levelEv(ptr noundef nonnull align 8 dereferenceable(16) %191)
          to label %194 unwind label %96

194:                                              ; preds = %192
  %195 = icmp sgt i32 3, %193
  br i1 %195, label %196, label %197

196:                                              ; preds = %194
  br label %212

197:                                              ; preds = %194
  %198 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %199 unwind label %96

199:                                              ; preds = %197
  %200 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7hipsycl6common13output_stream10get_streamEv(ptr noundef nonnull align 8 dereferenceable(16) %198)
          to label %201 unwind label %96

201:                                              ; preds = %199
  %202 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %200, ptr noundef @.str)
          to label %203 unwind label %96

203:                                              ; preds = %201
  %204 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %202, ptr noundef @.str.10)
          to label %205 unwind label %96

205:                                              ; preds = %203
  %206 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EERSt13basic_ostreamIT_T0_ESB_RKSt12__shared_ptrIT1_XT2_EE(ptr noundef nonnull align 8 dereferenceable(8) %204, ptr noundef nonnull align 8 dereferenceable(16) %14)
          to label %207 unwind label %96

207:                                              ; preds = %205
  %208 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %206, ptr noundef @.str.11)
          to label %209 unwind label %96

209:                                              ; preds = %207
  %210 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %208, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %211 unwind label %96

211:                                              ; preds = %209
  br label %212

212:                                              ; preds = %211, %196
  br label %305

213:                                              ; preds = %186
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #7
  %214 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %14) #7
  invoke void @_ZNK7hipsycl2rt8dag_node9get_eventEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.12") align 8 %20, ptr noundef nonnull align 8 dereferenceable(384) %214)
          to label %215 unwind label %219

215:                                              ; preds = %213
  %216 = call noundef zeroext i1 @_ZNKSt12__shared_ptrIN7hipsycl2rt14dag_node_eventELN9__gnu_cxx12_Lock_policyE2EEcvbEv(ptr noundef nonnull align 8 dereferenceable(16) %20) #7
  br i1 %216, label %217, label %218

217:                                              ; preds = %215
  br label %224

218:                                              ; preds = %215
  call void @__assert_fail(ptr noundef @.str.12, ptr noundef @.str.6, i32 noundef 132, ptr noundef @__PRETTY_FUNCTION__._ZN7hipsycl2rt16inorder_executor15submit_directlyERKSt10shared_ptrINS0_8dag_nodeEEPNS0_9operationERKN3sbo12small_vectorIS4_Lm8EEE) #8
  unreachable

219:                                              ; preds = %213
  %220 = landingpad { ptr, i32 }
          cleanup
  %221 = extractvalue { ptr, i32 } %220, 0
  store ptr %221, ptr %15, align 8
  %222 = extractvalue { ptr, i32 } %220, 1
  store i32 %222, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #7
  br label %321

223:                                              ; No predecessors!
  br label %224

224:                                              ; preds = %223, %217
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt14dag_node_eventELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %20) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #7
  %225 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %226 unwind label %96

226:                                              ; preds = %224
  %227 = invoke noundef i32 @_ZNK7hipsycl6common13output_stream15get_debug_levelEv(ptr noundef nonnull align 8 dereferenceable(16) %225)
          to label %228 unwind label %96

228:                                              ; preds = %226
  %229 = icmp sgt i32 3, %227
  br i1 %229, label %230, label %231

230:                                              ; preds = %228
  br label %244

231:                                              ; preds = %228
  %232 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %233 unwind label %96

233:                                              ; preds = %231
  %234 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7hipsycl6common13output_stream10get_streamEv(ptr noundef nonnull align 8 dereferenceable(16) %232)
          to label %235 unwind label %96

235:                                              ; preds = %233
  %236 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %234, ptr noundef @.str)
          to label %237 unwind label %96

237:                                              ; preds = %235
  %238 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %236, ptr noundef @.str.13)
          to label %239 unwind label %96

239:                                              ; preds = %237
  %240 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EERSt13basic_ostreamIT_T0_ESB_RKSt12__shared_ptrIT1_XT2_EE(ptr noundef nonnull align 8 dereferenceable(8) %238, ptr noundef nonnull align 8 dereferenceable(16) %14)
          to label %241 unwind label %96

241:                                              ; preds = %239
  %242 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %240, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %243 unwind label %96

243:                                              ; preds = %241
  br label %244

244:                                              ; preds = %243, %230
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %245 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %14) #7
  %246 = invoke noundef ptr @_ZNK7hipsycl2rt8dag_node27get_assigned_execution_laneEv(ptr noundef nonnull align 8 dereferenceable(384) %245)
          to label %247 unwind label %264

247:                                              ; preds = %244
  store ptr %246, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %248 = load ptr, ptr %8, align 8, !tbaa !5
  %249 = load ptr, ptr %21, align 8, !tbaa !5
  %250 = invoke noundef i64 @_ZN7hipsycl2rt12_GLOBAL__N_136get_maximum_execution_index_for_laneERKN3sbo12small_vectorISt10shared_ptrINS0_8dag_nodeEELm8EEEPNS0_13inorder_queueE(ptr noundef nonnull align 8 dereferenceable(160) %248, ptr noundef %249)
          to label %251 unwind label %268

251:                                              ; preds = %247
  store i64 %250, ptr %22, align 8, !tbaa !11
  %252 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %14) #7
  %253 = invoke noundef i64 @_ZNK7hipsycl2rt8dag_node28get_assigned_execution_indexEv(ptr noundef nonnull align 8 dereferenceable(384) %252)
          to label %254 unwind label %268

254:                                              ; preds = %251
  %255 = load i64, ptr %22, align 8, !tbaa !11
  %256 = icmp ne i64 %253, %255
  br i1 %256, label %257, label %284

257:                                              ; preds = %254
  %258 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %259 unwind label %268

259:                                              ; preds = %257
  %260 = invoke noundef i32 @_ZNK7hipsycl6common13output_stream15get_debug_levelEv(ptr noundef nonnull align 8 dereferenceable(16) %258)
          to label %261 unwind label %268

261:                                              ; preds = %259
  %262 = icmp sgt i32 3, %260
  br i1 %262, label %263, label %272

263:                                              ; preds = %261
  br label %283

264:                                              ; preds = %244
  %265 = landingpad { ptr, i32 }
          cleanup
  %266 = extractvalue { ptr, i32 } %265, 0
  store ptr %266, ptr %15, align 8
  %267 = extractvalue { ptr, i32 } %265, 1
  store i32 %267, ptr %16, align 4
  br label %304

268:                                              ; preds = %280, %278, %276, %274, %272, %259, %257, %251, %247
  %269 = landingpad { ptr, i32 }
          cleanup
  %270 = extractvalue { ptr, i32 } %269, 0
  store ptr %270, ptr %15, align 8
  %271 = extractvalue { ptr, i32 } %269, 1
  store i32 %271, ptr %16, align 4
  br label %303

272:                                              ; preds = %261
  %273 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %274 unwind label %268

274:                                              ; preds = %272
  %275 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7hipsycl6common13output_stream10get_streamEv(ptr noundef nonnull align 8 dereferenceable(16) %273)
          to label %276 unwind label %268

276:                                              ; preds = %274
  %277 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %275, ptr noundef @.str)
          to label %278 unwind label %268

278:                                              ; preds = %276
  %279 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %277, ptr noundef @.str.14)
          to label %280 unwind label %268

280:                                              ; preds = %278
  %281 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %279, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %282 unwind label %268

282:                                              ; preds = %280
  br label %283

283:                                              ; preds = %282, %263
  br label %302

284:                                              ; preds = %254
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #7
  %285 = getelementptr inbounds %"class.hipsycl::rt::inorder_executor", ptr %29, i32 0, i32 1
  %286 = call noundef ptr @_ZNKSt10unique_ptrIN7hipsycl2rt13inorder_queueESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %285) #7
  %287 = load ptr, ptr %286, align 8, !tbaa !9
  %288 = getelementptr inbounds ptr, ptr %287, i64 6
  %289 = load ptr, ptr %288, align 8
  invoke void %289(ptr dead_on_unwind writable sret(%"class.hipsycl::rt::result") align 8 %23, ptr noundef nonnull align 8 dereferenceable(8) %286, ptr noundef nonnull align 8 dereferenceable(16) %14)
          to label %290 unwind label %293

290:                                              ; preds = %284
  %291 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7hipsycl2rt6resultaSEOS1_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %23)
          to label %292 unwind label %297

292:                                              ; preds = %290
  call void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %23) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  br label %302

293:                                              ; preds = %284
  %294 = landingpad { ptr, i32 }
          cleanup
  %295 = extractvalue { ptr, i32 } %294, 0
  store ptr %295, ptr %15, align 8
  %296 = extractvalue { ptr, i32 } %294, 1
  store i32 %296, ptr %16, align 4
  br label %301

297:                                              ; preds = %290
  %298 = landingpad { ptr, i32 }
          cleanup
  %299 = extractvalue { ptr, i32 } %298, 0
  store ptr %299, ptr %15, align 8
  %300 = extractvalue { ptr, i32 } %298, 1
  store i32 %300, ptr %16, align 4
  call void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %23) #7
  br label %301

301:                                              ; preds = %297, %293
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #7
  br label %303

302:                                              ; preds = %292, %283
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  br label %305

303:                                              ; preds = %301, %268
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  br label %304

304:                                              ; preds = %303, %264
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  br label %321

305:                                              ; preds = %302, %212
  br label %306

306:                                              ; preds = %305, %173
  %307 = invoke noundef zeroext i1 @_ZNK7hipsycl2rt6result10is_successEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %308 unwind label %96

308:                                              ; preds = %306
  br i1 %307, label %314, label %309

309:                                              ; preds = %308
  invoke void @_ZN7hipsycl2rt14register_errorERKNS0_6resultE(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %310 unwind label %96

310:                                              ; preds = %309
  %311 = load ptr, ptr %6, align 8, !tbaa !5
  %312 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %311) #7
  invoke void @_ZN7hipsycl2rt8dag_node6cancelEv(ptr noundef nonnull align 8 dereferenceable(384) %312)
          to label %313 unwind label %96

313:                                              ; preds = %310
  store i32 1, ptr %13, align 4
  br label %316

314:                                              ; preds = %308
  br label %315

315:                                              ; preds = %314, %111
  store i32 0, ptr %13, align 4
  br label %316

316:                                              ; preds = %315, %313
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %14) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #7
  %317 = load i32, ptr %13, align 4
  switch i32 %317, label %322 [
    i32 0, label %318
  ]

318:                                              ; preds = %316
  br label %319

319:                                              ; preds = %318
  %320 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKSt10shared_ptrIN7hipsycl2rt8dag_nodeEESt6vectorIS5_N3sbo29small_buffer_vector_allocatorIS5_Lm8ES5_EEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  br label %85

321:                                              ; preds = %304, %219, %182, %151, %96
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %14) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %443

322:                                              ; preds = %316, %87
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  %323 = load i32, ptr %13, align 4
  switch i32 %323, label %438 [
    i32 2, label %324
  ]

324:                                              ; preds = %322
  %325 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %326 unwind label %331

326:                                              ; preds = %324
  %327 = invoke noundef i32 @_ZNK7hipsycl6common13output_stream15get_debug_levelEv(ptr noundef nonnull align 8 dereferenceable(16) %325)
          to label %328 unwind label %331

328:                                              ; preds = %326
  %329 = icmp sgt i32 3, %327
  br i1 %329, label %330, label %335

330:                                              ; preds = %328
  br label %365

331:                                              ; preds = %347, %343, %341, %339, %337, %335, %326, %324
  %332 = landingpad { ptr, i32 }
          cleanup
  %333 = extractvalue { ptr, i32 } %332, 0
  store ptr %333, ptr %15, align 8
  %334 = extractvalue { ptr, i32 } %332, 1
  store i32 %334, ptr %16, align 4
  br label %443

335:                                              ; preds = %328
  %336 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %337 unwind label %331

337:                                              ; preds = %335
  %338 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7hipsycl6common13output_stream10get_streamEv(ptr noundef nonnull align 8 dereferenceable(16) %336)
          to label %339 unwind label %331

339:                                              ; preds = %337
  %340 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %338, ptr noundef @.str)
          to label %341 unwind label %331

341:                                              ; preds = %339
  %342 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %340, ptr noundef @.str.15)
          to label %343 unwind label %331

343:                                              ; preds = %341
  %344 = getelementptr inbounds %"class.hipsycl::rt::inorder_executor", ptr %29, i32 0, i32 1
  %345 = call noundef ptr @_ZNKSt10unique_ptrIN7hipsycl2rt13inorder_queueESt14default_deleteIS2_EE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %344) #7
  %346 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPKv(ptr noundef nonnull align 8 dereferenceable(8) %342, ptr noundef %345)
          to label %347 unwind label %331

347:                                              ; preds = %343
  %348 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %346, ptr noundef @.str.16)
          to label %349 unwind label %331

349:                                              ; preds = %347
  call void @llvm.lifetime.start.p0(i64 32, ptr %24) #7
  %350 = load ptr, ptr %7, align 8, !tbaa !5
  invoke void @_ZN7hipsycl2rt4dumpINS0_9operationEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPT_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %24, ptr noundef %350)
          to label %351 unwind label %356

351:                                              ; preds = %349
  %352 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %348, ptr noundef nonnull align 8 dereferenceable(32) %24)
          to label %353 unwind label %360

353:                                              ; preds = %351
  %354 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %352, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %355 unwind label %360

355:                                              ; preds = %353
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #7
  br label %365

356:                                              ; preds = %349
  %357 = landingpad { ptr, i32 }
          cleanup
  %358 = extractvalue { ptr, i32 } %357, 0
  store ptr %358, ptr %15, align 8
  %359 = extractvalue { ptr, i32 } %357, 1
  store i32 %359, ptr %16, align 4
  br label %364

360:                                              ; preds = %353, %351
  %361 = landingpad { ptr, i32 }
          cleanup
  %362 = extractvalue { ptr, i32 } %361, 0
  store ptr %362, ptr %15, align 8
  %363 = extractvalue { ptr, i32 } %361, 1
  store i32 %363, ptr %16, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %24) #7
  br label %364

364:                                              ; preds = %360, %356
  call void @llvm.lifetime.end.p0(i64 32, ptr %24) #7
  br label %443

365:                                              ; preds = %355, %330
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #7
  %366 = getelementptr inbounds %"class.hipsycl::rt::inorder_executor", ptr %29, i32 0, i32 1
  %367 = call noundef ptr @_ZNKSt10unique_ptrIN7hipsycl2rt13inorder_queueESt14default_deleteIS2_EE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %366) #7
  invoke void @_ZN7hipsycl2rt12_GLOBAL__N_126queue_operation_dispatcherC2EPNS0_13inorder_queueE(ptr noundef nonnull align 8 dereferenceable(16) %25, ptr noundef %367)
          to label %368 unwind label %384

368:                                              ; preds = %365
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #7
  %369 = load ptr, ptr %7, align 8, !tbaa !5
  %370 = load ptr, ptr %6, align 8, !tbaa !5
  %371 = load ptr, ptr %369, align 8, !tbaa !9
  %372 = getelementptr inbounds ptr, ptr %371, i64 7
  %373 = load ptr, ptr %372, align 8
  invoke void %373(ptr dead_on_unwind writable sret(%"class.hipsycl::rt::result") align 8 %26, ptr noundef nonnull align 8 dereferenceable(40) %369, ptr noundef %25, ptr noundef nonnull align 8 dereferenceable(16) %370)
          to label %374 unwind label %388

374:                                              ; preds = %368
  %375 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7hipsycl2rt6resultaSEOS1_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %26)
          to label %376 unwind label %392

376:                                              ; preds = %374
  call void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %26) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  %377 = invoke noundef zeroext i1 @_ZNK7hipsycl2rt6result10is_successEv(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %378 unwind label %397

378:                                              ; preds = %376
  br i1 %377, label %401, label %379

379:                                              ; preds = %378
  invoke void @_ZN7hipsycl2rt14register_errorERKNS0_6resultE(ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %380 unwind label %397

380:                                              ; preds = %379
  %381 = load ptr, ptr %6, align 8, !tbaa !5
  %382 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %381) #7
  invoke void @_ZN7hipsycl2rt8dag_node6cancelEv(ptr noundef nonnull align 8 dereferenceable(384) %382)
          to label %383 unwind label %397

383:                                              ; preds = %380
  store i32 1, ptr %13, align 4
  br label %437

384:                                              ; preds = %365
  %385 = landingpad { ptr, i32 }
          cleanup
  %386 = extractvalue { ptr, i32 } %385, 0
  store ptr %386, ptr %15, align 8
  %387 = extractvalue { ptr, i32 } %385, 1
  store i32 %387, ptr %16, align 4
  br label %442

388:                                              ; preds = %368
  %389 = landingpad { ptr, i32 }
          cleanup
  %390 = extractvalue { ptr, i32 } %389, 0
  store ptr %390, ptr %15, align 8
  %391 = extractvalue { ptr, i32 } %389, 1
  store i32 %391, ptr %16, align 4
  br label %396

392:                                              ; preds = %374
  %393 = landingpad { ptr, i32 }
          cleanup
  %394 = extractvalue { ptr, i32 } %393, 0
  store ptr %394, ptr %15, align 8
  %395 = extractvalue { ptr, i32 } %393, 1
  store i32 %395, ptr %16, align 4
  call void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %26) #7
  br label %396

396:                                              ; preds = %392, %388
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #7
  br label %441

397:                                              ; preds = %422, %408, %405, %401, %380, %379, %376
  %398 = landingpad { ptr, i32 }
          cleanup
  %399 = extractvalue { ptr, i32 } %398, 0
  store ptr %399, ptr %15, align 8
  %400 = extractvalue { ptr, i32 } %398, 1
  store i32 %400, ptr %16, align 4
  br label %441

401:                                              ; preds = %378
  %402 = load ptr, ptr %6, align 8, !tbaa !5
  %403 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %402) #7
  %404 = invoke noundef nonnull align 8 dereferenceable(132) ptr @_ZN7hipsycl2rt8dag_node19get_execution_hintsEv(ptr noundef nonnull align 8 dereferenceable(384) %403)
          to label %405 unwind label %397

405:                                              ; preds = %401
  %406 = invoke noundef zeroext i1 @_ZNK7hipsycl2rt15execution_hints8has_hintINS0_5hints30coarse_grained_synchronizationEEEbv(ptr noundef nonnull align 8 dereferenceable(132) %404)
          to label %407 unwind label %397

407:                                              ; preds = %405
  br i1 %406, label %408, label %422

408:                                              ; preds = %407
  %409 = load ptr, ptr %6, align 8, !tbaa !5
  %410 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %409) #7
  %411 = getelementptr inbounds %"class.hipsycl::rt::inorder_executor", ptr %29, i32 0, i32 1
  %412 = call noundef ptr @_ZNKSt10unique_ptrIN7hipsycl2rt13inorder_queueESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %411) #7
  %413 = load ptr, ptr %412, align 8, !tbaa !9
  %414 = getelementptr inbounds ptr, ptr %413, i64 1
  %415 = load ptr, ptr %414, align 8
  invoke void %415(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.12") align 8 %27, ptr noundef nonnull align 8 dereferenceable(8) %412)
          to label %416 unwind label %397

416:                                              ; preds = %408
  invoke void @_ZN7hipsycl2rt8dag_node14mark_submittedESt10shared_ptrINS0_14dag_node_eventEE(ptr noundef nonnull align 8 dereferenceable(384) %410, ptr noundef %27)
          to label %417 unwind label %418

417:                                              ; preds = %416
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt14dag_node_eventELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %27) #7
  br label %436

418:                                              ; preds = %416
  %419 = landingpad { ptr, i32 }
          cleanup
  %420 = extractvalue { ptr, i32 } %419, 0
  store ptr %420, ptr %15, align 8
  %421 = extractvalue { ptr, i32 } %419, 1
  store i32 %421, ptr %16, align 4
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt14dag_node_eventELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %27) #7
  br label %441

422:                                              ; preds = %407
  %423 = load ptr, ptr %6, align 8, !tbaa !5
  %424 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %423) #7
  %425 = getelementptr inbounds %"class.hipsycl::rt::inorder_executor", ptr %29, i32 0, i32 1
  %426 = call noundef ptr @_ZNKSt10unique_ptrIN7hipsycl2rt13inorder_queueESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %425) #7
  %427 = load ptr, ptr %426, align 8, !tbaa !9
  %428 = getelementptr inbounds ptr, ptr %427, i64 0
  %429 = load ptr, ptr %428, align 8
  invoke void %429(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.12") align 8 %28, ptr noundef nonnull align 8 dereferenceable(8) %426)
          to label %430 unwind label %397

430:                                              ; preds = %422
  invoke void @_ZN7hipsycl2rt8dag_node14mark_submittedESt10shared_ptrINS0_14dag_node_eventEE(ptr noundef nonnull align 8 dereferenceable(384) %424, ptr noundef %28)
          to label %431 unwind label %432

431:                                              ; preds = %430
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt14dag_node_eventELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %28) #7
  br label %436

432:                                              ; preds = %430
  %433 = landingpad { ptr, i32 }
          cleanup
  %434 = extractvalue { ptr, i32 } %433, 0
  store ptr %434, ptr %15, align 8
  %435 = extractvalue { ptr, i32 } %433, 1
  store i32 %435, ptr %16, align 4
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt14dag_node_eventELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %28) #7
  br label %441

436:                                              ; preds = %431, %417
  store i32 0, ptr %13, align 4
  br label %437

437:                                              ; preds = %436, %383
  call void @_ZN7hipsycl2rt20operation_dispatcherD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %25) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #7
  br label %438

438:                                              ; preds = %437, %322
  call void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  %439 = load i32, ptr %13, align 4
  switch i32 %439, label %449 [
    i32 0, label %440
    i32 1, label %440
  ]

440:                                              ; preds = %438, %438, %68
  ret void

441:                                              ; preds = %432, %418, %397, %396
  call void @_ZN7hipsycl2rt20operation_dispatcherD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %25) #7
  br label %442

442:                                              ; preds = %441, %384
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #7
  br label %443

443:                                              ; preds = %442, %364, %331, %321
  call void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  br label %444

444:                                              ; preds = %443
  %445 = load ptr, ptr %15, align 8
  %446 = load i32, ptr %16, align 4
  %447 = insertvalue { ptr, i32 } poison, ptr %445, 0
  %448 = insertvalue { ptr, i32 } %447, i32 %446, 1
  resume { ptr, i32 } %448

449:                                              ; preds = %438
  unreachable
}

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

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPKv(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0 align 2

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #0 align 2

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

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

declare noundef nonnull align 8 dereferenceable(160) ptr @_ZNK7hipsycl2rt8dag_node16get_requirementsEv(ptr noundef nonnull align 8 dereferenceable(384)) #3

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #2

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

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

declare void @_ZN7hipsycl2rt8dag_node24assign_to_execution_laneEPv(ptr noundef nonnull align 8 dereferenceable(384), ptr noundef) #3

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

declare void @_ZN7hipsycl2rt8dag_node22assign_execution_indexEm(ptr noundef nonnull align 8 dereferenceable(384), i64 noundef) #3

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt6vectorISt10shared_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 @_ZNKSt6vectorISt10shared_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_cxxneIPKSt10shared_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)) #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKSt10shared_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 @_ZNSt10shared_ptrIN7hipsycl2rt8dag_nodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #1 align 2

declare noundef zeroext i1 @_ZNK7hipsycl2rt8dag_node10is_virtualEv(ptr noundef nonnull align 8 dereferenceable(384)) #3

declare i32 @__gxx_personality_v0(...)

declare noundef zeroext i1 @_ZNK7hipsycl2rt8dag_node17is_known_completeEv(ptr noundef nonnull align 8 dereferenceable(384)) #3

declare { i64, i64 } @_ZNK7hipsycl2rt8dag_node19get_assigned_deviceEv(ptr noundef nonnull align 8 dereferenceable(384)) #3

declare noundef i32 @_ZNK7hipsycl2rt9device_id11get_backendEv(ptr noundef nonnull align 4 dereferenceable(16)) #3

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

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

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN7hipsycl2rt6resultaSEOS1_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #3

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

declare noundef ptr @_ZNK7hipsycl2rt8dag_node27get_assigned_execution_laneEv(ptr noundef nonnull align 8 dereferenceable(384)) #3

declare void @_ZNK7hipsycl2rt8dag_node9get_eventEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.12") align 8, ptr noundef nonnull align 8 dereferenceable(384)) #3

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

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i64 @_ZN7hipsycl2rt12_GLOBAL__N_136get_maximum_execution_index_for_laneERKN3sbo12small_vectorISt10shared_ptrINS0_8dag_nodeEELm8EEEPNS0_13inorder_queueE(ptr noundef nonnull align 8 dereferenceable(160), ptr noundef) #0

declare noundef i64 @_ZNK7hipsycl2rt8dag_node28get_assigned_execution_indexEv(ptr noundef nonnull align 8 dereferenceable(384)) #3

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7hipsycl2rt4dumpINS0_9operationEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPT_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef) #0

; 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 hidden void @_ZN7hipsycl2rt12_GLOBAL__N_126queue_operation_dispatcherC2EPNS0_13inorder_queueE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #1 align 2

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

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

declare void @_ZN7hipsycl2rt8dag_node14mark_submittedESt10shared_ptrINS0_14dag_node_eventEE(ptr noundef nonnull align 8 dereferenceable(384), ptr noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7hipsycl2rt20operation_dispatcherD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { 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 #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 = !{!10, !10, i64 0}
!10 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !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.hipsycl::rt::result" = type { %"class.std::unique_ptr.30" }
%"class.std::unique_ptr.30" = type { %"struct.std::__uniq_ptr_data.31" }
%"struct.std::__uniq_ptr_data.31" = type { %"class.std::__uniq_ptr_impl.32" }
%"class.std::__uniq_ptr_impl.32" = type { %"class.std::tuple.33" }
%"class.std::tuple.33" = type { %"struct.std::_Tuple_impl.34" }
%"struct.std::_Tuple_impl.34" = type { %"struct.std::_Head_base.37" }
%"struct.std::_Head_base.37" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"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.std::shared_ptr.12" = type { %"class.std::__shared_ptr.13" }
%"class.std::__shared_ptr.13" = type { ptr, %"class.std::__shared_count" }
%"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.hipsycl::rt::(anonymous namespace)::queue_operation_dispatcher" = type { %"class.hipsycl::rt::operation_dispatcher", ptr }
%"class.hipsycl::rt::operation_dispatcher" = type { ptr }

@.str = external hidden unnamed_addr constant [30 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [22 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [90 x i8], align 1
@__PRETTY_FUNCTION__._ZN7hipsycl2rt16inorder_executor15submit_directlyERKSt10shared_ptrINS0_8dag_nodeEEPNS0_9operationERKN3sbo12small_vectorIS4_Lm8EEE = external hidden unnamed_addr constant [116 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [100 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7hipsycl2rt16inorder_executor15submit_directlyERKSt10shared_ptrINS0_8dag_nodeEEPNS0_9operationERKN3sbo12small_vectorIS4_Lm8EEE(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef %2, ptr noundef nonnull align 8 dereferenceable(160) %3) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.hipsycl::rt::result", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"class.std::shared_ptr", align 8
  %9 = alloca %"class.hipsycl::rt::device_id", align 8
  %10 = alloca %"class.hipsycl::rt::device_id", align 8
  %11 = alloca %"class.hipsycl::rt::result", align 8
  %12 = alloca %"class.std::shared_ptr.12", align 8
  %13 = alloca %"class.hipsycl::rt::result", align 8
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca %"class.hipsycl::rt::(anonymous namespace)::queue_operation_dispatcher", align 8
  %16 = alloca %"class.hipsycl::rt::result", align 8
  %17 = alloca %"class.std::shared_ptr.12", align 8
  %18 = alloca %"class.std::shared_ptr.12", align 8
  %19 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
  %20 = tail call noundef i32 @_ZNK7hipsycl6common13output_stream15get_debug_levelEv(ptr noundef nonnull align 8 dereferenceable(16) %19)
  %21 = icmp slt i32 %20, 3
  br i1 %21, label %39, label %22

22:                                               ; preds = %4
  %23 = tail call noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
  %24 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7hipsycl6common13output_stream10get_streamEv(ptr noundef nonnull align 8 dereferenceable(16) %23)
  %25 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %24, ptr noundef nonnull @.str)
  %26 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %25, ptr noundef nonnull @.str.1)
  %27 = tail call noundef ptr @_ZNKSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EE3getEv(ptr noundef nonnull align 8 dereferenceable(16) %1) #7
  %28 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPKv(ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef %27)
  %29 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull @.str.2)
  %30 = tail call noundef i64 @_ZNKSt6vectorISt10shared_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(160) %3) #7
  %31 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %29, i64 noundef %30)
  %32 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef nonnull @.str.3)
  %33 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #7
  %34 = tail call noundef nonnull align 8 dereferenceable(160) ptr @_ZNK7hipsycl2rt8dag_node16get_requirementsEv(ptr noundef nonnull align 8 dereferenceable(384) %33)
  %35 = tail call noundef i64 @_ZNKSt6vectorISt8weak_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(160) %34) #7
  %36 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) %32, i64 noundef %35)
  %37 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %36, ptr noundef nonnull @.str.4)
  %38 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %37, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
  br label %39

39:                                               ; preds = %4, %22
  %40 = load ptr, ptr %2, align 8, !tbaa !5
  %41 = getelementptr inbounds i8, ptr %40, i64 24
  %42 = load ptr, ptr %41, align 8
  %43 = tail call noundef zeroext i1 %42(ptr noundef nonnull align 8 dereferenceable(40) %2)
  br i1 %43, label %44, label %45

44:                                               ; preds = %39
  tail call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.6, i32 noundef 98, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN7hipsycl2rt16inorder_executor15submit_directlyERKSt10shared_ptrINS0_8dag_nodeEEPNS0_9operationERKN3sbo12small_vectorIS4_Lm8EEE) #8
  unreachable

45:                                               ; preds = %39
  %46 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #7
  %47 = tail call noundef zeroext i1 @_ZNK7hipsycl2rt8dag_node12is_submittedEv(ptr noundef nonnull align 8 dereferenceable(384) %46)
  br i1 %47, label %295, label %48

48:                                               ; preds = %45
  %49 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #7
  %50 = getelementptr inbounds i8, ptr %0, i64 8
  %51 = tail call noundef ptr @_ZNKSt10unique_ptrIN7hipsycl2rt13inorder_queueESt14default_deleteIS2_EE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %50) #7
  tail call void @_ZN7hipsycl2rt8dag_node24assign_to_execution_laneEPv(ptr noundef nonnull align 8 dereferenceable(384) %49, ptr noundef %51)
  %52 = tail call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #7
  %53 = getelementptr inbounds i8, ptr %0, i64 16
  %54 = tail call noundef i64 @_ZNSt13__atomic_baseImEppEv(ptr noundef nonnull align 8 dereferenceable(8) %53) #7
  tail call void @_ZN7hipsycl2rt8dag_node22assign_execution_indexEm(ptr noundef nonnull align 8 dereferenceable(384) %52, i64 noundef %54)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  call void @_ZN7hipsycl2rt6resultC2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %55 = call ptr @_ZNKSt6vectorISt10shared_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(160) %3) #7
  store ptr %55, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %56 = call ptr @_ZNKSt6vectorISt10shared_ptrIN7hipsycl2rt8dag_nodeEEN3sbo29small_buffer_vector_allocatorIS4_Lm8ES4_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(160) %3) #7
  store ptr %56, ptr %7, align 8
  %57 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKSt10shared_ptrIN7hipsycl2rt8dag_nodeEESt6vectorIS5_N3sbo29small_buffer_vector_allocatorIS5_Lm8ES5_EEEEEbRKNS_17__normal_iteratorIT_T0_EESI_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  br i1 %57, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %48
  %58 = getelementptr inbounds i8, ptr %9, i64 8
  %59 = getelementptr inbounds i8, ptr %10, i64 8
  br label %60

60:                                               ; preds = %.lr.ph, %220
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #7
  %61 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKSt10shared_ptrIN7hipsycl2rt8dag_nodeEESt6vectorIS5_N3sbo29small_buffer_vector_allocatorIS5_Lm8ES5_EEEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  call void @_ZNSt10shared_ptrIN7hipsycl2rt8dag_nodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %61) #7
  %62 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  %63 = invoke noundef zeroext i1 @_ZNK7hipsycl2rt8dag_node10is_virtualEv(ptr noundef nonnull align 8 dereferenceable(384) %62)
          to label %64 unwind label %.loopexit

64:                                               ; preds = %60
  br i1 %63, label %65, label %66

65:                                               ; preds = %64
  call void @__assert_fail(ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.6, i32 noundef 111, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN7hipsycl2rt16inorder_executor15submit_directlyERKSt10shared_ptrINS0_8dag_nodeEEPNS0_9operationERKN3sbo12small_vectorIS4_Lm8EEE) #8
  unreachable

.loopexit:                                        ; preds = %60, %66, %71, %93, %103, %105, %108, %110, %112, %127, %133, %138, %140, %143, %145, %147, %149, %158, %163, %165, %168, %170, %172, %214
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %223

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

66:                                               ; preds = %64
  %67 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  %68 = invoke noundef zeroext i1 @_ZNK7hipsycl2rt8dag_node12is_submittedEv(ptr noundef nonnull align 8 dereferenceable(384) %67)
          to label %69 unwind label %.loopexit

69:                                               ; preds = %66
  br i1 %68, label %71, label %70

70:                                               ; preds = %69
  call void @__assert_fail(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.6, i32 noundef 112, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN7hipsycl2rt16inorder_executor15submit_directlyERKSt10shared_ptrINS0_8dag_nodeEEPNS0_9operationERKN3sbo12small_vectorIS4_Lm8EEE) #8
  unreachable

71:                                               ; preds = %69
  %72 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  %73 = invoke noundef zeroext i1 @_ZNK7hipsycl2rt8dag_node17is_known_completeEv(ptr noundef nonnull align 8 dereferenceable(384) %72)
          to label %74 unwind label %.loopexit

74:                                               ; preds = %71
  br i1 %73, label %220, label %75

75:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #7
  %76 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  %77 = invoke { i64, i64 } @_ZNK7hipsycl2rt8dag_node19get_assigned_deviceEv(ptr noundef nonnull align 8 dereferenceable(384) %76)
          to label %78 unwind label %98

78:                                               ; preds = %75
  %79 = extractvalue { i64, i64 } %77, 0
  store i64 %79, ptr %9, align 8
  %80 = extractvalue { i64, i64 } %77, 1
  store i64 %80, ptr %58, align 8
  %81 = invoke noundef i32 @_ZNK7hipsycl2rt9device_id11get_backendEv(ptr noundef nonnull align 4 dereferenceable(16) %9)
          to label %82 unwind label %98

82:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #7
  %83 = call noundef ptr @_ZNKSt10unique_ptrIN7hipsycl2rt13inorder_queueESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %50) #7
  %84 = load ptr, ptr %83, align 8, !tbaa !5
  %85 = getelementptr inbounds i8, ptr %84, i64 72
  %86 = load ptr, ptr %85, align 8
  %87 = invoke { i64, i64 } %86(ptr noundef nonnull align 8 dereferenceable(8) %83)
          to label %88 unwind label %100

88:                                               ; preds = %82
  %89 = extractvalue { i64, i64 } %87, 0
  store i64 %89, ptr %10, align 8
  %90 = extractvalue { i64, i64 } %87, 1
  store i64 %90, ptr %59, align 8
  %91 = invoke noundef i32 @_ZNK7hipsycl2rt9device_id11get_backendEv(ptr noundef nonnull align 4 dereferenceable(16) %10)
          to label %92 unwind label %100

92:                                               ; preds = %88
  %.not = icmp eq i32 %81, %91
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #7
  br i1 %.not, label %127, label %93

93:                                               ; preds = %92
  %94 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %95 unwind label %.loopexit

95:                                               ; preds = %93
  %96 = call noundef i32 @_ZNK7hipsycl6common13output_stream15get_debug_levelEv(ptr noundef nonnull align 8 dereferenceable(16) %94)
  %97 = icmp slt i32 %96, 3
  br i1 %97, label %114, label %103

98:                                               ; preds = %78, %75
  %99 = landingpad { ptr, i32 }
          cleanup
  br label %102

100:                                              ; preds = %88, %82
  %101 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #7
  br label %102

102:                                              ; preds = %100, %98
  %.pn = phi { ptr, i32 } [ %101, %100 ], [ %99, %98 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #7
  br label %223

103:                                              ; preds = %95
  %104 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %105 unwind label %.loopexit

105:                                              ; preds = %103
  %106 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7hipsycl6common13output_stream10get_streamEv(ptr noundef nonnull align 8 dereferenceable(16) %104)
  %107 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %106, ptr noundef nonnull @.str)
          to label %108 unwind label %.loopexit

108:                                              ; preds = %105
  %109 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %107, ptr noundef nonnull @.str.9)
          to label %110 unwind label %.loopexit

110:                                              ; preds = %108
  %111 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EERSt13basic_ostreamIT_T0_ESB_RKSt12__shared_ptrIT1_XT2_EE(ptr noundef nonnull align 8 dereferenceable(8) %109, ptr noundef nonnull align 8 dereferenceable(16) %8)
          to label %112 unwind label %.loopexit

112:                                              ; preds = %110
  %113 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %111, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %114 unwind label %.loopexit

114:                                              ; preds = %112, %95
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #7
  %115 = call noundef ptr @_ZNKSt10unique_ptrIN7hipsycl2rt13inorder_queueESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %50) #7
  %116 = load ptr, ptr %115, align 8, !tbaa !5
  %117 = getelementptr inbounds i8, ptr %116, i64 56
  %118 = load ptr, ptr %117, align 8
  invoke void %118(ptr dead_on_unwind nonnull writable sret(%"class.hipsycl::rt::result") align 8 %11, ptr noundef nonnull align 8 dereferenceable(8) %115, ptr noundef nonnull align 8 dereferenceable(16) %8)
          to label %119 unwind label %122

119:                                              ; preds = %114
  %120 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7hipsycl2rt6resultaSEOS1_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %121 unwind label %124

121:                                              ; preds = %119
  call void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  br label %214

122:                                              ; preds = %114
  %123 = landingpad { ptr, i32 }
          cleanup
  br label %126

124:                                              ; preds = %119
  %125 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %11) #7
  br label %126

126:                                              ; preds = %124, %122
  %.pn45 = phi { ptr, i32 } [ %125, %124 ], [ %123, %122 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #7
  br label %223

127:                                              ; preds = %92
  %128 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  %129 = invoke noundef ptr @_ZNK7hipsycl2rt8dag_node27get_assigned_execution_laneEv(ptr noundef nonnull align 8 dereferenceable(384) %128)
          to label %130 unwind label %.loopexit

130:                                              ; preds = %127
  %131 = call noundef ptr @_ZNKSt10unique_ptrIN7hipsycl2rt13inorder_queueESt14default_deleteIS2_EE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %50) #7
  %132 = icmp eq ptr %129, %131
  br i1 %132, label %133, label %151

133:                                              ; preds = %130
  %134 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %135 unwind label %.loopexit

135:                                              ; preds = %133
  %136 = call noundef i32 @_ZNK7hipsycl6common13output_stream15get_debug_levelEv(ptr noundef nonnull align 8 dereferenceable(16) %134)
  %137 = icmp slt i32 %136, 3
  br i1 %137, label %214, label %138

138:                                              ; preds = %135
  %139 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %140 unwind label %.loopexit

140:                                              ; preds = %138
  %141 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7hipsycl6common13output_stream10get_streamEv(ptr noundef nonnull align 8 dereferenceable(16) %139)
  %142 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %141, ptr noundef nonnull @.str)
          to label %143 unwind label %.loopexit

143:                                              ; preds = %140
  %144 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %142, ptr noundef nonnull @.str.10)
          to label %145 unwind label %.loopexit

145:                                              ; preds = %143
  %146 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EERSt13basic_ostreamIT_T0_ESB_RKSt12__shared_ptrIT1_XT2_EE(ptr noundef nonnull align 8 dereferenceable(8) %144, ptr noundef nonnull align 8 dereferenceable(16) %8)
          to label %147 unwind label %.loopexit

147:                                              ; preds = %145
  %148 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %146, ptr noundef nonnull @.str.11)
          to label %149 unwind label %.loopexit

149:                                              ; preds = %147
  %150 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %148, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %214 unwind label %.loopexit

151:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %12) #7
  %152 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  invoke void @_ZNK7hipsycl2rt8dag_node9get_eventEv(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.12") align 8 %12, ptr noundef nonnull align 8 dereferenceable(384) %152)
          to label %153 unwind label %156

153:                                              ; preds = %151
  %154 = call noundef zeroext i1 @_ZNKSt12__shared_ptrIN7hipsycl2rt14dag_node_eventELN9__gnu_cxx12_Lock_policyE2EEcvbEv(ptr noundef nonnull align 8 dereferenceable(16) %12) #7
  br i1 %154, label %158, label %155

155:                                              ; preds = %153
  call void @__assert_fail(ptr noundef nonnull @.str.12, ptr noundef nonnull @.str.6, i32 noundef 132, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN7hipsycl2rt16inorder_executor15submit_directlyERKSt10shared_ptrINS0_8dag_nodeEEPNS0_9operationERKN3sbo12small_vectorIS4_Lm8EEE) #8
  unreachable

156:                                              ; preds = %151
  %157 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #7
  br label %223

158:                                              ; preds = %153
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt14dag_node_eventELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %12) #7
  %159 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %160 unwind label %.loopexit

160:                                              ; preds = %158
  %161 = call noundef i32 @_ZNK7hipsycl6common13output_stream15get_debug_levelEv(ptr noundef nonnull align 8 dereferenceable(16) %159)
  %162 = icmp slt i32 %161, 3
  br i1 %162, label %174, label %163

163:                                              ; preds = %160
  %164 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %165 unwind label %.loopexit

165:                                              ; preds = %163
  %166 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7hipsycl6common13output_stream10get_streamEv(ptr noundef nonnull align 8 dereferenceable(16) %164)
  %167 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %166, ptr noundef nonnull @.str)
          to label %168 unwind label %.loopexit

168:                                              ; preds = %165
  %169 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %167, ptr noundef nonnull @.str.13)
          to label %170 unwind label %.loopexit

170:                                              ; preds = %168
  %171 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcEN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EERSt13basic_ostreamIT_T0_ESB_RKSt12__shared_ptrIT1_XT2_EE(ptr noundef nonnull align 8 dereferenceable(8) %169, ptr noundef nonnull align 8 dereferenceable(16) %8)
          to label %172 unwind label %.loopexit

172:                                              ; preds = %170
  %173 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %171, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %174 unwind label %.loopexit

174:                                              ; preds = %172, %160
  %175 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  %176 = invoke noundef ptr @_ZNK7hipsycl2rt8dag_node27get_assigned_execution_laneEv(ptr noundef nonnull align 8 dereferenceable(384) %175)
          to label %177 unwind label %188

177:                                              ; preds = %174
  %178 = invoke noundef i64 @_ZN7hipsycl2rt12_GLOBAL__N_136get_maximum_execution_index_for_laneERKN3sbo12small_vectorISt10shared_ptrINS0_8dag_nodeEELm8EEEPNS0_13inorder_queueE(ptr noundef nonnull align 8 dereferenceable(160) %3, ptr noundef %176)
          to label %179 unwind label %190

179:                                              ; preds = %177
  %180 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  %181 = invoke noundef i64 @_ZNK7hipsycl2rt8dag_node28get_assigned_execution_indexEv(ptr noundef nonnull align 8 dereferenceable(384) %180)
          to label %182 unwind label %190

182:                                              ; preds = %179
  %.not39 = icmp eq i64 %181, %178
  br i1 %.not39, label %201, label %183

183:                                              ; preds = %182
  %184 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %185 unwind label %190

185:                                              ; preds = %183
  %186 = call noundef i32 @_ZNK7hipsycl6common13output_stream15get_debug_levelEv(ptr noundef nonnull align 8 dereferenceable(16) %184)
  %187 = icmp slt i32 %186, 3
  br i1 %187, label %214, label %192

188:                                              ; preds = %174
  %189 = landingpad { ptr, i32 }
          cleanup
  br label %223

190:                                              ; preds = %199, %197, %194, %192, %183, %179, %177
  %191 = landingpad { ptr, i32 }
          cleanup
  br label %223

192:                                              ; preds = %185
  %193 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %194 unwind label %190

194:                                              ; preds = %192
  %195 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7hipsycl6common13output_stream10get_streamEv(ptr noundef nonnull align 8 dereferenceable(16) %193)
  %196 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %195, ptr noundef nonnull @.str)
          to label %197 unwind label %190

197:                                              ; preds = %194
  %198 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %196, ptr noundef nonnull @.str.14)
          to label %199 unwind label %190

199:                                              ; preds = %197
  %200 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %198, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %214 unwind label %190

201:                                              ; preds = %182
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #7
  %202 = call noundef ptr @_ZNKSt10unique_ptrIN7hipsycl2rt13inorder_queueESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %50) #7
  %203 = load ptr, ptr %202, align 8, !tbaa !5
  %204 = getelementptr inbounds i8, ptr %203, i64 48
  %205 = load ptr, ptr %204, align 8
  invoke void %205(ptr dead_on_unwind nonnull writable sret(%"class.hipsycl::rt::result") align 8 %13, ptr noundef nonnull align 8 dereferenceable(8) %202, ptr noundef nonnull align 8 dereferenceable(16) %8)
          to label %206 unwind label %209

206:                                              ; preds = %201
  %207 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7hipsycl2rt6resultaSEOS1_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %13)
          to label %208 unwind label %211

208:                                              ; preds = %206
  call void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  br label %214

209:                                              ; preds = %201
  %210 = landingpad { ptr, i32 }
          cleanup
  br label %213

211:                                              ; preds = %206
  %212 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  br label %213

213:                                              ; preds = %211, %209
  %.pn40 = phi { ptr, i32 } [ %212, %211 ], [ %210, %209 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #7
  br label %223

214:                                              ; preds = %208, %199, %185, %149, %135, %121
  %215 = invoke noundef zeroext i1 @_ZNK7hipsycl2rt6result10is_successEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %216 unwind label %.loopexit

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

217:                                              ; preds = %216
  invoke void @_ZN7hipsycl2rt14register_errorERKNS0_6resultE(ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %218 unwind label %.loopexit.split-lp

218:                                              ; preds = %217
  %219 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #7
  invoke void @_ZN7hipsycl2rt8dag_node6cancelEv(ptr noundef nonnull align 8 dereferenceable(384) %219)
          to label %.critedge unwind label %.loopexit.split-lp

220:                                              ; preds = %74, %216
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #7
  %221 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKSt10shared_ptrIN7hipsycl2rt8dag_nodeEESt6vectorIS5_N3sbo29small_buffer_vector_allocatorIS5_Lm8ES5_EEEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  %222 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKSt10shared_ptrIN7hipsycl2rt8dag_nodeEESt6vectorIS5_N3sbo29small_buffer_vector_allocatorIS5_Lm8ES5_EEEEEbRKNS_17__normal_iteratorIT_T0_EESI_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  br i1 %222, label %60, label %._crit_edge

223:                                              ; preds = %.loopexit, %.loopexit.split-lp, %188, %213, %190, %156, %126, %102
  %.pn47 = phi { ptr, i32 } [ %.pn45, %126 ], [ %157, %156 ], [ %.pn, %102 ], [ %189, %188 ], [ %191, %190 ], [ %.pn40, %213 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  br label %297

.critedge:                                        ; preds = %218
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  br label %294

._crit_edge:                                      ; preds = %220, %48
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  %224 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %225 unwind label %228

225:                                              ; preds = %._crit_edge
  %226 = call noundef i32 @_ZNK7hipsycl6common13output_stream15get_debug_levelEv(ptr noundef nonnull align 8 dereferenceable(16) %224)
  %227 = icmp slt i32 %226, 3
  br i1 %227, label %253, label %230

228:                                              ; preds = %240, %237, %235, %232, %230, %._crit_edge
  %229 = landingpad { ptr, i32 }
          cleanup
  br label %297

230:                                              ; preds = %225
  %231 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZN7hipsycl6common13output_stream3getEv()
          to label %232 unwind label %228

232:                                              ; preds = %230
  %233 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7hipsycl6common13output_stream10get_streamEv(ptr noundef nonnull align 8 dereferenceable(16) %231)
  %234 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %233, ptr noundef nonnull @.str)
          to label %235 unwind label %228

235:                                              ; preds = %232
  %236 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %234, ptr noundef nonnull @.str.15)
          to label %237 unwind label %228

237:                                              ; preds = %235
  %238 = call noundef ptr @_ZNKSt10unique_ptrIN7hipsycl2rt13inorder_queueESt14default_deleteIS2_EE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %50) #7
  %239 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPKv(ptr noundef nonnull align 8 dereferenceable(8) %236, ptr noundef %238)
          to label %240 unwind label %228

240:                                              ; preds = %237
  %241 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %239, ptr noundef nonnull @.str.16)
          to label %242 unwind label %228

242:                                              ; preds = %240
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %14) #7
  invoke void @_ZN7hipsycl2rt4dumpINS0_9operationEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPT_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %14, ptr noundef nonnull %2)
          to label %243 unwind label %248

243:                                              ; preds = %242
  %244 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8) %241, ptr noundef nonnull align 8 dereferenceable(32) %14)
          to label %245 unwind label %250

245:                                              ; preds = %243
  %246 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %244, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %247 unwind label %250

247:                                              ; preds = %245
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #7
  br label %253

248:                                              ; preds = %242
  %249 = landingpad { ptr, i32 }
          cleanup
  br label %252

250:                                              ; preds = %245, %243
  %251 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #7
  br label %252

252:                                              ; preds = %250, %248
  %.pn49 = phi { ptr, i32 } [ %251, %250 ], [ %249, %248 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %14) #7
  br label %297

253:                                              ; preds = %225, %247
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #7
  %254 = call noundef ptr @_ZNKSt10unique_ptrIN7hipsycl2rt13inorder_queueESt14default_deleteIS2_EE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %50) #7
  call void @_ZN7hipsycl2rt12_GLOBAL__N_126queue_operation_dispatcherC2EPNS0_13inorder_queueE(ptr noundef nonnull align 8 dereferenceable(16) %15, ptr noundef %254)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #7
  %255 = load ptr, ptr %2, align 8, !tbaa !5
  %256 = getelementptr inbounds i8, ptr %255, i64 56
  %257 = load ptr, ptr %256, align 8
  invoke void %257(ptr dead_on_unwind nonnull writable sret(%"class.hipsycl::rt::result") align 8 %16, ptr noundef nonnull align 8 dereferenceable(40) %2, ptr noundef nonnull %15, ptr noundef nonnull align 8 dereferenceable(16) %1)
          to label %258 unwind label %266

258:                                              ; preds = %253
  %259 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN7hipsycl2rt6resultaSEOS1_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %16)
          to label %260 unwind label %268

260:                                              ; preds = %258
  call void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #7
  %261 = invoke noundef zeroext i1 @_ZNK7hipsycl2rt6result10is_successEv(ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %262 unwind label %271

262:                                              ; preds = %260
  br i1 %261, label %273, label %263

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

264:                                              ; preds = %263
  %265 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #7
  invoke void @_ZN7hipsycl2rt8dag_node6cancelEv(ptr noundef nonnull align 8 dereferenceable(384) %265)
          to label %293 unwind label %271

266:                                              ; preds = %253
  %267 = landingpad { ptr, i32 }
          cleanup
  br label %270

268:                                              ; preds = %258
  %269 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %16) #7
  br label %270

270:                                              ; preds = %268, %266
  %.pn51 = phi { ptr, i32 } [ %269, %268 ], [ %267, %266 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #7
  br label %296

271:                                              ; preds = %288, %282, %276, %273, %264, %263, %260
  %272 = landingpad { ptr, i32 }
          cleanup
  br label %296

273:                                              ; preds = %262
  %274 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #7
  %275 = invoke noundef nonnull align 8 dereferenceable(132) ptr @_ZN7hipsycl2rt8dag_node19get_execution_hintsEv(ptr noundef nonnull align 8 dereferenceable(384) %274)
          to label %276 unwind label %271

276:                                              ; preds = %273
  %277 = invoke noundef zeroext i1 @_ZNK7hipsycl2rt15execution_hints8has_hintINS0_5hints30coarse_grained_synchronizationEEEbv(ptr noundef nonnull align 8 dereferenceable(132) %275)
          to label %278 unwind label %271

278:                                              ; preds = %276
  %279 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN7hipsycl2rt8dag_nodeELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %1) #7
  %280 = call noundef ptr @_ZNKSt10unique_ptrIN7hipsycl2rt13inorder_queueESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %50) #7
  %281 = load ptr, ptr %280, align 8, !tbaa !5
  br i1 %277, label %282, label %288

282:                                              ; preds = %278
  %283 = getelementptr inbounds i8, ptr %281, i64 8
  %284 = load ptr, ptr %283, align 8
  invoke void %284(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.12") align 8 %17, ptr noundef nonnull align 8 dereferenceable(8) %280)
          to label %285 unwind label %271

285:                                              ; preds = %282
  invoke void @_ZN7hipsycl2rt8dag_node14mark_submittedESt10shared_ptrINS0_14dag_node_eventEE(ptr noundef nonnull align 8 dereferenceable(384) %279, ptr noundef nonnull %17)
          to label %.sink.split unwind label %286

286:                                              ; preds = %285
  %287 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt14dag_node_eventELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #7
  br label %296

288:                                              ; preds = %278
  %289 = load ptr, ptr %281, align 8
  invoke void %289(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.12") align 8 %18, ptr noundef nonnull align 8 dereferenceable(8) %280)
          to label %290 unwind label %271

290:                                              ; preds = %288
  invoke void @_ZN7hipsycl2rt8dag_node14mark_submittedESt10shared_ptrINS0_14dag_node_eventEE(ptr noundef nonnull align 8 dereferenceable(384) %279, ptr noundef nonnull %18)
          to label %.sink.split unwind label %291

291:                                              ; preds = %290
  %292 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt14dag_node_eventELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #7
  br label %296

.sink.split:                                      ; preds = %290, %285
  %.sink = phi ptr [ %17, %285 ], [ %18, %290 ]
  call void @_ZNSt12__shared_ptrIN7hipsycl2rt14dag_node_eventELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %.sink) #7
  br label %293

293:                                              ; preds = %.sink.split, %264
  call void @_ZN7hipsycl2rt20operation_dispatcherD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %15) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #7
  br label %294

294:                                              ; preds = %.critedge, %293
  call void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br label %295

295:                                              ; preds = %45, %294
  ret void

296:                                              ; preds = %291, %286, %271, %270
  %.pn53 = phi { ptr, i32 } [ %287, %286 ], [ %272, %271 ], [ %292, %291 ], [ %.pn51, %270 ]
  call void @_ZN7hipsycl2rt20operation_dispatcherD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %15) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #7
  br label %297

297:                                              ; preds = %296, %252, %228, %223
  %.pn53.pn = phi { ptr, i32 } [ %.pn53, %296 ], [ %.pn49, %252 ], [ %229, %228 ], [ %.pn47, %223 ]
  call void @_ZN7hipsycl2rt6resultD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  resume { ptr, i32 } %.pn53.pn
}

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

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

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

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPKv(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #0 align 2

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #0 align 2

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

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

declare noundef nonnull align 8 dereferenceable(160) ptr @_ZNK7hipsycl2rt8dag_node16get_requirementsEv(ptr noundef nonnull align 8 dereferenceable(384)) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #0 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #2

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

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

declare void @_ZN7hipsycl2rt8dag_node24assign_to_execution_laneEPv(ptr noundef nonnull align 8 dereferenceable(384), ptr noundef) local_unnamed_addr #3

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNKSt6vectorISt10shared_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 @_ZNKSt6vectorISt10shared_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_cxxneIPKSt10shared_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 #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKSt10shared_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 @_ZNSt10shared_ptrIN7hipsycl2rt8dag_nodeEEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #1 align 2

declare noundef zeroext i1 @_ZNK7hipsycl2rt8dag_node10is_virtualEv(ptr noundef nonnull align 8 dereferenceable(384)) local_unnamed_addr #3

declare i32 @__gxx_personality_v0(...)

declare noundef zeroext i1 @_ZNK7hipsycl2rt8dag_node17is_known_completeEv(ptr noundef nonnull align 8 dereferenceable(384)) local_unnamed_addr #3

declare { i64, i64 } @_ZNK7hipsycl2rt8dag_node19get_assigned_deviceEv(ptr noundef nonnull align 8 dereferenceable(384)) local_unnamed_addr #3

declare noundef i32 @_ZNK7hipsycl2rt9device_id11get_backendEv(ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt10unique_ptrIN7hipsycl2rt13inorder_queueESt14default_deleteIS2_EEptEv(ptr noundef nonnull align 8 dereferenceable(8)) local_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) #5

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

declare noundef nonnull align 8 dereferenceable(8) ptr @_ZN7hipsycl2rt6resultaSEOS1_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

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

declare noundef ptr @_ZNK7hipsycl2rt8dag_node27get_assigned_execution_laneEv(ptr noundef nonnull align 8 dereferenceable(384)) local_unnamed_addr #3

declare void @_ZNK7hipsycl2rt8dag_node9get_eventEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.12") align 8, ptr noundef nonnull align 8 dereferenceable(384)) local_unnamed_addr #3

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

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

; Function Attrs: mustprogress uwtable
declare hidden noundef i64 @_ZN7hipsycl2rt12_GLOBAL__N_136get_maximum_execution_index_for_laneERKN3sbo12small_vectorISt10shared_ptrINS0_8dag_nodeEELm8EEEPNS0_13inorder_queueE(ptr noundef nonnull align 8 dereferenceable(160), ptr noundef) local_unnamed_addr #0

declare noundef i64 @_ZNK7hipsycl2rt8dag_node28get_assigned_execution_indexEv(ptr noundef nonnull align 8 dereferenceable(384)) local_unnamed_addr #3

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7hipsycl2rt4dumpINS0_9operationEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPT_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef) local_unnamed_addr #0

; 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 hidden void @_ZN7hipsycl2rt12_GLOBAL__N_126queue_operation_dispatcherC2EPNS0_13inorder_queueE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) 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 #3

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

declare void @_ZN7hipsycl2rt8dag_node14mark_submittedESt10shared_ptrINS0_14dag_node_eventEE(ptr noundef nonnull align 8 dereferenceable(384), ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7hipsycl2rt20operation_dispatcherD2Ev(ptr noundef nonnull align 8 dereferenceable(8)) 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #6 = { 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 #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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}


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