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

; 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.std::unique_ptr.11" = type { %"struct.std::__uniq_ptr_data.12" }
%"struct.std::__uniq_ptr_data.12" = type { %"class.std::__uniq_ptr_impl.13" }
%"class.std::__uniq_ptr_impl.13" = type { %"class.std::tuple.14" }
%"class.std::tuple.14" = type { %"struct.std::_Tuple_impl.15" }
%"struct.std::_Tuple_impl.15" = type { %"struct.std::_Head_base.18" }
%"struct.std::_Head_base.18" = type { ptr }
%"class.std::shared_ptr.125" = type { %"class.std::__shared_ptr.126" }
%"class.std::__shared_ptr.126" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.dali::GPUBackend" = type { i8 }
%"class.std::shared_ptr.128" = type { %"class.std::__shared_ptr.129" }
%"class.std::__shared_ptr.129" = type { ptr, %"class.std::__shared_count" }
%"class.dali::CPUBackend" = type { i8 }
%"class.dali::exec2::ExecNode" = type { %"class.dali::SmallVector", %"class.dali::SmallVector.3", %"class.std::shared_ptr", %"class.std::shared_ptr", %"class.std::unique_ptr", %"struct.dali::exec2::ExecEnv", %"class.std::__cxx11::basic_string", i32, i8, i8, i8, %"class.std::shared_ptr.8", %"class.std::shared_ptr.8", %"class.std::shared_ptr.8", %"class.std::unique_ptr.11", i8, %"class.dali::CUDASharedEvent", %"class.std::any" }
%"class.dali::SmallVector" = type { %union.anon.2, i64 }
%union.anon.2 = type { %struct.anon, [48 x i8] }
%struct.anon = type { ptr, i64 }
%"class.dali::SmallVector.3" = type { %union.anon.6, i64 }
%union.anon.6 = type { %struct.anon.7, [176 x i8] }
%struct.anon.7 = type { ptr, i64 }
%"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.1" }
%"struct.std::_Head_base.1" = type { ptr }
%"struct.dali::exec2::ExecEnv" = type { ptr, %"class.dali::AccessOrder" }
%"class.dali::AccessOrder" = type <{ ptr, i32, [4 x i8] }>
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::shared_ptr.8" = type { %"class.std::__shared_ptr.9" }
%"class.std::__shared_ptr.9" = type { ptr, %"class.std::__shared_count" }
%"class.dali::CUDASharedEvent" = type { %"class.std::shared_ptr.19" }
%"class.std::shared_ptr.19" = type { %"class.std::__shared_ptr.20" }
%"class.std::__shared_ptr.20" = type { ptr, %"class.std::__shared_count" }
%"class.std::any" = type { ptr, %"union.std::any::_Storage" }
%"union.std::any::_Storage" = type { ptr }
%"struct.dali::exec2::ExecEdge" = type <{ ptr, ptr, i32, i32, i32, i8, [3 x i8] }>

@.str.6 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [19 x i8], align 1
@__PRETTY_FUNCTION__._ZN4dali5exec28ExecNode21CreateOutputWorkspaceEv = external hidden unnamed_addr constant [74 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [32 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: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #1

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4dali5exec28ExecNode21CreateOutputWorkspaceEv(ptr dead_on_unwind noalias writable sret(%"class.std::unique_ptr.11") align 8 %0, ptr noundef nonnull align 8 dereferenceable(472) %1) #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i1, align 1
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca %"class.std::shared_ptr.125", align 8
  %13 = alloca %"class.dali::GPUBackend", align 1
  %14 = alloca %"class.std::shared_ptr.128", align 8
  %15 = alloca %"class.dali::CPUBackend", align 1
  store ptr %0, ptr %3, align 8
  store ptr %1, ptr %4, align 8, !tbaa !5
  %16 = load ptr, ptr %4, align 8
  %17 = getelementptr inbounds %"class.dali::exec2::ExecNode", ptr %16, i32 0, i32 8
  %18 = load i8, ptr %17, align 4, !tbaa !9, !range !42, !noundef !43
  %19 = trunc i8 %18 to i1
  br i1 %19, label %20, label %21

20:                                               ; preds = %2
  br label %23

21:                                               ; preds = %2
  call void @__assert_fail(ptr noundef @.str.8, ptr noundef @.str.6, i32 noundef 106, ptr noundef @__PRETTY_FUNCTION__._ZN4dali5exec28ExecNode21CreateOutputWorkspaceEv) #5
  unreachable

22:                                               ; No predecessors!
  br label %23

23:                                               ; preds = %22, %20
  store i1 false, ptr %5, align 1
  call void @_ZSt11make_uniqueIN4dali9WorkspaceEJEENSt8__detail9_MakeUniqIT_E15__single_objectEDpOT0_(ptr dead_on_unwind writable sret(%"class.std::unique_ptr.11") align 8 %0)
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %24 = getelementptr inbounds %"class.dali::exec2::ExecNode", ptr %16, i32 0, i32 0
  store ptr %24, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  %26 = invoke noundef ptr @_ZN4dali11SmallVectorIPNS_5exec28ExecEdgeELm8ESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(72) %25)
          to label %27 unwind label %36

27:                                               ; preds = %23
  store ptr %26, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %28 = load ptr, ptr %6, align 8, !tbaa !5
  %29 = invoke noundef ptr @_ZN4dali11SmallVectorIPNS_5exec28ExecEdgeELm8ESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(72) %28)
          to label %30 unwind label %40

