; LLVM IR from NVIDIA/DALI :: dali/operators/generic (roi_random_crop)

; 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::CPUBackend" = type { i8 }
%"struct.dali::TensorListView.123" = type { %"struct.dali::TensorListViewBase.124" }
%"struct.dali::TensorListViewBase.124" = type { %"struct.dali::TensorListShape", %"class.std::vector.125" }
%"struct.dali::TensorListShape" = type { %"struct.dali::TensorListShapeBase.base", [4 x i8] }
%"struct.dali::TensorListShapeBase.base" = type <{ %"class.std::vector.73", i32 }>
%"class.std::vector.73" = type { %"struct.std::_Vector_base.74" }
%"struct.std::_Vector_base.74" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.125" = type { %"struct.std::_Vector_base.126" }
%"struct.std::_Vector_base.126" = type { %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl" }
%"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl" = type { %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.dali::TensorView.130" = type { %"struct.dali::TensorViewBase.131" }
%"struct.dali::TensorViewBase.131" = type { ptr, %"struct.dali::TensorShape" }
%"struct.dali::TensorShape" = type { %"struct.dali::TensorShapeBase" }
%"struct.dali::TensorShapeBase" = type { %"class.dali::DeviceArray" }
%"class.dali::DeviceArray" = type { [1 x i64] }
%"class.dali::span" = type { ptr, i64 }
%"struct.dali::TensorView" = type { %"struct.dali::TensorViewBase" }
%"struct.dali::TensorViewBase" = type { ptr, %"struct.dali::TensorShape" }
%"class.std::uniform_int_distribution" = type { %"struct.std::uniform_int_distribution<long>::param_type" }
%"struct.std::uniform_int_distribution<long>::param_type" = type { i64, i64 }
%"class.dali::ROIRandomCropCPU" = type { %"class.dali::rng::OperatorWithRng", %"class.dali::ArgValue", %"class.dali::ArgValue", %"class.dali::ArgValue", %"class.dali::ArgValue", %"class.dali::ArgValue", %"struct.dali::TensorListShape.83" }
%"class.dali::rng::OperatorWithRng" = type { %"class.dali::Operator", %"class.dali::BatchRNG", %"struct.dali::rng::OperatorWithRngFields" }
%"class.dali::Operator" = type { %"class.dali::OperatorBase" }
%"class.dali::OperatorBase" = type { ptr, %"class.dali::OpSpec", i32, i32, %"class.std::unordered_map" }
%"class.dali::OpSpec" = type { %"class.std::__cxx11::basic_string", ptr, %"class.std::vector.28", %"class.std::map.33", %"class.std::vector.38", %"class.std::map.33", %"class.std::map.43", %"class.std::vector.48", %"class.std::vector.48", %"class.std::map.53" }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::vector.28" = type { %"struct.std::_Vector_base.29" }
%"struct.std::_Vector_base.29" = type { %"struct.std::_Vector_base<std::shared_ptr<dali::Argument>, std::allocator<std::shared_ptr<dali::Argument>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::shared_ptr<dali::Argument>, std::allocator<std::shared_ptr<dali::Argument>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::shared_ptr<dali::Argument>, std::allocator<std::shared_ptr<dali::Argument>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::shared_ptr<dali::Argument>, std::allocator<std::shared_ptr<dali::Argument>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.38" = type { %"struct.std::_Vector_base.39" }
%"struct.std::_Vector_base.39" = type { %"struct.std::_Vector_base<std::pair<std::__cxx11::basic_string<char>, int>, std::allocator<std::pair<std::__cxx11::basic_string<char>, int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<std::__cxx11::basic_string<char>, int>, std::allocator<std::pair<std::__cxx11::basic_string<char>, int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<std::__cxx11::basic_string<char>, int>, std::allocator<std::pair<std::__cxx11::basic_string<char>, int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<std::__cxx11::basic_string<char>, int>, std::allocator<std::pair<std::__cxx11::basic_string<char>, int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::map.33" = type { %"class.std::_Rb_tree.34" }
%"class.std::_Rb_tree.34" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, int>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, int>>, std::less<void>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, int>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, int>>, std::less<void>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::map.43" = type { %"class.std::_Rb_tree.44" }
%"class.std::_Rb_tree.44" = type { %"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>>, std::less<void>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::__cxx11::basic_string<char>, std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>, std::_Select1st<std::pair<const std::__cxx11::basic_string<char>, std::__cxx11::basic_string<char>>>, std::less<void>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::vector.48" = type { %"struct.std::_Vector_base.49" }
%"struct.std::_Vector_base.49" = type { %"struct.std::_Vector_base<dali::OpSpec::InOutDeviceDesc, std::allocator<dali::OpSpec::InOutDeviceDesc>>::_Vector_impl" }
%"struct.std::_Vector_base<dali::OpSpec::InOutDeviceDesc, std::allocator<dali::OpSpec::InOutDeviceDesc>>::_Vector_impl" = type { %"struct.std::_Vector_base<dali::OpSpec::InOutDeviceDesc, std::allocator<dali::OpSpec::InOutDeviceDesc>>::_Vector_impl_data" }
%"struct.std::_Vector_base<dali::OpSpec::InOutDeviceDesc, std::allocator<dali::OpSpec::InOutDeviceDesc>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::map.53" = type { %"class.std::_Rb_tree.54" }
%"class.std::_Rb_tree.54" = type { %"struct.std::_Rb_tree<dali::OpSpec::InOutDeviceDesc, std::pair<const dali::OpSpec::InOutDeviceDesc, int>, std::_Select1st<std::pair<const dali::OpSpec::InOutDeviceDesc, int>>, std::less<void>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<dali::OpSpec::InOutDeviceDesc, std::pair<const dali::OpSpec::InOutDeviceDesc, int>, std::_Select1st<std::pair<const dali::OpSpec::InOutDeviceDesc, int>>, std::less<void>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.dali::BatchRNG" = type { i64, %"class.std::vector.63" }
%"class.std::vector.63" = type { %"struct.std::_Vector_base.64" }
%"struct.std::_Vector_base.64" = type { %"struct.std::_Vector_base<std::mersenne_twister_engine<unsigned long, 64, 312, 156, 31, 13043109905998158313, 29, 6148914691236517205, 17, 8202884508482404352, 37, 18444473444759240704, 43, 6364136223846793005>, std::allocator<std::mersenne_twister_engine<unsigned long, 64, 312, 156, 31, 13043109905998158313, 29, 6148914691236517205, 17, 8202884508482404352, 37, 18444473444759240704, 43, 6364136223846793005>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::mersenne_twister_engine<unsigned long, 64, 312, 156, 31, 13043109905998158313, 29, 6148914691236517205, 17, 8202884508482404352, 37, 18444473444759240704, 43, 6364136223846793005>, std::allocator<std::mersenne_twister_engine<unsigned long, 64, 312, 156, 31, 13043109905998158313, 29, 6148914691236517205, 17, 8202884508482404352, 37, 18444473444759240704, 43, 6364136223846793005>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::mersenne_twister_engine<unsigned long, 64, 312, 156, 31, 13043109905998158313, 29, 6148914691236517205, 17, 8202884508482404352, 37, 18444473444759240704, 43, 6364136223846793005>, std::allocator<std::mersenne_twister_engine<unsigned long, 64, 312, 156, 31, 13043109905998158313, 29, 6148914691236517205, 17, 8202884508482404352, 37, 18444473444759240704, 43, 6364136223846793005>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::mersenne_twister_engine<unsigned long, 64, 312, 156, 31, 13043109905998158313, 29, 6148914691236517205, 17, 8202884508482404352, 37, 18444473444759240704, 43, 6364136223846793005>, std::allocator<std::mersenne_twister_engine<unsigned long, 64, 312, 156, 31, 13043109905998158313, 29, 6148914691236517205, 17, 8202884508482404352, 37, 18444473444759240704, 43, 6364136223846793005>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.dali::rng::OperatorWithRngFields" = type { %"class.std::any" }
%"class.std::any" = type { ptr, %"union.std::any::_Storage" }
%"union.std::any::_Storage" = type { ptr }
%"class.dali::ArgValue" = type <{ %"class.std::__cxx11::basic_string", %"class.std::vector.68", %"struct.dali::TensorListView", i8, i8, [6 x i8], i64, i8, [7 x i8] }>
%"class.std::vector.68" = type { %"struct.std::_Vector_base.69" }
%"struct.std::_Vector_base.69" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.dali::TensorListView" = type { %"struct.dali::TensorListViewBase" }
%"struct.dali::TensorListViewBase" = type { %"struct.dali::TensorListShape", %"class.std::vector.78" }
%"class.std::vector.78" = type { %"struct.std::_Vector_base.79" }
%"struct.std::_Vector_base.79" = type { %"struct.std::_Vector_base<const int *, std::allocator<const int *>>::_Vector_impl" }
%"struct.std::_Vector_base<const int *, std::allocator<const int *>>::_Vector_impl" = type { %"struct.std::_Vector_base<const int *, std::allocator<const int *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<const int *, std::allocator<const int *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.dali::TensorListShape.83" = type { %"struct.dali::TensorListShapeBase.base.85", i32 }
%"struct.dali::TensorListShapeBase.base.85" = type <{ %"class.std::vector.73", i32 }>

; 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 nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4dali8ArgValueIiLi1EE16HasExplicitValueEv(ptr noundef nonnull align 8 dereferenceable(129)) #1 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZN4dali19TensorListShapeBaseINS_15TensorListShapeILin1EEELin1EE17tensor_shape_spanEl(ptr noundef nonnull align 8 dereferenceable(28), i64 noundef) #2 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4dali16ROIRandomCropCPU7RunImplERNS_9WorkspaceE(ptr noundef nonnull align 8 dereferenceable(1160) %0, ptr noundef nonnull align 8 dereferenceable(664) %1) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %"class.dali::CPUBackend", align 1
  %7 = alloca %"struct.dali::TensorListView.123", align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %"struct.dali::TensorView.130", align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca %"class.dali::span", align 8
  %17 = alloca i32, align 4
  %18 = alloca i64, align 8
  %19 = alloca i64, align 8
  %20 = alloca %"struct.dali::TensorView", align 8
  %21 = alloca i64, align 8
  %22 = alloca %"struct.dali::TensorView", align 8
  %23 = alloca %"struct.dali::TensorView", align 8
  %24 = alloca %"struct.dali::TensorView", align 8
  %25 = alloca %"struct.dali::TensorView.130", align 8
  %26 = alloca [2 x i64], align 16
  %27 = alloca i64, align 8
  %28 = alloca i64, align 8
  %29 = alloca %"class.std::uniform_int_distribution", align 8
  %30 = alloca %"struct.dali::TensorView.130", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %31 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = call noundef nonnull align 8 dereferenceable(304) ptr @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE6OutputINS_10CPUBackendEEERDaiT_(ptr noundef nonnull align 8 dereferenceable(664) %32, i32 noundef 0)
  store ptr %33, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 56, ptr %7) #4
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  call void @_ZN4dali4viewIlLi1ENS_10CPUBackendEEENS_14TensorListViewINS_6detail15storage_tag_mapIT1_E4typeET_XT0_EEERNS_10TensorListIS5_EE(ptr dead_on_unwind writable sret(%"struct.dali::TensorListView.123") align 8 %7, ptr noundef nonnull align 8 dereferenceable(304) %34)
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  %35 = getelementptr inbounds %"struct.dali::TensorListViewBase.124", ptr %7, i32 0, i32 0
  %36 = invoke noundef i32 @_ZNK4dali19TensorListShapeBaseINS_15TensorListShapeILi1EEELi1EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(28) %35)
          to label %37 unwind label %55

37:                                               ; preds = %2
  store i32 %36, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #4
  %38 = invoke { ptr, i64 } @_ZNK4dali18TensorListViewBaseINS_10StorageCPUElLi1EEixEi(ptr noundef nonnull align 8 dereferenceable(56) %7, i32 noundef 0)
          to label %39 unwind label %59

39:                                               ; preds = %37
  %40 = getelementptr inbounds %"struct.dali::TensorView.130", ptr %12, i32 0, i32 0
  %41 = getelementptr inbounds { ptr, i64 }, ptr %40, i32 0, i32 0
  %42 = extractvalue { ptr, i64 } %38, 0
  store ptr %42, ptr %41, align 8
  %43 = getelementptr inbounds { ptr, i64 }, ptr %40, i32 0, i32 1
  %44 = extractvalue { ptr, i64 } %38, 1
  store i64 %44, ptr %43, align 8
  %45 = getelementptr inbounds %"struct.dali::TensorViewBase.131", ptr %12, i32 0, i32 1
  %46 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZN4dali15TensorShapeBaseINS_11DeviceArrayIlLm1EEELi1EEixEi(ptr noundef nonnull align 8 dereferenceable(8) %45, i32 noundef 0)
          to label %47 unwind label %59

47:                                               ; preds = %39
  %48 = load i64, ptr %46, align 8, !tbaa !11
  %49 = trunc i64 %48 to i32
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #4
  store i32 %49, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #4
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %50

50:                                               ; preds = %293, %47
  %51 = load i32, ptr %13, align 4, !tbaa !9
  %52 = load i32, ptr %8, align 4, !tbaa !9
  %53 = icmp slt i32 %51, %52
  br i1 %53, label %63, label %54

54:                                               ; preds = %50
  store i32 2, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %297

55:                                               ; preds = %2
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %9, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %10, align 4
  br label %299

59:                                               ; preds = %39, %37
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %9, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #4
  br label %298

63:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  store ptr null, ptr %15, align 8, !tbaa !5
  %64 = getelementptr inbounds %"class.dali::ROIRandomCropCPU", ptr %31, i32 0, i32 6
  %65 = invoke noundef zeroext i1 @_ZNK4dali19TensorListShapeBaseINS_15TensorListShapeILin1EEELin1EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(28) %64)
          to label %66 unwind label %78

66:                                               ; preds = %63
  br i1 %65, label %86, label %67

67:                                               ; preds = %66
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #4
  %68 = getelementptr inbounds %"class.dali::ROIRandomCropCPU", ptr %31, i32 0, i32 6
  %69 = load i32, ptr %13, align 4, !tbaa !9
  %70 = sext i32 %69 to i64
  %71 = invoke { ptr, i64 } @_ZN4dali19TensorListShapeBaseINS_15TensorListShapeILin1EEELin1EE17tensor_shape_spanEl(ptr noundef nonnull align 8 dereferenceable(28) %68, i64 noundef %70)
          to label %72 unwind label %82

72:                                               ; preds = %67
  %73 = getelementptr inbounds { ptr, i64 }, ptr %16, i32 0, i32 0
  %74 = extractvalue { ptr, i64 } %71, 0
  store ptr %74, ptr %73, align 8
  %75 = getelementptr inbounds { ptr, i64 }, ptr %16, i32 0, i32 1
  %76 = extractvalue { ptr, i64 } %71, 1
  store i64 %76, ptr %75, align 8
  %77 = call noundef ptr @_ZNK4dali4spanIlLln1EE4dataEv(ptr noundef nonnull align 8 dereferenceable(16) %16) #4
  store ptr %77, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #4
  br label %86

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

82:                                               ; preds = %67
  %83 = landingpad { ptr, i32 }
          cleanup
  %84 = extractvalue { ptr, i32 } %83, 0
  store ptr %84, ptr %9, align 8
  %85 = extractvalue { ptr, i32 } %83, 1
  store i32 %85, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #4
  br label %296

86:                                               ; preds = %72, %66
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  store i32 0, ptr %17, align 4, !tbaa !9
  br label %87

87:                                               ; preds = %287, %86
  %88 = load i32, ptr %17, align 4, !tbaa !9
  %89 = load i32, ptr %11, align 4, !tbaa !9
  %90 = icmp slt i32 %88, %89
  br i1 %90, label %92, label %91

91:                                               ; preds = %87
  store i32 5, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  br label %292

92:                                               ; preds = %87
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  store i64 -1, ptr %18, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #4
  %93 = getelementptr inbounds %"class.dali::ROIRandomCropCPU", ptr %31, i32 0, i32 1
  %94 = load i32, ptr %13, align 4, !tbaa !9
  %95 = invoke { ptr, i64 } @_ZNK4dali8ArgValueIiLi1EEixEi(ptr noundef nonnull align 8 dereferenceable(129) %93, i32 noundef %94)
          to label %96 unwind label %147

96:                                               ; preds = %92
  %97 = getelementptr inbounds %"struct.dali::TensorView", ptr %20, i32 0, i32 0
  %98 = getelementptr inbounds { ptr, i64 }, ptr %97, i32 0, i32 0
  %99 = extractvalue { ptr, i64 } %95, 0
  store ptr %99, ptr %98, align 8
  %100 = getelementptr inbounds { ptr, i64 }, ptr %97, i32 0, i32 1
  %101 = extractvalue { ptr, i64 } %95, 1
  store i64 %101, ptr %100, align 8
  %102 = getelementptr inbounds %"struct.dali::TensorViewBase", ptr %20, i32 0, i32 0
  %103 = load ptr, ptr %102, align 8, !tbaa !13
  %104 = load i32, ptr %17, align 4, !tbaa !9
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds i32, ptr %103, i64 %105
  %107 = load i32, ptr %106, align 4, !tbaa !9
  %108 = sext i32 %107 to i64
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #4
  store i64 %108, ptr %19, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #4
  %109 = getelementptr inbounds %"class.dali::ROIRandomCropCPU", ptr %31, i32 0, i32 4
  %110 = load i32, ptr %13, align 4, !tbaa !9
  %111 = invoke { ptr, i64 } @_ZNK4dali8ArgValueIiLi1EEixEi(ptr noundef nonnull align 8 dereferenceable(129) %109, i32 noundef %110)
          to label %112 unwind label %151

112:                                              ; preds = %96
  %113 = getelementptr inbounds %"struct.dali::TensorView", ptr %22, i32 0, i32 0
  %114 = getelementptr inbounds { ptr, i64 }, ptr %113, i32 0, i32 0
  %115 = extractvalue { ptr, i64 } %111, 0
  store ptr %115, ptr %114, align 8
  %116 = getelementptr inbounds { ptr, i64 }, ptr %113, i32 0, i32 1
  %117 = extractvalue { ptr, i64 } %111, 1
  store i64 %117, ptr %116, align 8
  %118 = getelementptr inbounds %"struct.dali::TensorViewBase", ptr %22, i32 0, i32 0
  %119 = load ptr, ptr %118, align 8, !tbaa !13
  %120 = load i32, ptr %17, align 4, !tbaa !9
  %121 = sext i32 %120 to i64
  %122 = getelementptr inbounds i32, ptr %119, i64 %121
  %123 = load i32, ptr %122, align 4, !tbaa !9
  %124 = sext i32 %123 to i64
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #4
  store i64 %124, ptr %21, align 8, !tbaa !11
  %125 = getelementptr inbounds %"class.dali::ROIRandomCropCPU", ptr %31, i32 0, i32 2
  %126 = invoke noundef zeroext i1 @_ZNK4dali8ArgValueIiLi1EE16HasExplicitValueEv(ptr noundef nonnull align 8 dereferenceable(129) %125)
          to label %127 unwind label %155

127:                                              ; preds = %112
  br i1 %126, label %128, label %163

128:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #4
  %129 = getelementptr inbounds %"class.dali::ROIRandomCropCPU", ptr %31, i32 0, i32 2
  %130 = load i32, ptr %13, align 4, !tbaa !9
  %131 = invoke { ptr, i64 } @_ZNK4dali8ArgValueIiLi1EEixEi(ptr noundef nonnull align 8 dereferenceable(129) %129, i32 noundef %130)
          to label %132 unwind label %159

132:                                              ; preds = %128
  %133 = getelementptr inbounds %"struct.dali::TensorView", ptr %23, i32 0, i32 0
  %134 = getelementptr inbounds { ptr, i64 }, ptr %133, i32 0, i32 0
  %135 = extractvalue { ptr, i64 } %131, 0
  store ptr %135, ptr %134, align 8
  %136 = getelementptr inbounds { ptr, i64 }, ptr %133, i32 0, i32 1
  %137 = extractvalue { ptr, i64 } %131, 1
  store i64 %137, ptr %136, align 8
  %138 = getelementptr inbounds %"struct.dali::TensorViewBase", ptr %23, i32 0, i32 0
  %139 = load ptr, ptr %138, align 8, !tbaa !13
  %140 = load i32, ptr %17, align 4, !tbaa !9
  %141 = sext i32 %140 to i64
  %142 = getelementptr inbounds i32, ptr %139, i64 %141
  %143 = load i32, ptr %142, align 4, !tbaa !9
  %144 = sext i32 %143 to i64
  %145 = load i64, ptr %19, align 8, !tbaa !11
  %146 = sub nsw i64 %144, %145
  store i64 %146, ptr %18, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #4
  br label %184

147:                                              ; preds = %92
  %148 = landingpad { ptr, i32 }
          cleanup
  %149 = extractvalue { ptr, i32 } %148, 0
  store ptr %149, ptr %9, align 8
  %150 = extractvalue { ptr, i32 } %148, 1
  store i32 %150, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #4
  br label %291

151:                                              ; preds = %96
  %152 = landingpad { ptr, i32 }
          cleanup
  %153 = extractvalue { ptr, i32 } %152, 0
  store ptr %153, ptr %9, align 8
  %154 = extractvalue { ptr, i32 } %152, 1
  store i32 %154, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #4
  br label %290

155:                                              ; preds = %112
  %156 = landingpad { ptr, i32 }
          cleanup
  %157 = extractvalue { ptr, i32 } %156, 0
  store ptr %157, ptr %9, align 8
  %158 = extractvalue { ptr, i32 } %156, 1
  store i32 %158, ptr %10, align 4
  br label %290

159:                                              ; preds = %128
  %160 = landingpad { ptr, i32 }
          cleanup
  %161 = extractvalue { ptr, i32 } %160, 0
  store ptr %161, ptr %9, align 8
  %162 = extractvalue { ptr, i32 } %160, 1
  store i32 %162, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #4
  br label %290

163:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 16, ptr %24) #4
  %164 = getelementptr inbounds %"class.dali::ROIRandomCropCPU", ptr %31, i32 0, i32 3
  %165 = load i32, ptr %13, align 4, !tbaa !9
  %166 = invoke { ptr, i64 } @_ZNK4dali8ArgValueIiLi1EEixEi(ptr noundef nonnull align 8 dereferenceable(129) %164, i32 noundef %165)
          to label %167 unwind label %180

167:                                              ; preds = %163
  %168 = getelementptr inbounds %"struct.dali::TensorView", ptr %24, i32 0, i32 0
  %169 = getelementptr inbounds { ptr, i64 }, ptr %168, i32 0, i32 0
  %170 = extractvalue { ptr, i64 } %166, 0
  store ptr %170, ptr %169, align 8
  %171 = getelementptr inbounds { ptr, i64 }, ptr %168, i32 0, i32 1
  %172 = extractvalue { ptr, i64 } %166, 1
  store i64 %172, ptr %171, align 8
  %173 = getelementptr inbounds %"struct.dali::TensorViewBase", ptr %24, i32 0, i32 0
  %174 = load ptr, ptr %173, align 8, !tbaa !13
  %175 = load i32, ptr %17, align 4, !tbaa !9
  %176 = sext i32 %175 to i64
  %177 = getelementptr inbounds i32, ptr %174, i64 %176
  %178 = load i32, ptr %177, align 4, !tbaa !9
  %179 = sext i32 %178 to i64
  store i64 %179, ptr %18, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #4
  br label %184

180:                                              ; preds = %163
  %181 = landingpad { ptr, i32 }
          cleanup
  %182 = extractvalue { ptr, i32 } %181, 0
  store ptr %182, ptr %9, align 8
  %183 = extractvalue { ptr, i32 } %181, 1
  store i32 %183, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %24) #4
  br label %290

184:                                              ; preds = %167, %132
  %185 = load i64, ptr %18, align 8, !tbaa !11
  %186 = load i64, ptr %21, align 8, !tbaa !11
  %187 = icmp eq i64 %185, %186
  br i1 %187, label %188, label %207

188:                                              ; preds = %184
  %189 = load i64, ptr %19, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 16, ptr %25) #4
  %190 = load i32, ptr %13, align 4, !tbaa !9
  %191 = invoke { ptr, i64 } @_ZNK4dali18TensorListViewBaseINS_10StorageCPUElLi1EEixEi(ptr noundef nonnull align 8 dereferenceable(56) %7, i32 noundef %190)
          to label %192 unwind label %203

192:                                              ; preds = %188
  %193 = getelementptr inbounds %"struct.dali::TensorView.130", ptr %25, i32 0, i32 0
  %194 = getelementptr inbounds { ptr, i64 }, ptr %193, i32 0, i32 0
  %195 = extractvalue { ptr, i64 } %191, 0
  store ptr %195, ptr %194, align 8
  %196 = getelementptr inbounds { ptr, i64 }, ptr %193, i32 0, i32 1
  %197 = extractvalue { ptr, i64 } %191, 1
  store i64 %197, ptr %196, align 8
  %198 = getelementptr inbounds %"struct.dali::TensorViewBase.131", ptr %25, i32 0, i32 0
  %199 = load ptr, ptr %198, align 8, !tbaa !18
  %200 = load i32, ptr %17, align 4, !tbaa !9
  %201 = sext i32 %200 to i64
  %202 = getelementptr inbounds i64, ptr %199, i64 %201
  store i64 %189, ptr %202, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #4
  br label %286

203:                                              ; preds = %188
  %204 = landingpad { ptr, i32 }
          cleanup
  %205 = extractvalue { ptr, i32 } %204, 0
  store ptr %205, ptr %9, align 8
  %206 = extractvalue { ptr, i32 } %204, 1
  store i32 %206, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %25) #4
  br label %290

207:                                              ; preds = %184
  call void @llvm.lifetime.start.p0(i64 16, ptr %26) #4
  %208 = load i64, ptr %19, align 8, !tbaa !11
  store i64 %208, ptr %26, align 8, !tbaa !11
  %209 = getelementptr inbounds i64, ptr %26, i64 1
  %210 = load i64, ptr %19, align 8, !tbaa !11
  %211 = load i64, ptr %18, align 8, !tbaa !11
  %212 = add nsw i64 %210, %211
  %213 = load i64, ptr %21, align 8, !tbaa !11
  %214 = sub nsw i64 %212, %213
  store i64 %214, ptr %209, align 8, !tbaa !11
  %215 = getelementptr inbounds [2 x i64], ptr %26, i64 0, i64 0
  %216 = load i64, ptr %215, align 16, !tbaa !11
  %217 = getelementptr inbounds [2 x i64], ptr %26, i64 0, i64 1
  %218 = load i64, ptr %217, align 8, !tbaa !11
  %219 = icmp sgt i64 %216, %218
  br i1 %219, label %220, label %223

220:                                              ; preds = %207
  %221 = getelementptr inbounds [2 x i64], ptr %26, i64 0, i64 0
  %222 = getelementptr inbounds [2 x i64], ptr %26, i64 0, i64 1
  call void @_ZSt4swapIlENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %221, ptr noundef nonnull align 8 dereferenceable(8) %222) #4
  br label %223

