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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.dali::SmallVector" = type { %union.anon.0, i64 }
%union.anon.0 = type { %struct.anon, [112 x i8] }
%struct.anon = type { ptr, i64 }
%"class.dali::AccessOrder" = type <{ ptr, i32, [4 x 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_count" = type { ptr }
%"class.dali::CPUBackend" = type { i8 }
%"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::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" }
%"class.std::shared_ptr.158" = type { %"class.std::__shared_ptr.159" }
%"class.std::__shared_ptr.159" = type { ptr, %"class.std::__shared_count" }
%"class.dali::GPUBackend" = type { i8 }
%"struct.dali::exec2::ExecNodeTask::OperatorIO.225" = type { %"class.std::shared_ptr.158", %"class.dali::AccessOrder" }
%"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::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"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 }

@.str.8 = external hidden unnamed_addr constant [96 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [33 x i8], align 1
@__PRETTY_FUNCTION__._ZN4dali5exec26OpTask19GetWorkspaceOutputsEv = external hidden unnamed_addr constant [65 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
define dso_local void @_ZN4dali5exec26OpTask19GetWorkspaceOutputsEv(ptr dead_on_unwind noalias writable sret(%"class.dali::SmallVector") align 8 %0, ptr noundef nonnull align 8 dereferenceable(112) %1) #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i1, align 1
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.dali::AccessOrder", align 8
  %10 = alloca { ptr, i32 }, align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.std::shared_ptr.152", align 8
  %13 = alloca %"class.dali::CPUBackend", align 1
  %14 = alloca %"class.dali::AccessOrder", align 8
  %15 = alloca { ptr, i32 }, align 8
  %16 = alloca %"class.dali::AccessOrder", align 8
  %17 = alloca %"class.dali::CUDASharedEvent", align 8
  %18 = alloca %"class.std::any", align 8
  %19 = alloca %"struct.dali::exec2::ExecNodeTask::OperatorIO", align 8
  %20 = alloca %"class.std::shared_ptr.158", align 8
  %21 = alloca %"class.dali::GPUBackend", align 1
  %22 = alloca %"class.dali::AccessOrder", align 8
  %23 = alloca { ptr, i32 }, align 8
  %24 = alloca %"class.dali::AccessOrder", align 8
  %25 = alloca %"class.dali::CUDASharedEvent", align 8
  %26 = alloca %"class.std::any", align 8
  %27 = alloca %"struct.dali::exec2::ExecNodeTask::OperatorIO.225", align 8
  %28 = alloca %"class.dali::GPUBackend", align 1
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  %29 = load ptr, ptr %4, align 8
  store i1 false, ptr %5, align 1
  call void @_ZN4dali11SmallVectorISt3anyLm8ESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(136) %0)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #8
  %30 = getelementptr inbounds %"class.dali::exec2::ExecNodeTask", ptr %29, i32 0, i32 3
  %31 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %30) #8
  %32 = invoke noundef i32 @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE9NumOutputEv(ptr noundef nonnull align 8 dereferenceable(664) %31)
          to label %33 unwind label %46

33:                                               ; preds = %2
  store i32 %32, ptr %6, align 4, !tbaa !9
  %34 = load i32, ptr %6, align 4, !tbaa !9
  %35 = sext i32 %34 to i64
  invoke void @_ZN4dali11SmallVectorISt3anyLm8ESaIS1_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(136) %0, i64 noundef %35)
          to label %36 unwind label %46

36:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #8
  %37 = getelementptr inbounds %"class.dali::exec2::ExecNodeTask", ptr %29, i32 0, i32 3
  %38 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %37) #8
  %39 = invoke { ptr, i32 } @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE12output_orderEv(ptr noundef nonnull align 8 dereferenceable(664) %38)
          to label %40 unwind label %50

40:                                               ; preds = %36
  store { ptr, i32 } %39, ptr %10, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %9, ptr align 8 %10, i64 12, i1 false)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %41

41:                                               ; preds = %203, %40
  %42 = load i32, ptr %11, align 4, !tbaa !9
  %43 = load i32, ptr %6, align 4, !tbaa !9
  %44 = icmp slt i32 %42, %43
  br i1 %44, label %54, label %45

45:                                               ; preds = %41
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %207

46:                                               ; preds = %33, %2
  %47 = landingpad { ptr, i32 }
          cleanup
  %48 = extractvalue { ptr, i32 } %47, 0
  store ptr %48, ptr %7, align 8
  %49 = extractvalue { ptr, i32 } %47, 1
  store i32 %49, ptr %8, align 4
  br label %210

50:                                               ; preds = %36
  %51 = landingpad { ptr, i32 }
          cleanup
  %52 = extractvalue { ptr, i32 } %51, 0
  store ptr %52, ptr %7, align 8
  %53 = extractvalue { ptr, i32 } %51, 1
  store i32 %53, ptr %8, align 4
  br label %209

54:                                               ; preds = %41
  %55 = getelementptr inbounds %"class.dali::exec2::ExecNodeTask", ptr %29, i32 0, i32 3
  %56 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %55) #8
  %57 = load i32, ptr %11, align 4, !tbaa !9
  %58 = invoke noundef zeroext i1 @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE12OutputIsTypeINS_10CPUBackendEEEbi(ptr noundef nonnull align 8 dereferenceable(664) %56, i32 noundef %57)
          to label %59 unwind label %85

