; LLVM IR from NVIDIA/DALI :: dali/util/numpy.ll (ZN4dali5numpy10ReadTensorEPNS_11InputStreamEb)

; 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::__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::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.60", %"class.std::function", 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.60" = type { %"class.std::__shared_ptr.61" }
%"class.std::__shared_ptr.61" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::function" = 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" }
%"class.dali::SmallVector" = type { %union.anon.1, i64 }
%union.anon.1 = type { %struct.anon, [32 x i8] }
%struct.anon = type { ptr, i64 }
%"class.dali::DALIMeta" = type <{ %"class.dali::TensorLayout", %"class.std::__cxx11::basic_string", i8, [7 x i8] }>
%"class.dali::TensorLayout" = type { [16 x i8] }
%"class.dali::CUDASharedEvent" = type { %"class.std::shared_ptr.60" }
%"class.dali::numpy::HeaderData" = type { %"struct.dali::TensorShape", ptr, i8, i64 }
%"class.std::allocator" = type { i8 }
%"class.dali::SampleView" = type { %"class.dali::SampleViewBase.base", [4 x i8] }
%"class.dali::SampleViewBase.base" = type <{ ptr, %"struct.dali::TensorShape", i32 }>
%"class.dali::ConstSampleView" = type { %"class.dali::SampleViewBase.base.8", [4 x i8] }
%"class.dali::SampleViewBase.base.8" = type <{ ptr, %"struct.dali::TensorShape", i32 }>

@_ZTIN4dali13DALIExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.14 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.65 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.66 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.67 = external hidden unnamed_addr constant [71 x i8], align 1

declare ptr @__cxa_allocate_exception(i64)

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

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4dali13GetStacktraceB5cxx11Ev(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8) #3

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

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

declare void @__cxa_throw(ptr, ptr, ptr)

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

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

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

declare void @__cxa_free_exception(ptr)

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) #3

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4dali5numpy11ParseHeaderERNS0_10HeaderDataEPNS_11InputStreamE(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4dali5numpy16FromFortranOrderENS_10SampleViewINS_10CPUBackendEEENS_15ConstSampleViewIS2_EE(ptr noundef, ptr noundef) #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4dali10SampleViewINS_10CPUBackendEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(68), ptr noundef nonnull align 8 dereferenceable(68)) unnamed_addr #3 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4dali5numpy10ReadTensorEPNS_11InputStreamEb(ptr dead_on_unwind noalias writable sret(%"class.dali::Tensor") align 8 %0, ptr noundef %1, i1 noundef zeroext %2) #1 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i8, align 1
  %7 = alloca %"class.dali::numpy::HeaderData", align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca %"class.dali::Tensor", align 8
  %11 = alloca i64, align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca %"class.std::allocator", align 1
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca %"class.std::allocator", align 1
  %18 = alloca %"class.std::__cxx11::basic_string", align 8
  %19 = alloca %"class.std::__cxx11::basic_string", align 8
  %20 = alloca %"class.std::__cxx11::basic_string", align 8
  %21 = alloca %"class.std::allocator", align 1
  %22 = alloca %"class.std::__cxx11::basic_string", align 8
  %23 = alloca i1, align 1
  %24 = alloca i1, align 1
  %25 = alloca %"class.dali::SampleView", align 8
  %26 = alloca %"struct.dali::TensorShape", align 8
  %27 = alloca %"class.dali::SampleView", align 8
  %28 = alloca %"struct.dali::TensorShape", align 8
  %29 = alloca %"class.dali::SampleView", align 8
  %30 = alloca %"class.dali::ConstSampleView", align 8
  %31 = alloca i32, align 4
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  %32 = zext i1 %2 to i8
  store i8 %32, ptr %6, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 80, ptr %7) #5
  call void @_ZN4dali5numpy10HeaderDataC2Ev(ptr noundef nonnull align 8 dereferenceable(80) %7)
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  invoke void @_ZN4dali5numpy11ParseHeaderERNS0_10HeaderDataEPNS_11InputStreamE(ptr noundef nonnull align 8 dereferenceable(80) %7, ptr noundef %33)
          to label %34 unwind label %78

34:                                               ; preds = %3
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = getelementptr inbounds %"class.dali::numpy::HeaderData", ptr %7, i32 0, i32 3
  %37 = load i64, ptr %36, align 8, !tbaa !11
  %38 = load ptr, ptr %35, align 8, !tbaa !17
  %39 = getelementptr inbounds ptr, ptr %38, i64 3
  %40 = load ptr, ptr %39, align 8
  invoke void %40(ptr noundef nonnull align 8 dereferenceable(8) %35, i64 noundef %37, i32 noundef 0)
          to label %41 unwind label %78

41:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 272, ptr %10) #5
  invoke void @_ZN4dali6TensorINS_10CPUBackendEEC2Ev(ptr noundef nonnull align 8 dereferenceable(272) %10)
          to label %42 unwind label %82

42:                                               ; preds = %41
  %43 = load i8, ptr %6, align 1, !tbaa !9, !range !19, !noundef !20
  %44 = trunc i8 %43 to i1
  invoke void @_ZN4dali6BufferINS_10CPUBackendEE10set_pinnedEb(ptr noundef nonnull align 8 dereferenceable(138) %10, i1 noundef zeroext %44)
          to label %45 unwind label %86

45:                                               ; preds = %42
  %46 = getelementptr inbounds %"class.dali::numpy::HeaderData", ptr %7, i32 0, i32 0
  %47 = invoke noundef i32 @_ZNK4dali5numpy10HeaderData4typeEv(ptr noundef nonnull align 8 dereferenceable(80) %7)
          to label %48 unwind label %86

48:                                               ; preds = %45
  invoke void @_ZN4dali6TensorINS_10CPUBackendEE6ResizeERKNS_11TensorShapeILin1EEE13_DALIDataType(ptr noundef nonnull align 8 dereferenceable(272) %10, ptr noundef nonnull align 8 dereferenceable(56) %46, i32 noundef %47)
          to label %49 unwind label %86

49:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = invoke noundef ptr @_ZN4dali6BufferINS_10CPUBackendEE16raw_mutable_dataEv(ptr noundef nonnull align 8 dereferenceable(138) %10)
          to label %52 unwind label %90