223:                                              ; preds = %220, %207
  %224 = load ptr, ptr %15, align 8, !tbaa !5
  %225 = icmp ne ptr %224, null
  br i1 %225, label %226, label %252

226:                                              ; preds = %223
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #4
  store i64 0, ptr %27, align 8, !tbaa !11
  %227 = getelementptr inbounds [2 x i64], ptr %26, i64 0, i64 0
  %228 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(8) %227)
          to label %229 unwind label %244

229:                                              ; preds = %226
  %230 = load i64, ptr %228, align 8, !tbaa !11
  %231 = getelementptr inbounds [2 x i64], ptr %26, i64 0, i64 0
  store i64 %230, ptr %231, align 16, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #4
  %232 = load ptr, ptr %15, align 8, !tbaa !5
  %233 = load i32, ptr %17, align 4, !tbaa !9
  %234 = sext i32 %233 to i64
  %235 = getelementptr inbounds i64, ptr %232, i64 %234
  %236 = load i64, ptr %235, align 8, !tbaa !11
  %237 = load i64, ptr %21, align 8, !tbaa !11
  %238 = sub nsw i64 %236, %237
  store i64 %238, ptr %28, align 8, !tbaa !11
  %239 = getelementptr inbounds [2 x i64], ptr %26, i64 0, i64 1
  %240 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %28, ptr noundef nonnull align 8 dereferenceable(8) %239)
          to label %241 unwind label %248

