; LLVM IR from NVIDIA/DALI :: dali/pipeline/executor/executor2/exec_node_task.ll (ZN4dali5exec210OutputTask3RunEv)

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

%"struct.dali::detail::CallAtExit" = type { %class.anon }
%class.anon = type { ptr }
%"struct.dali::exec2::PipelineOutput" = type { %"class.dali::Workspace", %"class.dali::CUDASharedEvent", %"class.std::optional.226" }
%"class.dali::Workspace" = type { %"class.dali::WorkspaceBase" }
%"class.dali::WorkspaceBase" = type { %"class.dali::ArgumentWorkspace", %"class.dali::SmallVector.6", %"class.dali::SmallVector.74", %"class.dali::SmallVector.79", %"class.dali::AccessOrder", ptr, ptr, %"class.dali::SmallVector.82", %"class.std::__cxx11::basic_string", ptr, %"class.std::shared_ptr" }
%"class.dali::ArgumentWorkspace" = type { ptr, %"class.std::map", %"class.dali::SmallVector.69" }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, int>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, int>>, std::less<void>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, int>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, int>>, std::less<void>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.dali::SmallVector.69" = type { %union.anon.72, i64 }
%union.anon.72 = type { %struct.anon.73, [176 x i8] }
%struct.anon.73 = type { ptr, i64 }
%"class.dali::SmallVector.6" = type { %union.anon.9, i64 }
%union.anon.9 = type { %struct.anon.10 }
%struct.anon.10 = type { ptr, i64 }
%"class.dali::SmallVector.74" = type { %union.anon.77, i64 }
%union.anon.77 = type { %struct.anon.78, [144 x i8] }
%struct.anon.78 = type { ptr, i64 }
%"class.dali::SmallVector.79" = type { %union.anon.80, i64 }
%union.anon.80 = type { %struct.anon.81, [64 x i8] }
%struct.anon.81 = type { ptr, i64 }
%"class.dali::AccessOrder" = type <{ ptr, i32, [4 x i8] }>
%"class.dali::SmallVector.82" = type { %union.anon.85, i64 }
%union.anon.85 = type { %struct.anon.86, [16 x i8] }
%struct.anon.86 = type { ptr, i64 }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.dali::CUDASharedEvent" = type { %"class.std::shared_ptr.3" }
%"class.std::shared_ptr.3" = type { %"class.std::__shared_ptr.4" }
%"class.std::__shared_ptr.4" = type { ptr, %"class.std::__shared_count" }
%"class.std::optional.226" = type { %"struct.std::_Optional_base.227" }
%"struct.std::_Optional_base.227" = type { %"struct.std::_Optional_payload.229" }
%"struct.std::_Optional_payload.229" = type { %"struct.std::_Optional_payload_base.base", [3 x i8] }
%"struct.std::_Optional_payload_base.base" = type <{ %"union.std::_Optional_payload_base<int>::_Storage", i8 }>
%"union.std::_Optional_payload_base<int>::_Storage" = type { i32 }
%"struct.dali::DomainTimeRange" = type { i8 }
%"class.std::unordered_set" = type { %"class.std::_Hashtable.179" }
%"class.std::_Hashtable.179" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"struct.std::hash.183" = type { i8 }
%"struct.std::equal_to.186" = type { i8 }
%"class.std::allocator.198" = type { i8 }
%"struct.std::pair" = type <{ %"struct.std::__detail::_Node_iterator", i8, [7 x i8] }>
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }
%"class.std::shared_ptr.152" = type { %"class.std::__shared_ptr.153" }
%"class.std::__shared_ptr.153" = type { ptr, %"class.std::__shared_count" }
%"class.std::shared_ptr.158" = type { %"class.std::__shared_ptr.159" }
%"class.std::__shared_ptr.159" = type { ptr, %"class.std::__shared_count" }
%"class.dali::CPUBackend" = type { i8 }
%"class.dali::GPUBackend" = type { i8 }
%"class.dali::exec2::ExecNodeTask" = type { ptr, ptr, %"struct.dali::exec2::WorkspaceParams", %"class.std::unique_ptr", %"class.dali::CUDASharedEvent" }
%"struct.dali::exec2::WorkspaceParams" = type <{ ptr, %"class.std::shared_ptr", i32, [4 x i8] }>
%"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.2" }
%"struct.std::_Head_base.2" = type { ptr }
%"class.dali::exec2::ExecNode" = type { %"class.dali::SmallVector.13", %"class.dali::SmallVector.18", %"class.std::shared_ptr.23", %"class.std::shared_ptr.23", %"class.std::unique_ptr.26", %"struct.dali::exec2::ExecEnv", %"class.std::__cxx11::basic_string", i32, i8, i8, i8, %"class.std::shared_ptr.34", %"class.std::shared_ptr.34", %"class.std::shared_ptr.34", %"class.std::unique_ptr", i8, %"class.dali::CUDASharedEvent", %"class.std::any" }
%"class.dali::SmallVector.13" = type { %union.anon.16, i64 }
%union.anon.16 = type { %struct.anon.17, [48 x i8] }
%struct.anon.17 = type { ptr, i64 }
%"class.dali::SmallVector.18" = type { %union.anon.21, i64 }
%union.anon.21 = type { %struct.anon.22, [176 x i8] }
%struct.anon.22 = type { ptr, i64 }
%"class.std::shared_ptr.23" = type { %"class.std::__shared_ptr.24" }
%"class.std::__shared_ptr.24" = type { ptr, %"class.std::__shared_count" }
%"class.std::unique_ptr.26" = type { %"struct.std::__uniq_ptr_data.27" }
%"struct.std::__uniq_ptr_data.27" = type { %"class.std::__uniq_ptr_impl.28" }
%"class.std::__uniq_ptr_impl.28" = type { %"class.std::tuple.29" }
%"class.std::tuple.29" = type { %"struct.std::_Tuple_impl.30" }
%"struct.std::_Tuple_impl.30" = type { %"struct.std::_Head_base.33" }
%"struct.std::_Head_base.33" = type { ptr }
%"struct.dali::exec2::ExecEnv" = type { ptr, %"class.dali::AccessOrder" }
%"class.std::shared_ptr.34" = type { %"class.std::__shared_ptr.35" }
%"class.std::__shared_ptr.35" = type { ptr, %"class.std::__shared_count" }
%"class.std::any" = type { ptr, %"union.std::any::_Storage" }
%"union.std::any::_Storage" = type { ptr }
%"struct.dali::exec2::ExecNodeTask::OperatorIO" = type { %"class.std::shared_ptr.152", %"class.dali::AccessOrder" }
%"struct.dali::exec2::ExecNodeTask::OperatorIO.225" = type { %"class.std::shared_ptr.158", %"class.dali::AccessOrder" }

@.str.8 = external hidden unnamed_addr constant [96 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [21 x i8], align 1
@__PRETTY_FUNCTION__._ZN4dali5exec210OutputTask3RunEv = external hidden unnamed_addr constant [46 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [13 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4dali5exec212ExecNodeTask12GetWorkspaceEv(ptr dead_on_unwind noalias writable sret(%"struct.dali::detail::CallAtExit") align 8, ptr noundef nonnull align 8 dereferenceable(72)) #1 align 2

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) #2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE8NumInputEv(ptr noundef nonnull align 8 dereferenceable(664)) #4 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE9NumOutputEv(ptr noundef nonnull align 8 dereferenceable(664)) #4 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE12OutputIsTypeINS_10CPUBackendEEEbi(ptr noundef nonnull align 8 dereferenceable(664), i32 noundef) #1 align 2

declare void @_ZN4dali10TensorListINS_10CPUBackendEE9set_orderENS_11AccessOrderEb(ptr noundef nonnull align 8 dereferenceable(304), ptr, i32, i1 noundef zeroext) #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { ptr, i32 } @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE12output_orderEv(ptr noundef nonnull align 8 dereferenceable(664)) #3 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #7

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z9CUDA_CALLI9cudaErrorEvT_(i32 noundef) #8

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE9SetOutputEiS2_INS1_INS_10CPUBackendEEEE(ptr noundef nonnull align 8 dereferenceable(664), i32 noundef, ptr noundef) #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE12OutputIsTypeINS_10GPUBackendEEEbi(ptr noundef nonnull align 8 dereferenceable(664), i32 noundef) #1 align 2

declare void @_ZN4dali10TensorListINS_10GPUBackendEE9set_orderENS_11AccessOrderEb(ptr noundef nonnull align 8 dereferenceable(304), ptr, i32, i1 noundef zeroext) #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE9SetOutputEiS2_INS1_INS_10GPUBackendEEEE(ptr noundef nonnull align 8 dereferenceable(664), i32 noundef, ptr noundef) #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(304) ptr @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE6OutputINS_10CPUBackendEEERDaiT_(ptr noundef nonnull align 8 dereferenceable(664), i32 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(304) ptr @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE6OutputINS_10GPUBackendEEERDaiT_(ptr noundef nonnull align 8 dereferenceable(664), i32 noundef) #1 align 2

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4dali10TensorListINS_10CPUBackendEE9is_pinnedEv(ptr noundef nonnull align 8 dereferenceable(304)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { ptr, i32 } @_ZNK4dali10TensorListINS_10CPUBackendEE5orderEv(ptr noundef nonnull align 8 dereferenceable(304)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4dali11AccessOrder9is_deviceEv(ptr noundef nonnull align 8 dereferenceable(12)) #3 align 2

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

declare i32 @cudaEventRecord(ptr noundef, ptr noundef) #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK4dali11SmallVectorIPNS_5exec28ExecEdgeELm8ESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(72)) #4 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNK4dali5exec212ExecNodeTask9TaskInputINS_10CPUBackendEEERKDai(ptr noundef nonnull align 8 dereferenceable(72), i32 noundef) #1 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i32 } @_ZN4dali11AccessOrder4hostEv() #1 align 2

declare void @_ZNK4dali11AccessOrder4waitEP10CUevent_st(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef) #6

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4dali5exec210OutputTask3RunEv(ptr dead_on_unwind noalias writable sret(%"struct.dali::exec2::PipelineOutput") align 8 %0, ptr noundef nonnull align 8 dereferenceable(72) %1) #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"struct.dali::DomainTimeRange", align 1
  %6 = alloca %"struct.dali::detail::CallAtExit", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.std::unordered_set", align 8
  %10 = alloca %"struct.std::hash.183", align 1
  %11 = alloca %"struct.std::equal_to.186", align 1
  %12 = alloca %"class.std::allocator.198", align 1
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca %"struct.std::pair", align 8
  %17 = alloca %"class.std::shared_ptr.152", align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca %"struct.std::pair", align 8
  %21 = alloca %"class.std::shared_ptr.158", align 8
  %22 = alloca ptr, align 8
  %23 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %24 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %25 = alloca ptr, align 8
  %26 = alloca %"class.dali::AccessOrder", align 8
  %27 = alloca { ptr, i32 }, align 8
  %28 = alloca i32, align 4
  %29 = alloca ptr, align 8
  %30 = alloca %"class.dali::CPUBackend", align 1
  %31 = alloca %"class.dali::AccessOrder", align 8
  %32 = alloca { ptr, i32 }, align 8
  %33 = alloca %"class.dali::CUDASharedEvent", align 8
  %34 = alloca %"class.dali::AccessOrder", align 8
  %35 = alloca { ptr, i32 }, align 8
  %36 = alloca %"class.dali::AccessOrder", align 8
  %37 = alloca { ptr, i32 }, align 8
  %38 = alloca ptr, align 8
  %39 = alloca %"class.dali::GPUBackend", align 1
  %40 = alloca %"class.dali::AccessOrder", align 8
  %41 = alloca { ptr, i32 }, align 8
  %42 = alloca %"class.dali::CUDASharedEvent", align 8
  %43 = alloca %"class.std::optional.226", align 4
  %44 = alloca %"class.dali::AccessOrder", align 8
  %45 = alloca { ptr, i32 }, align 8
  %46 = alloca %"class.std::optional.226", align 4
  %47 = alloca i32, align 4
  %48 = alloca %"class.dali::AccessOrder", align 8
  %49 = alloca { ptr, i32 }, align 8
  %50 = alloca %"class.dali::AccessOrder", align 8
  %51 = alloca { ptr, i32 }, align 8
  %52 = alloca i1, align 1
  %53 = alloca %"class.dali::CUDASharedEvent", align 8
  %54 = alloca %"class.std::optional.226", align 4
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  %55 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #9
  %56 = getelementptr inbounds %"class.dali::exec2::ExecNodeTask", ptr %55, i32 0, i32 1
  %57 = load ptr, ptr %56, align 8, !tbaa !9
  %58 = getelementptr inbounds %"class.dali::exec2::ExecNode", ptr %57, i32 0, i32 7
  %59 = load i32, ptr %58, align 8, !tbaa !25
  %60 = icmp eq i32 %59, 0
  %61 = zext i1 %60 to i64
  %62 = select i1 %60, i32 7780608, i32 2526162
  call void @_ZN4dali15DomainTimeRangeC2EPKcj(ptr noundef nonnull align 1 dereferenceable(1) %5, ptr noundef @.str.23, i32 noundef %62)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #9
  invoke void @_ZN4dali5exec212ExecNodeTask12GetWorkspaceEv(ptr dead_on_unwind writable sret(%"struct.dali::detail::CallAtExit") align 8 %6, ptr noundef nonnull align 8 dereferenceable(72) %55)
          to label %63 unwind label %71

63:                                               ; preds = %2
  %64 = getelementptr inbounds %"class.dali::exec2::ExecNodeTask", ptr %55, i32 0, i32 3
  %65 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %64) #9
  %66 = invoke noundef i32 @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE8NumInputEv(ptr noundef nonnull align 8 dereferenceable(664) %65)
          to label %67 unwind label %75

67:                                               ; preds = %63
  %68 = icmp eq i32 %66, 0
  br i1 %68, label %69, label %70

69:                                               ; preds = %67
  br label %80

70:                                               ; preds = %67
  call void @__assert_fail(ptr noundef @.str.24, ptr noundef @.str.8, i32 noundef 506, ptr noundef @__PRETTY_FUNCTION__._ZN4dali5exec210OutputTask3RunEv) #10
  unreachable

71:                                               ; preds = %426, %2
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %7, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %8, align 4
  br label %433

75:                                               ; preds = %80, %63
  %76 = landingpad { ptr, i32 }
          cleanup
  %77 = extractvalue { ptr, i32 } %76, 0
  store ptr %77, ptr %7, align 8
  %78 = extractvalue { ptr, i32 } %76, 1
  store i32 %78, ptr %8, align 4
  br label %431

79:                                               ; No predecessors!
  br label %80

80:                                               ; preds = %79, %69
  %81 = getelementptr inbounds %"class.dali::exec2::ExecNodeTask", ptr %55, i32 0, i32 3
  %82 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %81) #9
  %83 = invoke noundef i32 @_ZNK4dali17ArgumentWorkspace16NumArgumentInputEv(ptr noundef nonnull align 8 dereferenceable(256) %82)
          to label %84 unwind label %75

84:                                               ; preds = %80
  %85 = icmp eq i32 %83, 0
  br i1 %85, label %86, label %87

86:                                               ; preds = %84
  br label %89

87:                                               ; preds = %84
  call void @__assert_fail(ptr noundef @.str.25, ptr noundef @.str.8, i32 noundef 507, ptr noundef @__PRETTY_FUNCTION__._ZN4dali5exec210OutputTask3RunEv) #10
  unreachable

88:                                               ; No predecessors!
  br label %89

89:                                               ; preds = %88, %86
  call void @llvm.lifetime.start.p0(i64 56, ptr %9) #9
  %90 = getelementptr inbounds %"class.dali::exec2::ExecNodeTask", ptr %55, i32 0, i32 3
  %91 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %90) #9
  %92 = invoke noundef i32 @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE9NumOutputEv(ptr noundef nonnull align 8 dereferenceable(664) %91)
          to label %93 unwind label %109

93:                                               ; preds = %89
  %94 = sext i32 %92 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #9
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #9
  call void @_ZNSaIP10CUevent_stEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #9
  invoke void @_ZNSt13unordered_setIP10CUevent_stSt4hashIS1_ESt8equal_toIS1_ESaIS1_EEC2EmRKS3_RKS5_RKS6_(ptr noundef nonnull align 8 dereferenceable(56) %9, i64 noundef %94, ptr noundef nonnull align 1 dereferenceable(1) %10, ptr noundef nonnull align 1 dereferenceable(1) %11, ptr noundef nonnull align 1 dereferenceable(1) %12)
          to label %95 unwind label %113

95:                                               ; preds = %93
  call void @_ZNSt15__new_allocatorIP10CUevent_stED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #9
  %96 = getelementptr inbounds %"class.dali::exec2::ExecNodeTask", ptr %55, i32 0, i32 3
  %97 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %96) #9
  %98 = invoke noundef i32 @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE9NumOutputEv(ptr noundef nonnull align 8 dereferenceable(664) %97)
          to label %99 unwind label %117

