; LLVM IR from NVIDIA/DALI :: dali/operators/util (get_property)

; 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::TensorLayout" = type { [16 x i8] }
%"class.dali::Tensor" = type { %"class.dali::Buffer.base", %"struct.dali::TensorShape", %"class.dali::DALIMeta", %"class.dali::CUDASharedEvent" }
%"class.dali::Buffer.base" = type <{ ptr, %"class.dali::TypeInfo", %"class.std::shared_ptr.52", %"class.std::function.55", i64, i64, i32, [4 x i8], %"class.dali::AccessOrder", i8, i8 }>
%"class.dali::TypeInfo" = type { ptr, i32, i64, %"class.std::basic_string_view" }
%"class.std::basic_string_view" = type { i64, ptr }
%"class.std::shared_ptr.52" = type { %"class.std::__shared_ptr.53" }
%"class.std::__shared_ptr.53" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::function.55" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%"class.dali::AccessOrder" = type <{ ptr, i32, [4 x i8] }>
%"struct.dali::TensorShape" = type { %"struct.dali::TensorShapeBase" }
%"struct.dali::TensorShapeBase" = type { %"class.dali::SmallVector.68" }
%"class.dali::SmallVector.68" = type { %union.anon.71, i64 }
%union.anon.71 = type { %struct.anon.72, [32 x i8] }
%struct.anon.72 = type { ptr, i64 }
%"class.dali::DALIMeta" = type <{ %"class.dali::TensorLayout", %"class.std::__cxx11::basic_string", i8, [7 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.dali::CUDASharedEvent" = type { %"class.std::shared_ptr.52" }
%"class.dali::Tensor.73" = type { %"class.dali::Buffer.base.75", %"struct.dali::TensorShape", %"class.dali::DALIMeta", %"class.dali::CUDASharedEvent" }
%"class.dali::Buffer.base.75" = type <{ ptr, %"class.dali::TypeInfo", %"class.std::shared_ptr.52", %"class.std::function.55", i64, i64, i32, [4 x i8], %"class.dali::AccessOrder", i8, i8 }>
%"struct.dali::TensorShape.76" = type { %"struct.dali::TensorShapeBase.77" }
%"struct.dali::TensorShapeBase.77" = type { %"class.dali::DeviceArray" }
%"class.dali::DeviceArray" = type { [1 x i64] }

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4dali10LayoutToTLERNS_10TensorListINS_10GPUBackendEEERKNS_9WorkspaceE(ptr noundef nonnull align 8 dereferenceable(304) %0, ptr noundef nonnull align 8 dereferenceable(664) %1) #1 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.dali::TensorLayout", align 1
  %6 = alloca %"class.dali::Tensor", align 8
  %7 = alloca %"class.dali::Tensor.73", align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"struct.dali::TensorShape", align 8
  %11 = alloca %"struct.dali::TensorShape.76", align 8
  %12 = alloca %"class.dali::AccessOrder", align 8
  %13 = alloca { ptr, i32 }, align 8
  %14 = alloca %"class.dali::AccessOrder", align 8
  %15 = alloca { ptr, i32 }, align 8
  %16 = alloca %"class.dali::AccessOrder", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #7
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = call { i64, i64 } @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE14GetInputLayoutEi(ptr noundef nonnull align 8 dereferenceable(664) %17, i32 noundef 0)
  %19 = getelementptr inbounds %"class.dali::TensorLayout", ptr %5, i32 0, i32 0
  %20 = getelementptr inbounds { i64, i64 }, ptr %19, i32 0, i32 0
  %21 = extractvalue { i64, i64 } %18, 0
  store i64 %21, ptr %20, align 1
  %22 = getelementptr inbounds { i64, i64 }, ptr %19, i32 0, i32 1
  %23 = extractvalue { i64, i64 } %18, 1
  store i64 %23, ptr %22, align 1
  call void @llvm.lifetime.start.p0(i64 272, ptr %6) #7
  call void @_ZN4dali6TensorINS_10CPUBackendEEC2Ev(ptr noundef nonnull align 8 dereferenceable(272) %6)
  call void @llvm.lifetime.start.p0(i64 272, ptr %7) #7
  invoke void @_ZN4dali6TensorINS_10GPUBackendEEC2Ev(ptr noundef nonnull align 8 dereferenceable(272) %7)
          to label %24 unwind label %61

24:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 56, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %25 = call noundef zeroext i8 @_ZNK4dali12TensorLayout4sizeEv(ptr noundef nonnull align 1 dereferenceable(16) %5) #7
  %26 = zext i8 %25 to i64
  invoke void @_ZN4dali11TensorShapeILi1EEC2IJEEElDpT_(ptr noundef nonnull align 8 dereferenceable(8) %11, i64 noundef %26)
          to label %27 unwind label %65

27:                                               ; preds = %24
  invoke void @_ZN4dali11TensorShapeILin1EEC2ILi1EEERKNS0_IXT_EEE(ptr noundef nonnull align 8 dereferenceable(56) %10, ptr noundef nonnull align 8 dereferenceable(8) %11)
          to label %28 unwind label %65

28:                                               ; preds = %27
  invoke void @_ZN4dali6TensorINS_10CPUBackendEE6ResizeERKNS_11TensorShapeILin1EEE13_DALIDataType(ptr noundef nonnull align 8 dereferenceable(272) %6, ptr noundef nonnull align 8 dereferenceable(56) %10, i32 noundef 0)
          to label %29 unwind label %69

29:                                               ; preds = %28
  call void @_ZN4dali15TensorShapeBaseINS_11SmallVectorIlLm6ESaIlEEELin1EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %10) #7
  %30 = invoke noundef ptr @_ZN4dali6BufferINS_10CPUBackendEE16raw_mutable_dataEv(ptr noundef nonnull align 8 dereferenceable(138) %6)
          to label %31 unwind label %74

31:                                               ; preds = %29
  %32 = call noundef ptr @_ZNK4dali12TensorLayout4dataEv(ptr noundef nonnull align 1 dereferenceable(16) %5) #7
  %33 = call noundef zeroext i8 @_ZNK4dali12TensorLayout4sizeEv(ptr noundef nonnull align 1 dereferenceable(16) %5) #7
  %34 = zext i8 %33 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %30, ptr align 1 %32, i64 %34, i1 false)
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = invoke { ptr, i32 } @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE12output_orderEv(ptr noundef nonnull align 8 dereferenceable(664) %35)
          to label %37 unwind label %74