241:                                              ; preds = %229
  %242 = load i64, ptr %240, align 8, !tbaa !11
  %243 = getelementptr inbounds [2 x i64], ptr %26, i64 0, i64 1
  store i64 %242, ptr %243, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #4
  br label %252

244:                                              ; preds = %226
  %245 = landingpad { ptr, i32 }
          cleanup
  %246 = extractvalue { ptr, i32 } %245, 0
  store ptr %246, ptr %9, align 8
  %247 = extractvalue { ptr, i32 } %245, 1
  store i32 %247, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #4
  br label %285

248:                                              ; preds = %229
  %249 = landingpad { ptr, i32 }
          cleanup
  %250 = extractvalue { ptr, i32 } %249, 0
  store ptr %250, ptr %9, align 8
  %251 = extractvalue { ptr, i32 } %249, 1
  store i32 %251, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #4
  br label %285

252:                                              ; preds = %241, %223
  call void @llvm.lifetime.start.p0(i64 16, ptr %29) #4
  %253 = getelementptr inbounds [2 x i64], ptr %26, i64 0, i64 0
  %254 = load i64, ptr %253, align 16, !tbaa !11
  %255 = getelementptr inbounds [2 x i64], ptr %26, i64 0, i64 1
  %256 = load i64, ptr %255, align 8, !tbaa !11
  invoke void @_ZNSt24uniform_int_distributionIlEC2Ell(ptr noundef nonnull align 8 dereferenceable(16) %29, i64 noundef %254, i64 noundef %256)
          to label %257 unwind label %276