52:                                               ; preds = %49
  %53 = invoke noundef i64 @_ZNK4dali5numpy10HeaderData6nbytesEv(ptr noundef nonnull align 8 dereferenceable(80) %7)
          to label %54 unwind label %90

54:                                               ; preds = %52
  %55 = load ptr, ptr %50, align 8, !tbaa !17
  %56 = getelementptr inbounds ptr, ptr %55, i64 2
  %57 = load ptr, ptr %56, align 8
  %58 = invoke noundef i64 %57(ptr noundef nonnull align 8 dereferenceable(8) %50, ptr noundef %51, i64 noundef %53)
          to label %59 unwind label %90

59:                                               ; preds = %54
  store i64 %58, ptr %11, align 8, !tbaa !21
  br label %60

60:                                               ; preds = %59
  %61 = load i64, ptr %11, align 8, !tbaa !21
  %62 = invoke noundef i64 @_ZNK4dali5numpy10HeaderData6nbytesEv(ptr noundef nonnull align 8 dereferenceable(80) %7)
          to label %63 unwind label %90

63:                                               ; preds = %60
  %64 = icmp eq i64 %61, %62
  br i1 %64, label %146, label %65

65:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %15) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef @.str.14, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %66 unwind label %94

66:                                               ; preds = %65
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %13, ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef @.str.65)
          to label %67 unwind label %98

67:                                               ; preds = %66
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %12, ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef @.str.16)
          to label %68 unwind label %102

68:                                               ; preds = %67
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %16, ptr noundef @.str.66, ptr noundef nonnull align 1 dereferenceable(1) %17)
          to label %69 unwind label %108

69:                                               ; preds = %68
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #5
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %18, ptr noundef @.str.19, ptr noundef nonnull align 8 dereferenceable(32) %16)
          to label %70 unwind label %112

70:                                               ; preds = %69
  %71 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull align 8 dereferenceable(32) %18)
          to label %72 unwind label %116

72:                                               ; preds = %70
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #5
  store i1 true, ptr %23, align 1
  %73 = call ptr @__cxa_allocate_exception(i64 80) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %19) #5
  invoke void @_ZN4dali11make_stringIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEES6_DpRKT_(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %19, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %74 unwind label %121

74:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 1, ptr %21) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %20, ptr noundef @.str.67, ptr noundef nonnull align 1 dereferenceable(1) %21)
          to label %75 unwind label %125

75:                                               ; preds = %74
  call void @llvm.lifetime.start.p0(i64 32, ptr %22) #5
  invoke void @_ZN4dali13GetStacktraceB5cxx11Ev(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %22)
          to label %76 unwind label %129

76:                                               ; preds = %75
  invoke void @_ZN4dali13DALIExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_S8_(ptr noundef nonnull align 8 dereferenceable(80) %73, ptr noundef nonnull align 8 dereferenceable(32) %19, ptr noundef %20, ptr noundef nonnull align 8 dereferenceable(32) %22)
          to label %77 unwind label %133

77:                                               ; preds = %76
  store i1 false, ptr %23, align 1
  invoke void @__cxa_throw(ptr %73, ptr @_ZTIN4dali13DALIExceptionE, ptr @_ZN4dali13DALIExceptionD2Ev) #6
          to label %229 unwind label %133

78:                                               ; preds = %34, %3
  %79 = landingpad { ptr, i32 }
          cleanup
  %80 = extractvalue { ptr, i32 } %79, 0
  store ptr %80, ptr %8, align 8
  %81 = extractvalue { ptr, i32 } %79, 1
  store i32 %81, ptr %9, align 4
  br label %223

82:                                               ; preds = %41
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %8, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %9, align 4
  br label %222

86:                                               ; preds = %48, %45, %42
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %8, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %9, align 4
  br label %221

90:                                               ; preds = %152, %60, %54, %52, %49
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %8, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %9, align 4
  br label %220

94:                                               ; preds = %65
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %8, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %9, align 4
  br label %107

98:                                               ; preds = %66
  %99 = landingpad { ptr, i32 }
          cleanup
  %100 = extractvalue { ptr, i32 } %99, 0
  store ptr %100, ptr %8, align 8
  %101 = extractvalue { ptr, i32 } %99, 1
  store i32 %101, ptr %9, align 4
  br label %106

102:                                              ; preds = %67
  %103 = landingpad { ptr, i32 }
          cleanup
  %104 = extractvalue { ptr, i32 } %103, 0
  store ptr %104, ptr %8, align 8
  %105 = extractvalue { ptr, i32 } %103, 1
  store i32 %105, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #5
  br label %106

106:                                              ; preds = %102, %98
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #5
  br label %107

107:                                              ; preds = %106, %94
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %13) #5
  br label %145

108:                                              ; preds = %68
  %109 = landingpad { ptr, i32 }
          cleanup
  %110 = extractvalue { ptr, i32 } %109, 0
  store ptr %110, ptr %8, align 8
  %111 = extractvalue { ptr, i32 } %109, 1
  store i32 %111, ptr %9, align 4
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %17) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #5
  br label %144

112:                                              ; preds = %69
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %8, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %9, align 4
  br label %120

116:                                              ; preds = %70
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %8, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %18) #5
  br label %120

120:                                              ; preds = %116, %112
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #5
  br label %143

121:                                              ; preds = %72
  %122 = landingpad { ptr, i32 }
          cleanup
  %123 = extractvalue { ptr, i32 } %122, 0
  store ptr %123, ptr %8, align 8
  %124 = extractvalue { ptr, i32 } %122, 1
  store i32 %124, ptr %9, align 4
  br label %139

125:                                              ; preds = %74
  %126 = landingpad { ptr, i32 }
          cleanup
  %127 = extractvalue { ptr, i32 } %126, 0
  store ptr %127, ptr %8, align 8
  %128 = extractvalue { ptr, i32 } %126, 1
  store i32 %128, ptr %9, align 4
  br label %138

129:                                              ; preds = %75
  %130 = landingpad { ptr, i32 }
          cleanup
  %131 = extractvalue { ptr, i32 } %130, 0
  store ptr %131, ptr %8, align 8
  %132 = extractvalue { ptr, i32 } %130, 1
  store i32 %132, ptr %9, align 4
  br label %137

133:                                              ; preds = %77, %76
  %134 = landingpad { ptr, i32 }
          cleanup
  %135 = extractvalue { ptr, i32 } %134, 0
  store ptr %135, ptr %8, align 8
  %136 = extractvalue { ptr, i32 } %134, 1
  store i32 %136, ptr %9, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #5
  br label %137