37:                                               ; preds = %31
  store { ptr, i32 } %36, ptr %13, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %12, ptr align 8 %13, i64 12, i1 false)
  %38 = getelementptr inbounds { ptr, i32 }, ptr %12, i32 0, i32 0
  %39 = load ptr, ptr %38, align 8
  %40 = getelementptr inbounds { ptr, i32 }, ptr %12, i32 0, i32 1
  %41 = load i32, ptr %40, align 8
  invoke void @_ZN4dali6BufferINS_10CPUBackendEE9set_orderENS_11AccessOrderEb(ptr noundef nonnull align 8 dereferenceable(138) %6, ptr %39, i32 %41, i1 noundef zeroext true)
          to label %42 unwind label %74

42:                                               ; preds = %37
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = invoke { ptr, i32 } @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE12output_orderEv(ptr noundef nonnull align 8 dereferenceable(664) %43)
          to label %45 unwind label %74

45:                                               ; preds = %42
  store { ptr, i32 } %44, ptr %15, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %14, ptr align 8 %15, i64 12, i1 false)
  %46 = getelementptr inbounds { ptr, i32 }, ptr %14, i32 0, i32 0
  %47 = load ptr, ptr %46, align 8
  %48 = getelementptr inbounds { ptr, i32 }, ptr %14, i32 0, i32 1
  %49 = load i32, ptr %48, align 8
  invoke void @_ZN4dali6BufferINS_10GPUBackendEE9set_orderENS_11AccessOrderEb(ptr noundef nonnull align 8 dereferenceable(138) %7, ptr %47, i32 %49, i1 noundef zeroext true)
          to label %50 unwind label %74