257:                                              ; preds = %252
  %258 = getelementptr inbounds %"class.dali::rng::OperatorWithRng", ptr %31, i32 0, i32 1
  %259 = load i32, ptr %13, align 4, !tbaa !9
  %260 = call noundef nonnull align 8 dereferenceable(2504) ptr @_ZN4dali8BatchRNGISt23mersenne_twister_engineImLm64ELm312ELm156ELm31ELm13043109905998158313ELm29ELm6148914691236517205ELm17ELm8202884508482404352ELm37ELm18444473444759240704ELm43ELm6364136223846793005EEEixEi(ptr noundef nonnull align 8 dereferenceable(32) %258, i32 noundef %259) #4
  %261 = invoke noundef i64 @_ZNSt24uniform_int_distributionIlEclISt23mersenne_twister_engineImLm64ELm312ELm156ELm31ELm13043109905998158313ELm29ELm6148914691236517205ELm17ELm8202884508482404352ELm37ELm18444473444759240704ELm43ELm6364136223846793005EEEElRT_(ptr noundef nonnull align 8 dereferenceable(16) %29, ptr noundef nonnull align 8 dereferenceable(2504) %260)
          to label %262 unwind label %276

262:                                              ; preds = %257
  call void @llvm.lifetime.start.p0(i64 16, ptr %30) #4
  %263 = load i32, ptr %13, align 4, !tbaa !9
  %264 = invoke { ptr, i64 } @_ZNK4dali18TensorListViewBaseINS_10StorageCPUElLi1EEixEi(ptr noundef nonnull align 8 dereferenceable(56) %7, i32 noundef %263)
          to label %265 unwind label %280