137:                                              ; preds = %133, %129
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %20) #5
  br label %138

138:                                              ; preds = %137, %125
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %21) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %21) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %19) #5
  br label %139

139:                                              ; preds = %138, %121
  call void @llvm.lifetime.end.p0(i64 32, ptr %19) #5
  %140 = load i1, ptr %23, align 1
  br i1 %140, label %141, label %142

141:                                              ; preds = %139
  call void @__cxa_free_exception(ptr %73) #5
  br label %142

142:                                              ; preds = %141, %139
  br label %143

143:                                              ; preds = %142, %120
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #5
  br label %144

144:                                              ; preds = %143, %108
  call void @llvm.lifetime.end.p0(i64 32, ptr %16) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #5
  br label %145

145:                                              ; preds = %144, %107
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #5
  br label %220

146:                                              ; preds = %63
  br label %147

147:                                              ; preds = %146
  br label %148

148:                                              ; preds = %147
  %149 = getelementptr inbounds %"class.dali::numpy::HeaderData", ptr %7, i32 0, i32 2
  %150 = load i8, ptr %149, align 8, !tbaa !22, !range !19, !noundef !20
  %151 = trunc i8 %150 to i1
  br i1 %151, label %152, label %218

152:                                              ; preds = %148
  store i1 false, ptr %24, align 1
  invoke void @_ZN4dali6TensorINS_10CPUBackendEEC2Ev(ptr noundef nonnull align 8 dereferenceable(272) %0)
          to label %153 unwind label %90

153:                                              ; preds = %152
  %154 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZNKR4dali6TensorINS_10CPUBackendEE5shapeEv(ptr noundef nonnull align 8 dereferenceable(272) %10)
          to label %155 unwind label %179

155:                                              ; preds = %153
  %156 = invoke noundef i32 @_ZNK4dali6BufferINS_10CPUBackendEE4typeEv(ptr noundef nonnull align 8 dereferenceable(138) %10)
          to label %157 unwind label %179

157:                                              ; preds = %155
  invoke void @_ZN4dali6TensorINS_10CPUBackendEE6ResizeERKNS_11TensorShapeILin1EEE13_DALIDataType(ptr noundef nonnull align 8 dereferenceable(272) %0, ptr noundef nonnull align 8 dereferenceable(56) %154, i32 noundef %156)
          to label %158 unwind label %179

158:                                              ; preds = %157
  call void @llvm.lifetime.start.p0(i64 72, ptr %25) #5
  %159 = invoke noundef ptr @_ZN4dali6BufferINS_10CPUBackendEE16raw_mutable_dataEv(ptr noundef nonnull align 8 dereferenceable(138) %10)
          to label %160 unwind label %183

160:                                              ; preds = %158
  %161 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZNKR4dali6TensorINS_10CPUBackendEE5shapeEv(ptr noundef nonnull align 8 dereferenceable(272) %10)
          to label %162 unwind label %183

162:                                              ; preds = %160
  invoke void @_ZN4dali11TensorShapeILin1EEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(56) %26, ptr noundef nonnull align 8 dereferenceable(56) %161)
          to label %163 unwind label %183

163:                                              ; preds = %162
  %164 = invoke noundef i32 @_ZNK4dali6BufferINS_10CPUBackendEE4typeEv(ptr noundef nonnull align 8 dereferenceable(138) %10)
          to label %165 unwind label %187

165:                                              ; preds = %163
  invoke void @_ZN4dali10SampleViewINS_10CPUBackendEECI2NS_14SampleViewBaseIS1_PvEEES4_NS_11TensorShapeILin1EEE13_DALIDataType(ptr noundef nonnull align 8 dereferenceable(68) %25, ptr noundef %159, ptr noundef %26, i32 noundef %164)
          to label %166 unwind label %187

166:                                              ; preds = %165
  call void @_ZN4dali15TensorShapeBaseINS_11SmallVectorIlLm6ESaIlEEELin1EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %26) #5
  call void @llvm.lifetime.start.p0(i64 72, ptr %27) #5
  %167 = invoke noundef ptr @_ZN4dali6BufferINS_10CPUBackendEE16raw_mutable_dataEv(ptr noundef nonnull align 8 dereferenceable(138) %0)
          to label %168 unwind label %191

168:                                              ; preds = %166
  %169 = invoke noundef nonnull align 8 dereferenceable(56) ptr @_ZNKR4dali6TensorINS_10CPUBackendEE5shapeEv(ptr noundef nonnull align 8 dereferenceable(272) %0)
          to label %170 unwind label %191

170:                                              ; preds = %168
  invoke void @_ZN4dali11TensorShapeILin1EEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(56) %28, ptr noundef nonnull align 8 dereferenceable(56) %169)
          to label %171 unwind label %191

171:                                              ; preds = %170
  %172 = invoke noundef i32 @_ZNK4dali6BufferINS_10CPUBackendEE4typeEv(ptr noundef nonnull align 8 dereferenceable(138) %0)
          to label %173 unwind label %195

173:                                              ; preds = %171
  invoke void @_ZN4dali10SampleViewINS_10CPUBackendEECI2NS_14SampleViewBaseIS1_PvEEES4_NS_11TensorShapeILin1EEE13_DALIDataType(ptr noundef nonnull align 8 dereferenceable(68) %27, ptr noundef %167, ptr noundef %28, i32 noundef %172)
          to label %174 unwind label %195

174:                                              ; preds = %173
  call void @_ZN4dali15TensorShapeBaseINS_11SmallVectorIlLm6ESaIlEEELin1EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %28) #5
  invoke void @_ZN4dali10SampleViewINS_10CPUBackendEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(68) %29, ptr noundef nonnull align 8 dereferenceable(68) %27)
          to label %175 unwind label %199

175:                                              ; preds = %174
  invoke void @_ZN4dali15ConstSampleViewINS_10CPUBackendEEC2ERKNS_10SampleViewIS1_EE(ptr noundef nonnull align 8 dereferenceable(68) %30, ptr noundef nonnull align 8 dereferenceable(68) %25)
          to label %176 unwind label %203