59:                                               ; preds = %54
  br i1 %58, label %60, label %126

60:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #8
  %61 = getelementptr inbounds %"class.dali::exec2::ExecNodeTask", ptr %29, i32 0, i32 3
  %62 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %61) #8
  %63 = load i32, ptr %11, align 4, !tbaa !9
  %64 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE9OutputPtrINS_10CPUBackendEEERKS2_INS1_IT_EEEiS6_(ptr noundef nonnull align 8 dereferenceable(664) %62, i32 noundef %63)
          to label %65 unwind label %89

65:                                               ; preds = %60
  call void @_ZNSt10shared_ptrIN4dali10TensorListINS0_10CPUBackendEEEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(16) %64) #8
  %66 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4dali10TensorListINS0_10CPUBackendEEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %12) #8
  %67 = invoke noundef zeroext i1 @_ZNK4dali10TensorListINS_10CPUBackendEE9is_pinnedEv(ptr noundef nonnull align 8 dereferenceable(304) %66)
          to label %68 unwind label %93

68:                                               ; preds = %65
  br i1 %67, label %69, label %110

69:                                               ; preds = %68
  %70 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4dali10TensorListINS0_10CPUBackendEEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %12) #8
  %71 = invoke noundef zeroext i1 @_ZNK4dali10TensorListINS_10CPUBackendEE11shares_dataEv(ptr noundef nonnull align 8 dereferenceable(304) %70)
          to label %72 unwind label %93

72:                                               ; preds = %69
  br i1 %71, label %102, label %73

73:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #8
  %74 = load i32, ptr %11, align 4, !tbaa !9
  %75 = invoke { ptr, i32 } @_ZNK4dali5exec26OpTask20OutputConsumerStreamEi(ptr noundef nonnull align 8 dereferenceable(112) %29, i32 noundef %74)
          to label %76 unwind label %97

76:                                               ; preds = %73
  store { ptr, i32 } %75, ptr %15, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %14, ptr align 8 %15, i64 12, i1 false)
  %77 = call noundef zeroext i1 @_ZNK4dali11AccessOrdercvbEv(ptr noundef nonnull align 8 dereferenceable(12) %14) #8
  br i1 %77, label %78, label %101

78:                                               ; preds = %76
  %79 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4dali10TensorListINS0_10CPUBackendEEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %12) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %16, ptr align 8 %14, i64 16, i1 false), !tbaa.struct !11
  %80 = getelementptr inbounds { ptr, i32 }, ptr %16, i32 0, i32 0
  %81 = load ptr, ptr %80, align 8
  %82 = getelementptr inbounds { ptr, i32 }, ptr %16, i32 0, i32 1
  %83 = load i32, ptr %82, align 8
  invoke void @_ZN4dali10TensorListINS_10CPUBackendEE9set_orderENS_11AccessOrderEb(ptr noundef nonnull align 8 dereferenceable(304) %79, ptr %81, i32 %83, i1 noundef zeroext false)
          to label %84 unwind label %97

84:                                               ; preds = %78
  br label %101

85:                                               ; preds = %126, %54
  %86 = landingpad { ptr, i32 }
          cleanup
  %87 = extractvalue { ptr, i32 } %86, 0
  store ptr %87, ptr %7, align 8
  %88 = extractvalue { ptr, i32 } %86, 1
  store i32 %88, ptr %8, align 4
  br label %206

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

93:                                               ; preds = %69, %65
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %7, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %8, align 4
  br label %124

97:                                               ; preds = %78, %73
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %7, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #8
  br label %124

101:                                              ; preds = %84, %76
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #8
  br label %102

102:                                              ; preds = %101, %72
  %103 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4dali10TensorListINS0_10CPUBackendEEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %12) #8
  %104 = getelementptr inbounds %"class.dali::exec2::ExecNodeTask", ptr %29, i32 0, i32 4
  call void @_ZN4dali15CUDASharedEventC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 8 dereferenceable(16) %104) #8
  invoke void @_ZN4dali10TensorListINS_10CPUBackendEE15set_ready_eventENS_15CUDASharedEventE(ptr noundef nonnull align 8 dereferenceable(304) %103, ptr noundef %17)
          to label %105 unwind label %106

105:                                              ; preds = %102
  call void @_ZN4dali15CUDASharedEventD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #8
  br label %110

106:                                              ; preds = %102
  %107 = landingpad { ptr, i32 }
          cleanup
  %108 = extractvalue { ptr, i32 } %107, 0
  store ptr %108, ptr %7, align 8
  %109 = extractvalue { ptr, i32 } %107, 1
  store i32 %109, ptr %8, align 4
  call void @_ZN4dali15CUDASharedEventD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %17) #8
  br label %124

110:                                              ; preds = %105, %68
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #8
  %111 = getelementptr inbounds %"struct.dali::exec2::ExecNodeTask::OperatorIO", ptr %19, i32 0, i32 0
  call void @_ZNSt10shared_ptrIN4dali10TensorListINS0_10CPUBackendEEEEC2EOS4_(ptr noundef nonnull align 8 dereferenceable(16) %111, ptr noundef nonnull align 8 dereferenceable(16) %12) #8
  %112 = getelementptr inbounds %"struct.dali::exec2::ExecNodeTask::OperatorIO", ptr %19, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %112, ptr align 8 %9, i64 12, i1 false), !tbaa.struct !11
  invoke void @_ZNSt3anyC2IN4dali5exec212ExecNodeTask10OperatorIOINS1_10CPUBackendEEES6_NS_17_Manager_externalIS6_EETnNSt9enable_ifIXaa23is_copy_constructible_vIT0_Ent20__is_in_place_type_vISA_EEbE4typeELb1EEEOT_(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef nonnull align 8 dereferenceable(32) %19)
          to label %113 unwind label %115