265:                                              ; preds = %262
  %266 = getelementptr inbounds %"struct.dali::TensorView.130", ptr %30, i32 0, i32 0
  %267 = getelementptr inbounds { ptr, i64 }, ptr %266, i32 0, i32 0
  %268 = extractvalue { ptr, i64 } %264, 0
  store ptr %268, ptr %267, align 8
  %269 = getelementptr inbounds { ptr, i64 }, ptr %266, i32 0, i32 1
  %270 = extractvalue { ptr, i64 } %264, 1
  store i64 %270, ptr %269, align 8
  %271 = getelementptr inbounds %"struct.dali::TensorViewBase.131", ptr %30, i32 0, i32 0
  %272 = load ptr, ptr %271, align 8, !tbaa !18
  %273 = load i32, ptr %17, align 4, !tbaa !9
  %274 = sext i32 %273 to i64
  %275 = getelementptr inbounds i64, ptr %272, i64 %274
  store i64 %261, ptr %275, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #4
  br label %286

276:                                              ; preds = %257, %252
  %277 = landingpad { ptr, i32 }
          cleanup
  %278 = extractvalue { ptr, i32 } %277, 0
  store ptr %278, ptr %9, align 8
  %279 = extractvalue { ptr, i32 } %277, 1
  store i32 %279, ptr %10, align 4
  br label %284

280:                                              ; preds = %262
  %281 = landingpad { ptr, i32 }
          cleanup
  %282 = extractvalue { ptr, i32 } %281, 0
  store ptr %282, ptr %9, align 8
  %283 = extractvalue { ptr, i32 } %281, 1
  store i32 %283, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %30) #4
  br label %284

284:                                              ; preds = %280, %276
  call void @llvm.lifetime.end.p0(i64 16, ptr %29) #4
  br label %285

285:                                              ; preds = %284, %248, %244
  call void @llvm.lifetime.end.p0(i64 16, ptr %26) #4
  br label %290

286:                                              ; preds = %265, %192
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  br label %287

287:                                              ; preds = %286
  %288 = load i32, ptr %17, align 4, !tbaa !9
  %289 = add nsw i32 %288, 1
  store i32 %289, ptr %17, align 4, !tbaa !9
  br label %87, !llvm.loop !20

290:                                              ; preds = %285, %203, %180, %159, %155, %151
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  br label %291

291:                                              ; preds = %290, %147
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  br label %296

292:                                              ; preds = %91
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  br label %293

293:                                              ; preds = %292
  %294 = load i32, ptr %13, align 4, !tbaa !9
  %295 = add nsw i32 %294, 1
  store i32 %295, ptr %13, align 4, !tbaa !9
  br label %50, !llvm.loop !22

296:                                              ; preds = %291, %82, %78
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #4
  br label %298