176:                                              ; preds = %175
  invoke void @_ZN4dali5numpy16FromFortranOrderENS_10SampleViewINS_10CPUBackendEEENS_15ConstSampleViewIS2_EE(ptr noundef %29, ptr noundef %30)
          to label %177 unwind label %207

177:                                              ; preds = %176
  call void @_ZN4dali14SampleViewBaseINS_10CPUBackendEPKvED2Ev(ptr noundef nonnull align 8 dereferenceable(68) %30) #5
  call void @_ZN4dali14SampleViewBaseINS_10CPUBackendEPvED2Ev(ptr noundef nonnull align 8 dereferenceable(68) %29) #5
  store i1 true, ptr %24, align 1
  store i32 1, ptr %31, align 4
  call void @_ZN4dali14SampleViewBaseINS_10CPUBackendEPvED2Ev(ptr noundef nonnull align 8 dereferenceable(68) %27) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr %27) #5
  call void @_ZN4dali14SampleViewBaseINS_10CPUBackendEPvED2Ev(ptr noundef nonnull align 8 dereferenceable(68) %25) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr %25) #5
  %178 = load i1, ptr %24, align 1
  br i1 %178, label %216, label %215

179:                                              ; preds = %157, %155, %153
  %180 = landingpad { ptr, i32 }
          cleanup
  %181 = extractvalue { ptr, i32 } %180, 0
  store ptr %181, ptr %8, align 8
  %182 = extractvalue { ptr, i32 } %180, 1
  store i32 %182, ptr %9, align 4
  br label %217

183:                                              ; preds = %162, %160, %158
  %184 = landingpad { ptr, i32 }
          cleanup
  %185 = extractvalue { ptr, i32 } %184, 0
  store ptr %185, ptr %8, align 8
  %186 = extractvalue { ptr, i32 } %184, 1
  store i32 %186, ptr %9, align 4
  br label %214

187:                                              ; preds = %165, %163
  %188 = landingpad { ptr, i32 }
          cleanup
  %189 = extractvalue { ptr, i32 } %188, 0
  store ptr %189, ptr %8, align 8
  %190 = extractvalue { ptr, i32 } %188, 1
  store i32 %190, ptr %9, align 4
  call void @_ZN4dali15TensorShapeBaseINS_11SmallVectorIlLm6ESaIlEEELin1EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %26) #5
  br label %214

191:                                              ; preds = %170, %168, %166
  %192 = landingpad { ptr, i32 }
          cleanup
  %193 = extractvalue { ptr, i32 } %192, 0
  store ptr %193, ptr %8, align 8
  %194 = extractvalue { ptr, i32 } %192, 1
  store i32 %194, ptr %9, align 4
  br label %213

195:                                              ; preds = %173, %171
  %196 = landingpad { ptr, i32 }
          cleanup
  %197 = extractvalue { ptr, i32 } %196, 0
  store ptr %197, ptr %8, align 8
  %198 = extractvalue { ptr, i32 } %196, 1
  store i32 %198, ptr %9, align 4
  call void @_ZN4dali15TensorShapeBaseINS_11SmallVectorIlLm6ESaIlEEELin1EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %28) #5
  br label %213

199:                                              ; preds = %174
  %200 = landingpad { ptr, i32 }
          cleanup
  %201 = extractvalue { ptr, i32 } %200, 0
  store ptr %201, ptr %8, align 8
  %202 = extractvalue { ptr, i32 } %200, 1
  store i32 %202, ptr %9, align 4
  br label %212

203:                                              ; preds = %175
  %204 = landingpad { ptr, i32 }
          cleanup
  %205 = extractvalue { ptr, i32 } %204, 0
  store ptr %205, ptr %8, align 8
  %206 = extractvalue { ptr, i32 } %204, 1
  store i32 %206, ptr %9, align 4
  br label %211

207:                                              ; preds = %176
  %208 = landingpad { ptr, i32 }
          cleanup
  %209 = extractvalue { ptr, i32 } %208, 0
  store ptr %209, ptr %8, align 8
  %210 = extractvalue { ptr, i32 } %208, 1
  store i32 %210, ptr %9, align 4
  call void @_ZN4dali14SampleViewBaseINS_10CPUBackendEPKvED2Ev(ptr noundef nonnull align 8 dereferenceable(68) %30) #5
  br label %211

211:                                              ; preds = %207, %203
  call void @_ZN4dali14SampleViewBaseINS_10CPUBackendEPvED2Ev(ptr noundef nonnull align 8 dereferenceable(68) %29) #5
  br label %212

212:                                              ; preds = %211, %199
  call void @_ZN4dali14SampleViewBaseINS_10CPUBackendEPvED2Ev(ptr noundef nonnull align 8 dereferenceable(68) %27) #5
  br label %213

213:                                              ; preds = %212, %195, %191
  call void @llvm.lifetime.end.p0(i64 72, ptr %27) #5
  call void @_ZN4dali14SampleViewBaseINS_10CPUBackendEPvED2Ev(ptr noundef nonnull align 8 dereferenceable(68) %25) #5
  br label %214

214:                                              ; preds = %213, %187, %183
  call void @llvm.lifetime.end.p0(i64 72, ptr %25) #5
  br label %217

215:                                              ; preds = %177
  call void @_ZN4dali6TensorINS_10CPUBackendEED2Ev(ptr noundef nonnull align 8 dereferenceable(272) %0) #5
  br label %216

216:                                              ; preds = %215, %177
  br label %219

217:                                              ; preds = %214, %179
  call void @_ZN4dali6TensorINS_10CPUBackendEED2Ev(ptr noundef nonnull align 8 dereferenceable(272) %0) #5
  br label %220

218:                                              ; preds = %148
  call void @_ZN4dali6TensorINS_10CPUBackendEEC2EOS2_(ptr noundef nonnull align 8 dereferenceable(272) %0, ptr noundef nonnull align 8 dereferenceable(272) %10) #5
  store i32 1, ptr %31, align 4
  br label %219

219:                                              ; preds = %218, %216
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @_ZN4dali6TensorINS_10CPUBackendEED2Ev(ptr noundef nonnull align 8 dereferenceable(272) %10) #5
  call void @llvm.lifetime.end.p0(i64 272, ptr %10) #5
  call void @_ZN4dali5numpy10HeaderDataD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %7) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr %7) #5
  ret void

220:                                              ; preds = %217, %145, %90
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  br label %221