99:                                               ; preds = %95
  %100 = getelementptr inbounds %"class.dali::exec2::ExecNodeTask", ptr %55, i32 0, i32 1
  %101 = load ptr, ptr %100, align 8, !tbaa !9
  %102 = getelementptr inbounds %"class.dali::exec2::ExecNode", ptr %101, i32 0, i32 0
  %103 = invoke noundef i64 @_ZNK4dali11SmallVectorIPNS_5exec28ExecEdgeELm8ESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(72) %102)
          to label %104 unwind label %117

104:                                              ; preds = %99
  %105 = trunc i64 %103 to i32
  %106 = icmp eq i32 %98, %105
  br i1 %106, label %107, label %108

107:                                              ; preds = %104
  br label %122

108:                                              ; preds = %104
  call void @__assert_fail(ptr noundef @.str.26, ptr noundef @.str.8, i32 noundef 509, ptr noundef @__PRETTY_FUNCTION__._ZN4dali5exec210OutputTask3RunEv) #10
  unreachable

109:                                              ; preds = %89
  %110 = landingpad { ptr, i32 }
          cleanup
  %111 = extractvalue { ptr, i32 } %110, 0
  store ptr %111, ptr %7, align 8
  %112 = extractvalue { ptr, i32 } %110, 1
  store i32 %112, ptr %8, align 4
  br label %429

113:                                              ; preds = %93
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %7, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %8, align 4
  call void @_ZNSt15__new_allocatorIP10CUevent_stED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %12) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #9
  br label %429

117:                                              ; preds = %99, %95
  %118 = landingpad { ptr, i32 }
          cleanup
  %119 = extractvalue { ptr, i32 } %118, 0
  store ptr %119, ptr %7, align 8
  %120 = extractvalue { ptr, i32 } %118, 1
  store i32 %120, ptr %8, align 4
  br label %428

121:                                              ; No predecessors!
  br label %122

122:                                              ; preds = %121, %107
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #9
  store i32 0, ptr %13, align 4, !tbaa !47
  br label %123

123:                                              ; preds = %227, %122
  %124 = load i32, ptr %13, align 4, !tbaa !47
  %125 = getelementptr inbounds %"class.dali::exec2::ExecNodeTask", ptr %55, i32 0, i32 3
  %126 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %125) #9
  %127 = invoke noundef i32 @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE9NumOutputEv(ptr noundef nonnull align 8 dereferenceable(664) %126)
          to label %128 unwind label %131

128:                                              ; preds = %123
  %129 = icmp slt i32 %124, %127
  br i1 %129, label %135, label %130

130:                                              ; preds = %128
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  br label %231

131:                                              ; preds = %179, %135, %123
  %132 = landingpad { ptr, i32 }
          cleanup
  %133 = extractvalue { ptr, i32 } %132, 0
  store ptr %133, ptr %7, align 8
  %134 = extractvalue { ptr, i32 } %132, 1
  store i32 %134, ptr %8, align 4
  br label %230

135:                                              ; preds = %128
  %136 = getelementptr inbounds %"class.dali::exec2::ExecNodeTask", ptr %55, i32 0, i32 3
  %137 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %136) #9
  %138 = load i32, ptr %13, align 4, !tbaa !47
  %139 = invoke noundef zeroext i1 @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE12OutputIsTypeINS_10CPUBackendEEEbi(ptr noundef nonnull align 8 dereferenceable(664) %137, i32 noundef %138)
          to label %140 unwind label %131

140:                                              ; preds = %135
  br i1 %139, label %141, label %179

141:                                              ; preds = %140
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #9
  %142 = load i32, ptr %13, align 4, !tbaa !47
  %143 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK4dali5exec212ExecNodeTask9TaskInputINS_10CPUBackendEEERKDai(ptr noundef nonnull align 8 dereferenceable(72) %55, i32 noundef %142)
          to label %144 unwind label %159

144:                                              ; preds = %141
  store ptr %143, ptr %14, align 8, !tbaa !5
  %145 = load ptr, ptr %14, align 8, !tbaa !5
  %146 = invoke noundef ptr @_ZNK4dali5exec212ExecNodeTask10OperatorIOINS_10CPUBackendEE5eventEv(ptr noundef nonnull align 8 dereferenceable(32) %145)
          to label %147 unwind label %159

147:                                              ; preds = %144
  %148 = icmp ne ptr %146, null
  br i1 %148, label %149, label %167

149:                                              ; preds = %147
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #9
  %150 = load ptr, ptr %14, align 8, !tbaa !5
  %151 = invoke noundef ptr @_ZNK4dali5exec212ExecNodeTask10OperatorIOINS_10CPUBackendEE5eventEv(ptr noundef nonnull align 8 dereferenceable(32) %150)
          to label %152 unwind label %163

152:                                              ; preds = %149
  store ptr %151, ptr %15, align 8, !tbaa !5
  %153 = invoke { ptr, i8 } @_ZNSt13unordered_setIP10CUevent_stSt4hashIS1_ESt8equal_toIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(56) %9, ptr noundef nonnull align 8 dereferenceable(8) %15)
          to label %154 unwind label %163

154:                                              ; preds = %152
  %155 = getelementptr inbounds { ptr, i8 }, ptr %16, i32 0, i32 0
  %156 = extractvalue { ptr, i8 } %153, 0
  store ptr %156, ptr %155, align 8
  %157 = getelementptr inbounds { ptr, i8 }, ptr %16, i32 0, i32 1
  %158 = extractvalue { ptr, i8 } %153, 1
  store i8 %158, ptr %157, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #9
  br label %167

159:                                              ; preds = %144, %141
  %160 = landingpad { ptr, i32 }
          cleanup
  %161 = extractvalue { ptr, i32 } %160, 0
  store ptr %161, ptr %7, align 8
  %162 = extractvalue { ptr, i32 } %160, 1
  store i32 %162, ptr %8, align 4
  br label %178

163:                                              ; preds = %152, %149
  %164 = landingpad { ptr, i32 }
          cleanup
  %165 = extractvalue { ptr, i32 } %164, 0
  store ptr %165, ptr %7, align 8
  %166 = extractvalue { ptr, i32 } %164, 1
  store i32 %166, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #9
  br label %178

167:                                              ; preds = %154, %147
  %168 = getelementptr inbounds %"class.dali::exec2::ExecNodeTask", ptr %55, i32 0, i32 3
  %169 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %168) #9
  %170 = load i32, ptr %13, align 4, !tbaa !47
  %171 = load ptr, ptr %14, align 8, !tbaa !5
  %172 = getelementptr inbounds %"struct.dali::exec2::ExecNodeTask::OperatorIO", ptr %171, i32 0, i32 0
  call void @_ZNSt10shared_ptrIN4dali10TensorListINS0_10CPUBackendEEEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(16) %172) #9
  invoke void @_ZN4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE9SetOutputEiS2_INS1_INS_10CPUBackendEEEE(ptr noundef nonnull align 8 dereferenceable(664) %169, i32 noundef %170, ptr noundef %17)
          to label %173 unwind label %174

173:                                              ; preds = %167
  call void @_ZNSt12__shared_ptrIN4dali10TensorListINS0_10CPUBackendEEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #9
  br label %226

174:                                              ; preds = %167
  %175 = landingpad { ptr, i32 }
          cleanup
  %176 = extractvalue { ptr, i32 } %175, 0
  store ptr %176, ptr %7, align 8
  %177 = extractvalue { ptr, i32 } %175, 1
  store i32 %177, ptr %8, align 4
  call void @_ZNSt12__shared_ptrIN4dali10TensorListINS0_10CPUBackendEEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #9
  br label %178

178:                                              ; preds = %174, %163, %159
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #9
  br label %230

179:                                              ; preds = %140
  %180 = getelementptr inbounds %"class.dali::exec2::ExecNodeTask", ptr %55, i32 0, i32 3
  %181 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %180) #9
  %182 = load i32, ptr %13, align 4, !tbaa !47
  %183 = invoke noundef zeroext i1 @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE12OutputIsTypeINS_10GPUBackendEEEbi(ptr noundef nonnull align 8 dereferenceable(664) %181, i32 noundef %182)
          to label %184 unwind label %131