297:                                              ; preds = %54
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @_ZN4dali18TensorListViewBaseINS_10StorageCPUElLi1EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %7) #4
  call void @llvm.lifetime.end.p0(i64 56, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  ret void

298:                                              ; preds = %296, %59
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  br label %299

299:                                              ; preds = %298, %55
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  call void @_ZN4dali18TensorListViewBaseINS_10StorageCPUElLi1EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %7) #4
  call void @llvm.lifetime.end.p0(i64 56, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  br label %300

300:                                              ; preds = %299
  %301 = load ptr, ptr %9, align 8
  %302 = load i32, ptr %10, align 4
  %303 = insertvalue { ptr, i32 } poison, ptr %301, 0
  %304 = insertvalue { ptr, i32 } %303, i32 %302, 1
  resume { ptr, i32 } %304
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4dali4viewIlLi1ENS_10CPUBackendEEENS_14TensorListViewINS_6detail15storage_tag_mapIT1_E4typeET_XT0_EEERNS_10TensorListIS5_EE(ptr dead_on_unwind noalias writable sret(%"struct.dali::TensorListView.123") align 8, ptr noundef nonnull align 8 dereferenceable(304)) #2

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNSt24uniform_int_distributionIlEclISt23mersenne_twister_engineImLm64ELm312ELm156ELm31ELm13043109905998158313ELm29ELm6148914691236517205ELm17ELm8202884508482404352ELm37ELm18444473444759240704ELm43ELm6364136223846793005EEEElRT_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(2504)) #2 align 2

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"_ZTSN4dali14TensorViewBaseINS_10StorageCPUEKiLi1EEE", !6, i64 0, !15, i64 8}
!15 = !{!"_ZTSN4dali11TensorShapeILi1EEE", !16, i64 0}
!16 = !{!"_ZTSN4dali15TensorShapeBaseINS_11DeviceArrayIlLm1EEELi1EEE", !17, i64 0}
!17 = !{!"_ZTSN4dali11DeviceArrayIlLm1EEE", !7, i64 0}
!18 = !{!19, !6, i64 0}
!19 = !{!"_ZTSN4dali14TensorViewBaseINS_10StorageCPUElLi1EEE", !6, i64 0, !15, i64 8}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = distinct !{!22, !21}


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

%"struct.dali::TensorListView.123" = type { %"struct.dali::TensorListViewBase.124" }
%"struct.dali::TensorListViewBase.124" = type { %"struct.dali::TensorListShape", %"class.std::vector.125" }
%"struct.dali::TensorListShape" = type { %"struct.dali::TensorListShapeBase.base", [4 x i8] }
%"struct.dali::TensorListShapeBase.base" = type <{ %"class.std::vector.73", i32 }>
%"class.std::vector.73" = type { %"struct.std::_Vector_base.74" }
%"struct.std::_Vector_base.74" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.125" = type { %"struct.std::_Vector_base.126" }
%"struct.std::_Vector_base.126" = type { %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl" }
%"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl" = type { %"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long *, std::allocator<long *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.dali::TensorView.130" = type { %"struct.dali::TensorViewBase.131" }
%"struct.dali::TensorViewBase.131" = type { ptr, %"struct.dali::TensorShape" }
%"struct.dali::TensorShape" = type { %"struct.dali::TensorShapeBase" }
%"struct.dali::TensorShapeBase" = type { %"class.dali::DeviceArray" }
%"class.dali::DeviceArray" = type { [1 x i64] }
%"class.dali::span" = type { ptr, i64 }
%"class.std::uniform_int_distribution" = type { %"struct.std::uniform_int_distribution<long>::param_type" }
%"struct.std::uniform_int_distribution<long>::param_type" = type { i64, 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 nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK4dali8ArgValueIiLi1EE16HasExplicitValueEv(ptr noundef nonnull align 8 dereferenceable(129)) local_unnamed_addr #1 align 2

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4dali16ROIRandomCropCPU7RunImplERNS_9WorkspaceE(ptr noundef nonnull align 8 dereferenceable(1160) %0, ptr noundef nonnull align 8 dereferenceable(664) %1) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"struct.dali::TensorListView.123", align 8
  %4 = alloca %"struct.dali::TensorView.130", align 8
  %5 = alloca %"class.dali::span", align 8
  %6 = alloca [2 x i64], align 16
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca %"class.std::uniform_int_distribution", align 8
  %10 = tail call noundef nonnull align 8 dereferenceable(304) ptr @_ZNK4dali13WorkspaceBaseINS_10TensorListESt10shared_ptrE6OutputINS_10CPUBackendEEERDaiT_(ptr noundef nonnull align 8 dereferenceable(664) %1, i32 noundef 0)
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %3) #4
  call void @_ZN4dali4viewIlLi1ENS_10CPUBackendEEENS_14TensorListViewINS_6detail15storage_tag_mapIT1_E4typeET_XT0_EEERNS_10TensorListIS5_EE(ptr dead_on_unwind nonnull writable sret(%"struct.dali::TensorListView.123") align 8 %3, ptr noundef nonnull align 8 dereferenceable(304) %10)
  %11 = call noundef i32 @_ZNK4dali19TensorListShapeBaseINS_15TensorListShapeILi1EEELi1EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(28) %3)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #4
  %12 = invoke { ptr, i64 } @_ZNK4dali18TensorListViewBaseINS_10StorageCPUElLi1EEixEi(ptr noundef nonnull align 8 dereferenceable(56) %3, i32 noundef 0)
          to label %13 unwind label %110

13:                                               ; preds = %2
  %14 = extractvalue { ptr, i64 } %12, 0
  store ptr %14, ptr %4, align 8
  %15 = getelementptr inbounds i8, ptr %4, i64 8
  %16 = extractvalue { ptr, i64 } %12, 1
  store i64 %16, ptr %15, align 8
  %17 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN4dali15TensorShapeBaseINS_11DeviceArrayIlLm1EEELi1EEixEi(ptr noundef nonnull align 8 dereferenceable(8) %15, i32 noundef 0)
  %18 = load i64, ptr %17, align 8, !tbaa !5
  %.fr = freeze i64 %18
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #4
  %19 = icmp sgt i32 %11, 0
  br i1 %19, label %.lr.ph65, label %._crit_edge66

.lr.ph65:                                         ; preds = %13
  %20 = trunc i64 %.fr to i32
  %21 = getelementptr inbounds i8, ptr %0, i64 1128
  %22 = getelementptr inbounds i8, ptr %5, i64 8
  %23 = icmp sgt i32 %20, 0
  %24 = getelementptr inbounds i8, ptr %0, i64 448
  %25 = getelementptr inbounds i8, ptr %0, i64 856
  %26 = getelementptr inbounds i8, ptr %0, i64 584
  %27 = getelementptr inbounds i8, ptr %0, i64 720
  %28 = getelementptr inbounds i8, ptr %6, i64 8
  %29 = getelementptr inbounds i8, ptr %0, i64 400
  %wide.trip.count102 = zext nneg i32 %11 to i64
  br i1 %23, label %.lr.ph65.split.us.preheader, label %.lr.ph65.split

.lr.ph65.split.us.preheader:                      ; preds = %.lr.ph65
  %wide.trip.count97 = and i64 %.fr, 2147483647
  br label %.lr.ph65.split.us

.lr.ph65.split.us:                                ; preds = %.lr.ph65.split.us.preheader, %._crit_edge.us
  %indvars.iv99 = phi i64 [ 0, %.lr.ph65.split.us.preheader ], [ %indvars.iv.next100, %._crit_edge.us ]
  %30 = invoke noundef zeroext i1 @_ZNK4dali19TensorListShapeBaseINS_15TensorListShapeILin1EEELin1EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(28) %21)
          to label %31 unwind label %.split.us