50:                                               ; preds = %45
  call void @llvm.memset.p0.i64(ptr align 8 %16, i8 0, i64 16, i1 false)
  call void @_ZN4dali11AccessOrderC2Ev(ptr noundef nonnull align 8 dereferenceable(12) %16) #7
  %51 = getelementptr inbounds { ptr, i32 }, ptr %16, i32 0, i32 0
  %52 = load ptr, ptr %51, align 8
  %53 = getelementptr inbounds { ptr, i32 }, ptr %16, i32 0, i32 1
  %54 = load i32, ptr %53, align 8
  invoke void @_ZN4dali6TensorINS_10GPUBackendEE4CopyINS_10CPUBackendEEEvRKNS0_IT_EENS_11AccessOrderE(ptr noundef nonnull align 8 dereferenceable(272) %7, ptr noundef nonnull align 8 dereferenceable(272) %6, ptr %52, i32 %54)
          to label %55 unwind label %74

55:                                               ; preds = %50
  %56 = load ptr, ptr %3, align 8, !tbaa !5
  %57 = load ptr, ptr %4, align 8, !tbaa !5
  %58 = invoke noundef i32 @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE17GetInputBatchSizeEi(ptr noundef nonnull align 8 dereferenceable(664) %57, i32 noundef 0)
          to label %59 unwind label %74

59:                                               ; preds = %55
  invoke void @_ZN4dali12RepeatTensorINS_10GPUBackendEEEvRNS_10TensorListIT_EERKNS_6TensorIS3_EEi(ptr noundef nonnull align 8 dereferenceable(304) %56, ptr noundef nonnull align 8 dereferenceable(272) %7, i32 noundef %58)
          to label %60 unwind label %74

60:                                               ; preds = %59
  call void @_ZN4dali6TensorINS_10GPUBackendEED2Ev(ptr noundef nonnull align 8 dereferenceable(272) %7) #7
  call void @llvm.lifetime.end.p0(i64 272, ptr %7) #7
  call void @_ZN4dali6TensorINS_10CPUBackendEED2Ev(ptr noundef nonnull align 8 dereferenceable(272) %6) #7
  call void @llvm.lifetime.end.p0(i64 272, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #7
  ret void

61:                                               ; preds = %2
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %8, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %9, align 4
  br label %79

65:                                               ; preds = %27, %24
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %8, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %9, align 4
  br label %73

69:                                               ; preds = %28
  %70 = landingpad { ptr, i32 }
          cleanup
  %71 = extractvalue { ptr, i32 } %70, 0
  store ptr %71, ptr %8, align 8
  %72 = extractvalue { ptr, i32 } %70, 1
  store i32 %72, ptr %9, align 4
  call void @_ZN4dali15TensorShapeBaseINS_11SmallVectorIlLm6ESaIlEEELin1EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %10) #7
  br label %73

73:                                               ; preds = %69, %65
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %10) #7
  br label %78

74:                                               ; preds = %59, %55, %50, %45, %42, %37, %31, %29
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %8, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %9, align 4
  br label %78

78:                                               ; preds = %74, %73
  call void @_ZN4dali6TensorINS_10GPUBackendEED2Ev(ptr noundef nonnull align 8 dereferenceable(272) %7) #7
  br label %79