30:                                               ; preds = %27
  store ptr %29, ptr %10, align 8, !tbaa !5
  br label %31

31:                                               ; preds = %75, %30
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  %33 = load ptr, ptr %10, align 8, !tbaa !5
  %34 = icmp ne ptr %32, %33
  br i1 %34, label %44, label %35

35:                                               ; preds = %31
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  br label %81

36:                                               ; preds = %23
  %37 = landingpad { ptr, i32 }
          cleanup
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %8, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %9, align 4
  br label %80

40:                                               ; preds = %27
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %8, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %9, align 4
  br label %79

44:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %45 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %45, ptr %11, align 8, !tbaa !5
  %46 = load ptr, ptr %11, align 8, !tbaa !5
  %47 = load ptr, ptr %46, align 8, !tbaa !5
  %48 = getelementptr inbounds %"struct.dali::exec2::ExecEdge", ptr %47, i32 0, i32 4
  %49 = load i32, ptr %48, align 8, !tbaa !44
  %50 = icmp eq i32 %49, 1
  br i1 %50, label %51, label %58

51:                                               ; preds = %44
  %52 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %0) #6
  call void @_ZNSt10shared_ptrIN4dali10TensorListINS0_10GPUBackendEEEEC2EDn(ptr noundef nonnull align 8 dereferenceable(16) %12, ptr null) #6
  invoke void @_ZN4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE9AddOutputINS_10GPUBackendEEEvS2_INS1_IT_EEES6_(ptr noundef nonnull align 8 dereferenceable(664) %52, ptr noundef %12)
          to label %53 unwind label %54

53:                                               ; preds = %51
  call void @_ZNSt12__shared_ptrIN4dali10TensorListINS0_10GPUBackendEEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #6
  br label %74

54:                                               ; preds = %51
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %8, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %9, align 4
  call void @_ZNSt12__shared_ptrIN4dali10TensorListINS0_10GPUBackendEEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %12) #6
  br label %78

58:                                               ; preds = %44
  %59 = load ptr, ptr %11, align 8, !tbaa !5
  %60 = load ptr, ptr %59, align 8, !tbaa !5
  %61 = getelementptr inbounds %"struct.dali::exec2::ExecEdge", ptr %60, i32 0, i32 4
  %62 = load i32, ptr %61, align 8, !tbaa !44
  %63 = icmp eq i32 %62, 0
  br i1 %63, label %64, label %65

64:                                               ; preds = %58
  br label %67

65:                                               ; preds = %58
  call void @__assert_fail(ptr noundef @.str.9, ptr noundef @.str.6, i32 noundef 112, ptr noundef @__PRETTY_FUNCTION__._ZN4dali5exec28ExecNode21CreateOutputWorkspaceEv) #5
  unreachable

66:                                               ; No predecessors!
  br label %67

67:                                               ; preds = %66, %64
  %68 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %0) #6
  call void @_ZNSt10shared_ptrIN4dali10TensorListINS0_10CPUBackendEEEEC2EDn(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr null) #6
  invoke void @_ZN4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE9AddOutputINS_10CPUBackendEEEvS2_INS1_IT_EEES6_(ptr noundef nonnull align 8 dereferenceable(664) %68, ptr noundef %14)
          to label %69 unwind label %70

69:                                               ; preds = %67
  call void @_ZNSt12__shared_ptrIN4dali10TensorListINS0_10CPUBackendEEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %14) #6
  br label %74