113:                                              ; preds = %110
  invoke void @_ZN4dali11SmallVectorISt3anyLm8ESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(136) %0, ptr noundef nonnull align 8 dereferenceable(16) %18)
          to label %114 unwind label %119

114:                                              ; preds = %113
  call void @_ZNSt3anyD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #8
  call void @_ZN4dali5exec212ExecNodeTask10OperatorIOINS_10CPUBackendEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #8
  call void @_ZNSt12__shared_ptrIN4dali10TensorListINS0_10CPUBackendEEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #8
  br label %202

115:                                              ; preds = %110
  %116 = landingpad { ptr, i32 }
          cleanup
  %117 = extractvalue { ptr, i32 } %116, 0
  store ptr %117, ptr %7, align 8
  %118 = extractvalue { ptr, i32 } %116, 1
  store i32 %118, ptr %8, align 4
  br label %123

119:                                              ; preds = %113
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %7, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %8, align 4
  call void @_ZNSt3anyD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %18) #8
  br label %123

123:                                              ; preds = %119, %115
  call void @_ZN4dali5exec212ExecNodeTask10OperatorIOINS_10CPUBackendEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #8
  br label %124

124:                                              ; preds = %123, %106, %97, %93
  call void @_ZNSt12__shared_ptrIN4dali10TensorListINS0_10CPUBackendEEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #8
  br label %125

125:                                              ; preds = %124, %89
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #8
  br label %206

126:                                              ; preds = %59
  %127 = getelementptr inbounds %"class.dali::exec2::ExecNodeTask", ptr %29, i32 0, i32 3
  %128 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %127) #8
  %129 = load i32, ptr %11, align 4, !tbaa !9
  %130 = invoke noundef zeroext i1 @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE12OutputIsTypeINS_10GPUBackendEEEbi(ptr noundef nonnull align 8 dereferenceable(664) %128, i32 noundef %129)
          to label %131 unwind label %85

131:                                              ; preds = %126
  br i1 %130, label %132, label %133

132:                                              ; preds = %131
  br label %135

133:                                              ; preds = %131
  call void @__assert_fail(ptr noundef @.str.22, ptr noundef @.str.8, i32 noundef 458, ptr noundef @__PRETTY_FUNCTION__._ZN4dali5exec26OpTask19GetWorkspaceOutputsEv) #9
  unreachable

134:                                              ; No predecessors!
  br label %135

135:                                              ; preds = %134, %132
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #8
  %136 = getelementptr inbounds %"class.dali::exec2::ExecNodeTask", ptr %29, i32 0, i32 3
  %137 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %136) #8
  %138 = load i32, ptr %11, align 4, !tbaa !9
  %139 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE9OutputPtrINS_10GPUBackendEEERKS2_INS1_IT_EEEiS6_(ptr noundef nonnull align 8 dereferenceable(664) %137, i32 noundef %138)
          to label %140 unwind label %156

140:                                              ; preds = %135
  call void @_ZNSt10shared_ptrIN4dali10TensorListINS0_10GPUBackendEEEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(16) %20, ptr noundef nonnull align 8 dereferenceable(16) %139) #8
  %141 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4dali10TensorListINS0_10GPUBackendEEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %20) #8
  %142 = invoke noundef zeroext i1 @_ZNK4dali10TensorListINS_10GPUBackendEE11shares_dataEv(ptr noundef nonnull align 8 dereferenceable(304) %141)
          to label %143 unwind label %160

143:                                              ; preds = %140
  br i1 %142, label %169, label %144

144:                                              ; preds = %143
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #8
  %145 = load i32, ptr %11, align 4, !tbaa !9
  %146 = invoke { ptr, i32 } @_ZNK4dali5exec26OpTask20OutputConsumerStreamEi(ptr noundef nonnull align 8 dereferenceable(112) %29, i32 noundef %145)
          to label %147 unwind label %164

147:                                              ; preds = %144
  store { ptr, i32 } %146, ptr %23, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %22, ptr align 8 %23, i64 12, i1 false)
  %148 = call noundef zeroext i1 @_ZNK4dali11AccessOrdercvbEv(ptr noundef nonnull align 8 dereferenceable(12) %22) #8
  br i1 %148, label %149, label %168

149:                                              ; preds = %147
  %150 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4dali10TensorListINS0_10GPUBackendEEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %20) #8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %24, ptr align 8 %22, i64 16, i1 false), !tbaa.struct !11
  %151 = getelementptr inbounds { ptr, i32 }, ptr %24, i32 0, i32 0
  %152 = load ptr, ptr %151, align 8
  %153 = getelementptr inbounds { ptr, i32 }, ptr %24, i32 0, i32 1
  %154 = load i32, ptr %153, align 8
  invoke void @_ZN4dali10TensorListINS_10GPUBackendEE9set_orderENS_11AccessOrderEb(ptr noundef nonnull align 8 dereferenceable(304) %150, ptr %152, i32 %154, i1 noundef zeroext false)
          to label %155 unwind label %164