184:                                              ; preds = %179
  br i1 %183, label %185, label %186

185:                                              ; preds = %184
  br label %188

186:                                              ; preds = %184
  call void @__assert_fail(ptr noundef @.str.22, ptr noundef @.str.8, i32 noundef 518, ptr noundef @__PRETTY_FUNCTION__._ZN4dali5exec210OutputTask3RunEv) #10
  unreachable

187:                                              ; No predecessors!
  br label %188

188:                                              ; preds = %187, %185
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #9
  %189 = load i32, ptr %13, align 4, !tbaa !47
  %190 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK4dali5exec212ExecNodeTask9TaskInputINS_10GPUBackendEEERKDai(ptr noundef nonnull align 8 dereferenceable(72) %55, i32 noundef %189)
          to label %191 unwind label %206

191:                                              ; preds = %188
  store ptr %190, ptr %18, align 8, !tbaa !5
  %192 = load ptr, ptr %18, align 8, !tbaa !5
  %193 = invoke noundef ptr @_ZNK4dali5exec212ExecNodeTask10OperatorIOINS_10GPUBackendEE5eventEv(ptr noundef nonnull align 8 dereferenceable(32) %192)
          to label %194 unwind label %206

194:                                              ; preds = %191
  %195 = icmp ne ptr %193, null
  br i1 %195, label %196, label %214

196:                                              ; preds = %194
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #9
  %197 = load ptr, ptr %18, align 8, !tbaa !5
  %198 = invoke noundef ptr @_ZNK4dali5exec212ExecNodeTask10OperatorIOINS_10GPUBackendEE5eventEv(ptr noundef nonnull align 8 dereferenceable(32) %197)
          to label %199 unwind label %210

199:                                              ; preds = %196
  store ptr %198, ptr %19, align 8, !tbaa !5
  %200 = invoke { ptr, i8 } @_ZNSt13unordered_setIP10CUevent_stSt4hashIS1_ESt8equal_toIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(56) %9, ptr noundef nonnull align 8 dereferenceable(8) %19)
          to label %201 unwind label %210

201:                                              ; preds = %199
  %202 = getelementptr inbounds { ptr, i8 }, ptr %20, i32 0, i32 0
  %203 = extractvalue { ptr, i8 } %200, 0
  store ptr %203, ptr %202, align 8
  %204 = getelementptr inbounds { ptr, i8 }, ptr %20, i32 0, i32 1
  %205 = extractvalue { ptr, i8 } %200, 1
  store i8 %205, ptr %204, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #9
  br label %214

206:                                              ; preds = %191, %188
  %207 = landingpad { ptr, i32 }
          cleanup
  %208 = extractvalue { ptr, i32 } %207, 0
  store ptr %208, ptr %7, align 8
  %209 = extractvalue { ptr, i32 } %207, 1
  store i32 %209, ptr %8, align 4
  br label %225

210:                                              ; preds = %199, %196
  %211 = landingpad { ptr, i32 }
          cleanup
  %212 = extractvalue { ptr, i32 } %211, 0
  store ptr %212, ptr %7, align 8
  %213 = extractvalue { ptr, i32 } %211, 1
  store i32 %213, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #9
  br label %225

214:                                              ; preds = %201, %194
  %215 = getelementptr inbounds %"class.dali::exec2::ExecNodeTask", ptr %55, i32 0, i32 3
  %216 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %215) #9
  %217 = load i32, ptr %13, align 4, !tbaa !47
  %218 = load ptr, ptr %18, align 8, !tbaa !5
  %219 = getelementptr inbounds %"struct.dali::exec2::ExecNodeTask::OperatorIO.225", ptr %218, i32 0, i32 0
  call void @_ZNSt10shared_ptrIN4dali10TensorListINS0_10GPUBackendEEEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 8 dereferenceable(16) %219) #9
  invoke void @_ZN4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE9SetOutputEiS2_INS1_INS_10GPUBackendEEEE(ptr noundef nonnull align 8 dereferenceable(664) %216, i32 noundef %217, ptr noundef %21)
          to label %220 unwind label %221

220:                                              ; preds = %214
  call void @_ZNSt12__shared_ptrIN4dali10TensorListINS0_10GPUBackendEEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %21) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #9
  br label %226

221:                                              ; preds = %214
  %222 = landingpad { ptr, i32 }
          cleanup
  %223 = extractvalue { ptr, i32 } %222, 0
  store ptr %223, ptr %7, align 8
  %224 = extractvalue { ptr, i32 } %222, 1
  store i32 %224, ptr %8, align 4
  call void @_ZNSt12__shared_ptrIN4dali10TensorListINS0_10GPUBackendEEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %21) #9
  br label %225

225:                                              ; preds = %221, %210, %206
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #9
  br label %230

226:                                              ; preds = %220, %173
  br label %227

227:                                              ; preds = %226
  %228 = load i32, ptr %13, align 4, !tbaa !47
  %229 = add nsw i32 %228, 1
  store i32 %229, ptr %13, align 4, !tbaa !47
  br label %123, !llvm.loop !48

230:                                              ; preds = %225, %178, %131
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #9
  br label %428

231:                                              ; preds = %130
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #9
  store ptr %9, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #9
  %232 = load ptr, ptr %22, align 8, !tbaa !5
  %233 = call ptr @_ZNSt13unordered_setIP10CUevent_stSt4hashIS1_ESt8equal_toIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %232) #9
  %234 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %23, i32 0, i32 0
  %235 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %234, i32 0, i32 0
  store ptr %233, ptr %235, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #9
  %236 = load ptr, ptr %22, align 8, !tbaa !5
  %237 = call ptr @_ZNSt13unordered_setIP10CUevent_stSt4hashIS1_ESt8equal_toIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %236) #9
  %238 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %24, i32 0, i32 0
  %239 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %238, i32 0, i32 0
  store ptr %237, ptr %239, align 8
  br label %240

240:                                              ; preds = %252, %231
  %241 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseIP10CUevent_stLb0EEES5_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %24) #9
  br i1 %241, label %243, label %242

242:                                              ; preds = %240
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #9
  br label %258

243:                                              ; preds = %240
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #9
  %244 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt8__detail14_Node_iteratorIP10CUevent_stLb1ELb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #9
  %245 = load ptr, ptr %244, align 8, !tbaa !5
  store ptr %245, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #9
  %246 = getelementptr inbounds %"class.dali::exec2::ExecNodeTask", ptr %55, i32 0, i32 3
  %247 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %246) #9
  %248 = invoke { ptr, i32 } @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE12output_orderEv(ptr noundef nonnull align 8 dereferenceable(664) %247)
          to label %249 unwind label %254

249:                                              ; preds = %243
  store { ptr, i32 } %248, ptr %27, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %26, ptr align 8 %27, i64 12, i1 false)
  %250 = load ptr, ptr %25, align 8, !tbaa !5
  invoke void @_ZNK4dali11AccessOrder4waitEP10CUevent_st(ptr noundef nonnull align 8 dereferenceable(12) %26, ptr noundef %250)
          to label %251 unwind label %254

251:                                              ; preds = %249
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #9
  br label %252

252:                                              ; preds = %251
  %253 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorIP10CUevent_stLb1ELb0EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %23) #9
  br label %240

254:                                              ; preds = %249, %243
  %255 = landingpad { ptr, i32 }
          cleanup
  %256 = extractvalue { ptr, i32 } %255, 0
  store ptr %256, ptr %7, align 8
  %257 = extractvalue { ptr, i32 } %255, 1
  store i32 %257, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #9
  br label %428

258:                                              ; preds = %242
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #9
  store i32 0, ptr %28, align 4, !tbaa !47
  br label %259

259:                                              ; preds = %359, %258
  %260 = load i32, ptr %28, align 4, !tbaa !47
  %261 = getelementptr inbounds %"class.dali::exec2::ExecNodeTask", ptr %55, i32 0, i32 3
  %262 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %261) #9
  %263 = invoke noundef i32 @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE9NumOutputEv(ptr noundef nonnull align 8 dereferenceable(664) %262)
          to label %264 unwind label %267

264:                                              ; preds = %259
  %265 = icmp slt i32 %260, %263
  br i1 %265, label %271, label %266

266:                                              ; preds = %264
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #9
  br label %363

267:                                              ; preds = %271, %259
  %268 = landingpad { ptr, i32 }
          cleanup
  %269 = extractvalue { ptr, i32 } %268, 0
  store ptr %269, ptr %7, align 8
  %270 = extractvalue { ptr, i32 } %268, 1
  store i32 %270, ptr %8, align 4
  br label %362

271:                                              ; preds = %264
  %272 = getelementptr inbounds %"class.dali::exec2::ExecNodeTask", ptr %55, i32 0, i32 3
  %273 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %272) #9
  %274 = load i32, ptr %28, align 4, !tbaa !47
  %275 = invoke noundef zeroext i1 @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE12OutputIsTypeINS_10CPUBackendEEEbi(ptr noundef nonnull align 8 dereferenceable(664) %273, i32 noundef %274)
          to label %276 unwind label %267

276:                                              ; preds = %271
  br i1 %275, label %277, label %330

277:                                              ; preds = %276
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #9
  %278 = getelementptr inbounds %"class.dali::exec2::ExecNodeTask", ptr %55, i32 0, i32 3
  %279 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %278) #9
  %280 = load i32, ptr %28, align 4, !tbaa !47
  %281 = invoke noundef nonnull align 8 dereferenceable(304) ptr @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE6OutputINS_10CPUBackendEEERDaiT_(ptr noundef nonnull align 8 dereferenceable(664) %279, i32 noundef %280)
          to label %282 unwind label %300

282:                                              ; preds = %277
  store ptr %281, ptr %29, align 8, !tbaa !5
  %283 = load ptr, ptr %29, align 8, !tbaa !5
  %284 = invoke noundef zeroext i1 @_ZNK4dali10TensorListINS_10CPUBackendEE9is_pinnedEv(ptr noundef nonnull align 8 dereferenceable(304) %283)
          to label %285 unwind label %300

285:                                              ; preds = %282
  br i1 %284, label %286, label %308

286:                                              ; preds = %285
  %287 = load ptr, ptr %29, align 8, !tbaa !5
  %288 = getelementptr inbounds %"class.dali::exec2::ExecNodeTask", ptr %55, i32 0, i32 3
  %289 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %288) #9
  %290 = invoke { ptr, i32 } @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE12output_orderEv(ptr noundef nonnull align 8 dereferenceable(664) %289)
          to label %291 unwind label %300

291:                                              ; preds = %286
  store { ptr, i32 } %290, ptr %32, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %31, ptr align 8 %32, i64 12, i1 false)
  %292 = getelementptr inbounds { ptr, i32 }, ptr %31, i32 0, i32 0
  %293 = load ptr, ptr %292, align 8
  %294 = getelementptr inbounds { ptr, i32 }, ptr %31, i32 0, i32 1
  %295 = load i32, ptr %294, align 8
  invoke void @_ZN4dali10TensorListINS_10CPUBackendEE9set_orderENS_11AccessOrderEb(ptr noundef nonnull align 8 dereferenceable(304) %287, ptr %293, i32 %295, i1 noundef zeroext false)
          to label %296 unwind label %300

296:                                              ; preds = %291
  %297 = load ptr, ptr %29, align 8, !tbaa !5
  %298 = getelementptr inbounds %"class.dali::exec2::ExecNodeTask", ptr %55, i32 0, i32 4
  call void @_ZN4dali15CUDASharedEventC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %33, ptr noundef nonnull align 8 dereferenceable(16) %298) #9
  invoke void @_ZN4dali10TensorListINS_10CPUBackendEE15set_ready_eventENS_15CUDASharedEventE(ptr noundef nonnull align 8 dereferenceable(304) %297, ptr noundef %33)
          to label %299 unwind label %304

299:                                              ; preds = %296
  call void @_ZN4dali15CUDASharedEventD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %33) #9
  br label %328

300:                                              ; preds = %291, %286, %282, %277
  %301 = landingpad { ptr, i32 }
          cleanup
  %302 = extractvalue { ptr, i32 } %301, 0
  store ptr %302, ptr %7, align 8
  %303 = extractvalue { ptr, i32 } %301, 1
  store i32 %303, ptr %8, align 4
  br label %329