70:                                               ; preds = %67
  %71 = landingpad { ptr, i32 }
          cleanup
  %72 = extractvalue { ptr, i32 } %71, 0
  store ptr %72, ptr %8, align 8
  %73 = extractvalue { ptr, i32 } %71, 1
  store i32 %73, ptr %9, align 4
  call void @_ZNSt12__shared_ptrIN4dali10TensorListINS0_10CPUBackendEEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %14) #6
  br label %78

74:                                               ; preds = %69, %53
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %75

75:                                               ; preds = %74
  %76 = load ptr, ptr %7, align 8, !tbaa !5
  %77 = getelementptr inbounds ptr, ptr %76, i32 1
  store ptr %77, ptr %7, align 8, !tbaa !5
  br label %31

78:                                               ; preds = %70, %54
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %79

79:                                               ; preds = %78, %40
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  br label %80

80:                                               ; preds = %79, %36
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @_ZNSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #6
  br label %85

81:                                               ; preds = %35
  store i1 true, ptr %5, align 1
  %82 = load i1, ptr %5, align 1
  br i1 %82, label %84, label %83

83:                                               ; preds = %81
  call void @_ZNSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #6
  br label %84

84:                                               ; preds = %83, %81
  ret void

85:                                               ; preds = %80
  %86 = load ptr, ptr %8, align 8
  %87 = load i32, ptr %9, align 4
  %88 = insertvalue { ptr, i32 } poison, ptr %86, 0
  %89 = insertvalue { ptr, i32 } %88, i32 %87, 1
  resume { ptr, i32 } %89
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt11make_uniqueIN4dali9WorkspaceEJEENSt8__detail9_MakeUniqIT_E15__single_objectEDpOT0_(ptr dead_on_unwind noalias writable sret(%"class.std::unique_ptr.11") align 8) #4

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN4dali11SmallVectorIPNS_5exec28ExecEdgeELm8ESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(72)) #4 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: mustprogress uwtable
declare dso_local void @_ZN4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE9AddOutputINS_10GPUBackendEEEvS2_INS1_IT_EEES6_(ptr noundef nonnull align 8 dereferenceable(664), ptr noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt10shared_ptrIN4dali10TensorListINS0_10GPUBackendEEEEC2EDn(ptr noundef nonnull align 8 dereferenceable(16), ptr) 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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 #4 = { 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 #5 = { noreturn nounwind }
attributes #6 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !29, i64 372}
!10 = !{!"_ZTSN4dali5exec28ExecNodeE", !11, i64 0, !13, i64 72, !14, i64 272, !14, i64 288, !17, i64 304, !23, i64 312, !26, i64 336, !28, i64 368, !29, i64 372, !29, i64 373, !29, i64 374, !30, i64 376, !30, i64 392, !30, i64 408, !32, i64 424, !29, i64 432, !38, i64 440, !41, i64 456}
!11 = !{!"_ZTSN4dali11SmallVectorIPNS_5exec28ExecEdgeELm8ESaIS3_EEE", !7, i64 0, !12, i64 64}
!12 = !{!"long", !7, i64 0}
!13 = !{!"_ZTSN4dali11SmallVectorINS_5exec214ExecOutputDescELm4ESaIS2_EEE", !7, i64 0, !12, i64 192}
!14 = !{!"_ZTSSt10shared_ptrIN4dali7tasking9SemaphoreEE", !15, i64 0}
!15 = !{!"_ZTSSt12__shared_ptrIN4dali7tasking9SemaphoreELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !16, i64 8}
!16 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0}
!17 = !{!"_ZTSSt10unique_ptrIN4dali12OperatorBaseESt14default_deleteIS1_EE", !18, i64 0}
!18 = !{!"_ZTSSt15__uniq_ptr_dataIN4dali12OperatorBaseESt14default_deleteIS1_ELb1ELb1EE", !19, i64 0}
!19 = !{!"_ZTSSt15__uniq_ptr_implIN4dali12OperatorBaseESt14default_deleteIS1_EE", !20, i64 0}
!20 = !{!"_ZTSSt5tupleIJPN4dali12OperatorBaseESt14default_deleteIS1_EEE", !21, i64 0}
!21 = !{!"_ZTSSt11_Tuple_implILm0EJPN4dali12OperatorBaseESt14default_deleteIS1_EEE", !22, i64 0}
!22 = !{!"_ZTSSt10_Head_baseILm0EPN4dali12OperatorBaseELb0EE", !6, i64 0}
!23 = !{!"_ZTSN4dali5exec27ExecEnvE", !6, i64 0, !24, i64 8}
!24 = !{!"_ZTSN4dali11AccessOrderE", !6, i64 0, !25, i64 8}
!25 = !{!"int", !7, i64 0}
!26 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !27, i64 0, !12, i64 8, !7, i64 16}
!27 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!28 = !{!"_ZTSN4dali6OpTypeE", !7, i64 0}
!29 = !{!"bool", !7, i64 0}
!30 = !{!"_ZTSSt10shared_ptrIN4dali7tasking4TaskEE", !31, i64 0}
!31 = !{!"_ZTSSt12__shared_ptrIN4dali7tasking4TaskELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !16, i64 8}
!32 = !{!"_ZTSSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EE", !33, i64 0}
!33 = !{!"_ZTSSt15__uniq_ptr_dataIN4dali9WorkspaceESt14default_deleteIS1_ELb1ELb1EE", !34, i64 0}
!34 = !{!"_ZTSSt15__uniq_ptr_implIN4dali9WorkspaceESt14default_deleteIS1_EE", !35, i64 0}
!35 = !{!"_ZTSSt5tupleIJPN4dali9WorkspaceESt14default_deleteIS1_EEE", !36, i64 0}
!36 = !{!"_ZTSSt11_Tuple_implILm0EJPN4dali9WorkspaceESt14default_deleteIS1_EEE", !37, i64 0}
!37 = !{!"_ZTSSt10_Head_baseILm0EPN4dali9WorkspaceELb0EE", !6, i64 0}
!38 = !{!"_ZTSN4dali15CUDASharedEventE", !39, i64 0}
!39 = !{!"_ZTSSt10shared_ptrIvE", !40, i64 0}
!40 = !{!"_ZTSSt12__shared_ptrIvLN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !16, i64 8}
!41 = !{!"_ZTSSt3any", !6, i64 0, !7, i64 8}
!42 = !{i8 0, i8 2}
!43 = !{}
!44 = !{!45, !46, i64 24}
!45 = !{!"_ZTSN4dali5exec28ExecEdgeE", !6, i64 0, !6, i64 8, !25, i64 16, !25, i64 20, !46, i64 24, !29, i64 28}
!46 = !{!"_ZTSN4dali13StorageDeviceE", !7, i64 0}


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

%"class.std::unique_ptr.11" = type { %"struct.std::__uniq_ptr_data.12" }
%"struct.std::__uniq_ptr_data.12" = type { %"class.std::__uniq_ptr_impl.13" }
%"class.std::__uniq_ptr_impl.13" = type { %"class.std::tuple.14" }
%"class.std::tuple.14" = type { %"struct.std::_Tuple_impl.15" }
%"struct.std::_Tuple_impl.15" = type { %"struct.std::_Head_base.18" }
%"struct.std::_Head_base.18" = type { ptr }
%"class.std::shared_ptr.125" = type { %"class.std::__shared_ptr.126" }
%"class.std::__shared_ptr.126" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::shared_ptr.128" = type { %"class.std::__shared_ptr.129" }
%"class.std::__shared_ptr.129" = type { ptr, %"class.std::__shared_count" }

@.str.6 = external hidden unnamed_addr constant [92 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [19 x i8], align 1
@__PRETTY_FUNCTION__._ZN4dali5exec28ExecNode21CreateOutputWorkspaceEv = external hidden unnamed_addr constant [74 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [32 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4dali5exec28ExecNode21CreateOutputWorkspaceEv(ptr dead_on_unwind noalias writable sret(%"class.std::unique_ptr.11") align 8 %0, ptr noundef nonnull align 8 dereferenceable(472) %1) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::shared_ptr.125", align 8
  %4 = alloca %"class.std::shared_ptr.128", align 8
  %5 = getelementptr inbounds i8, ptr %1, i64 372
  %6 = load i8, ptr %5, align 4, !tbaa !5, !range !41, !noundef !42
  %7 = trunc nuw i8 %6 to i1
  br i1 %7, label %9, label %8

8:                                                ; preds = %2
  tail call void @__assert_fail(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.6, i32 noundef 106, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN4dali5exec28ExecNode21CreateOutputWorkspaceEv) #4
  unreachable

9:                                                ; preds = %2
  tail call void @_ZSt11make_uniqueIN4dali9WorkspaceEJEENSt8__detail9_MakeUniqIT_E15__single_objectEDpOT0_(ptr dead_on_unwind writable sret(%"class.std::unique_ptr.11") align 8 %0)
  %10 = invoke noundef ptr @_ZN4dali11SmallVectorIPNS_5exec28ExecEdgeELm8ESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(72) %1)
          to label %11 unwind label %13

11:                                               ; preds = %9
  %12 = invoke noundef ptr @_ZN4dali11SmallVectorIPNS_5exec28ExecEdgeELm8ESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(72) %1)
          to label %.preheader unwind label %15

.preheader:                                       ; preds = %11
  %.not19 = icmp eq ptr %10, %12
  br i1 %.not19, label %._crit_edge, label %.lr.ph

13:                                               ; preds = %9
  %14 = landingpad { ptr, i32 }
          cleanup
  br label %33

15:                                               ; preds = %11
  %16 = landingpad { ptr, i32 }
          cleanup
  br label %33

.lr.ph:                                           ; preds = %.preheader, %31
  %.020 = phi ptr [ %32, %31 ], [ %10, %.preheader ]
  %17 = load ptr, ptr %.020, align 8, !tbaa !43
  %18 = getelementptr inbounds i8, ptr %17, i64 24
  %19 = load i32, ptr %18, align 8, !tbaa !44
  switch i32 %19, label %25 [
    i32 1, label %20
    i32 0, label %26
  ]

20:                                               ; preds = %.lr.ph
  %21 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %0) #5
  call void @_ZNSt10shared_ptrIN4dali10TensorListINS0_10GPUBackendEEEEC2EDn(ptr noundef nonnull align 8 dereferenceable(16) %3, ptr null) #5
  invoke void @_ZN4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE9AddOutputINS_10GPUBackendEEEvS2_INS1_IT_EEES6_(ptr noundef nonnull align 8 dereferenceable(664) %21, ptr noundef nonnull %3)
          to label %22 unwind label %23

22:                                               ; preds = %20
  call void @_ZNSt12__shared_ptrIN4dali10TensorListINS0_10GPUBackendEEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #5
  br label %31

23:                                               ; preds = %20
  %24 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN4dali10TensorListINS0_10GPUBackendEEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %3) #5
  br label %33

25:                                               ; preds = %.lr.ph
  call void @__assert_fail(ptr noundef nonnull @.str.9, ptr noundef nonnull @.str.6, i32 noundef 112, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN4dali5exec28ExecNode21CreateOutputWorkspaceEv) #4
  unreachable

26:                                               ; preds = %.lr.ph
  %27 = call noundef ptr @_ZNKSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EEptEv(ptr noundef nonnull align 8 dereferenceable(8) %0) #5
  call void @_ZNSt10shared_ptrIN4dali10TensorListINS0_10CPUBackendEEEEC2EDn(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr null) #5
  invoke void @_ZN4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE9AddOutputINS_10CPUBackendEEEvS2_INS1_IT_EEES6_(ptr noundef nonnull align 8 dereferenceable(664) %27, ptr noundef nonnull %4)
          to label %28 unwind label %29

28:                                               ; preds = %26
  call void @_ZNSt12__shared_ptrIN4dali10TensorListINS0_10CPUBackendEEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #5
  br label %31

29:                                               ; preds = %26
  %30 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt12__shared_ptrIN4dali10TensorListINS0_10CPUBackendEEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #5
  br label %33

31:                                               ; preds = %28, %22
  %32 = getelementptr inbounds i8, ptr %.020, i64 8
  %.not = icmp eq ptr %32, %12
  br i1 %.not, label %._crit_edge, label %.lr.ph

33:                                               ; preds = %15, %29, %23, %13
  %.pn.pn.pn = phi { ptr, i32 } [ %14, %13 ], [ %16, %15 ], [ %24, %23 ], [ %30, %29 ]
  call void @_ZNSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #5
  resume { ptr, i32 } %.pn.pn.pn

._crit_edge:                                      ; preds = %31, %.preheader
  ret void
}

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt11make_uniqueIN4dali9WorkspaceEJEENSt8__detail9_MakeUniqIT_E15__single_objectEDpOT0_(ptr dead_on_unwind noalias writable sret(%"class.std::unique_ptr.11") align 8) local_unnamed_addr #3

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN4dali11SmallVectorIPNS_5exec28ExecEdgeELm8ESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(72)) local_unnamed_addr #3 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 #1 align 2

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

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !28, i64 372}
!6 = !{!"_ZTSN4dali5exec28ExecNodeE", !7, i64 0, !11, i64 72, !12, i64 272, !12, i64 288, !16, i64 304, !22, i64 312, !25, i64 336, !27, i64 368, !28, i64 372, !28, i64 373, !28, i64 374, !29, i64 376, !29, i64 392, !29, i64 408, !31, i64 424, !28, i64 432, !37, i64 440, !40, i64 456}
!7 = !{!"_ZTSN4dali11SmallVectorIPNS_5exec28ExecEdgeELm8ESaIS3_EEE", !8, i64 0, !10, i64 64}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!"_ZTSN4dali11SmallVectorINS_5exec214ExecOutputDescELm4ESaIS2_EEE", !8, i64 0, !10, i64 192}
!12 = !{!"_ZTSSt10shared_ptrIN4dali7tasking9SemaphoreEE", !13, i64 0}
!13 = !{!"_ZTSSt12__shared_ptrIN4dali7tasking9SemaphoreELN9__gnu_cxx12_Lock_policyE2EE", !14, i64 0, !15, i64 8}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !14, i64 0}
!16 = !{!"_ZTSSt10unique_ptrIN4dali12OperatorBaseESt14default_deleteIS1_EE", !17, i64 0}
!17 = !{!"_ZTSSt15__uniq_ptr_dataIN4dali12OperatorBaseESt14default_deleteIS1_ELb1ELb1EE", !18, i64 0}
!18 = !{!"_ZTSSt15__uniq_ptr_implIN4dali12OperatorBaseESt14default_deleteIS1_EE", !19, i64 0}
!19 = !{!"_ZTSSt5tupleIJPN4dali12OperatorBaseESt14default_deleteIS1_EEE", !20, i64 0}
!20 = !{!"_ZTSSt11_Tuple_implILm0EJPN4dali12OperatorBaseESt14default_deleteIS1_EEE", !21, i64 0}
!21 = !{!"_ZTSSt10_Head_baseILm0EPN4dali12OperatorBaseELb0EE", !14, i64 0}
!22 = !{!"_ZTSN4dali5exec27ExecEnvE", !14, i64 0, !23, i64 8}
!23 = !{!"_ZTSN4dali11AccessOrderE", !14, i64 0, !24, i64 8}
!24 = !{!"int", !8, i64 0}
!25 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !26, i64 0, !10, i64 8, !8, i64 16}
!26 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !14, i64 0}
!27 = !{!"_ZTSN4dali6OpTypeE", !8, i64 0}
!28 = !{!"bool", !8, i64 0}
!29 = !{!"_ZTSSt10shared_ptrIN4dali7tasking4TaskEE", !30, i64 0}
!30 = !{!"_ZTSSt12__shared_ptrIN4dali7tasking4TaskELN9__gnu_cxx12_Lock_policyE2EE", !14, i64 0, !15, i64 8}
!31 = !{!"_ZTSSt10unique_ptrIN4dali9WorkspaceESt14default_deleteIS1_EE", !32, i64 0}
!32 = !{!"_ZTSSt15__uniq_ptr_dataIN4dali9WorkspaceESt14default_deleteIS1_ELb1ELb1EE", !33, i64 0}
!33 = !{!"_ZTSSt15__uniq_ptr_implIN4dali9WorkspaceESt14default_deleteIS1_EE", !34, i64 0}
!34 = !{!"_ZTSSt5tupleIJPN4dali9WorkspaceESt14default_deleteIS1_EEE", !35, i64 0}
!35 = !{!"_ZTSSt11_Tuple_implILm0EJPN4dali9WorkspaceESt14default_deleteIS1_EEE", !36, i64 0}
!36 = !{!"_ZTSSt10_Head_baseILm0EPN4dali9WorkspaceELb0EE", !14, i64 0}
!37 = !{!"_ZTSN4dali15CUDASharedEventE", !38, i64 0}
!38 = !{!"_ZTSSt10shared_ptrIvE", !39, i64 0}
!39 = !{!"_ZTSSt12__shared_ptrIvLN9__gnu_cxx12_Lock_policyE2EE", !14, i64 0, !15, i64 8}
!40 = !{!"_ZTSSt3any", !14, i64 0, !8, i64 8}
!41 = !{i8 0, i8 2}
!42 = !{}
!43 = !{!14, !14, i64 0}
!44 = !{!45, !46, i64 24}
!45 = !{!"_ZTSN4dali5exec28ExecEdgeE", !14, i64 0, !14, i64 8, !24, i64 16, !24, i64 20, !46, i64 24, !28, i64 28}
!46 = !{!"_ZTSN4dali13StorageDeviceE", !8, i64 0}


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