221:                                              ; preds = %220, %86
  call void @_ZN4dali6TensorINS_10CPUBackendEED2Ev(ptr noundef nonnull align 8 dereferenceable(272) %10) #5
  br label %222

222:                                              ; preds = %221, %82
  call void @llvm.lifetime.end.p0(i64 272, ptr %10) #5
  br label %223

223:                                              ; preds = %222, %78
  call void @_ZN4dali5numpy10HeaderDataD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %7) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr %7) #5
  br label %224

224:                                              ; preds = %223
  %225 = load ptr, ptr %8, align 8
  %226 = load i32, ptr %9, align 4
  %227 = insertvalue { ptr, i32 } poison, ptr %225, 0
  %228 = insertvalue { ptr, i32 } %227, i32 %226, 1
  resume { ptr, i32 } %228

229:                                              ; preds = %77
  unreachable
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4dali6BufferINS_10CPUBackendEE10set_pinnedEb(ptr noundef nonnull align 8 dereferenceable(138), i1 noundef zeroext) #3 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) #3 align 2

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4dali10SampleViewINS_10CPUBackendEECI2NS_14SampleViewBaseIS1_PvEEES4_NS_11TensorShapeILin1EEE13_DALIDataType(ptr noundef nonnull align 8 dereferenceable(68), ptr noundef, ptr noundef, i32 noundef) unnamed_addr #3 align 2

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

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

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

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

!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 = !{!"bool", !7, i64 0}
!11 = !{!12, !16, i64 72}
!12 = !{!"_ZTSN4dali5numpy10HeaderDataE", !13, i64 0, !6, i64 56, !10, i64 64, !16, i64 72}
!13 = !{!"_ZTSN4dali11TensorShapeILin1EEE", !14, i64 0}
!14 = !{!"_ZTSN4dali15TensorShapeBaseINS_11SmallVectorIlLm6ESaIlEEELin1EEE", !15, i64 0}
!15 = !{!"_ZTSN4dali11SmallVectorIlLm6ESaIlEEE", !7, i64 0, !16, i64 48}
!16 = !{!"long", !7, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"vtable pointer", !8, i64 0}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{!16, !16, i64 0}
!22 = !{!12, !10, i64 64}


; 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::__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::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.60", %"class.std::function", 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.60" = type { %"class.std::__shared_ptr.61" }
%"class.std::__shared_ptr.61" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::function" = 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" }
%"class.dali::SmallVector" = type { %union.anon.1, i64 }
%union.anon.1 = type { %struct.anon, [32 x i8] }
%struct.anon = type { ptr, i64 }
%"class.dali::DALIMeta" = type <{ %"class.dali::TensorLayout", %"class.std::__cxx11::basic_string", i8, [7 x i8] }>
%"class.dali::TensorLayout" = type { [16 x i8] }
%"class.dali::CUDASharedEvent" = type { %"class.std::shared_ptr.60" }
%"class.dali::numpy::HeaderData" = type { %"struct.dali::TensorShape", ptr, i8, i64 }
%"class.std::allocator" = type { i8 }
%"class.dali::SampleView" = type { %"class.dali::SampleViewBase.base", [4 x i8] }
%"class.dali::SampleViewBase.base" = type <{ ptr, %"struct.dali::TensorShape", i32 }>
%"class.dali::ConstSampleView" = type { %"class.dali::SampleViewBase.base.8", [4 x i8] }
%"class.dali::SampleViewBase.base.8" = type <{ ptr, %"struct.dali::TensorShape", i32 }>

@_ZTIN4dali13DALIExceptionE = external dso_local constant { ptr, ptr, ptr }, align 8
@.str.14 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [3 x i8], align 1
@.str.65 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.66 = external hidden unnamed_addr constant [26 x i8], align 1
@.str.67 = external hidden unnamed_addr constant [71 x i8], align 1

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

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

; 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 nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

declare void @__cxa_free_exception(ptr) local_unnamed_addr

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind noalias writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef nonnull align 8 dereferenceable(32), ptr noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) local_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 #4 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4dali5numpy11ParseHeaderERNS0_10HeaderDataEPNS_11InputStreamE(ptr noundef nonnull align 8 dereferenceable(80), ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4dali5numpy16FromFortranOrderENS_10SampleViewINS_10CPUBackendEEENS_15ConstSampleViewIS2_EE(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4dali10SampleViewINS_10CPUBackendEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(68), ptr noundef nonnull align 8 dereferenceable(68)) unnamed_addr #3 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4dali5numpy10ReadTensorEPNS_11InputStreamEb(ptr dead_on_unwind noalias writable sret(%"class.dali::Tensor") align 8 %0, ptr noundef %1, i1 noundef zeroext %2) local_unnamed_addr #1 personality ptr @__gxx_personality_v0 {
  %4 = alloca %"class.dali::numpy::HeaderData", align 8
  %5 = alloca %"class.dali::Tensor", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca %"class.std::__cxx11::basic_string", align 8
  %9 = alloca %"class.std::allocator", align 1
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::allocator", align 1
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca %"class.std::__cxx11::basic_string", align 8
  %14 = alloca %"class.std::__cxx11::basic_string", align 8
  %15 = alloca %"class.std::allocator", align 1
  %16 = alloca %"class.std::__cxx11::basic_string", align 8
  %17 = alloca %"class.dali::SampleView", align 8
  %18 = alloca %"struct.dali::TensorShape", align 8
  %19 = alloca %"class.dali::SampleView", align 8
  %20 = alloca %"struct.dali::TensorShape", align 8
  %21 = alloca %"class.dali::SampleView", align 8
  %22 = alloca %"class.dali::ConstSampleView", align 8
  call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %4) #5
  call void @_ZN4dali5numpy10HeaderDataC2Ev(ptr noundef nonnull align 8 dereferenceable(80) %4)
  invoke void @_ZN4dali5numpy11ParseHeaderERNS0_10HeaderDataEPNS_11InputStreamE(ptr noundef nonnull align 8 dereferenceable(80) %4, ptr noundef %1)
          to label %23 unwind label %59

23:                                               ; preds = %3
  %24 = getelementptr inbounds i8, ptr %4, i64 72
  %25 = load i64, ptr %24, align 8, !tbaa !5
  %26 = load ptr, ptr %1, align 8, !tbaa !15
  %27 = getelementptr inbounds i8, ptr %26, i64 24
  %28 = load ptr, ptr %27, align 8
  invoke void %28(ptr noundef nonnull align 8 dereferenceable(8) %1, i64 noundef %25, i32 noundef 0)
          to label %29 unwind label %59

29:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 272, ptr nonnull %5) #5
  invoke void @_ZN4dali6TensorINS_10CPUBackendEEC2Ev(ptr noundef nonnull align 8 dereferenceable(272) %5)
          to label %30 unwind label %61

30:                                               ; preds = %29
  invoke void @_ZN4dali6BufferINS_10CPUBackendEE10set_pinnedEb(ptr noundef nonnull align 8 dereferenceable(138) %5, i1 noundef zeroext %2)
          to label %31 unwind label %63

31:                                               ; preds = %30
  %32 = invoke noundef i32 @_ZNK4dali5numpy10HeaderData4typeEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
          to label %33 unwind label %63

33:                                               ; preds = %31
  invoke void @_ZN4dali6TensorINS_10CPUBackendEE6ResizeERKNS_11TensorShapeILin1EEE13_DALIDataType(ptr noundef nonnull align 8 dereferenceable(272) %5, ptr noundef nonnull align 8 dereferenceable(56) %4, i32 noundef %32)
          to label %34 unwind label %63

34:                                               ; preds = %33
  %35 = call noundef ptr @_ZN4dali6BufferINS_10CPUBackendEE16raw_mutable_dataEv(ptr noundef nonnull align 8 dereferenceable(138) %5)
  %36 = invoke noundef i64 @_ZNK4dali5numpy10HeaderData6nbytesEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
          to label %37 unwind label %65

37:                                               ; preds = %34
  %38 = load ptr, ptr %1, align 8, !tbaa !15
  %39 = getelementptr inbounds i8, ptr %38, i64 16
  %40 = load ptr, ptr %39, align 8
  %41 = invoke noundef i64 %40(ptr noundef nonnull align 8 dereferenceable(8) %1, ptr noundef %35, i64 noundef %36)
          to label %42 unwind label %65

42:                                               ; preds = %37
  %43 = invoke noundef i64 @_ZNK4dali5numpy10HeaderData6nbytesEv(ptr noundef nonnull align 8 dereferenceable(80) %4)
          to label %44 unwind label %65

44:                                               ; preds = %42
  %45 = icmp eq i64 %41, %43
  br i1 %45, label %95, label %46

46:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %8) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %9) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull @.str.14, ptr noundef nonnull align 1 dereferenceable(1) %9)
          to label %47 unwind label %67

47:                                               ; preds = %46
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %7, ptr noundef nonnull align 8 dereferenceable(32) %8, ptr noundef nonnull @.str.65)
          to label %48 unwind label %69

48:                                               ; preds = %47
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %6, ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull @.str.16)
          to label %49 unwind label %71

49:                                               ; preds = %48
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #5
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull @.str.66, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %50 unwind label %75

50:                                               ; preds = %49
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %12) #5
  invoke void @_ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %12, ptr noundef nonnull @.str.19, ptr noundef nonnull align 8 dereferenceable(32) %10)
          to label %51 unwind label %77

51:                                               ; preds = %50
  %52 = invoke noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %53 unwind label %79

53:                                               ; preds = %51
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #5
  %54 = call ptr @__cxa_allocate_exception(i64 80) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %13) #5
  invoke void @_ZN4dali11make_stringIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEES6_DpRKT_(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %13, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %55 unwind label %.thread

55:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %15) #5
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #5
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %14, ptr noundef nonnull @.str.67, ptr noundef nonnull align 1 dereferenceable(1) %15)
          to label %56 unwind label %83

56:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %16) #5
  invoke void @_ZN4dali13GetStacktraceB5cxx11Ev(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %16)
          to label %57 unwind label %85

57:                                               ; preds = %56
  invoke void @_ZN4dali13DALIExceptionC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_S8_(ptr noundef nonnull align 8 dereferenceable(80) %54, ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull %14, ptr noundef nonnull align 8 dereferenceable(32) %16)
          to label %58 unwind label %87

58:                                               ; preds = %57
  invoke void @__cxa_throw(ptr nonnull %54, ptr nonnull @_ZTIN4dali13DALIExceptionE, ptr nonnull @_ZN4dali13DALIExceptionD2Ev) #6
          to label %143 unwind label %87

59:                                               ; preds = %23, %3
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %142

61:                                               ; preds = %29
  %62 = landingpad { ptr, i32 }
          cleanup
  br label %141

63:                                               ; preds = %33, %31, %30
  %64 = landingpad { ptr, i32 }
          cleanup
  br label %140

65:                                               ; preds = %99, %42, %37, %34
  %66 = landingpad { ptr, i32 }
          cleanup
  br label %140

67:                                               ; preds = %46
  %68 = landingpad { ptr, i32 }
          cleanup
  br label %74

69:                                               ; preds = %47
  %70 = landingpad { ptr, i32 }
          cleanup
  br label %73

71:                                               ; preds = %48
  %72 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  br label %73

73:                                               ; preds = %71, %69
  %.pn = phi { ptr, i32 } [ %72, %71 ], [ %70, %69 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %8) #5
  br label %74

74:                                               ; preds = %73, %67
  %.pn.pn = phi { ptr, i32 } [ %.pn, %73 ], [ %68, %67 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %9) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  br label %94

75:                                               ; preds = %49
  %76 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #5
  br label %93

77:                                               ; preds = %50
  %78 = landingpad { ptr, i32 }
          cleanup
  br label %81

79:                                               ; preds = %51
  %80 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #5
  br label %81

81:                                               ; preds = %79, %77
  %.pn32 = phi { ptr, i32 } [ %80, %79 ], [ %78, %77 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %12) #5
  br label %92

.thread:                                          ; preds = %53
  %82 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #5
  br label %91

83:                                               ; preds = %55
  %84 = landingpad { ptr, i32 }
          cleanup
  br label %90

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

87:                                               ; preds = %58, %57
  %.0 = phi i1 [ false, %58 ], [ true, %57 ]
  %88 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %16) #5
  br label %89

89:                                               ; preds = %87, %85
  %.pn34 = phi { ptr, i32 } [ %88, %87 ], [ %86, %85 ]
  %.1 = phi i1 [ %.0, %87 ], [ true, %85 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %16) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %14) #5
  br label %90