31:                                               ; preds = %.lr.ph65.split.us
  br i1 %30, label %.lr.ph.us, label %32

32:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #4
  %33 = invoke { ptr, i64 } @_ZN4dali19TensorListShapeBaseINS_15TensorListShapeILin1EEELin1EE17tensor_shape_spanEl(ptr noundef nonnull align 8 dereferenceable(28) %21, i64 noundef %indvars.iv99)
          to label %34 unwind label %.split68.us

34:                                               ; preds = %32
  %35 = extractvalue { ptr, i64 } %33, 0
  store ptr %35, ptr %5, align 8
  %36 = extractvalue { ptr, i64 } %33, 1
  store i64 %36, ptr %22, align 8
  %37 = call noundef ptr @_ZNK4dali4spanIlLln1EE4dataEv(ptr noundef nonnull align 8 dereferenceable(16) %5) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #4
  br label %.lr.ph.us

.lr.ph.us:                                        ; preds = %34, %31
  %.052.us = phi ptr [ null, %31 ], [ %37, %34 ]
  %.not.us = icmp eq ptr %.052.us, null
  %38 = trunc nuw nsw i64 %indvars.iv99 to i32
  br label %39

39:                                               ; preds = %.lr.ph.us, %100
  %indvars.iv94 = phi i64 [ 0, %.lr.ph.us ], [ %indvars.iv.next95, %100 ]
  %40 = invoke { ptr, i64 } @_ZNK4dali8ArgValueIiLi1EEixEi(ptr noundef nonnull align 8 dereferenceable(129) %24, i32 noundef %38)
          to label %41 unwind label %.split71.us

41:                                               ; preds = %39
  %42 = extractvalue { ptr, i64 } %40, 0
  %43 = getelementptr inbounds i32, ptr %42, i64 %indvars.iv94
  %44 = load i32, ptr %43, align 4, !tbaa !9
  %45 = sext i32 %44 to i64
  %46 = invoke { ptr, i64 } @_ZNK4dali8ArgValueIiLi1EEixEi(ptr noundef nonnull align 8 dereferenceable(129) %25, i32 noundef %38)
          to label %47 unwind label %.split74.us

47:                                               ; preds = %41
  %48 = extractvalue { ptr, i64 } %46, 0
  %49 = getelementptr inbounds i32, ptr %48, i64 %indvars.iv94
  %50 = load i32, ptr %49, align 4, !tbaa !9
  %51 = sext i32 %50 to i64
  %52 = call noundef zeroext i1 @_ZNK4dali8ArgValueIiLi1EE16HasExplicitValueEv(ptr noundef nonnull align 8 dereferenceable(129) %26)
  br i1 %52, label %60, label %53

53:                                               ; preds = %47
  %54 = invoke { ptr, i64 } @_ZNK4dali8ArgValueIiLi1EEixEi(ptr noundef nonnull align 8 dereferenceable(129) %27, i32 noundef %38)
          to label %55 unwind label %.split77.us

55:                                               ; preds = %53
  %56 = extractvalue { ptr, i64 } %54, 0
  %57 = getelementptr inbounds i32, ptr %56, i64 %indvars.iv94
  %58 = load i32, ptr %57, align 4, !tbaa !9
  %59 = sext i32 %58 to i64
  br label %68

60:                                               ; preds = %47
  %61 = invoke { ptr, i64 } @_ZNK4dali8ArgValueIiLi1EEixEi(ptr noundef nonnull align 8 dereferenceable(129) %26, i32 noundef %38)
          to label %62 unwind label %.split80.us

62:                                               ; preds = %60
  %63 = extractvalue { ptr, i64 } %61, 0
  %64 = getelementptr inbounds i32, ptr %63, i64 %indvars.iv94
  %65 = load i32, ptr %64, align 4, !tbaa !9
  %66 = sext i32 %65 to i64
  %67 = sub nsw i64 %66, %45
  br label %68

68:                                               ; preds = %62, %55
  %.054.us = phi i64 [ %67, %62 ], [ %59, %55 ]
  %69 = icmp eq i64 %.054.us, %51
  br i1 %69, label %95, label %70

70:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #4
  store i64 %45, ptr %6, align 16, !tbaa !5
  %71 = sub nsw i64 %45, %51
  %72 = add nsw i64 %71, %.054.us
  store i64 %72, ptr %28, align 8, !tbaa !5
  %73 = icmp slt i64 %72, %45
  br i1 %73, label %74, label %75

74:                                               ; preds = %70
  call void @_ZSt4swapIlENSt9enable_ifIXsr6__and_ISt6__not_ISt15__is_tuple_likeIT_EESt21is_move_constructibleIS3_ESt18is_move_assignableIS3_EEE5valueEvE4typeERS3_SC_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %28) #4
  br label %75

75:                                               ; preds = %74, %70
  br i1 %.not.us, label %._crit_edge, label %76

._crit_edge:                                      ; preds = %75
  %.pre = load i64, ptr %28, align 8, !tbaa !5
  br label %84

76:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  store i64 0, ptr %7, align 8, !tbaa !5
  %77 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3maxIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %78 = load i64, ptr %77, align 8, !tbaa !5
  store i64 %78, ptr %6, align 16, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  %79 = getelementptr inbounds i64, ptr %.052.us, i64 %indvars.iv94
  %80 = load i64, ptr %79, align 8, !tbaa !5
  %81 = sub nsw i64 %80, %51
  store i64 %81, ptr %8, align 8, !tbaa !5
  %82 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minIlERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %28)
  %83 = load i64, ptr %82, align 8, !tbaa !5
  store i64 %83, ptr %28, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  br label %84