155:                                              ; preds = %149
  br label %168

156:                                              ; preds = %135
  %157 = landingpad { ptr, i32 }
          cleanup
  %158 = extractvalue { ptr, i32 } %157, 0
  store ptr %158, ptr %7, align 8
  %159 = extractvalue { ptr, i32 } %157, 1
  store i32 %159, ptr %8, align 4
  br label %201

160:                                              ; preds = %140
  %161 = landingpad { ptr, i32 }
          cleanup
  %162 = extractvalue { ptr, i32 } %161, 0
  store ptr %162, ptr %7, align 8
  %163 = extractvalue { ptr, i32 } %161, 1
  store i32 %163, ptr %8, align 4
  br label %200

164:                                              ; preds = %149, %144
  %165 = landingpad { ptr, i32 }
          cleanup
  %166 = extractvalue { ptr, i32 } %165, 0
  store ptr %166, ptr %7, align 8
  %167 = extractvalue { ptr, i32 } %165, 1
  store i32 %167, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #8
  br label %200

168:                                              ; preds = %155, %147
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #8
  br label %169

169:                                              ; preds = %168, %143
  %170 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4dali10TensorListINS0_10GPUBackendEEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %20) #8
  %171 = getelementptr inbounds %"class.dali::exec2::ExecNodeTask", ptr %29, i32 0, i32 4
  call void @_ZN4dali15CUDASharedEventC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %25, ptr noundef nonnull align 8 dereferenceable(16) %171) #8
  invoke void @_ZN4dali10TensorListINS_10GPUBackendEE15set_ready_eventENS_15CUDASharedEventE(ptr noundef nonnull align 8 dereferenceable(304) %170, ptr noundef %25)
          to label %172 unwind label %182

172:                                              ; preds = %169
  call void @_ZN4dali15CUDASharedEventD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %25) #8
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #8
  call void @llvm.lifetime.start.p0(i64 32, ptr %27) #8
  %173 = getelementptr inbounds %"struct.dali::exec2::ExecNodeTask::OperatorIO.225", ptr %27, i32 0, i32 0
  %174 = getelementptr inbounds %"class.dali::exec2::ExecNodeTask", ptr %29, i32 0, i32 3
  %175 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %174) #8
  %176 = load i32, ptr %11, align 4, !tbaa !9
  %177 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE9OutputPtrINS_10GPUBackendEEERKS2_INS1_IT_EEEiS6_(ptr noundef nonnull align 8 dereferenceable(664) %175, i32 noundef %176)
          to label %178 unwind label %186

178:                                              ; preds = %172
  call void @_ZNSt10shared_ptrIN4dali10TensorListINS0_10GPUBackendEEEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(16) %173, ptr noundef nonnull align 8 dereferenceable(16) %177) #8
  %179 = getelementptr inbounds %"struct.dali::exec2::ExecNodeTask::OperatorIO.225", ptr %27, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %179, ptr align 8 %9, i64 12, i1 false), !tbaa.struct !11
  invoke void @_ZNSt3anyC2IN4dali5exec212ExecNodeTask10OperatorIOINS1_10GPUBackendEEES6_NS_17_Manager_externalIS6_EETnNSt9enable_ifIXaa23is_copy_constructible_vIT0_Ent20__is_in_place_type_vISA_EEbE4typeELb1EEEOT_(ptr noundef nonnull align 8 dereferenceable(16) %26, ptr noundef nonnull align 8 dereferenceable(32) %27)
          to label %180 unwind label %190

180:                                              ; preds = %178
  invoke void @_ZN4dali11SmallVectorISt3anyLm8ESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(136) %0, ptr noundef nonnull align 8 dereferenceable(16) %26)
          to label %181 unwind label %194

181:                                              ; preds = %180
  call void @_ZNSt3anyD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %26) #8
  call void @_ZN4dali5exec212ExecNodeTask10OperatorIOINS_10GPUBackendEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #8
  call void @llvm.lifetime.end.p0(i64 32, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #8
  call void @_ZNSt12__shared_ptrIN4dali10TensorListINS0_10GPUBackendEEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %20) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #8
  br label %202

182:                                              ; preds = %169
  %183 = landingpad { ptr, i32 }
          cleanup
  %184 = extractvalue { ptr, i32 } %183, 0
  store ptr %184, ptr %7, align 8
  %185 = extractvalue { ptr, i32 } %183, 1
  store i32 %185, ptr %8, align 4
  call void @_ZN4dali15CUDASharedEventD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %25) #8
  br label %200

186:                                              ; preds = %172
  %187 = landingpad { ptr, i32 }
          cleanup
  %188 = extractvalue { ptr, i32 } %187, 0
  store ptr %188, ptr %7, align 8
  %189 = extractvalue { ptr, i32 } %187, 1
  store i32 %189, ptr %8, align 4
  br label %199

190:                                              ; preds = %178
  %191 = landingpad { ptr, i32 }
          cleanup
  %192 = extractvalue { ptr, i32 } %191, 0
  store ptr %192, ptr %7, align 8
  %193 = extractvalue { ptr, i32 } %191, 1
  store i32 %193, ptr %8, align 4
  br label %198