79:                                               ; preds = %78, %61
  call void @llvm.lifetime.end.p0(i64 272, ptr %7) #7
  call void @_ZN4dali6TensorINS_10CPUBackendEED2Ev(ptr noundef nonnull align 8 dereferenceable(272) %6) #7
  call void @llvm.lifetime.end.p0(i64 272, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #7
  br label %80

80:                                               ; preds = %79
  %81 = load ptr, ptr %8, align 8
  %82 = load i32, ptr %9, align 4
  %83 = insertvalue { ptr, i32 } poison, ptr %81, 0
  %84 = insertvalue { ptr, i32 } %83, i32 %82, 1
  resume { ptr, i32 } %84
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4dali6TensorINS_10CPUBackendEE6ResizeERKNS_11TensorShapeILin1EEE13_DALIDataType(ptr noundef nonnull align 8 dereferenceable(272), ptr noundef nonnull align 8 dereferenceable(56), i32 noundef) #4 align 2

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

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

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

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

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

; 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: mustprogress uwtable
declare dso_local void @_ZN4dali6BufferINS_10GPUBackendEE9set_orderENS_11AccessOrderEb(ptr noundef nonnull align 8 dereferenceable(138), ptr, i32, i1 noundef zeroext) #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4dali6TensorINS_10GPUBackendEE4CopyINS_10CPUBackendEEEvRKNS0_IT_EENS_11AccessOrderE(ptr noundef nonnull align 8 dereferenceable(272), ptr noundef nonnull align 8 dereferenceable(272), ptr, i32) #4 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4dali12RepeatTensorINS_10GPUBackendEEEvRNS_10TensorListIT_EERKNS_6TensorIS3_EEi(ptr noundef nonnull align 8 dereferenceable(304), ptr noundef nonnull align 8 dereferenceable(272), i32 noundef) #1

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4dali6TensorINS_10CPUBackendEED2Ev(ptr noundef nonnull align 8 dereferenceable(272)) unnamed_addr #5 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { 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"}


; 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::TensorLayout" = type { [16 x i8] }
%"class.dali::Tensor" = type { %"class.dali::Buffer.base", %"struct.dali::TensorShape", %"class.dali::DALIMeta", %"class.dali::CUDASharedEvent" }
%"class.dali::Buffer.base" = type <{ ptr, %"class.dali::TypeInfo", %"class.std::shared_ptr.52", %"class.std::function.55", i64, i64, i32, [4 x i8], %"class.dali::AccessOrder", i8, i8 }>
%"class.dali::TypeInfo" = type { ptr, i32, i64, %"class.std::basic_string_view" }
%"class.std::basic_string_view" = type { i64, ptr }
%"class.std::shared_ptr.52" = type { %"class.std::__shared_ptr.53" }
%"class.std::__shared_ptr.53" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::function.55" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%"class.dali::AccessOrder" = type <{ ptr, i32, [4 x i8] }>
%"struct.dali::TensorShape" = type { %"struct.dali::TensorShapeBase" }
%"struct.dali::TensorShapeBase" = type { %"class.dali::SmallVector.68" }
%"class.dali::SmallVector.68" = type { %union.anon.71, i64 }
%union.anon.71 = type { %struct.anon.72, [32 x i8] }
%struct.anon.72 = type { ptr, i64 }
%"class.dali::DALIMeta" = type <{ %"class.dali::TensorLayout", %"class.std::__cxx11::basic_string", i8, [7 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.dali::CUDASharedEvent" = type { %"class.std::shared_ptr.52" }
%"class.dali::Tensor.73" = type { %"class.dali::Buffer.base.75", %"struct.dali::TensorShape", %"class.dali::DALIMeta", %"class.dali::CUDASharedEvent" }
%"class.dali::Buffer.base.75" = type <{ ptr, %"class.dali::TypeInfo", %"class.std::shared_ptr.52", %"class.std::function.55", i64, i64, i32, [4 x i8], %"class.dali::AccessOrder", i8, i8 }>
%"struct.dali::TensorShape.76" = type { %"struct.dali::TensorShapeBase.77" }
%"struct.dali::TensorShapeBase.77" = type { %"class.dali::DeviceArray" }
%"class.dali::DeviceArray" = type { [1 x i64] }

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

; Function Attrs: mustprogress 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) #3

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4dali10LayoutToTLERNS_10TensorListINS_10GPUBackendEEERKNS_9WorkspaceE(ptr noundef nonnull align 8 dereferenceable(304) %0, ptr noundef nonnull align 8 dereferenceable(664) %1) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.dali::TensorLayout", align 8
  %4 = alloca %"class.dali::Tensor", align 8
  %5 = alloca %"class.dali::Tensor.73", align 8
  %6 = alloca %"struct.dali::TensorShape", align 8
  %7 = alloca %"struct.dali::TensorShape.76", align 8
  %8 = alloca %"class.dali::AccessOrder", align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #7
  %9 = tail call { i64, i64 } @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE14GetInputLayoutEi(ptr noundef nonnull align 8 dereferenceable(664) %1, i32 noundef 0)
  %10 = extractvalue { i64, i64 } %9, 0
  store i64 %10, ptr %3, align 8
  %11 = getelementptr inbounds i8, ptr %3, i64 8
  %12 = extractvalue { i64, i64 } %9, 1
  store i64 %12, ptr %11, align 8
  call void @llvm.lifetime.start.p0(i64 272, ptr nonnull %4) #7
  call void @_ZN4dali6TensorINS_10CPUBackendEEC2Ev(ptr noundef nonnull align 8 dereferenceable(272) %4)
  call void @llvm.lifetime.start.p0(i64 272, ptr nonnull %5) #7
  invoke void @_ZN4dali6TensorINS_10GPUBackendEEC2Ev(ptr noundef nonnull align 8 dereferenceable(272) %5)
          to label %13 unwind label %34

13:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %14 = call noundef zeroext i8 @_ZNK4dali12TensorLayout4sizeEv(ptr noundef nonnull align 1 dereferenceable(16) %3) #7
  %15 = zext i8 %14 to i64
  invoke void @_ZN4dali11TensorShapeILi1EEC2IJEEElDpT_(ptr noundef nonnull align 8 dereferenceable(8) %7, i64 noundef %15)
          to label %16 unwind label %36

16:                                               ; preds = %13
  invoke void @_ZN4dali11TensorShapeILin1EEC2ILi1EEERKNS0_IXT_EEE(ptr noundef nonnull align 8 dereferenceable(56) %6, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %17 unwind label %36

17:                                               ; preds = %16
  invoke void @_ZN4dali6TensorINS_10CPUBackendEE6ResizeERKNS_11TensorShapeILin1EEE13_DALIDataType(ptr noundef nonnull align 8 dereferenceable(272) %4, ptr noundef nonnull align 8 dereferenceable(56) %6, i32 noundef 0)
          to label %18 unwind label %38

18:                                               ; preds = %17
  call void @_ZN4dali15TensorShapeBaseINS_11SmallVectorIlLm6ESaIlEEELin1EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %6) #7
  %19 = call noundef ptr @_ZN4dali6BufferINS_10CPUBackendEE16raw_mutable_dataEv(ptr noundef nonnull align 8 dereferenceable(138) %4)
  %20 = call noundef ptr @_ZNK4dali12TensorLayout4dataEv(ptr noundef nonnull align 1 dereferenceable(16) %3) #7
  %21 = call noundef zeroext i8 @_ZNK4dali12TensorLayout4sizeEv(ptr noundef nonnull align 1 dereferenceable(16) %3) #7
  %22 = zext i8 %21 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %19, ptr align 1 %20, i64 %22, i1 false)
  %23 = call { ptr, i32 } @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE12output_orderEv(ptr noundef nonnull align 8 dereferenceable(664) %1)
  %.fca.0.extract3 = extractvalue { ptr, i32 } %23, 0
  %.fca.1.extract4 = extractvalue { ptr, i32 } %23, 1
  invoke void @_ZN4dali6BufferINS_10CPUBackendEE9set_orderENS_11AccessOrderEb(ptr noundef nonnull align 8 dereferenceable(138) %4, ptr %.fca.0.extract3, i32 %.fca.1.extract4, i1 noundef zeroext true)
          to label %24 unwind label %41

24:                                               ; preds = %18
  %25 = call { ptr, i32 } @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE12output_orderEv(ptr noundef nonnull align 8 dereferenceable(664) %1)
  %.fca.0.extract = extractvalue { ptr, i32 } %25, 0
  %.fca.1.extract = extractvalue { ptr, i32 } %25, 1
  invoke void @_ZN4dali6BufferINS_10GPUBackendEE9set_orderENS_11AccessOrderEb(ptr noundef nonnull align 8 dereferenceable(138) %5, ptr %.fca.0.extract, i32 %.fca.1.extract, i1 noundef zeroext true)
          to label %26 unwind label %41

26:                                               ; preds = %24
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %8, i8 0, i64 16, i1 false)
  call void @_ZN4dali11AccessOrderC2Ev(ptr noundef nonnull align 8 dereferenceable(12) %8) #7
  %27 = load ptr, ptr %8, align 8
  %28 = getelementptr inbounds i8, ptr %8, i64 8
  %29 = load i32, ptr %28, align 8
  invoke void @_ZN4dali6TensorINS_10GPUBackendEE4CopyINS_10CPUBackendEEEvRKNS0_IT_EENS_11AccessOrderE(ptr noundef nonnull align 8 dereferenceable(272) %5, ptr noundef nonnull align 8 dereferenceable(272) %4, ptr %27, i32 %29)
          to label %30 unwind label %41

30:                                               ; preds = %26
  %31 = invoke noundef i32 @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE17GetInputBatchSizeEi(ptr noundef nonnull align 8 dereferenceable(664) %1, i32 noundef 0)
          to label %32 unwind label %41

32:                                               ; preds = %30
  invoke void @_ZN4dali12RepeatTensorINS_10GPUBackendEEEvRNS_10TensorListIT_EERKNS_6TensorIS3_EEi(ptr noundef nonnull align 8 dereferenceable(304) %0, ptr noundef nonnull align 8 dereferenceable(272) %5, i32 noundef %31)
          to label %33 unwind label %41

33:                                               ; preds = %32
  call void @_ZN4dali6TensorINS_10GPUBackendEED2Ev(ptr noundef nonnull align 8 dereferenceable(272) %5) #7
  call void @llvm.lifetime.end.p0(i64 272, ptr nonnull %5) #7
  call void @_ZN4dali6TensorINS_10CPUBackendEED2Ev(ptr noundef nonnull align 8 dereferenceable(272) %4) #7
  call void @llvm.lifetime.end.p0(i64 272, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #7
  ret void

34:                                               ; preds = %2
  %35 = landingpad { ptr, i32 }
          cleanup
  br label %44

36:                                               ; preds = %16, %13
  %37 = landingpad { ptr, i32 }
          cleanup
  br label %40

38:                                               ; preds = %17
  %39 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4dali15TensorShapeBaseINS_11SmallVectorIlLm6ESaIlEEELin1EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %6) #7
  br label %40

40:                                               ; preds = %38, %36
  %.pn = phi { ptr, i32 } [ %39, %38 ], [ %37, %36 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %6) #7
  br label %43

41:                                               ; preds = %32, %30, %26, %24, %18
  %42 = landingpad { ptr, i32 }
          cleanup
  br label %43

43:                                               ; preds = %41, %40
  %.pn18 = phi { ptr, i32 } [ %42, %41 ], [ %.pn, %40 ]
  call void @_ZN4dali6TensorINS_10GPUBackendEED2Ev(ptr noundef nonnull align 8 dereferenceable(272) %5) #7
  br label %44

44:                                               ; preds = %43, %34
  %.pn18.pn = phi { ptr, i32 } [ %.pn18, %43 ], [ %35, %34 ]
  call void @llvm.lifetime.end.p0(i64 272, ptr nonnull %5) #7
  call void @_ZN4dali6TensorINS_10CPUBackendEED2Ev(ptr noundef nonnull align 8 dereferenceable(272) %4) #7
  call void @llvm.lifetime.end.p0(i64 272, ptr nonnull %4) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #7
  resume { ptr, i32 } %.pn18.pn
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4dali6TensorINS_10CPUBackendEE6ResizeERKNS_11TensorShapeILin1EEE13_DALIDataType(ptr noundef nonnull align 8 dereferenceable(272), ptr noundef nonnull align 8 dereferenceable(56), i32 noundef) local_unnamed_addr #4 align 2

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZN4dali6BufferINS_10CPUBackendEE16raw_mutable_dataEv(ptr noundef nonnull align 8 dereferenceable(138)) local_unnamed_addr #5 align 2

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

; 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 uwtable
declare dso_local void @_ZN4dali6BufferINS_10GPUBackendEE9set_orderENS_11AccessOrderEb(ptr noundef nonnull align 8 dereferenceable(138), ptr, i32, i1 noundef zeroext) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4dali6TensorINS_10GPUBackendEE4CopyINS_10CPUBackendEEEvRKNS0_IT_EENS_11AccessOrderE(ptr noundef nonnull align 8 dereferenceable(272), ptr noundef nonnull align 8 dereferenceable(272), ptr, i32) local_unnamed_addr #4 align 2

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4dali12RepeatTensorINS_10GPUBackendEEEvRNS_10TensorListIT_EERKNS_6TensorIS3_EEi(ptr noundef nonnull align 8 dereferenceable(304), ptr noundef nonnull align 8 dereferenceable(272), i32 noundef) local_unnamed_addr #1

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN4dali6TensorINS_10CPUBackendEED2Ev(ptr noundef nonnull align 8 dereferenceable(272)) unnamed_addr #5 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #6 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { 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)"}


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