304:                                              ; preds = %296
  %305 = landingpad { ptr, i32 }
          cleanup
  %306 = extractvalue { ptr, i32 } %305, 0
  store ptr %306, ptr %7, align 8
  %307 = extractvalue { ptr, i32 } %305, 1
  store i32 %307, ptr %8, align 4
  call void @_ZN4dali15CUDASharedEventD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %33) #9
  br label %329

308:                                              ; preds = %285
  call void @llvm.lifetime.start.p0(i64 16, ptr %34) #9
  %309 = load ptr, ptr %29, align 8, !tbaa !5
  %310 = invoke { ptr, i32 } @_ZNK4dali10TensorListINS_10CPUBackendEE5orderEv(ptr noundef nonnull align 8 dereferenceable(304) %309)
          to label %311 unwind label %317

311:                                              ; preds = %308
  store { ptr, i32 } %310, ptr %35, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %34, ptr align 8 %35, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr %36) #9
  %312 = invoke { ptr, i32 } @_ZN4dali11AccessOrder4hostEv()
          to label %313 unwind label %321

313:                                              ; preds = %311
  store { ptr, i32 } %312, ptr %37, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %36, ptr align 8 %37, i64 12, i1 false)
  %314 = call noundef zeroext i1 @_ZNK4dali11AccessOrdereqERKS0_(ptr noundef nonnull align 8 dereferenceable(12) %34, ptr noundef nonnull align 8 dereferenceable(12) %36) #9
  br i1 %314, label %315, label %316

315:                                              ; preds = %313
  br label %326

316:                                              ; preds = %313
  call void @__assert_fail(ptr noundef @.str.27, ptr noundef @.str.8, i32 noundef 536, ptr noundef @__PRETTY_FUNCTION__._ZN4dali5exec210OutputTask3RunEv) #10
  unreachable

317:                                              ; preds = %308
  %318 = landingpad { ptr, i32 }
          cleanup
  %319 = extractvalue { ptr, i32 } %318, 0
  store ptr %319, ptr %7, align 8
  %320 = extractvalue { ptr, i32 } %318, 1
  store i32 %320, ptr %8, align 4
  br label %327

321:                                              ; preds = %311
  %322 = landingpad { ptr, i32 }
          cleanup
  %323 = extractvalue { ptr, i32 } %322, 0
  store ptr %323, ptr %7, align 8
  %324 = extractvalue { ptr, i32 } %322, 1
  store i32 %324, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %36) #9
  br label %327

325:                                              ; No predecessors!
  br label %326

326:                                              ; preds = %325, %315
  call void @llvm.lifetime.end.p0(i64 16, ptr %36) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %34) #9
  br label %328

327:                                              ; preds = %321, %317
  call void @llvm.lifetime.end.p0(i64 16, ptr %34) #9
  br label %329

328:                                              ; preds = %326, %299
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #9
  br label %358

329:                                              ; preds = %327, %304, %300
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #9
  br label %362

330:                                              ; preds = %276
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #9
  %331 = getelementptr inbounds %"class.dali::exec2::ExecNodeTask", ptr %55, i32 0, i32 3
  %332 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %331) #9
  %333 = load i32, ptr %28, align 4, !tbaa !47
  %334 = invoke noundef nonnull align 8 dereferenceable(304) ptr @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE6OutputINS_10GPUBackendEEERDaiT_(ptr noundef nonnull align 8 dereferenceable(664) %332, i32 noundef %333)
          to label %335 unwind label %349

335:                                              ; preds = %330
  store ptr %334, ptr %38, align 8, !tbaa !5
  %336 = load ptr, ptr %38, align 8, !tbaa !5
  %337 = getelementptr inbounds %"class.dali::exec2::ExecNodeTask", ptr %55, i32 0, i32 3
  %338 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %337) #9
  %339 = invoke { ptr, i32 } @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE12output_orderEv(ptr noundef nonnull align 8 dereferenceable(664) %338)
          to label %340 unwind label %349

340:                                              ; preds = %335
  store { ptr, i32 } %339, ptr %41, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %40, ptr align 8 %41, i64 12, i1 false)
  %341 = getelementptr inbounds { ptr, i32 }, ptr %40, i32 0, i32 0
  %342 = load ptr, ptr %341, align 8
  %343 = getelementptr inbounds { ptr, i32 }, ptr %40, i32 0, i32 1
  %344 = load i32, ptr %343, align 8
  invoke void @_ZN4dali10TensorListINS_10GPUBackendEE9set_orderENS_11AccessOrderEb(ptr noundef nonnull align 8 dereferenceable(304) %336, ptr %342, i32 %344, i1 noundef zeroext false)
          to label %345 unwind label %349

345:                                              ; preds = %340
  %346 = load ptr, ptr %38, align 8, !tbaa !5
  %347 = getelementptr inbounds %"class.dali::exec2::ExecNodeTask", ptr %55, i32 0, i32 4
  call void @_ZN4dali15CUDASharedEventC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %42, ptr noundef nonnull align 8 dereferenceable(16) %347) #9
  invoke void @_ZN4dali10TensorListINS_10GPUBackendEE15set_ready_eventENS_15CUDASharedEventE(ptr noundef nonnull align 8 dereferenceable(304) %346, ptr noundef %42)
          to label %348 unwind label %353

348:                                              ; preds = %345
  call void @_ZN4dali15CUDASharedEventD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %42) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #9
  br label %358

349:                                              ; preds = %340, %335, %330
  %350 = landingpad { ptr, i32 }
          cleanup
  %351 = extractvalue { ptr, i32 } %350, 0
  store ptr %351, ptr %7, align 8
  %352 = extractvalue { ptr, i32 } %350, 1
  store i32 %352, ptr %8, align 4
  br label %357

353:                                              ; preds = %345
  %354 = landingpad { ptr, i32 }
          cleanup
  %355 = extractvalue { ptr, i32 } %354, 0
  store ptr %355, ptr %7, align 8
  %356 = extractvalue { ptr, i32 } %354, 1
  store i32 %356, ptr %8, align 4
  call void @_ZN4dali15CUDASharedEventD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %42) #9
  br label %357

357:                                              ; preds = %353, %349
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #9
  br label %362

358:                                              ; preds = %348, %328
  br label %359

359:                                              ; preds = %358
  %360 = load i32, ptr %28, align 4, !tbaa !47
  %361 = add nsw i32 %360, 1
  store i32 %361, ptr %28, align 4, !tbaa !47
  br label %259, !llvm.loop !50

362:                                              ; preds = %357, %329, %267
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #9
  br label %428

363:                                              ; preds = %266
  call void @llvm.lifetime.start.p0(i64 8, ptr %43) #9
  call void @_ZNSt8optionalIiEC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %43) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr %44) #9
  %364 = getelementptr inbounds %"class.dali::exec2::ExecNodeTask", ptr %55, i32 0, i32 3
  %365 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %364) #9
  %366 = invoke { ptr, i32 } @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE12output_orderEv(ptr noundef nonnull align 8 dereferenceable(664) %365)
          to label %367 unwind label %377

367:                                              ; preds = %363
  store { ptr, i32 } %366, ptr %45, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %44, ptr align 8 %45, i64 12, i1 false)
  %368 = call noundef zeroext i1 @_ZNK4dali11AccessOrder9is_deviceEv(ptr noundef nonnull align 8 dereferenceable(12) %44) #9
  call void @llvm.lifetime.end.p0(i64 16, ptr %44) #9
  br i1 %368, label %369, label %412

369:                                              ; preds = %367
  %370 = getelementptr inbounds %"class.dali::exec2::ExecNodeTask", ptr %55, i32 0, i32 3
  %371 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %370) #9
  %372 = invoke noundef ptr @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE5eventEv(ptr noundef nonnull align 8 dereferenceable(664) %371)
          to label %373 unwind label %381

373:                                              ; preds = %369
  %374 = icmp ne ptr %372, null
  br i1 %374, label %375, label %376

375:                                              ; preds = %373
  br label %386

376:                                              ; preds = %373
  call void @__assert_fail(ptr noundef @.str.28, ptr noundef @.str.8, i32 noundef 547, ptr noundef @__PRETTY_FUNCTION__._ZN4dali5exec210OutputTask3RunEv) #10
  unreachable

377:                                              ; preds = %363
  %378 = landingpad { ptr, i32 }
          cleanup
  %379 = extractvalue { ptr, i32 } %378, 0
  store ptr %379, ptr %7, align 8
  %380 = extractvalue { ptr, i32 } %378, 1
  store i32 %380, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %44) #9
  br label %427

381:                                              ; preds = %390, %369
  %382 = landingpad { ptr, i32 }
          cleanup
  %383 = extractvalue { ptr, i32 } %382, 0
  store ptr %383, ptr %7, align 8
  %384 = extractvalue { ptr, i32 } %382, 1
  store i32 %384, ptr %8, align 4
  br label %427

385:                                              ; No predecessors!
  br label %386

386:                                              ; preds = %385, %375
  call void @llvm.lifetime.start.p0(i64 8, ptr %46) #9
  call void @llvm.lifetime.start.p0(i64 4, ptr %47) #9
  call void @llvm.lifetime.start.p0(i64 16, ptr %48) #9
  %387 = getelementptr inbounds %"class.dali::exec2::ExecNodeTask", ptr %55, i32 0, i32 3
  %388 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %387) #9
  %389 = invoke { ptr, i32 } @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE12output_orderEv(ptr noundef nonnull align 8 dereferenceable(664) %388)
          to label %390 unwind label %404

390:                                              ; preds = %386
  store { ptr, i32 } %389, ptr %49, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %48, ptr align 8 %49, i64 12, i1 false)
  %391 = call noundef i32 @_ZNK4dali11AccessOrder9device_idEv(ptr noundef nonnull align 8 dereferenceable(12) %48) #9
  store i32 %391, ptr %47, align 4, !tbaa !47
  call void @_ZNSt8optionalIiEC2IiTnNSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS0_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES3_IS4_ISt10in_place_tSB_EESt16is_constructibleIiJS7_EESt14is_convertibleIS7_iEEEbE4typeELb1EEEOS7_(ptr noundef nonnull align 4 dereferenceable(8) %46, ptr noundef nonnull align 4 dereferenceable(4) %47) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %43, ptr align 4 %46, i64 8, i1 false)
  call void @llvm.lifetime.end.p0(i64 16, ptr %48) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #9
  %392 = getelementptr inbounds %"class.dali::exec2::ExecNodeTask", ptr %55, i32 0, i32 3
  %393 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %392) #9
  %394 = invoke noundef ptr @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE5eventEv(ptr noundef nonnull align 8 dereferenceable(664) %393)
          to label %395 unwind label %381

395:                                              ; preds = %390
  call void @llvm.lifetime.start.p0(i64 16, ptr %50) #9
  %396 = getelementptr inbounds %"class.dali::exec2::ExecNodeTask", ptr %55, i32 0, i32 3
  %397 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %396) #9
  %398 = invoke { ptr, i32 } @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE12output_orderEv(ptr noundef nonnull align 8 dereferenceable(664) %397)
          to label %399 unwind label %408

399:                                              ; preds = %395
  store { ptr, i32 } %398, ptr %51, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %50, ptr align 8 %51, i64 12, i1 false)
  %400 = call noundef ptr @_ZNK4dali11AccessOrder6streamEv(ptr noundef nonnull align 8 dereferenceable(12) %50) #9
  %401 = invoke i32 @cudaEventRecord(ptr noundef %394, ptr noundef %400)
          to label %402 unwind label %408

402:                                              ; preds = %399
  invoke void @_Z9CUDA_CALLI9cudaErrorEvT_(i32 noundef %401)
          to label %403 unwind label %408

403:                                              ; preds = %402
  call void @llvm.lifetime.end.p0(i64 16, ptr %50) #9
  br label %412

404:                                              ; preds = %386
  %405 = landingpad { ptr, i32 }
          cleanup
  %406 = extractvalue { ptr, i32 } %405, 0
  store ptr %406, ptr %7, align 8
  %407 = extractvalue { ptr, i32 } %405, 1
  store i32 %407, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %48) #9
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %46) #9
  br label %427

408:                                              ; preds = %402, %399, %395
  %409 = landingpad { ptr, i32 }
          cleanup
  %410 = extractvalue { ptr, i32 } %409, 0
  store ptr %410, ptr %7, align 8
  %411 = extractvalue { ptr, i32 } %409, 1
  store i32 %411, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %50) #9
  br label %427

412:                                              ; preds = %403, %367
  store i1 false, ptr %52, align 1
  %413 = getelementptr inbounds %"class.dali::exec2::ExecNodeTask", ptr %55, i32 0, i32 3
  %414 = call noundef nonnull align 8 dereferenceable(664) ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %413) #9
  %415 = getelementptr inbounds %"class.dali::exec2::ExecNodeTask", ptr %55, i32 0, i32 4
  call void @_ZN4dali15CUDASharedEventC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %53, ptr noundef nonnull align 8 dereferenceable(16) %415) #9
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %54, ptr align 4 %43, i64 8, i1 false)
  %416 = getelementptr inbounds %"class.std::optional.226", ptr %54, i32 0, i32 0
  %417 = getelementptr inbounds %"struct.std::_Optional_base.227", ptr %416, i32 0, i32 0
  %418 = load i64, ptr %417, align 4
  invoke void @_ZN4dali5exec214PipelineOutputC2ERKNS_9WorkspaceENS_15CUDASharedEventESt8optionalIiE(ptr noundef nonnull align 8 dereferenceable(688) %0, ptr noundef nonnull align 8 dereferenceable(664) %414, ptr noundef %53, i64 %418)
          to label %419 unwind label %421

419:                                              ; preds = %412
  call void @_ZN4dali15CUDASharedEventD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %53) #9
  store i1 true, ptr %52, align 1
  %420 = load i1, ptr %52, align 1
  br i1 %420, label %426, label %425

421:                                              ; preds = %412
  %422 = landingpad { ptr, i32 }
          cleanup
  %423 = extractvalue { ptr, i32 } %422, 0
  store ptr %423, ptr %7, align 8
  %424 = extractvalue { ptr, i32 } %422, 1
  store i32 %424, ptr %8, align 4
  call void @_ZN4dali15CUDASharedEventD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %53) #9
  br label %427

425:                                              ; preds = %419
  call void @_ZN4dali5exec214PipelineOutputD2Ev(ptr noundef nonnull align 8 dereferenceable(688) %0) #9
  br label %426

426:                                              ; preds = %425, %419
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #9
  call void @_ZNSt13unordered_setIP10CUevent_stSt4hashIS1_ESt8equal_toIS1_ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %9) #9
  call void @llvm.lifetime.end.p0(i64 56, ptr %9) #9
  invoke void @_ZN4dali6detail10CallAtExitIZNS_5exec212ExecNodeTask12GetWorkspaceEvEUlvE_ED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %430 unwind label %71

427:                                              ; preds = %421, %408, %404, %381, %377
  call void @llvm.lifetime.end.p0(i64 8, ptr %43) #9
  br label %428

428:                                              ; preds = %427, %362, %254, %230, %117
  call void @_ZNSt13unordered_setIP10CUevent_stSt4hashIS1_ESt8equal_toIS1_ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %9) #9
  br label %429

429:                                              ; preds = %428, %113, %109
  call void @llvm.lifetime.end.p0(i64 56, ptr %9) #9
  br label %431

430:                                              ; preds = %426
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #9
  call void @_ZN4dali15DomainTimeRangeD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #9
  ret void

431:                                              ; preds = %429, %75
  invoke void @_ZN4dali6detail10CallAtExitIZNS_5exec212ExecNodeTask12GetWorkspaceEvEUlvE_ED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %432 unwind label %439

432:                                              ; preds = %431
  br label %433

433:                                              ; preds = %432, %71
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #9
  call void @_ZN4dali15DomainTimeRangeD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %5) #9
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #9
  br label %434

434:                                              ; preds = %433
  %435 = load ptr, ptr %7, align 8
  %436 = load i32, ptr %8, align 4
  %437 = insertvalue { ptr, i32 } poison, ptr %435, 0
  %438 = insertvalue { ptr, i32 } %437, i32 %436, 1
  resume { ptr, i32 } %438

439:                                              ; preds = %431
  %440 = landingpad { ptr, i32 }
          catch ptr null
  %441 = extractvalue { ptr, i32 } %440, 0
  call void @__clang_call_terminate(ptr %441) #10
  unreachable
}

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNK4dali5exec212ExecNodeTask9TaskInputINS_10GPUBackendEEERKDai(ptr noundef nonnull align 8 dereferenceable(72), i32 noundef) #1 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4dali11AccessOrder9device_idEv(ptr noundef nonnull align 8 dereferenceable(12)) #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4dali5exec214PipelineOutputC2ERKNS_9WorkspaceENS_15CUDASharedEventESt8optionalIiE(ptr noundef nonnull align 8 dereferenceable(688), ptr noundef nonnull align 8 dereferenceable(664), ptr noundef, i64) unnamed_addr #1 align 2

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { noinline noreturn nounwind uwtable "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #8 = { 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 #9 = { nounwind }
attributes #10 = { 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, !6, i64 8}
!10 = !{!"_ZTSN4dali5exec212ExecNodeTaskE", !6, i64 0, !6, i64 8, !11, i64 16, !16, i64 48, !22, i64 56}
!11 = !{!"_ZTSN4dali5exec215WorkspaceParamsE", !6, i64 0, !12, i64 8, !15, i64 24}
!12 = !{!"_ZTSSt10shared_ptrIN4dali13IterationDataEE", !13, i64 0}
!13 = !{!"_ZTSSt12__shared_ptrIN4dali13IterationDataELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !14, i64 8}
!14 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!"_ZTSSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EE", !17, i64 0}
!17 = !{!"_ZTSSt15__uniq_ptr_dataIN4dali9WorkspaceESt14default_deleteIS1_ELb1ELb1EE", !18, i64 0}
!18 = !{!"_ZTSSt15__uniq_ptr_implIN4dali9WorkspaceESt14default_deleteIS1_EE", !19, i64 0}
!19 = !{!"_ZTSSt5tupleIJPN4dali9WorkspaceESt14default_deleteIS1_EEE", !20, i64 0}
!20 = !{!"_ZTSSt11_Tuple_implILm0EJPN4dali9WorkspaceESt14default_deleteIS1_EEE", !21, i64 0}
!21 = !{!"_ZTSSt10_Head_baseILm0EPN4dali9WorkspaceELb0EE", !6, i64 0}
!22 = !{!"_ZTSN4dali15CUDASharedEventE", !23, i64 0}
!23 = !{!"_ZTSSt10shared_ptrIvE", !24, i64 0}
!24 = !{!"_ZTSSt12__shared_ptrIvLN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !14, i64 8}
!25 = !{!26, !42, i64 368}
!26 = !{!"_ZTSN4dali5exec28ExecNodeE", !27, i64 0, !29, i64 72, !30, i64 272, !30, i64 288, !32, i64 304, !38, i64 312, !40, i64 336, !42, i64 368, !43, i64 372, !43, i64 373, !43, i64 374, !44, i64 376, !44, i64 392, !44, i64 408, !16, i64 424, !43, i64 432, !22, i64 440, !46, i64 456}
!27 = !{!"_ZTSN4dali11SmallVectorIPNS_5exec28ExecEdgeELm8ESaIS3_EEE", !7, i64 0, !28, i64 64}
!28 = !{!"long", !7, i64 0}
!29 = !{!"_ZTSN4dali11SmallVectorINS_5exec214ExecOutputDescELm4ESaIS2_EEE", !7, i64 0, !28, i64 192}
!30 = !{!"_ZTSSt10shared_ptrIN4dali7tasking9SemaphoreEE", !31, i64 0}
!31 = !{!"_ZTSSt12__shared_ptrIN4dali7tasking9SemaphoreELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !14, i64 8}
!32 = !{!"_ZTSSt10unique_ptrIN4dali12OperatorBaseESt14default_deleteIS1_EE", !33, i64 0}
!33 = !{!"_ZTSSt15__uniq_ptr_dataIN4dali12OperatorBaseESt14default_deleteIS1_ELb1ELb1EE", !34, i64 0}
!34 = !{!"_ZTSSt15__uniq_ptr_implIN4dali12OperatorBaseESt14default_deleteIS1_EE", !35, i64 0}
!35 = !{!"_ZTSSt5tupleIJPN4dali12OperatorBaseESt14default_deleteIS1_EEE", !36, i64 0}
!36 = !{!"_ZTSSt11_Tuple_implILm0EJPN4dali12OperatorBaseESt14default_deleteIS1_EEE", !37, i64 0}
!37 = !{!"_ZTSSt10_Head_baseILm0EPN4dali12OperatorBaseELb0EE", !6, i64 0}
!38 = !{!"_ZTSN4dali5exec27ExecEnvE", !6, i64 0, !39, i64 8}
!39 = !{!"_ZTSN4dali11AccessOrderE", !6, i64 0, !15, i64 8}
!40 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !41, i64 0, !28, i64 8, !7, i64 16}
!41 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!42 = !{!"_ZTSN4dali6OpTypeE", !7, i64 0}
!43 = !{!"bool", !7, i64 0}
!44 = !{!"_ZTSSt10shared_ptrIN4dali7tasking4TaskEE", !45, i64 0}
!45 = !{!"_ZTSSt12__shared_ptrIN4dali7tasking4TaskELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !14, i64 8}
!46 = !{!"_ZTSSt3any", !6, i64 0, !7, i64 8}
!47 = !{!15, !15, i64 0}
!48 = distinct !{!48, !49}
!49 = !{!"llvm.loop.mustprogress"}
!50 = distinct !{!50, !49}


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

%"struct.dali::detail::CallAtExit" = type { %class.anon }
%class.anon = type { ptr }
%"struct.dali::exec2::PipelineOutput" = type { %"class.dali::Workspace", %"class.dali::CUDASharedEvent", %"class.std::optional.226" }
%"class.dali::Workspace" = type { %"class.dali::WorkspaceBase" }
%"class.dali::WorkspaceBase" = type { %"class.dali::ArgumentWorkspace", %"class.dali::SmallVector.6", %"class.dali::SmallVector.74", %"class.dali::SmallVector.79", %"class.dali::AccessOrder", ptr, ptr, %"class.dali::SmallVector.82", %"class.std::__cxx11::basic_string", ptr, %"class.std::shared_ptr" }
%"class.dali::ArgumentWorkspace" = type { ptr, %"class.std::map", %"class.dali::SmallVector.69" }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, int>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, int>>, std::less<void>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, int>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, int>>, std::less<void>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.dali::SmallVector.69" = type { %union.anon.72, i64 }
%union.anon.72 = type { %struct.anon.73, [176 x i8] }
%struct.anon.73 = type { ptr, i64 }
%"class.dali::SmallVector.6" = type { %union.anon.9, i64 }
%union.anon.9 = type { %struct.anon.10 }
%struct.anon.10 = type { ptr, i64 }
%"class.dali::SmallVector.74" = type { %union.anon.77, i64 }
%union.anon.77 = type { %struct.anon.78, [144 x i8] }
%struct.anon.78 = type { ptr, i64 }
%"class.dali::SmallVector.79" = type { %union.anon.80, i64 }
%union.anon.80 = type { %struct.anon.81, [64 x i8] }
%struct.anon.81 = type { ptr, i64 }
%"class.dali::AccessOrder" = type <{ ptr, i32, [4 x i8] }>
%"class.dali::SmallVector.82" = type { %union.anon.85, i64 }
%union.anon.85 = type { %struct.anon.86, [16 x i8] }
%struct.anon.86 = type { ptr, i64 }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.dali::CUDASharedEvent" = type { %"class.std::shared_ptr.3" }
%"class.std::shared_ptr.3" = type { %"class.std::__shared_ptr.4" }
%"class.std::__shared_ptr.4" = type { ptr, %"class.std::__shared_count" }
%"class.std::optional.226" = type { %"struct.std::_Optional_base.227" }
%"struct.std::_Optional_base.227" = type { %"struct.std::_Optional_payload.229" }
%"struct.std::_Optional_payload.229" = type { %"struct.std::_Optional_payload_base.base", [3 x i8] }
%"struct.std::_Optional_payload_base.base" = type <{ %"union.std::_Optional_payload_base<int>::_Storage", i8 }>
%"union.std::_Optional_payload_base<int>::_Storage" = type { i32 }
%"struct.dali::DomainTimeRange" = type { i8 }
%"class.std::unordered_set" = type { %"class.std::_Hashtable.179" }
%"class.std::_Hashtable.179" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"struct.std::hash.183" = type { i8 }
%"struct.std::equal_to.186" = type { i8 }
%"class.std::allocator.198" = type { i8 }
%"class.std::shared_ptr.152" = type { %"class.std::__shared_ptr.153" }
%"class.std::__shared_ptr.153" = type { ptr, %"class.std::__shared_count" }
%"class.std::shared_ptr.158" = type { %"class.std::__shared_ptr.159" }
%"class.std::__shared_ptr.159" = type { ptr, %"class.std::__shared_count" }
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }

@.str.8 = external hidden unnamed_addr constant [96 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [33 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [21 x i8], align 1
@__PRETTY_FUNCTION__._ZN4dali5exec210OutputTask3RunEv = external hidden unnamed_addr constant [46 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [29 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.27 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [13 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4dali5exec212ExecNodeTask12GetWorkspaceEv(ptr dead_on_unwind noalias writable sret(%"struct.dali::detail::CallAtExit") align 8, ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #1 align 2

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) local_unnamed_addr #2

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE8NumInputEv(ptr noundef nonnull align 8 dereferenceable(664)) local_unnamed_addr #4 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE9NumOutputEv(ptr noundef nonnull align 8 dereferenceable(664)) local_unnamed_addr #4 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE12OutputIsTypeINS_10CPUBackendEEEbi(ptr noundef nonnull align 8 dereferenceable(664), i32 noundef) local_unnamed_addr #1 align 2

declare void @_ZN4dali10TensorListINS_10CPUBackendEE9set_orderENS_11AccessOrderEb(ptr noundef nonnull align 8 dereferenceable(304), ptr, i32, i1 noundef zeroext) local_unnamed_addr #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { ptr, i32 } @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE12output_orderEv(ptr noundef nonnull align 8 dereferenceable(664)) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_Z9CUDA_CALLI9cudaErrorEvT_(i32 noundef) local_unnamed_addr #7

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE9SetOutputEiS2_INS1_INS_10CPUBackendEEEE(ptr noundef nonnull align 8 dereferenceable(664), i32 noundef, ptr noundef) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE12OutputIsTypeINS_10GPUBackendEEEbi(ptr noundef nonnull align 8 dereferenceable(664), i32 noundef) local_unnamed_addr #1 align 2

declare void @_ZN4dali10TensorListINS_10GPUBackendEE9set_orderENS_11AccessOrderEb(ptr noundef nonnull align 8 dereferenceable(304), ptr, i32, i1 noundef zeroext) local_unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE9SetOutputEiS2_INS1_INS_10GPUBackendEEEE(ptr noundef nonnull align 8 dereferenceable(664), i32 noundef, ptr noundef) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(304) ptr @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE6OutputINS_10CPUBackendEEERDaiT_(ptr noundef nonnull align 8 dereferenceable(664), i32 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(304) ptr @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE6OutputINS_10GPUBackendEEERDaiT_(ptr noundef nonnull align 8 dereferenceable(664), i32 noundef) local_unnamed_addr #1 align 2

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE5eventEv(ptr noundef nonnull align 8 dereferenceable(664)) local_unnamed_addr #4 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4dali10TensorListINS_10CPUBackendEE9is_pinnedEv(ptr noundef nonnull align 8 dereferenceable(304)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { ptr, i32 } @_ZNK4dali10TensorListINS_10CPUBackendEE5orderEv(ptr noundef nonnull align 8 dereferenceable(304)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4dali11AccessOrder9is_deviceEv(ptr noundef nonnull align 8 dereferenceable(12)) local_unnamed_addr #3 align 2

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

declare i32 @cudaEventRecord(ptr noundef, ptr noundef) local_unnamed_addr #6

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK4dali11SmallVectorIPNS_5exec28ExecEdgeELm8ESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #4 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNK4dali5exec212ExecNodeTask9TaskInputINS_10CPUBackendEEERKDai(ptr noundef nonnull align 8 dereferenceable(72), i32 noundef) local_unnamed_addr #1 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i32 } @_ZN4dali11AccessOrder4hostEv() local_unnamed_addr #1 align 2

declare void @_ZNK4dali11AccessOrder4waitEP10CUevent_st(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef) local_unnamed_addr #6

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4dali5exec210OutputTask3RunEv(ptr dead_on_unwind noalias writable sret(%"struct.dali::exec2::PipelineOutput") align 8 %0, ptr noundef nonnull align 8 dereferenceable(72) %1) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"struct.dali::DomainTimeRange", align 1
  %4 = alloca %"struct.dali::detail::CallAtExit", align 8
  %5 = alloca %"class.std::unordered_set", align 8
  %6 = alloca %"struct.std::hash.183", align 1
  %7 = alloca %"struct.std::equal_to.186", align 1
  %8 = alloca %"class.std::allocator.198", align 1
  %9 = alloca ptr, align 8
  %10 = alloca %"class.std::shared_ptr.152", align 8
  %11 = alloca ptr, align 8
  %12 = alloca %"class.std::shared_ptr.158", align 8
  %13 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %14 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %15 = alloca %"class.dali::AccessOrder", align 8
  %16 = alloca %"class.dali::CUDASharedEvent", align 8
  %17 = alloca %"class.dali::AccessOrder", align 8
  %18 = alloca %"class.dali::AccessOrder", align 8
  %19 = alloca %"class.dali::CUDASharedEvent", align 8
  %20 = alloca %"class.std::optional.226", align 8
  %21 = alloca %"class.dali::AccessOrder", align 8
  %22 = alloca %"class.std::optional.226", align 8
  %23 = alloca i32, align 4
  %24 = alloca %"class.dali::AccessOrder", align 8
  %25 = alloca %"class.dali::AccessOrder", align 8
  %26 = alloca %"class.dali::CUDASharedEvent", align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #8
  %27 = getelementptr inbounds i8, ptr %1, i64 8
  %28 = load ptr, ptr %27, align 8, !tbaa !5
  %29 = getelementptr inbounds i8, ptr %28, i64 368
  %30 = load i32, ptr %29, align 8, !tbaa !24
  %31 = icmp eq i32 %30, 0
  %32 = select i1 %31, i32 7780608, i32 2526162
  call void @_ZN4dali15DomainTimeRangeC2EPKcj(ptr noundef nonnull align 1 dereferenceable(1) %3, ptr noundef nonnull @.str.23, i32 noundef %32)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #8
  invoke void @_ZN4dali5exec212ExecNodeTask12GetWorkspaceEv(ptr dead_on_unwind nonnull writable sret(%"struct.dali::detail::CallAtExit") align 8 %4, ptr noundef nonnull align 8 dereferenceable(72) %1)
          to label %33 unwind label %39

33:                                               ; preds = %2
  %34 = getelementptr inbounds i8, ptr %1, i64 48
  %35 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %34) #8
  %36 = call noundef i32 @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE8NumInputEv(ptr noundef nonnull align 8 dereferenceable(664) %35)
  %37 = icmp eq i32 %36, 0
  br i1 %37, label %43, label %38

38:                                               ; preds = %33
  call void @__assert_fail(ptr noundef nonnull @.str.24, ptr noundef nonnull @.str.8, i32 noundef 506, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN4dali5exec210OutputTask3RunEv) #9
  unreachable

39:                                               ; preds = %200, %2
  %40 = landingpad { ptr, i32 }
          cleanup
  br label %208

41:                                               ; preds = %43
  %42 = landingpad { ptr, i32 }
          cleanup
  br label %207

43:                                               ; preds = %33
  %44 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %34) #8
  %45 = invoke noundef i32 @_ZNK4dali17ArgumentWorkspace16NumArgumentInputEv(ptr noundef nonnull align 8 dereferenceable(256) %44)
          to label %46 unwind label %41

46:                                               ; preds = %43
  %47 = icmp eq i32 %45, 0
  br i1 %47, label %49, label %48

48:                                               ; preds = %46
  call void @__assert_fail(ptr noundef nonnull @.str.25, ptr noundef nonnull @.str.8, i32 noundef 507, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN4dali5exec210OutputTask3RunEv) #9
  unreachable

49:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %5) #8
  %50 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %34) #8
  %51 = call noundef i32 @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE9NumOutputEv(ptr noundef nonnull align 8 dereferenceable(664) %50)
  %52 = sext i32 %51 to i64
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #8
  call void @_ZNSaIP10CUevent_stEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #8
  invoke void @_ZNSt13unordered_setIP10CUevent_stSt4hashIS1_ESt8equal_toIS1_ESaIS1_EEC2EmRKS3_RKS5_RKS6_(ptr noundef nonnull align 8 dereferenceable(56) %5, i64 noundef %52, ptr noundef nonnull align 1 dereferenceable(1) %6, ptr noundef nonnull align 1 dereferenceable(1) %7, ptr noundef nonnull align 1 dereferenceable(1) %8)
          to label %53 unwind label %64

53:                                               ; preds = %49
  call void @_ZNSt15__new_allocatorIP10CUevent_stED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #8
  %54 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %34) #8
  %55 = call noundef i32 @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE9NumOutputEv(ptr noundef nonnull align 8 dereferenceable(664) %54)
  %56 = load ptr, ptr %27, align 8, !tbaa !5
  %57 = call noundef i64 @_ZNK4dali11SmallVectorIPNS_5exec28ExecEdgeELm8ESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(72) %56)
  %58 = trunc i64 %57 to i32
  %59 = icmp eq i32 %55, %58
  br i1 %59, label %.preheader, label %63

.preheader:                                       ; preds = %53
  %60 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %34) #8
  %61 = call noundef i32 @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE9NumOutputEv(ptr noundef nonnull align 8 dereferenceable(664) %60)
  %62 = icmp sgt i32 %61, 0
  br i1 %62, label %.lr.ph, label %._crit_edge

63:                                               ; preds = %53
  call void @__assert_fail(ptr noundef nonnull @.str.26, ptr noundef nonnull @.str.8, i32 noundef 509, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN4dali5exec210OutputTask3RunEv) #9
  unreachable

64:                                               ; preds = %49
  %65 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIP10CUevent_stED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %8) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #8
  br label %205

._crit_edge:                                      ; preds = %117, %.preheader
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #8
  %66 = call ptr @_ZNSt13unordered_setIP10CUevent_stSt4hashIS1_ESt8equal_toIS1_ESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %5) #8
  store ptr %66, ptr %13, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #8
  %67 = call ptr @_ZNSt13unordered_setIP10CUevent_stSt4hashIS1_ESt8equal_toIS1_ESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %5) #8
  store ptr %67, ptr %14, align 8
  %68 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseIP10CUevent_stLb0EEES5_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #8
  br i1 %68, label %.lr.ph96, label %._crit_edge97

.lr.ph96:                                         ; preds = %._crit_edge
  %.sroa.243.0..sroa_idx = getelementptr inbounds i8, ptr %15, i64 8
  br label %126

69:                                               ; preds = %93, %.lr.ph
  %70 = landingpad { ptr, i32 }
          cleanup
  br label %204

.lr.ph:                                           ; preds = %.preheader, %117
  %.07794 = phi i32 [ %118, %117 ], [ 0, %.preheader ]
  %71 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %34) #8
  %72 = invoke noundef zeroext i1 @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE12OutputIsTypeINS_10CPUBackendEEEbi(ptr noundef nonnull align 8 dereferenceable(664) %71, i32 noundef %.07794)
          to label %73 unwind label %69

73:                                               ; preds = %.lr.ph
  br i1 %72, label %74, label %93

74:                                               ; preds = %73
  %75 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK4dali5exec212ExecNodeTask9TaskInputINS_10CPUBackendEEERKDai(ptr noundef nonnull align 8 dereferenceable(72) %1, i32 noundef %.07794)
          to label %76 unwind label %84

76:                                               ; preds = %74
  %77 = invoke noundef ptr @_ZNK4dali5exec212ExecNodeTask10OperatorIOINS_10CPUBackendEE5eventEv(ptr noundef nonnull align 8 dereferenceable(32) %75)
          to label %78 unwind label %84

78:                                               ; preds = %76
  %.not86 = icmp eq ptr %77, null
  br i1 %.not86, label %88, label %79

79:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #8
  %80 = invoke noundef ptr @_ZNK4dali5exec212ExecNodeTask10OperatorIOINS_10CPUBackendEE5eventEv(ptr noundef nonnull align 8 dereferenceable(32) %75)
          to label %81 unwind label %86

81:                                               ; preds = %79
  store ptr %80, ptr %9, align 8, !tbaa !46
  %82 = invoke { ptr, i8 } @_ZNSt13unordered_setIP10CUevent_stSt4hashIS1_ESt8equal_toIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(56) %5, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %83 unwind label %86

83:                                               ; preds = %81
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  br label %88

84:                                               ; preds = %76, %74
  %85 = landingpad { ptr, i32 }
          cleanup
  br label %204

86:                                               ; preds = %81, %79
  %87 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #8
  br label %204