194:                                              ; preds = %180
  %195 = landingpad { ptr, i32 }
          cleanup
  %196 = extractvalue { ptr, i32 } %195, 0
  store ptr %196, ptr %7, align 8
  %197 = extractvalue { ptr, i32 } %195, 1
  store i32 %197, ptr %8, align 4
  call void @_ZNSt3anyD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %26) #8
  br label %198

198:                                              ; preds = %194, %190
  call void @_ZN4dali5exec212ExecNodeTask10OperatorIOINS_10GPUBackendEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %27) #8
  br label %199

199:                                              ; preds = %198, %186
  call void @llvm.lifetime.end.p0(i64 32, ptr %27) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #8
  br label %200

200:                                              ; preds = %199, %182, %164, %160
  call void @_ZNSt12__shared_ptrIN4dali10TensorListINS0_10GPUBackendEEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %20) #8
  br label %201

201:                                              ; preds = %200, %156
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #8
  br label %206

202:                                              ; preds = %181, %114
  br label %203

203:                                              ; preds = %202
  %204 = load i32, ptr %11, align 4, !tbaa !9
  %205 = add nsw i32 %204, 1
  store i32 %205, ptr %11, align 4, !tbaa !9
  br label %41, !llvm.loop !12

206:                                              ; preds = %201, %125, %85
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  br label %209

207:                                              ; preds = %45
  store i1 true, ptr %5, align 1
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  %208 = load i1, ptr %5, align 1
  br i1 %208, label %212, label %211

209:                                              ; preds = %206, %50
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #8
  br label %210

210:                                              ; preds = %209, %46
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #8
  call void @_ZN4dali11SmallVectorISt3anyLm8ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(136) %0) #8
  br label %213

211:                                              ; preds = %207
  call void @_ZN4dali11SmallVectorISt3anyLm8ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(136) %0) #8
  br label %212

212:                                              ; preds = %211, %207
  ret void

213:                                              ; preds = %210
  %214 = load ptr, ptr %7, align 8
  %215 = load i32, ptr %8, align 4
  %216 = insertvalue { ptr, i32 } poison, ptr %214, 0
  %217 = insertvalue { ptr, i32 } %216, i32 %215, 1
  resume { ptr, i32 } %217
}

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { ptr, i32 } @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE12output_orderEv(ptr noundef nonnull align 8 dereferenceable(664)) #2 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) #6

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i32 } @_ZNK4dali5exec26OpTask20OutputConsumerStreamEi(ptr noundef nonnull align 8 dereferenceable(112), i32 noundef) #1 align 2

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

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

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

declare noundef zeroext i1 @_ZNK4dali10TensorListINS_10CPUBackendEE11shares_dataEv(ptr noundef nonnull align 8 dereferenceable(304)) #5

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

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

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

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

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

declare noundef zeroext i1 @_ZNK4dali10TensorListINS_10GPUBackendEE11shares_dataEv(ptr noundef nonnull align 8 dereferenceable(304)) #5

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

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


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

%"class.dali::SmallVector" = type { %union.anon.0, i64 }
%union.anon.0 = type { %struct.anon, [112 x i8] }
%struct.anon = type { ptr, i64 }
%"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_count" = type { ptr }
%"class.dali::AccessOrder" = type <{ ptr, i32, [4 x i8] }>
%"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::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" }
%"class.std::shared_ptr.158" = type { %"class.std::__shared_ptr.159" }
%"class.std::__shared_ptr.159" = type { ptr, %"class.std::__shared_count" }
%"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
@__PRETTY_FUNCTION__._ZN4dali5exec26OpTask19GetWorkspaceOutputsEv = external hidden unnamed_addr constant [65 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
define dso_local void @_ZN4dali5exec26OpTask19GetWorkspaceOutputsEv(ptr dead_on_unwind noalias nonnull writable sret(%"class.dali::SmallVector") align 8 %0, ptr noundef nonnull align 8 dereferenceable(112) %1) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::shared_ptr.152", align 8
  %4 = alloca %"class.dali::AccessOrder", align 8
  %5 = alloca %"class.dali::CUDASharedEvent", align 8
  %6 = alloca %"class.std::any", align 8
  %7 = alloca %"struct.dali::exec2::ExecNodeTask::OperatorIO", align 8
  %8 = alloca %"class.std::shared_ptr.158", align 8
  %9 = alloca %"class.dali::AccessOrder", align 8
  %10 = alloca %"class.dali::CUDASharedEvent", align 8
  %11 = alloca %"class.std::any", align 8
  %12 = alloca %"struct.dali::exec2::ExecNodeTask::OperatorIO.225", align 8
  tail call void @_ZN4dali11SmallVectorISt3anyLm8ESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(136) %0)
  %13 = getelementptr inbounds i8, ptr %1, i64 48
  %14 = tail call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  %15 = tail call noundef i32 @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE9NumOutputEv(ptr noundef nonnull align 8 dereferenceable(664) %14)
  %16 = sext i32 %15 to i64
  invoke void @_ZN4dali11SmallVectorISt3anyLm8ESaIS1_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(136) %0, i64 noundef %16)
          to label %17 unwind label %24

17:                                               ; preds = %2
  %18 = tail call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  %19 = tail call { ptr, i32 } @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE12output_orderEv(ptr noundef nonnull align 8 dereferenceable(664) %18)
  %.fca.0.extract18 = extractvalue { ptr, i32 } %19, 0
  %.fca.1.extract19 = extractvalue { ptr, i32 } %19, 1
  %20 = icmp sgt i32 %15, 0
  br i1 %20, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %17
  %.sroa.22.0..sroa_idx = getelementptr inbounds i8, ptr %9, i64 8
  %21 = getelementptr inbounds i8, ptr %1, i64 56
  %22 = getelementptr inbounds i8, ptr %12, i64 16
  %.sroa.6.0..sroa_idx24 = getelementptr inbounds i8, ptr %12, i64 24
  %.sroa.29.0..sroa_idx = getelementptr inbounds i8, ptr %4, i64 8
  %23 = getelementptr inbounds i8, ptr %7, i64 16
  %.sroa.6.0..sroa_idx = getelementptr inbounds i8, ptr %7, i64 24
  br label %26

24:                                               ; preds = %2
  %25 = landingpad { ptr, i32 }
          cleanup
  br label %111

26:                                               ; preds = %.lr.ph, %109
  %.04051 = phi i32 [ 0, %.lr.ph ], [ %110, %109 ]
  %27 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  %28 = invoke noundef zeroext i1 @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE12OutputIsTypeINS_10CPUBackendEEEbi(ptr noundef nonnull align 8 dereferenceable(664) %27, i32 noundef %.04051)
          to label %29 unwind label %46

29:                                               ; preds = %26
  br i1 %28, label %30, label %67

30:                                               ; preds = %29
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #7
  %31 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  %32 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE9OutputPtrINS_10CPUBackendEEERKS2_INS1_IT_EEEiS6_(ptr noundef nonnull align 8 dereferenceable(664) %31, i32 noundef %.04051)
          to label %33 unwind label %48

33:                                               ; preds = %30
  call void @_ZNSt10shared_ptrIN4dali10TensorListINS0_10CPUBackendEEEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr noundef nonnull align 8 dereferenceable(16) %32) #7
  %34 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4dali10TensorListINS0_10CPUBackendEEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  %35 = call noundef zeroext i1 @_ZNK4dali10TensorListINS_10CPUBackendEE9is_pinnedEv(ptr noundef nonnull align 8 dereferenceable(304) %34)
  br i1 %35, label %36, label %57

36:                                               ; preds = %33
  %37 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4dali10TensorListINS0_10CPUBackendEEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  %38 = invoke noundef zeroext i1 @_ZNK4dali10TensorListINS_10CPUBackendEE11shares_dataEv(ptr noundef nonnull align 8 dereferenceable(304) %37)
          to label %39 unwind label %50

39:                                               ; preds = %36
  br i1 %38, label %55, label %40

40:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #7
  %41 = invoke { ptr, i32 } @_ZNK4dali5exec26OpTask20OutputConsumerStreamEi(ptr noundef nonnull align 8 dereferenceable(112) %1, i32 noundef %.04051)
          to label %42 unwind label %52

42:                                               ; preds = %40
  %.fca.0.extract6 = extractvalue { ptr, i32 } %41, 0
  %.fca.1.extract7 = extractvalue { ptr, i32 } %41, 1
  store ptr %.fca.0.extract6, ptr %4, align 8
  store i32 %.fca.1.extract7, ptr %.sroa.29.0..sroa_idx, align 8
  %43 = call noundef zeroext i1 @_ZNK4dali11AccessOrdercvbEv(ptr noundef nonnull align 8 dereferenceable(12) %4) #7
  br i1 %43, label %44, label %54

44:                                               ; preds = %42
  %45 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4dali10TensorListINS0_10CPUBackendEEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  %.sroa.03.0.copyload = load ptr, ptr %4, align 8, !tbaa !5
  %.sroa.24.0.copyload = load i32, ptr %.sroa.29.0..sroa_idx, align 8, !tbaa !9
  invoke void @_ZN4dali10TensorListINS_10CPUBackendEE9set_orderENS_11AccessOrderEb(ptr noundef nonnull align 8 dereferenceable(304) %45, ptr %.sroa.03.0.copyload, i32 %.sroa.24.0.copyload, i1 noundef zeroext false)
          to label %54 unwind label %52

46:                                               ; preds = %67, %26
  %47 = landingpad { ptr, i32 }
          cleanup
  br label %111

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

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

52:                                               ; preds = %44, %40
  %53 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #7
  br label %65

54:                                               ; preds = %44, %42
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #7
  br label %55

55:                                               ; preds = %54, %39
  %56 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4dali10TensorListINS0_10CPUBackendEEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %3) #7
  call void @_ZN4dali15CUDASharedEventC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %21) #7
  call void @_ZN4dali10TensorListINS_10CPUBackendEE15set_ready_eventENS_15CUDASharedEventE(ptr noundef nonnull align 8 dereferenceable(304) %56, ptr noundef nonnull %5)
  call void @_ZN4dali15CUDASharedEventD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #7
  br label %57

57:                                               ; preds = %55, %33
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #7
  call void @_ZNSt10shared_ptrIN4dali10TensorListINS0_10CPUBackendEEEEC2EOS4_(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(16) %3) #7
  store ptr %.fca.0.extract18, ptr %23, align 8, !tbaa !5
  store i32 %.fca.1.extract19, ptr %.sroa.6.0..sroa_idx, align 8, !tbaa !9
  invoke void @_ZNSt3anyC2IN4dali5exec212ExecNodeTask10OperatorIOINS1_10CPUBackendEEES6_NS_17_Manager_externalIS6_EETnNSt9enable_ifIXaa23is_copy_constructible_vIT0_Ent20__is_in_place_type_vISA_EEbE4typeELb1EEEOT_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(32) %7)
          to label %58 unwind label %60

58:                                               ; preds = %57
  invoke void @_ZN4dali11SmallVectorISt3anyLm8ESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(136) %0, ptr noundef nonnull align 8 dereferenceable(16) %6)
          to label %59 unwind label %62

59:                                               ; preds = %58
  call void @_ZNSt3anyD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #7
  call void @_ZN4dali5exec212ExecNodeTask10OperatorIOINS_10CPUBackendEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  call void @_ZNSt12__shared_ptrIN4dali10TensorListINS0_10CPUBackendEEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #7
  br label %109

60:                                               ; preds = %57
  %61 = landingpad { ptr, i32 }
          cleanup
  br label %64

62:                                               ; preds = %58
  %63 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt3anyD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %6) #7
  br label %64

64:                                               ; preds = %62, %60
  %.pn45 = phi { ptr, i32 } [ %63, %62 ], [ %61, %60 ]
  call void @_ZN4dali5exec212ExecNodeTask10OperatorIOINS_10CPUBackendEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #7
  br label %65

65:                                               ; preds = %64, %52, %50
  %.pn45.pn = phi { ptr, i32 } [ %.pn45, %64 ], [ %53, %52 ], [ %51, %50 ]
  call void @_ZNSt12__shared_ptrIN4dali10TensorListINS0_10CPUBackendEEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #7
  br label %66

66:                                               ; preds = %65, %48
  %.pn45.pn.pn = phi { ptr, i32 } [ %.pn45.pn, %65 ], [ %49, %48 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #7
  br label %111

67:                                               ; preds = %29
  %68 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  %69 = invoke noundef zeroext i1 @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE12OutputIsTypeINS_10GPUBackendEEEbi(ptr noundef nonnull align 8 dereferenceable(664) %68, i32 noundef %.04051)
          to label %70 unwind label %46

70:                                               ; preds = %67
  br i1 %69, label %72, label %71

71:                                               ; preds = %70
  call void @__assert_fail(ptr noundef nonnull @.str.22, ptr noundef nonnull @.str.8, i32 noundef 458, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN4dali5exec26OpTask19GetWorkspaceOutputsEv) #8
  unreachable

72:                                               ; preds = %70
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #7
  %73 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  %74 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE9OutputPtrINS_10GPUBackendEEERKS2_INS1_IT_EEEiS6_(ptr noundef nonnull align 8 dereferenceable(664) %73, i32 noundef %.04051)
          to label %75 unwind label %85

75:                                               ; preds = %72
  call void @_ZNSt10shared_ptrIN4dali10TensorListINS0_10GPUBackendEEEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %74) #7
  %76 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4dali10TensorListINS0_10GPUBackendEEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  %77 = invoke noundef zeroext i1 @_ZNK4dali10TensorListINS_10GPUBackendEE11shares_dataEv(ptr noundef nonnull align 8 dereferenceable(304) %76)
          to label %78 unwind label %87

78:                                               ; preds = %75
  br i1 %77, label %92, label %79

79:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #7
  %80 = invoke { ptr, i32 } @_ZNK4dali5exec26OpTask20OutputConsumerStreamEi(ptr noundef nonnull align 8 dereferenceable(112) %1, i32 noundef %.04051)
          to label %81 unwind label %89

81:                                               ; preds = %79
  %.fca.0.extract = extractvalue { ptr, i32 } %80, 0
  %.fca.1.extract = extractvalue { ptr, i32 } %80, 1
  store ptr %.fca.0.extract, ptr %9, align 8
  store i32 %.fca.1.extract, ptr %.sroa.22.0..sroa_idx, align 8
  %82 = call noundef zeroext i1 @_ZNK4dali11AccessOrdercvbEv(ptr noundef nonnull align 8 dereferenceable(12) %9) #7
  br i1 %82, label %83, label %91

83:                                               ; preds = %81
  %84 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4dali10TensorListINS0_10GPUBackendEEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  %.sroa.0.0.copyload = load ptr, ptr %9, align 8, !tbaa !5
  %.sroa.2.0.copyload = load i32, ptr %.sroa.22.0..sroa_idx, align 8, !tbaa !9
  invoke void @_ZN4dali10TensorListINS_10GPUBackendEE9set_orderENS_11AccessOrderEb(ptr noundef nonnull align 8 dereferenceable(304) %84, ptr %.sroa.0.0.copyload, i32 %.sroa.2.0.copyload, i1 noundef zeroext false)
          to label %91 unwind label %89

85:                                               ; preds = %72
  %86 = landingpad { ptr, i32 }
          cleanup
  br label %108

87:                                               ; preds = %75
  %88 = landingpad { ptr, i32 }
          cleanup
  br label %107

89:                                               ; preds = %83, %79
  %90 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #7
  br label %107

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

92:                                               ; preds = %91, %78
  %93 = call noundef ptr @_ZNKSt19__shared_ptr_accessIN4dali10TensorListINS0_10GPUBackendEEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %8) #7
  call void @_ZN4dali15CUDASharedEventC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(16) %10, ptr noundef nonnull align 8 dereferenceable(16) %21) #7
  call void @_ZN4dali10TensorListINS_10GPUBackendEE15set_ready_eventENS_15CUDASharedEventE(ptr noundef nonnull align 8 dereferenceable(304) %93, ptr noundef nonnull %10)
  call void @_ZN4dali15CUDASharedEventD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #7
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #7
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #7
  %94 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  %95 = invoke noundef nonnull align 8 dereferenceable(16) ptr @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE9OutputPtrINS_10GPUBackendEEERKS2_INS1_IT_EEEiS6_(ptr noundef nonnull align 8 dereferenceable(664) %94, i32 noundef %.04051)
          to label %96 unwind label %99

96:                                               ; preds = %92
  call void @_ZNSt10shared_ptrIN4dali10TensorListINS0_10GPUBackendEEEEC2ERKS4_(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr noundef nonnull align 8 dereferenceable(16) %95) #7
  store ptr %.fca.0.extract18, ptr %22, align 8, !tbaa !5
  store i32 %.fca.1.extract19, ptr %.sroa.6.0..sroa_idx24, align 8, !tbaa !9
  invoke void @_ZNSt3anyC2IN4dali5exec212ExecNodeTask10OperatorIOINS1_10GPUBackendEEES6_NS_17_Manager_externalIS6_EETnNSt9enable_ifIXaa23is_copy_constructible_vIT0_Ent20__is_in_place_type_vISA_EEbE4typeELb1EEEOT_(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %97 unwind label %101

97:                                               ; preds = %96
  invoke void @_ZN4dali11SmallVectorISt3anyLm8ESaIS1_EE9push_backEOS1_(ptr noundef nonnull align 8 dereferenceable(136) %0, ptr noundef nonnull align 8 dereferenceable(16) %11)
          to label %98 unwind label %103

98:                                               ; preds = %97
  call void @_ZNSt3anyD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #7
  call void @_ZN4dali5exec212ExecNodeTask10OperatorIOINS_10GPUBackendEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #7
  call void @_ZNSt12__shared_ptrIN4dali10TensorListINS0_10GPUBackendEEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #7
  br label %109

99:                                               ; preds = %92
  %100 = landingpad { ptr, i32 }
          cleanup
  br label %106

101:                                              ; preds = %96
  %102 = landingpad { ptr, i32 }
          cleanup
  br label %105

103:                                              ; preds = %97
  %104 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt3anyD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %11) #7
  br label %105

105:                                              ; preds = %103, %101
  %.pn = phi { ptr, i32 } [ %104, %103 ], [ %102, %101 ]
  call void @_ZN4dali5exec212ExecNodeTask10OperatorIOINS_10GPUBackendEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #7
  br label %106

106:                                              ; preds = %105, %99
  %.pn.pn = phi { ptr, i32 } [ %.pn, %105 ], [ %100, %99 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #7
  br label %107

107:                                              ; preds = %106, %89, %87
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %106 ], [ %90, %89 ], [ %88, %87 ]
  call void @_ZNSt12__shared_ptrIN4dali10TensorListINS0_10GPUBackendEEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #7
  br label %108

108:                                              ; preds = %107, %85
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %107 ], [ %86, %85 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #7
  br label %111

109:                                              ; preds = %59, %98
  %110 = add nuw nsw i32 %.04051, 1
  %exitcond.not = icmp eq i32 %110, %15
  br i1 %exitcond.not, label %._crit_edge, label %26, !llvm.loop !11

111:                                              ; preds = %46, %66, %108, %24
  %.pn45.pn.pn.pn.pn = phi { ptr, i32 } [ %25, %24 ], [ %.pn45.pn.pn, %66 ], [ %.pn.pn.pn.pn, %108 ], [ %47, %46 ]
  call void @_ZN4dali11SmallVectorISt3anyLm8ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(136) %0) #7
  resume { ptr, i32 } %.pn45.pn.pn.pn.pn

._crit_edge:                                      ; preds = %109, %17
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN4dali11SmallVectorISt3anyLm8ESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(136)) unnamed_addr #2 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 #2 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 #3 align 2

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef zeroext i1 @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE12OutputIsTypeINS_10CPUBackendEEEbi(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(16) ptr @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE9OutputPtrINS_10CPUBackendEEERKS2_INS1_IT_EEEiS6_(ptr noundef nonnull align 8 dereferenceable(664), i32 noundef) local_unnamed_addr #1 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { ptr, i32 } @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE12output_orderEv(ptr noundef nonnull align 8 dereferenceable(664)) local_unnamed_addr #2 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 #2 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

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

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4dali15CUDASharedEventD2Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3 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 #2 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 #2 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4dali11SmallVectorISt3anyLm8ESaIS1_EE7reserveEm(ptr noundef nonnull align 8 dereferenceable(136), i64 noundef) local_unnamed_addr #1 align 2

declare noundef zeroext i1 @_ZNK4dali10TensorListINS_10CPUBackendEE11shares_dataEv(ptr noundef nonnull align 8 dereferenceable(304)) local_unnamed_addr #5

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

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

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

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

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

declare noundef zeroext i1 @_ZNK4dali10TensorListINS_10GPUBackendEE11shares_dataEv(ptr noundef nonnull align 8 dereferenceable(304)) local_unnamed_addr #5

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4dali5exec212ExecNodeTask10OperatorIOINS_10GPUBackendEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #3 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 #2 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 #2 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 = { 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 #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { "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 = { 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 #7 = { nounwind }
attributes #8 = { noreturn nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


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