90:                                               ; preds = %83, %89
  %.pn34.pn = phi { ptr, i32 } [ %.pn34, %89 ], [ %84, %83 ]
  %.2 = phi i1 [ %.1, %89 ], [ true, %83 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %15) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #5
  br i1 %.2, label %91, label %92

91:                                               ; preds = %.thread, %90
  %.pn34.pn.pn53 = phi { ptr, i32 } [ %82, %.thread ], [ %.pn34.pn, %90 ]
  call void @__cxa_free_exception(ptr %54) #5
  br label %92

92:                                               ; preds = %90, %91, %81
  %.pn34.pn.pn.pn = phi { ptr, i32 } [ %.pn34.pn.pn53, %91 ], [ %.pn34.pn, %90 ], [ %.pn32, %81 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #5
  br label %93

93:                                               ; preds = %92, %75
  %.pn34.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn34.pn.pn.pn, %92 ], [ %76, %75 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  br label %94

94:                                               ; preds = %93, %74
  %.pn34.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn34.pn.pn.pn.pn, %93 ], [ %.pn.pn, %74 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  br label %140

95:                                               ; preds = %44
  %96 = getelementptr inbounds i8, ptr %4, i64 64
  %97 = load i8, ptr %96, align 8, !tbaa !17, !range !18, !noundef !19
  %98 = trunc nuw i8 %97 to i1
  br i1 %98, label %99, label %138

99:                                               ; preds = %95
  invoke void @_ZN4dali6TensorINS_10CPUBackendEEC2Ev(ptr noundef nonnull align 8 dereferenceable(272) %0)
          to label %100 unwind label %65

100:                                              ; preds = %99
  %101 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNKR4dali6TensorINS_10CPUBackendEE5shapeEv(ptr noundef nonnull align 8 dereferenceable(272) %5)
  %102 = call noundef i32 @_ZNK4dali6BufferINS_10CPUBackendEE4typeEv(ptr noundef nonnull align 8 dereferenceable(138) %5)
  invoke void @_ZN4dali6TensorINS_10CPUBackendEE6ResizeERKNS_11TensorShapeILin1EEE13_DALIDataType(ptr noundef nonnull align 8 dereferenceable(272) %0, ptr noundef nonnull align 8 dereferenceable(56) %101, i32 noundef %102)
          to label %103 unwind label %117

103:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %17) #5
  %104 = call noundef ptr @_ZN4dali6BufferINS_10CPUBackendEE16raw_mutable_dataEv(ptr noundef nonnull align 8 dereferenceable(138) %5)
  %105 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNKR4dali6TensorINS_10CPUBackendEE5shapeEv(ptr noundef nonnull align 8 dereferenceable(272) %5)
  invoke void @_ZN4dali11TensorShapeILin1EEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(56) %18, ptr noundef nonnull align 8 dereferenceable(56) %105)
          to label %106 unwind label %119

106:                                              ; preds = %103
  %107 = call noundef i32 @_ZNK4dali6BufferINS_10CPUBackendEE4typeEv(ptr noundef nonnull align 8 dereferenceable(138) %5)
  invoke void @_ZN4dali10SampleViewINS_10CPUBackendEECI2NS_14SampleViewBaseIS1_PvEEES4_NS_11TensorShapeILin1EEE13_DALIDataType(ptr noundef nonnull align 8 dereferenceable(68) %17, ptr noundef %104, ptr noundef nonnull %18, i32 noundef %107)
          to label %108 unwind label %121

108:                                              ; preds = %106
  call void @_ZN4dali15TensorShapeBaseINS_11SmallVectorIlLm6ESaIlEEELin1EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %18) #5
  call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %19) #5
  %109 = call noundef ptr @_ZN4dali6BufferINS_10CPUBackendEE16raw_mutable_dataEv(ptr noundef nonnull align 8 dereferenceable(138) %0)
  %110 = call noundef nonnull align 8 dereferenceable(56) ptr @_ZNKR4dali6TensorINS_10CPUBackendEE5shapeEv(ptr noundef nonnull align 8 dereferenceable(272) %0)
  invoke void @_ZN4dali11TensorShapeILin1EEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(56) %20, ptr noundef nonnull align 8 dereferenceable(56) %110)
          to label %111 unwind label %123

111:                                              ; preds = %108
  %112 = call noundef i32 @_ZNK4dali6BufferINS_10CPUBackendEE4typeEv(ptr noundef nonnull align 8 dereferenceable(138) %0)
  invoke void @_ZN4dali10SampleViewINS_10CPUBackendEECI2NS_14SampleViewBaseIS1_PvEEES4_NS_11TensorShapeILin1EEE13_DALIDataType(ptr noundef nonnull align 8 dereferenceable(68) %19, ptr noundef %109, ptr noundef nonnull %20, i32 noundef %112)
          to label %113 unwind label %125

113:                                              ; preds = %111
  call void @_ZN4dali15TensorShapeBaseINS_11SmallVectorIlLm6ESaIlEEELin1EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %20) #5
  invoke void @_ZN4dali10SampleViewINS_10CPUBackendEEC2ERKS2_(ptr noundef nonnull align 8 dereferenceable(68) %21, ptr noundef nonnull align 8 dereferenceable(68) %19)
          to label %114 unwind label %127

114:                                              ; preds = %113
  invoke void @_ZN4dali15ConstSampleViewINS_10CPUBackendEEC2ERKNS_10SampleViewIS1_EE(ptr noundef nonnull align 8 dereferenceable(68) %22, ptr noundef nonnull align 8 dereferenceable(68) %17)
          to label %115 unwind label %129

115:                                              ; preds = %114
  invoke void @_ZN4dali5numpy16FromFortranOrderENS_10SampleViewINS_10CPUBackendEEENS_15ConstSampleViewIS2_EE(ptr noundef nonnull %21, ptr noundef nonnull %22)
          to label %116 unwind label %131

116:                                              ; preds = %115
  call void @_ZN4dali14SampleViewBaseINS_10CPUBackendEPKvED2Ev(ptr noundef nonnull align 8 dereferenceable(68) %22) #5
  call void @_ZN4dali14SampleViewBaseINS_10CPUBackendEPvED2Ev(ptr noundef nonnull align 8 dereferenceable(68) %21) #5
  call void @_ZN4dali14SampleViewBaseINS_10CPUBackendEPvED2Ev(ptr noundef nonnull align 8 dereferenceable(68) %19) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %19) #5
  call void @_ZN4dali14SampleViewBaseINS_10CPUBackendEPvED2Ev(ptr noundef nonnull align 8 dereferenceable(68) %17) #5
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %17) #5
  br label %139

117:                                              ; preds = %100
  %118 = landingpad { ptr, i32 }
          cleanup
  br label %137

119:                                              ; preds = %103
  %120 = landingpad { ptr, i32 }
          cleanup
  br label %136

121:                                              ; preds = %106
  %122 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4dali15TensorShapeBaseINS_11SmallVectorIlLm6ESaIlEEELin1EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %18) #5
  br label %136

123:                                              ; preds = %108
  %124 = landingpad { ptr, i32 }
          cleanup
  br label %135

125:                                              ; preds = %111
  %126 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4dali15TensorShapeBaseINS_11SmallVectorIlLm6ESaIlEEELin1EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %20) #5
  br label %135

127:                                              ; preds = %113
  %128 = landingpad { ptr, i32 }
          cleanup
  br label %134

129:                                              ; preds = %114
  %130 = landingpad { ptr, i32 }
          cleanup
  br label %133

131:                                              ; preds = %115
  %132 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN4dali14SampleViewBaseINS_10CPUBackendEPKvED2Ev(ptr noundef nonnull align 8 dereferenceable(68) %22) #5
  br label %133

133:                                              ; preds = %131, %129
  %.pn41 = phi { ptr, i32 } [ %132, %131 ], [ %130, %129 ]
  call void @_ZN4dali14SampleViewBaseINS_10CPUBackendEPvED2Ev(ptr noundef nonnull align 8 dereferenceable(68) %21) #5
  br label %134

134:                                              ; preds = %133, %127
  %.pn41.pn = phi { ptr, i32 } [ %.pn41, %133 ], [ %128, %127 ]
  call void @_ZN4dali14SampleViewBaseINS_10CPUBackendEPvED2Ev(ptr noundef nonnull align 8 dereferenceable(68) %19) #5
  br label %135

135:                                              ; preds = %134, %125, %123
  %.pn41.pn.pn = phi { ptr, i32 } [ %.pn41.pn, %134 ], [ %126, %125 ], [ %124, %123 ]
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %19) #5
  call void @_ZN4dali14SampleViewBaseINS_10CPUBackendEPvED2Ev(ptr noundef nonnull align 8 dereferenceable(68) %17) #5
  br label %136

136:                                              ; preds = %135, %121, %119
  %.pn41.pn.pn.pn = phi { ptr, i32 } [ %.pn41.pn.pn, %135 ], [ %122, %121 ], [ %120, %119 ]
  call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %17) #5
  br label %137

137:                                              ; preds = %136, %117
  %.pn41.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn41.pn.pn.pn, %136 ], [ %118, %117 ]
  call void @_ZN4dali6TensorINS_10CPUBackendEED2Ev(ptr noundef nonnull align 8 dereferenceable(272) %0) #5
  br label %140

138:                                              ; preds = %95
  call void @_ZN4dali6TensorINS_10CPUBackendEEC2EOS2_(ptr noundef nonnull align 8 dereferenceable(272) %0, ptr noundef nonnull align 8 dereferenceable(272) %5) #5
  br label %139

139:                                              ; preds = %116, %138
  call void @_ZN4dali6TensorINS_10CPUBackendEED2Ev(ptr noundef nonnull align 8 dereferenceable(272) %5) #5
  call void @llvm.lifetime.end.p0(i64 272, ptr nonnull %5) #5
  call void @_ZN4dali5numpy10HeaderDataD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %4) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %4) #5
  ret void

140:                                              ; preds = %65, %94, %137, %63
  %.pn41.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %64, %63 ], [ %.pn41.pn.pn.pn.pn, %137 ], [ %66, %65 ], [ %.pn34.pn.pn.pn.pn.pn, %94 ]
  call void @_ZN4dali6TensorINS_10CPUBackendEED2Ev(ptr noundef nonnull align 8 dereferenceable(272) %5) #5
  br label %141

141:                                              ; preds = %140, %61
  %.pn41.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn41.pn.pn.pn.pn.pn.pn, %140 ], [ %62, %61 ]
  call void @llvm.lifetime.end.p0(i64 272, ptr nonnull %5) #5
  br label %142

142:                                              ; preds = %141, %59
  %.pn41.pn.pn.pn.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn41.pn.pn.pn.pn.pn.pn.pn, %141 ], [ %60, %59 ]
  call void @_ZN4dali5numpy10HeaderDataD2Ev(ptr noundef nonnull align 8 dereferenceable(80) %4) #5
  call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %4) #5
  resume { ptr, i32 } %.pn41.pn.pn.pn.pn.pn.pn.pn.pn

143:                                              ; preds = %58
  unreachable
}

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4dali6BufferINS_10CPUBackendEE10set_pinnedEb(ptr noundef nonnull align 8 dereferenceable(138), i1 noundef zeroext) local_unnamed_addr #3 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 #3 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 #4 align 2

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN4dali10SampleViewINS_10CPUBackendEECI2NS_14SampleViewBaseIS1_PvEEES4_NS_11TensorShapeILin1EEE13_DALIDataType(ptr noundef nonnull align 8 dereferenceable(68), ptr noundef, ptr noundef, i32 noundef) unnamed_addr #3 align 2

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

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

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

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

!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, !12, i64 72}
!6 = !{!"_ZTSN4dali5numpy10HeaderDataE", !7, i64 0, !13, i64 56, !14, i64 64, !12, i64 72}
!7 = !{!"_ZTSN4dali11TensorShapeILin1EEE", !8, i64 0}
!8 = !{!"_ZTSN4dali15TensorShapeBaseINS_11SmallVectorIlLm6ESaIlEEELin1EEE", !9, i64 0}
!9 = !{!"_ZTSN4dali11SmallVectorIlLm6ESaIlEEE", !10, i64 0, !12, i64 48}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"long", !10, i64 0}
!13 = !{!"any pointer", !10, i64 0}
!14 = !{!"bool", !10, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"vtable pointer", !11, i64 0}
!17 = !{!6, !14, i64 64}
!18 = !{i8 0, i8 2}
!19 = !{}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,SROAPass,SimplifyCFGPass