88:                                               ; preds = %83, %78
  %89 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %34) #8
  call void @_ZNSt10shared_ptrIN4dali10TensorListINS0_10CPUBackendEEEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %75) #8
  invoke void @_ZN4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE9SetOutputEiS2_INS1_INS_10CPUBackendEEEE(ptr noundef nonnull align 8 dereferenceable(664) %89, i32 noundef %.07794, ptr noundef nonnull %10)
          to label %90 unwind label %91

90:                                               ; preds = %88
  call void @_ZNSt12__shared_ptrIN4dali10TensorListINS0_10CPUBackendEEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #8
  br label %117

91:                                               ; preds = %88
  %92 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN4dali10TensorListINS0_10CPUBackendEEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #8
  br label %204

93:                                               ; preds = %73
  %94 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %34) #8
  %95 = invoke noundef zeroext i1 @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE12OutputIsTypeINS_10GPUBackendEEEbi(ptr noundef nonnull align 8 dereferenceable(664) %94, i32 noundef %.07794)
          to label %96 unwind label %69

96:                                               ; preds = %93
  br i1 %95, label %98, label %97

97:                                               ; preds = %96
  call void @__assert_fail(ptr noundef nonnull @.str.22, ptr noundef nonnull @.str.8, i32 noundef 518, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN4dali5exec210OutputTask3RunEv) #9
  unreachable

98:                                               ; preds = %96
  %99 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNK4dali5exec212ExecNodeTask9TaskInputINS_10GPUBackendEEERKDai(ptr noundef nonnull align 8 dereferenceable(72) %1, i32 noundef %.07794)
          to label %100 unwind label %108

100:                                              ; preds = %98
  %101 = invoke noundef ptr @_ZNK4dali5exec212ExecNodeTask10OperatorIOINS_10GPUBackendEE5eventEv(ptr noundef nonnull align 8 dereferenceable(32) %99)
          to label %102 unwind label %108

102:                                              ; preds = %100
  %.not83 = icmp eq ptr %101, null
  br i1 %.not83, label %112, label %103

103:                                              ; preds = %102
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #8
  %104 = invoke noundef ptr @_ZNK4dali5exec212ExecNodeTask10OperatorIOINS_10GPUBackendEE5eventEv(ptr noundef nonnull align 8 dereferenceable(32) %99)
          to label %105 unwind label %110

105:                                              ; preds = %103
  store ptr %104, ptr %11, align 8, !tbaa !46
  %106 = invoke { ptr, i8 } @_ZNSt13unordered_setIP10CUevent_stSt4hashIS1_ESt8equal_toIS1_ESaIS1_EE6insertEOS1_(ptr noundef nonnull align 8 dereferenceable(56) %5, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %107 unwind label %110

107:                                              ; preds = %105
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  br label %112

108:                                              ; preds = %100, %98
  %109 = landingpad { ptr, i32 }
          cleanup
  br label %204

110:                                              ; preds = %105, %103
  %111 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #8
  br label %204

112:                                              ; preds = %107, %102
  %113 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %34) #8
  call void @_ZNSt10shared_ptrIN4dali10TensorListINS0_10GPUBackendEEEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(16) %99) #8
  invoke void @_ZN4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE9SetOutputEiS2_INS1_INS_10GPUBackendEEEE(ptr noundef nonnull align 8 dereferenceable(664) %113, i32 noundef %.07794, ptr noundef nonnull %12)
          to label %114 unwind label %115

114:                                              ; preds = %112
  call void @_ZNSt12__shared_ptrIN4dali10TensorListINS0_10GPUBackendEEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #8
  br label %117

115:                                              ; preds = %112
  %116 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN4dali10TensorListINS0_10GPUBackendEEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #8
  br label %204

117:                                              ; preds = %90, %114
  %118 = add nuw nsw i32 %.07794, 1
  %119 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %34) #8
  %120 = call noundef i32 @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE9NumOutputEv(ptr noundef nonnull align 8 dereferenceable(664) %119)
  %121 = icmp slt i32 %118, %120
  br i1 %121, label %.lr.ph, label %._crit_edge, !llvm.loop !47

._crit_edge97:                                    ; preds = %131, %._crit_edge
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #8
  %122 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %34) #8
  %123 = call noundef i32 @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE9NumOutputEv(ptr noundef nonnull align 8 dereferenceable(664) %122)
  %124 = icmp sgt i32 %123, 0
  br i1 %124, label %.lr.ph100, label %._crit_edge101

.lr.ph100:                                        ; preds = %._crit_edge97
  %125 = getelementptr inbounds i8, ptr %1, i64 56
  %.sroa.225.0..sroa_idx = getelementptr inbounds i8, ptr %17, i64 8
  %.sroa.221.0..sroa_idx = getelementptr inbounds i8, ptr %18, i64 8
  br label %141

126:                                              ; preds = %.lr.ph96, %131
  %127 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNKSt8__detail14_Node_iteratorIP10CUevent_stLb1ELb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #8
  %128 = load ptr, ptr %127, align 8, !tbaa !46
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %15) #8
  %129 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %34) #8
  %130 = call { ptr, i32 } @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE12output_orderEv(ptr noundef nonnull align 8 dereferenceable(664) %129)
  %.fca.0.extract40 = extractvalue { ptr, i32 } %130, 0
  %.fca.1.extract41 = extractvalue { ptr, i32 } %130, 1
  store ptr %.fca.0.extract40, ptr %15, align 8
  store i32 %.fca.1.extract41, ptr %.sroa.243.0..sroa_idx, align 8
  invoke void @_ZNK4dali11AccessOrder4waitEP10CUevent_st(ptr noundef nonnull align 8 dereferenceable(12) %15, ptr noundef %128)
          to label %131 unwind label %134

131:                                              ; preds = %126
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #8
  %132 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorIP10CUevent_stLb1ELb0EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #8
  %133 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseIP10CUevent_stLb0EEES5_(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #8
  br i1 %133, label %126, label %._crit_edge97

134:                                              ; preds = %126
  %135 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %15) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #8
  br label %204

._crit_edge101:                                   ; preds = %173, %._crit_edge97
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %20) #8
  call void @_ZNSt8optionalIiEC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %20) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %21) #8
  %136 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %34) #8
  %137 = call { ptr, i32 } @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE12output_orderEv(ptr noundef nonnull align 8 dereferenceable(664) %136)
  %.fca.0.extract6 = extractvalue { ptr, i32 } %137, 0
  %.fca.1.extract7 = extractvalue { ptr, i32 } %137, 1
  store ptr %.fca.0.extract6, ptr %21, align 8
  %.sroa.29.0..sroa_idx = getelementptr inbounds i8, ptr %21, i64 8
  store i32 %.fca.1.extract7, ptr %.sroa.29.0..sroa_idx, align 8
  %138 = call noundef zeroext i1 @_ZNK4dali11AccessOrder9is_deviceEv(ptr noundef nonnull align 8 dereferenceable(12) %21) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %21) #8
  br i1 %138, label %178, label %197

139:                                              ; preds = %141
  %140 = landingpad { ptr, i32 }
          cleanup
  br label %204

141:                                              ; preds = %.lr.ph100, %173
  %.07898 = phi i32 [ 0, %.lr.ph100 ], [ %174, %173 ]
  %142 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %34) #8
  %143 = invoke noundef zeroext i1 @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE12OutputIsTypeINS_10CPUBackendEEEbi(ptr noundef nonnull align 8 dereferenceable(664) %142, i32 noundef %.07898)
          to label %144 unwind label %139

144:                                              ; preds = %141
  %145 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %34) #8
  br i1 %143, label %146, label %165

146:                                              ; preds = %144
  %147 = invoke noundef nonnull align 8 dereferenceable(304) ptr @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE6OutputINS_10CPUBackendEEERDaiT_(ptr noundef nonnull align 8 dereferenceable(664) %145, i32 noundef %.07898)
          to label %148 unwind label %154

148:                                              ; preds = %146
  %149 = call noundef zeroext i1 @_ZNK4dali10TensorListINS_10CPUBackendEE9is_pinnedEv(ptr noundef nonnull align 8 dereferenceable(304) %147)
  br i1 %149, label %150, label %156

150:                                              ; preds = %148
  %151 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %34) #8
  %152 = call { ptr, i32 } @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE12output_orderEv(ptr noundef nonnull align 8 dereferenceable(664) %151)
  %.fca.0.extract26 = extractvalue { ptr, i32 } %152, 0
  %.fca.1.extract27 = extractvalue { ptr, i32 } %152, 1
  invoke void @_ZN4dali10TensorListINS_10CPUBackendEE9set_orderENS_11AccessOrderEb(ptr noundef nonnull align 8 dereferenceable(304) %147, ptr %.fca.0.extract26, i32 %.fca.1.extract27, i1 noundef zeroext false)
          to label %153 unwind label %154

153:                                              ; preds = %150
  call void @_ZN4dali15CUDASharedEventC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(16) %125) #8
  call void @_ZN4dali10TensorListINS_10CPUBackendEE15set_ready_eventENS_15CUDASharedEventE(ptr noundef nonnull align 8 dereferenceable(304) %147, ptr noundef nonnull %16)
  call void @_ZN4dali15CUDASharedEventD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %16) #8
  br label %173

154:                                              ; preds = %150, %146
  %155 = landingpad { ptr, i32 }
          cleanup
  br label %204

156:                                              ; preds = %148
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %17) #8
  %157 = call { ptr, i32 } @_ZNK4dali10TensorListINS_10CPUBackendEE5orderEv(ptr noundef nonnull align 8 dereferenceable(304) %147)
  %.fca.0.extract22 = extractvalue { ptr, i32 } %157, 0
  %.fca.1.extract23 = extractvalue { ptr, i32 } %157, 1
  store ptr %.fca.0.extract22, ptr %17, align 8
  store i32 %.fca.1.extract23, ptr %.sroa.225.0..sroa_idx, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %18) #8
  %158 = invoke { ptr, i32 } @_ZN4dali11AccessOrder4hostEv()
          to label %159 unwind label %162

159:                                              ; preds = %156
  %.fca.0.extract18 = extractvalue { ptr, i32 } %158, 0
  %.fca.1.extract19 = extractvalue { ptr, i32 } %158, 1
  store ptr %.fca.0.extract18, ptr %18, align 8
  store i32 %.fca.1.extract19, ptr %.sroa.221.0..sroa_idx, align 8
  %160 = call noundef zeroext i1 @_ZNK4dali11AccessOrdereqERKS0_(ptr noundef nonnull align 8 dereferenceable(12) %17, ptr noundef nonnull align 8 dereferenceable(12) %18) #8
  br i1 %160, label %164, label %161

161:                                              ; preds = %159
  call void @__assert_fail(ptr noundef nonnull @.str.27, ptr noundef nonnull @.str.8, i32 noundef 536, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN4dali5exec210OutputTask3RunEv) #9
  unreachable

162:                                              ; preds = %156
  %163 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #8
  br label %204

164:                                              ; preds = %159
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %18) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %17) #8
  br label %173

165:                                              ; preds = %144
  %166 = invoke noundef nonnull align 8 dereferenceable(304) ptr @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE6OutputINS_10GPUBackendEEERDaiT_(ptr noundef nonnull align 8 dereferenceable(664) %145, i32 noundef %.07898)
          to label %167 unwind label %171

167:                                              ; preds = %165
  %168 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %34) #8
  %169 = call { ptr, i32 } @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE12output_orderEv(ptr noundef nonnull align 8 dereferenceable(664) %168)
  %.fca.0.extract10 = extractvalue { ptr, i32 } %169, 0
  %.fca.1.extract11 = extractvalue { ptr, i32 } %169, 1
  invoke void @_ZN4dali10TensorListINS_10GPUBackendEE9set_orderENS_11AccessOrderEb(ptr noundef nonnull align 8 dereferenceable(304) %166, ptr %.fca.0.extract10, i32 %.fca.1.extract11, i1 noundef zeroext false)
          to label %170 unwind label %171

170:                                              ; preds = %167
  call void @_ZN4dali15CUDASharedEventC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %19, ptr noundef nonnull align 8 dereferenceable(16) %125) #8
  call void @_ZN4dali10TensorListINS_10GPUBackendEE15set_ready_eventENS_15CUDASharedEventE(ptr noundef nonnull align 8 dereferenceable(304) %166, ptr noundef nonnull %19)
  call void @_ZN4dali15CUDASharedEventD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %19) #8
  br label %173

171:                                              ; preds = %167, %165
  %172 = landingpad { ptr, i32 }
          cleanup
  br label %204

173:                                              ; preds = %153, %164, %170
  %174 = add nuw nsw i32 %.07898, 1
  %175 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %34) #8
  %176 = call noundef i32 @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE9NumOutputEv(ptr noundef nonnull align 8 dereferenceable(664) %175)
  %177 = icmp slt i32 %174, %176
  br i1 %177, label %141, label %._crit_edge101, !llvm.loop !49

178:                                              ; preds = %._crit_edge101
  %179 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %34) #8
  %180 = call noundef ptr @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE5eventEv(ptr noundef nonnull align 8 dereferenceable(664) %179)
  %.not = icmp eq ptr %180, null
  br i1 %.not, label %181, label %182

181:                                              ; preds = %178
  call void @__assert_fail(ptr noundef nonnull @.str.28, ptr noundef nonnull @.str.8, i32 noundef 547, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN4dali5exec210OutputTask3RunEv) #9
  unreachable

182:                                              ; preds = %178
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %22) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %23) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %24) #8
  %183 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %34) #8
  %184 = call { ptr, i32 } @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE12output_orderEv(ptr noundef nonnull align 8 dereferenceable(664) %183)
  %.fca.0.extract2 = extractvalue { ptr, i32 } %184, 0
  %.fca.1.extract3 = extractvalue { ptr, i32 } %184, 1
  store ptr %.fca.0.extract2, ptr %24, align 8
  %.sroa.25.0..sroa_idx = getelementptr inbounds i8, ptr %24, i64 8
  store i32 %.fca.1.extract3, ptr %.sroa.25.0..sroa_idx, align 8
  %185 = call noundef i32 @_ZNK4dali11AccessOrder9device_idEv(ptr noundef nonnull align 8 dereferenceable(12) %24) #8
  store i32 %185, ptr %23, align 4, !tbaa !50
  call void @_ZNSt8optionalIiEC2IiTnNSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS0_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES3_IS4_ISt10in_place_tSB_EESt16is_constructibleIiJS7_EESt14is_convertibleIS7_iEEEbE4typeELb1EEEOS7_(ptr noundef nonnull align 4 dereferenceable(8) %22, ptr noundef nonnull align 4 dereferenceable(4) %23) #8
  %186 = load i64, ptr %22, align 8
  store i64 %186, ptr %20, align 8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %24) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %22) #8
  %187 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %34) #8
  %188 = call noundef ptr @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE5eventEv(ptr noundef nonnull align 8 dereferenceable(664) %187)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %25) #8
  %189 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %34) #8
  %190 = call { ptr, i32 } @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE12output_orderEv(ptr noundef nonnull align 8 dereferenceable(664) %189)
  %.fca.0.extract = extractvalue { ptr, i32 } %190, 0
  %.fca.1.extract = extractvalue { ptr, i32 } %190, 1
  store ptr %.fca.0.extract, ptr %25, align 8
  %.sroa.2.0..sroa_idx = getelementptr inbounds i8, ptr %25, i64 8
  store i32 %.fca.1.extract, ptr %.sroa.2.0..sroa_idx, align 8
  %191 = call noundef ptr @_ZNK4dali11AccessOrder6streamEv(ptr noundef nonnull align 8 dereferenceable(12) %25) #8
  %192 = invoke i32 @cudaEventRecord(ptr noundef %188, ptr noundef %191)
          to label %193 unwind label %195

193:                                              ; preds = %182
  invoke void @_Z9CUDA_CALLI9cudaErrorEvT_(i32 noundef %192)
          to label %194 unwind label %195

194:                                              ; preds = %193
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %25) #8
  br label %197

195:                                              ; preds = %193, %182
  %196 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %25) #8
  br label %203

197:                                              ; preds = %194, %._crit_edge101
  %198 = call noundef nonnull align 8 dereferenceable(664) ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %34) #8
  %199 = getelementptr inbounds i8, ptr %1, i64 56
  call void @_ZN4dali15CUDASharedEventC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 8 dereferenceable(16) %199) #8
  %.sroa.0.0.copyload = load i64, ptr %20, align 8
  invoke void @_ZN4dali5exec214PipelineOutputC2ERKNS_9WorkspaceENS_15CUDASharedEventESt8optionalIiE(ptr noundef nonnull align 8 dereferenceable(688) %0, ptr noundef nonnull align 8 dereferenceable(664) %198, ptr noundef nonnull %26, i64 %.sroa.0.0.copyload)
          to label %200 unwind label %201

200:                                              ; preds = %197
  call void @_ZN4dali15CUDASharedEventD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %26) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #8
  call void @_ZNSt13unordered_setIP10CUevent_stSt4hashIS1_ESt8equal_toIS1_ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %5) #8
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %5) #8
  invoke void @_ZN4dali6detail10CallAtExitIZNS_5exec212ExecNodeTask12GetWorkspaceEvEUlvE_ED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %206 unwind label %39

201:                                              ; preds = %197
  %202 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4dali15CUDASharedEventD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %26) #8
  br label %203

203:                                              ; preds = %201, %195
  %.pn = phi { ptr, i32 } [ %202, %201 ], [ %196, %195 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %20) #8
  br label %204

204:                                              ; preds = %139, %171, %162, %154, %69, %91, %86, %84, %115, %110, %108, %203, %134
  %.pn87.pn.pn = phi { ptr, i32 } [ %135, %134 ], [ %.pn, %203 ], [ %70, %69 ], [ %92, %91 ], [ %87, %86 ], [ %85, %84 ], [ %116, %115 ], [ %111, %110 ], [ %109, %108 ], [ %172, %171 ], [ %140, %139 ], [ %155, %154 ], [ %163, %162 ]
  call void @_ZNSt13unordered_setIP10CUevent_stSt4hashIS1_ESt8equal_toIS1_ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %5) #8
  br label %205

205:                                              ; preds = %204, %64
  %.pn87.pn.pn.pn = phi { ptr, i32 } [ %.pn87.pn.pn, %204 ], [ %65, %64 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %5) #8
  br label %207

206:                                              ; preds = %200
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  call void @_ZN4dali15DomainTimeRangeD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #8
  ret void

207:                                              ; preds = %205, %41
  %.pn87.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn87.pn.pn.pn, %205 ], [ %42, %41 ]
  invoke void @_ZN4dali6detail10CallAtExitIZNS_5exec212ExecNodeTask12GetWorkspaceEvEUlvE_ED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %208 unwind label %209

208:                                              ; preds = %207, %39
  %.pn87.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn87.pn.pn.pn.pn, %207 ], [ %40, %39 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #8
  call void @_ZN4dali15DomainTimeRangeD2Ev(ptr noundef nonnull align 1 dereferenceable(1) %3) #8
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #8
  resume { ptr, i32 } %.pn87.pn.pn.pn.pn.pn

209:                                              ; preds = %207
  %210 = landingpad { ptr, i32 }
          catch ptr null
  %211 = extractvalue { ptr, i32 } %210, 0
  call void @__clang_call_terminate(ptr %211) #9
  unreachable
}

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(32) ptr @_ZNK4dali5exec212ExecNodeTask9TaskInputINS_10GPUBackendEEERKDai(ptr noundef nonnull align 8 dereferenceable(72), i32 noundef) local_unnamed_addr #1 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK4dali11AccessOrder9device_idEv(ptr noundef nonnull align 8 dereferenceable(12)) local_unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4dali5exec214PipelineOutputC2ERKNS_9WorkspaceENS_15CUDASharedEventESt8optionalIiE(ptr noundef nonnull align 8 dereferenceable(688), ptr noundef nonnull align 8 dereferenceable(664), ptr noundef, i64) unnamed_addr #1 align 2

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { noinline noreturn nounwind uwtable "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { "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 = { 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 #8 = { nounwind }
attributes #9 = { 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, !7, i64 8}
!6 = !{!"_ZTSN4dali5exec212ExecNodeTaskE", !7, i64 0, !7, i64 8, !10, i64 16, !15, i64 48, !21, i64 56}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSN4dali5exec215WorkspaceParamsE", !7, i64 0, !11, i64 8, !14, i64 24}
!11 = !{!"_ZTSSt10shared_ptrIN4dali13IterationDataEE", !12, i64 0}
!12 = !{!"_ZTSSt12__shared_ptrIN4dali13IterationDataELN9__gnu_cxx12_Lock_policyE2EE", !7, i64 0, !13, i64 8}
!13 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !7, i64 0}
!14 = !{!"int", !8, i64 0}
!15 = !{!"_ZTSSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EE", !16, i64 0}
!16 = !{!"_ZTSSt15__uniq_ptr_dataIN4dali9WorkspaceESt14default_deleteIS1_ELb1ELb1EE", !17, i64 0}
!17 = !{!"_ZTSSt15__uniq_ptr_implIN4dali9WorkspaceESt14default_deleteIS1_EE", !18, i64 0}
!18 = !{!"_ZTSSt5tupleIJPN4dali9WorkspaceESt14default_deleteIS1_EEE", !19, i64 0}
!19 = !{!"_ZTSSt11_Tuple_implILm0EJPN4dali9WorkspaceESt14default_deleteIS1_EEE", !20, i64 0}
!20 = !{!"_ZTSSt10_Head_baseILm0EPN4dali9WorkspaceELb0EE", !7, i64 0}
!21 = !{!"_ZTSN4dali15CUDASharedEventE", !22, i64 0}
!22 = !{!"_ZTSSt10shared_ptrIvE", !23, i64 0}
!23 = !{!"_ZTSSt12__shared_ptrIvLN9__gnu_cxx12_Lock_policyE2EE", !7, i64 0, !13, i64 8}
!24 = !{!25, !41, i64 368}
!25 = !{!"_ZTSN4dali5exec28ExecNodeE", !26, i64 0, !28, i64 72, !29, i64 272, !29, i64 288, !31, i64 304, !37, i64 312, !39, i64 336, !41, i64 368, !42, i64 372, !42, i64 373, !42, i64 374, !43, i64 376, !43, i64 392, !43, i64 408, !15, i64 424, !42, i64 432, !21, i64 440, !45, i64 456}
!26 = !{!"_ZTSN4dali11SmallVectorIPNS_5exec28ExecEdgeELm8ESaIS3_EEE", !8, i64 0, !27, i64 64}
!27 = !{!"long", !8, i64 0}
!28 = !{!"_ZTSN4dali11SmallVectorINS_5exec214ExecOutputDescELm4ESaIS2_EEE", !8, i64 0, !27, i64 192}
!29 = !{!"_ZTSSt10shared_ptrIN4dali7tasking9SemaphoreEE", !30, i64 0}
!30 = !{!"_ZTSSt12__shared_ptrIN4dali7tasking9SemaphoreELN9__gnu_cxx12_Lock_policyE2EE", !7, i64 0, !13, i64 8}
!31 = !{!"_ZTSSt10unique_ptrIN4dali12OperatorBaseESt14default_deleteIS1_EE", !32, i64 0}
!32 = !{!"_ZTSSt15__uniq_ptr_dataIN4dali12OperatorBaseESt14default_deleteIS1_ELb1ELb1EE", !33, i64 0}
!33 = !{!"_ZTSSt15__uniq_ptr_implIN4dali12OperatorBaseESt14default_deleteIS1_EE", !34, i64 0}
!34 = !{!"_ZTSSt5tupleIJPN4dali12OperatorBaseESt14default_deleteIS1_EEE", !35, i64 0}
!35 = !{!"_ZTSSt11_Tuple_implILm0EJPN4dali12OperatorBaseESt14default_deleteIS1_EEE", !36, i64 0}
!36 = !{!"_ZTSSt10_Head_baseILm0EPN4dali12OperatorBaseELb0EE", !7, i64 0}
!37 = !{!"_ZTSN4dali5exec27ExecEnvE", !7, i64 0, !38, i64 8}
!38 = !{!"_ZTSN4dali11AccessOrderE", !7, i64 0, !14, i64 8}
!39 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !40, i64 0, !27, i64 8, !8, i64 16}
!40 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !7, i64 0}
!41 = !{!"_ZTSN4dali6OpTypeE", !8, i64 0}
!42 = !{!"bool", !8, i64 0}
!43 = !{!"_ZTSSt10shared_ptrIN4dali7tasking4TaskEE", !44, i64 0}
!44 = !{!"_ZTSSt12__shared_ptrIN4dali7tasking4TaskELN9__gnu_cxx12_Lock_policyE2EE", !7, i64 0, !13, i64 8}
!45 = !{!"_ZTSSt3any", !7, i64 0, !8, i64 8}
!46 = !{!7, !7, i64 0}
!47 = distinct !{!47, !48}
!48 = !{!"llvm.loop.mustprogress"}
!49 = distinct !{!49, !48}
!50 = !{!14, !14, i64 0}


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