84:                                               ; preds = %._crit_edge, %76
  %85 = phi i64 [ %.pre, %._crit_edge ], [ %83, %76 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #4
  %86 = load i64, ptr %6, align 16, !tbaa !5
  invoke void @_ZNSt24uniform_int_distributionIlEC2Ell(ptr noundef nonnull align 8 dereferenceable(16) %9, i64 noundef %86, i64 noundef %85)
          to label %87 unwind label %.split83.us

87:                                               ; preds = %84
  %88 = call noundef nonnull align 8 dereferenceable(2504) ptr @_ZN4dali8BatchRNGISt23mersenne_twister_engineImLm64ELm312ELm156ELm31ELm13043109905998158313ELm29ELm6148914691236517205ELm17ELm8202884508482404352ELm37ELm18444473444759240704ELm43ELm6364136223846793005EEEixEi(ptr noundef nonnull align 8 dereferenceable(32) %29, i32 noundef %38) #4
  %89 = invoke noundef i64 @_ZNSt24uniform_int_distributionIlEclISt23mersenne_twister_engineImLm64ELm312ELm156ELm31ELm13043109905998158313ELm29ELm6148914691236517205ELm17ELm8202884508482404352ELm37ELm18444473444759240704ELm43ELm6364136223846793005EEEElRT_(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(2504) %88)
          to label %90 unwind label %.split83.us

90:                                               ; preds = %87
  %91 = invoke { ptr, i64 } @_ZNK4dali18TensorListViewBaseINS_10StorageCPUElLi1EEixEi(ptr noundef nonnull align 8 dereferenceable(56) %3, i32 noundef %38)
          to label %92 unwind label %.split86.us

92:                                               ; preds = %90
  %93 = extractvalue { ptr, i64 } %91, 0
  %94 = getelementptr inbounds i64, ptr %93, i64 %indvars.iv94
  store i64 %89, ptr %94, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #4
  br label %100

95:                                               ; preds = %68
  %96 = invoke { ptr, i64 } @_ZNK4dali18TensorListViewBaseINS_10StorageCPUElLi1EEixEi(ptr noundef nonnull align 8 dereferenceable(56) %3, i32 noundef %38)
          to label %97 unwind label %.split89.us

97:                                               ; preds = %95
  %98 = extractvalue { ptr, i64 } %96, 0
  %99 = getelementptr inbounds i64, ptr %98, i64 %indvars.iv94
  store i64 %45, ptr %99, align 8, !tbaa !5
  br label %100

100:                                              ; preds = %97, %92
  %indvars.iv.next95 = add nuw nsw i64 %indvars.iv94, 1
  %exitcond98.not = icmp eq i64 %indvars.iv.next95, %wide.trip.count97
  br i1 %exitcond98.not, label %._crit_edge.us, label %39, !llvm.loop !11

._crit_edge.us:                                   ; preds = %100
  %indvars.iv.next100 = add nuw nsw i64 %indvars.iv99, 1
  %exitcond103.not = icmp eq i64 %indvars.iv.next100, %wide.trip.count102
  br i1 %exitcond103.not, label %._crit_edge66, label %.lr.ph65.split.us, !llvm.loop !13

.split.us:                                        ; preds = %.lr.ph65.split.us
  %101 = landingpad { ptr, i32 }
          cleanup
  br label %125

.split68.us:                                      ; preds = %32
  %102 = landingpad { ptr, i32 }
          cleanup
  br label %122

.split71.us:                                      ; preds = %39
  %103 = landingpad { ptr, i32 }
          cleanup
  br label %125

.split74.us:                                      ; preds = %41
  %104 = landingpad { ptr, i32 }
          cleanup
  br label %125

.split77.us:                                      ; preds = %53
  %105 = landingpad { ptr, i32 }
          cleanup
  br label %125

.split80.us:                                      ; preds = %60
  %106 = landingpad { ptr, i32 }
          cleanup
  br label %125

.split83.us:                                      ; preds = %87, %84
  %107 = landingpad { ptr, i32 }
          cleanup
  br label %124

.split86.us:                                      ; preds = %90
  %108 = landingpad { ptr, i32 }
          cleanup
  br label %124

.split89.us:                                      ; preds = %95
  %109 = landingpad { ptr, i32 }
          cleanup
  br label %125

._crit_edge66:                                    ; preds = %123, %._crit_edge.us, %13
  call void @_ZN4dali18TensorListViewBaseINS_10StorageCPUElLi1EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %3) #4
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %3) #4
  ret void

110:                                              ; preds = %2
  %111 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #4
  br label %125

.lr.ph65.split:                                   ; preds = %.lr.ph65, %123
  %indvars.iv = phi i64 [ %indvars.iv.next, %123 ], [ 0, %.lr.ph65 ]
  %112 = invoke noundef zeroext i1 @_ZNK4dali19TensorListShapeBaseINS_15TensorListShapeILin1EEELin1EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(28) %21)
          to label %113 unwind label %.split

113:                                              ; preds = %.lr.ph65.split
  br i1 %112, label %123, label %114

114:                                              ; preds = %113
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #4
  %115 = invoke { ptr, i64 } @_ZN4dali19TensorListShapeBaseINS_15TensorListShapeILin1EEELin1EE17tensor_shape_spanEl(ptr noundef nonnull align 8 dereferenceable(28) %21, i64 noundef %indvars.iv)
          to label %116 unwind label %.split68

116:                                              ; preds = %114
  %117 = extractvalue { ptr, i64 } %115, 0
  store ptr %117, ptr %5, align 8
  %118 = extractvalue { ptr, i64 } %115, 1
  store i64 %118, ptr %22, align 8
  %119 = call noundef ptr @_ZNK4dali4spanIlLln1EE4dataEv(ptr noundef nonnull align 8 dereferenceable(16) %5) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #4
  br label %123

.split:                                           ; preds = %.lr.ph65.split
  %120 = landingpad { ptr, i32 }
          cleanup
  br label %125

.split68:                                         ; preds = %114
  %121 = landingpad { ptr, i32 }
          cleanup
  br label %122

122:                                              ; preds = %.split68.us, %.split68
  %.us-phi69 = phi { ptr, i32 } [ %121, %.split68 ], [ %102, %.split68.us ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #4
  br label %125

123:                                              ; preds = %116, %113
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count102
  br i1 %exitcond.not, label %._crit_edge66, label %.lr.ph65.split, !llvm.loop !13

124:                                              ; preds = %.split86.us, %.split83.us
  %.pn = phi { ptr, i32 } [ %108, %.split86.us ], [ %107, %.split83.us ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #4
  br label %125

125:                                              ; preds = %.split, %.split.us, %122, %.split74.us, %.split80.us, %.split77.us, %.split89.us, %124, %.split71.us, %110
  %.pn57.pn.pn.pn = phi { ptr, i32 } [ %111, %110 ], [ %.us-phi69, %122 ], [ %103, %.split71.us ], [ %109, %.split89.us ], [ %.pn, %124 ], [ %106, %.split80.us ], [ %105, %.split77.us ], [ %104, %.split74.us ], [ %120, %.split ], [ %101, %.split.us ]
  call void @_ZN4dali18TensorListViewBaseINS_10StorageCPUElLi1EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %3) #4
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %3) #4
  resume { ptr, i32 } %.pn57.pn.pn.pn
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4dali4viewIlLi1ENS_10CPUBackendEEENS_14TensorListViewINS_6detail15storage_tag_mapIT1_E4typeET_XT0_EEERNS_10TensorListIS5_EE(ptr dead_on_unwind noalias writable sret(%"struct.dali::TensorListView.123") align 8, ptr noundef nonnull align 8 dereferenceable(304)) local_unnamed_addr #2

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

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

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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNSt24uniform_int_distributionIlEclISt23mersenne_twister_engineImLm64ELm312ELm156ELm31ELm13043109905998158313ELm29ELm6148914691236517205ELm17ELm8202884508482404352ELm37ELm18444473444759240704ELm43ELm6364136223846793005EEEElRT_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(2504)) local_unnamed_addr #2 align 2

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass