; LLVM IR from NVIDIA/DALI :: dali/operators/ssd (box_encoder)

; 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::vector.42" = type { %"struct.std::_Vector_base.43" }
%"struct.std::_Vector_base.43" = type { %"struct.std::_Vector_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.dali::CPUBackend" = type { i8 }
%"class.std::vector.32" = type { %"struct.std::_Vector_base.33" }
%"struct.std::_Vector_base.33" = type { %"struct.std::_Vector_base<dali::Box<2, float>, std::allocator<dali::Box<2, float>>>::_Vector_impl" }
%"struct.std::_Vector_base<dali::Box<2, float>, std::allocator<dali::Box<2, float>>>::_Vector_impl" = type { %"struct.std::_Vector_base<dali::Box<2, float>, std::allocator<dali::Box<2, float>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<dali::Box<2, float>, std::allocator<dali::Box<2, float>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.dali::span" = type { ptr, i64 }
%"class.dali::span.79" = type { ptr, i64 }
%"class.dali::TensorLayout" = type { [16 x i8] }
%"struct.dali::Box" = type { %"struct.dali::vec", %"struct.dali::vec" }
%"struct.dali::vec" = type { %"struct.dali::vec_base" }
%"struct.dali::vec_base" = type { %union.anon.0 }
%union.anon.0 = type { [2 x float] }
%"struct.dali::TensorShape" = type { %"struct.dali::TensorShapeBase" }
%"struct.dali::TensorShapeBase" = type { %"class.dali::SmallVector.74" }
%"class.dali::SmallVector.74" = type { %union.anon.77, i64 }
%union.anon.77 = type { %struct.anon.78, [32 x i8] }
%struct.anon.78 = type { ptr, i64 }
%"class.dali::BoxEncoder" = type <{ %"class.dali::StatelessOperator", float, [4 x i8], %"class.std::vector.32", i8, [7 x i8], %"class.std::vector.37", %"class.std::vector.37", float, [4 x i8] }>
%"class.dali::StatelessOperator" = type { %"class.dali::Operator" }
%"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", %"class.std::map", %"class.std::vector.7", %"class.std::map", %"class.std::map.12", %"class.std::vector.17", %"class.std::vector.17", %"class.std::map.22" }
%"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" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = 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.7" = type { %"struct.std::_Vector_base.8" }
%"struct.std::_Vector_base.8" = 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" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = 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.12" = type { %"class.std::_Rb_tree.13" }
%"class.std::_Rb_tree.13" = 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.17" = type { %"struct.std::_Vector_base.18" }
%"struct.std::_Vector_base.18" = 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.22" = type { %"class.std::_Rb_tree.23" }
%"class.std::_Rb_tree.23" = 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.std::vector.37" = type { %"struct.std::_Vector_base.38" }
%"struct.std::_Vector_base.38" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" = type { ptr, ptr, ptr }

; 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 i64 @_ZNKSt6vectorIN4dali3BoxILi2EfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK4dali10BoxEncoderINS_10CPUBackendEE21MatchBoxesWithAnchorsERKSt6vectorINS_3BoxILi2EfEESaIS5_EE(ptr dead_on_unwind noalias writable sret(%"class.std::vector.42") align 8, ptr noundef nonnull align 8 dereferenceable(492), ptr noundef nonnull align 8 dereferenceable(24)) #2 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4dali10BoxEncoderINS_10CPUBackendEE7RunImplERNS_15SampleWorkspaceE(ptr noundef nonnull align 8 dereferenceable(492) %0, ptr noundef nonnull align 8 dereferenceable(576) %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 ptr, align 8
  %8 = alloca %"class.dali::CPUBackend", align 1
  %9 = alloca i64, align 8
  %10 = alloca ptr, align 8
  %11 = alloca %"class.std::vector.32", align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca %"class.dali::span", align 8
  %15 = alloca %"class.dali::span.79", align 8
  %16 = alloca %"class.dali::TensorLayout", align 1
  %17 = alloca %"struct.dali::Box", align 4
  %18 = alloca ptr, align 8
  %19 = alloca %"class.dali::CPUBackend", align 1
  %20 = alloca %"struct.dali::TensorShape", align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca %"class.dali::CPUBackend", align 1
  %24 = alloca %"struct.dali::TensorShape", align 8
  %25 = alloca ptr, align 8
  %26 = alloca i32, align 4
  %27 = alloca %"class.std::vector.42", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %28 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = call noundef nonnull align 8 dereferenceable(272) ptr @_ZNK4dali13WorkspaceBaseINS_6TensorESt13add_pointer_tE5InputINS_10CPUBackendEEERKDaiT_(ptr noundef nonnull align 8 dereferenceable(568) %29, i32 noundef 0)
  store ptr %30, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  %32 = call noundef nonnull align 8 dereferenceable(272) ptr @_ZNK4dali13WorkspaceBaseINS_6TensorESt13add_pointer_tE5InputINS_10CPUBackendEEERKDaiT_(ptr noundef nonnull align 8 dereferenceable(568) %31, i32 noundef 1)
  store ptr %32, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = load ptr, ptr %33, align 8, !tbaa !9
  %35 = getelementptr inbounds ptr, ptr %34, i64 3
  %36 = load ptr, ptr %35, align 8
  %37 = call noundef i64 %36(ptr noundef nonnull align 8 dereferenceable(272) %33, i32 noundef 0)
  store i64 %37, ptr %9, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %38 = load ptr, ptr %7, align 8, !tbaa !5
  %39 = call noundef ptr @_ZNK4dali6BufferINS_10CPUBackendEE4dataIiEEPKT_v(ptr noundef nonnull align 8 dereferenceable(138) %38)
  store ptr %39, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #7
  call void @_ZNSt6vectorIN4dali3BoxILi2EfEESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  %40 = load i64, ptr %9, align 8, !tbaa !11
  invoke void @_ZNSt6vectorIN4dali3BoxILi2EfEESaIS2_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %40)
          to label %41 unwind label %112

41:                                               ; preds = %2
  %42 = invoke { ptr, i64 } @_ZN4dali9make_spanISt6vectorINS_3BoxILi2EfEESaIS3_EEEEDaRT_(ptr noundef nonnull align 8 dereferenceable(24) %11)
          to label %43 unwind label %112

43:                                               ; preds = %41
  %44 = getelementptr inbounds { ptr, i64 }, ptr %14, i32 0, i32 0
  %45 = extractvalue { ptr, i64 } %42, 0
  store ptr %45, ptr %44, align 8
  %46 = getelementptr inbounds { ptr, i64 }, ptr %14, i32 0, i32 1
  %47 = extractvalue { ptr, i64 } %42, 1
  store i64 %47, ptr %46, align 8
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = invoke noundef ptr @_ZNK4dali6BufferINS_10CPUBackendEE4dataIfEEPKT_v(ptr noundef nonnull align 8 dereferenceable(138) %48)
          to label %50 unwind label %112

50:                                               ; preds = %43
  %51 = load ptr, ptr %5, align 8, !tbaa !5
  %52 = invoke noundef i64 @_ZNK4dali6BufferINS_10CPUBackendEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(138) %51)
          to label %53 unwind label %112

53:                                               ; preds = %50
  %54 = invoke { ptr, i64 } @_ZN4dali10make_cspanILln1EfEENS_4spanIKT0_XT_EEEPS3_l(ptr noundef %49, i64 noundef %52)
          to label %55 unwind label %112

55:                                               ; preds = %53
  %56 = getelementptr inbounds { ptr, i64 }, ptr %15, i32 0, i32 0
  %57 = extractvalue { ptr, i64 } %54, 0
  store ptr %57, ptr %56, align 8
  %58 = getelementptr inbounds { ptr, i64 }, ptr %15, i32 0, i32 1
  %59 = extractvalue { ptr, i64 } %54, 1
  store i64 %59, ptr %58, align 8
  invoke void @_ZN4dali12TensorLayoutC2Ev(ptr noundef nonnull align 1 dereferenceable(16) %16)
          to label %60 unwind label %112

60:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #7
  call void @llvm.memset.p0.i64(ptr align 4 %17, i8 0, i64 16, i1 false)
  %61 = getelementptr inbounds { ptr, i64 }, ptr %14, i32 0, i32 0
  %62 = load ptr, ptr %61, align 8
  %63 = getelementptr inbounds { ptr, i64 }, ptr %14, i32 0, i32 1
  %64 = load i64, ptr %63, align 8
  %65 = getelementptr inbounds { ptr, i64 }, ptr %15, i32 0, i32 0
  %66 = load ptr, ptr %65, align 8
  %67 = getelementptr inbounds { ptr, i64 }, ptr %15, i32 0, i32 1
  %68 = load i64, ptr %67, align 8
  %69 = getelementptr inbounds { i64, i64 }, ptr %16, i32 0, i32 0
  %70 = load i64, ptr %69, align 1
  %71 = getelementptr inbounds { i64, i64 }, ptr %16, i32 0, i32 1
  %72 = load i64, ptr %71, align 1
  invoke void @_ZN4dali9ReadBoxesILi2EEEvNS_4spanINS_3BoxIXT_EfEELln1EEENS1_IKfLln1EEENS_12TensorLayoutERKS3_(ptr %62, i64 %64, ptr %66, i64 %68, i64 %70, i64 %72, ptr noundef nonnull align 4 dereferenceable(16) %17)
          to label %73 unwind label %116

73:                                               ; preds = %60
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  %75 = invoke noundef nonnull align 8 dereferenceable(272) ptr @_ZNK4dali13WorkspaceBaseINS_6TensorESt13add_pointer_tE6OutputINS_10CPUBackendEEERDaiT_(ptr noundef nonnull align 8 dereferenceable(568) %74, i32 noundef 0)
          to label %76 unwind label %120

76:                                               ; preds = %73
  store ptr %75, ptr %18, align 8, !tbaa !5
  %77 = load ptr, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 56, ptr %20) #7
  %78 = getelementptr inbounds %"class.dali::BoxEncoder", ptr %28, i32 0, i32 3
  %79 = call noundef i64 @_ZNKSt6vectorIN4dali3BoxILi2EfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %78) #7
  %80 = trunc i64 %79 to i32
  %81 = sext i32 %80 to i64
  invoke void @_ZN4dali11TensorShapeILin1EEC2IJiEvEElDpT_(ptr noundef nonnull align 8 dereferenceable(56) %20, i64 noundef %81, i32 noundef 4)
          to label %82 unwind label %124

82:                                               ; preds = %76
  %83 = load ptr, ptr %5, align 8, !tbaa !5
  %84 = invoke noundef i32 @_ZNK4dali6BufferINS_10CPUBackendEE4typeEv(ptr noundef nonnull align 8 dereferenceable(138) %83)
          to label %85 unwind label %128

85:                                               ; preds = %82
  invoke void @_ZN4dali6TensorINS_10CPUBackendEE6ResizeERKNS_11TensorShapeILin1EEE13_DALIDataType(ptr noundef nonnull align 8 dereferenceable(272) %77, ptr noundef nonnull align 8 dereferenceable(56) %20, i32 noundef %84)
          to label %86 unwind label %128

86:                                               ; preds = %85
  call void @_ZN4dali15TensorShapeBaseINS_11SmallVectorIlLm6ESaIlEEELin1EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %20) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %20) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #7
  %87 = load ptr, ptr %18, align 8, !tbaa !5
  %88 = invoke noundef ptr @_ZN4dali6BufferINS_10CPUBackendEE12mutable_dataIfEEPT_v(ptr noundef nonnull align 8 dereferenceable(138) %87)
          to label %89 unwind label %133

89:                                               ; preds = %86
  store ptr %88, ptr %21, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #7
  %90 = load ptr, ptr %4, align 8, !tbaa !5
  %91 = invoke noundef nonnull align 8 dereferenceable(272) ptr @_ZNK4dali13WorkspaceBaseINS_6TensorESt13add_pointer_tE6OutputINS_10CPUBackendEEERDaiT_(ptr noundef nonnull align 8 dereferenceable(568) %90, i32 noundef 1)
          to label %92 unwind label %137

92:                                               ; preds = %89
  store ptr %91, ptr %22, align 8, !tbaa !5
  %93 = load ptr, ptr %22, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 56, ptr %24) #7
  %94 = getelementptr inbounds %"class.dali::BoxEncoder", ptr %28, i32 0, i32 3
  %95 = call noundef i64 @_ZNKSt6vectorIN4dali3BoxILi2EfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %94) #7
  %96 = trunc i64 %95 to i32
  %97 = sext i32 %96 to i64
  invoke void @_ZN4dali11TensorShapeILin1EEC2IJEvEElDpT_(ptr noundef nonnull align 8 dereferenceable(56) %24, i64 noundef %97)
          to label %98 unwind label %141

98:                                               ; preds = %92
  %99 = load ptr, ptr %7, align 8, !tbaa !5
  %100 = invoke noundef i32 @_ZNK4dali6BufferINS_10CPUBackendEE4typeEv(ptr noundef nonnull align 8 dereferenceable(138) %99)
          to label %101 unwind label %145

101:                                              ; preds = %98
  invoke void @_ZN4dali6TensorINS_10CPUBackendEE6ResizeERKNS_11TensorShapeILin1EEE13_DALIDataType(ptr noundef nonnull align 8 dereferenceable(272) %93, ptr noundef nonnull align 8 dereferenceable(56) %24, i32 noundef %100)
          to label %102 unwind label %145

102:                                              ; preds = %101
  call void @_ZN4dali15TensorShapeBaseINS_11SmallVectorIlLm6ESaIlEEELin1EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %24) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %24) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #7
  %103 = load ptr, ptr %22, align 8, !tbaa !5
  %104 = invoke noundef ptr @_ZN4dali6BufferINS_10CPUBackendEE12mutable_dataIiEEPT_v(ptr noundef nonnull align 8 dereferenceable(138) %103)
          to label %105 unwind label %150

105:                                              ; preds = %102
  store ptr %104, ptr %25, align 8, !tbaa !5
  %106 = load ptr, ptr %21, align 8, !tbaa !5
  %107 = load ptr, ptr %25, align 8, !tbaa !5
  invoke void @_ZNK4dali10BoxEncoderINS_10CPUBackendEE20WriteAnchorsToOutputEPfPi(ptr noundef nonnull align 8 dereferenceable(492) %28, ptr noundef %106, ptr noundef %107)
          to label %108 unwind label %150

108:                                              ; preds = %105
  %109 = load i64, ptr %9, align 8, !tbaa !11
  %110 = icmp eq i64 %109, 0
  br i1 %110, label %111, label %154

111:                                              ; preds = %108
  store i32 1, ptr %26, align 4
  br label %160

112:                                              ; preds = %55, %53, %50, %43, %41, %2
  %113 = landingpad { ptr, i32 }
          cleanup
  %114 = extractvalue { ptr, i32 } %113, 0
  store ptr %114, ptr %12, align 8
  %115 = extractvalue { ptr, i32 } %113, 1
  store i32 %115, ptr %13, align 4
  br label %176

116:                                              ; preds = %60
  %117 = landingpad { ptr, i32 }
          cleanup
  %118 = extractvalue { ptr, i32 } %117, 0
  store ptr %118, ptr %12, align 8
  %119 = extractvalue { ptr, i32 } %117, 1
  store i32 %119, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #7
  br label %176

120:                                              ; preds = %73
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %12, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %13, align 4
  br label %175

124:                                              ; preds = %76
  %125 = landingpad { ptr, i32 }
          cleanup
  %126 = extractvalue { ptr, i32 } %125, 0
  store ptr %126, ptr %12, align 8
  %127 = extractvalue { ptr, i32 } %125, 1
  store i32 %127, ptr %13, align 4
  br label %132

128:                                              ; preds = %85, %82
  %129 = landingpad { ptr, i32 }
          cleanup
  %130 = extractvalue { ptr, i32 } %129, 0
  store ptr %130, ptr %12, align 8
  %131 = extractvalue { ptr, i32 } %129, 1
  store i32 %131, ptr %13, align 4
  call void @_ZN4dali15TensorShapeBaseINS_11SmallVectorIlLm6ESaIlEEELin1EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %20) #7
  br label %132

132:                                              ; preds = %128, %124
  call void @llvm.lifetime.end.p0(i64 56, ptr %20) #7
  br label %175

133:                                              ; preds = %86
  %134 = landingpad { ptr, i32 }
          cleanup
  %135 = extractvalue { ptr, i32 } %134, 0
  store ptr %135, ptr %12, align 8
  %136 = extractvalue { ptr, i32 } %134, 1
  store i32 %136, ptr %13, align 4
  br label %174

137:                                              ; preds = %89
  %138 = landingpad { ptr, i32 }
          cleanup
  %139 = extractvalue { ptr, i32 } %138, 0
  store ptr %139, ptr %12, align 8
  %140 = extractvalue { ptr, i32 } %138, 1
  store i32 %140, ptr %13, align 4
  br label %173

141:                                              ; preds = %92
  %142 = landingpad { ptr, i32 }
          cleanup
  %143 = extractvalue { ptr, i32 } %142, 0
  store ptr %143, ptr %12, align 8
  %144 = extractvalue { ptr, i32 } %142, 1
  store i32 %144, ptr %13, align 4
  br label %149

145:                                              ; preds = %101, %98
  %146 = landingpad { ptr, i32 }
          cleanup
  %147 = extractvalue { ptr, i32 } %146, 0
  store ptr %147, ptr %12, align 8
  %148 = extractvalue { ptr, i32 } %146, 1
  store i32 %148, ptr %13, align 4
  call void @_ZN4dali15TensorShapeBaseINS_11SmallVectorIlLm6ESaIlEEELin1EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %24) #7
  br label %149

149:                                              ; preds = %145, %141
  call void @llvm.lifetime.end.p0(i64 56, ptr %24) #7
  br label %173

150:                                              ; preds = %105, %102
  %151 = landingpad { ptr, i32 }
          cleanup
  %152 = extractvalue { ptr, i32 } %151, 0
  store ptr %152, ptr %12, align 8
  %153 = extractvalue { ptr, i32 } %151, 1
  store i32 %153, ptr %13, align 4
  br label %172

154:                                              ; preds = %108
  call void @llvm.lifetime.start.p0(i64 24, ptr %27) #7
  invoke void @_ZNK4dali10BoxEncoderINS_10CPUBackendEE21MatchBoxesWithAnchorsERKSt6vectorINS_3BoxILi2EfEESaIS5_EE(ptr dead_on_unwind writable sret(%"class.std::vector.42") align 8 %27, ptr noundef nonnull align 8 dereferenceable(492) %28, ptr noundef nonnull align 8 dereferenceable(24) %11)
          to label %155 unwind label %163

155:                                              ; preds = %154
  %156 = load ptr, ptr %10, align 8, !tbaa !5
  %157 = load ptr, ptr %21, align 8, !tbaa !5
  %158 = load ptr, ptr %25, align 8, !tbaa !5
  invoke void @_ZNK4dali10BoxEncoderINS_10CPUBackendEE20WriteMatchesToOutputERKSt6vectorISt4pairIjjESaIS5_EERKS3_INS_3BoxILi2EfEESaISB_EEPKiPfPi(ptr noundef nonnull align 8 dereferenceable(492) %28, ptr noundef nonnull align 8 dereferenceable(24) %27, ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef %156, ptr noundef %157, ptr noundef %158)
          to label %159 unwind label %167

159:                                              ; preds = %155
  call void @_ZNSt6vectorISt4pairIjjESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %27) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %27) #7
  store i32 0, ptr %26, align 4
  br label %160

160:                                              ; preds = %159, %111
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @_ZNSt6vectorIN4dali3BoxILi2EfEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  %161 = load i32, ptr %26, align 4
  switch i32 %161, label %182 [
    i32 0, label %162
    i32 1, label %162
  ]

162:                                              ; preds = %160, %160
  ret void

163:                                              ; preds = %154
  %164 = landingpad { ptr, i32 }
          cleanup
  %165 = extractvalue { ptr, i32 } %164, 0
  store ptr %165, ptr %12, align 8
  %166 = extractvalue { ptr, i32 } %164, 1
  store i32 %166, ptr %13, align 4
  br label %171

167:                                              ; preds = %155
  %168 = landingpad { ptr, i32 }
          cleanup
  %169 = extractvalue { ptr, i32 } %168, 0
  store ptr %169, ptr %12, align 8
  %170 = extractvalue { ptr, i32 } %168, 1
  store i32 %170, ptr %13, align 4
  call void @_ZNSt6vectorISt4pairIjjESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %27) #7
  br label %171

171:                                              ; preds = %167, %163
  call void @llvm.lifetime.end.p0(i64 24, ptr %27) #7
  br label %172

172:                                              ; preds = %171, %150
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #7
  br label %173

173:                                              ; preds = %172, %149, %137
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #7
  br label %174

174:                                              ; preds = %173, %133
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #7
  br label %175

175:                                              ; preds = %174, %132, %120
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  br label %176

176:                                              ; preds = %175, %116, %112
  call void @_ZNSt6vectorIN4dali3BoxILi2EfEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  br label %177

177:                                              ; preds = %176
  %178 = load ptr, ptr %12, align 8
  %179 = load i32, ptr %13, align 4
  %180 = insertvalue { ptr, i32 } poison, ptr %178, 0
  %181 = insertvalue { ptr, i32 } %180, i32 %179, 1
  resume { ptr, i32 } %181

182:                                              ; preds = %160
  unreachable
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(272) ptr @_ZNK4dali13WorkspaceBaseINS_6TensorESt13add_pointer_tE5InputINS_10CPUBackendEEERKDaiT_(ptr noundef nonnull align 8 dereferenceable(568), i32 noundef) #2 align 2

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZN4dali10make_cspanILln1EfEENS_4spanIKT0_XT_EEEPS3_l(ptr noundef, i64 noundef) #2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(272) ptr @_ZNK4dali13WorkspaceBaseINS_6TensorESt13add_pointer_tE6OutputINS_10CPUBackendEEERDaiT_(ptr noundef nonnull align 8 dereferenceable(568), i32 noundef) #2 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) #5 align 2

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

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIN4dali3BoxILi2EfEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 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 = { mustprogress uwtable "min-legal-vector-width"="64" "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { 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 #6 = { 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 #7 = { nounwind }

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

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


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

%"class.std::vector.42" = type { %"struct.std::_Vector_base.43" }
%"struct.std::_Vector_base.43" = type { %"struct.std::_Vector_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<unsigned int, unsigned int>, std::allocator<std::pair<unsigned int, unsigned int>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.32" = type { %"struct.std::_Vector_base.33" }
%"struct.std::_Vector_base.33" = type { %"struct.std::_Vector_base<dali::Box<2, float>, std::allocator<dali::Box<2, float>>>::_Vector_impl" }
%"struct.std::_Vector_base<dali::Box<2, float>, std::allocator<dali::Box<2, float>>>::_Vector_impl" = type { %"struct.std::_Vector_base<dali::Box<2, float>, std::allocator<dali::Box<2, float>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<dali::Box<2, float>, std::allocator<dali::Box<2, float>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.dali::TensorLayout" = type { [16 x i8] }
%"struct.dali::Box" = type { %"struct.dali::vec", %"struct.dali::vec" }
%"struct.dali::vec" = type { %"struct.dali::vec_base" }
%"struct.dali::vec_base" = type { %union.anon.0 }
%union.anon.0 = type { [2 x float] }
%"struct.dali::TensorShape" = type { %"struct.dali::TensorShapeBase" }
%"struct.dali::TensorShapeBase" = type { %"class.dali::SmallVector.74" }
%"class.dali::SmallVector.74" = type { %union.anon.77, i64 }
%union.anon.77 = type { %struct.anon.78, [32 x i8] }
%struct.anon.78 = type { ptr, 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 i64 @_ZNKSt6vectorIN4dali3BoxILi2EfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK4dali10BoxEncoderINS_10CPUBackendEE21MatchBoxesWithAnchorsERKSt6vectorINS_3BoxILi2EfEESaIS5_EE(ptr dead_on_unwind noalias writable sret(%"class.std::vector.42") align 8, ptr noundef nonnull align 8 dereferenceable(492), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #2 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK4dali10BoxEncoderINS_10CPUBackendEE20WriteMatchesToOutputERKSt6vectorISt4pairIjjESaIS5_EERKS3_INS_3BoxILi2EfEESaISB_EEPKiPfPi(ptr noundef nonnull align 8 dereferenceable(492), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24), ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4dali10BoxEncoderINS_10CPUBackendEE7RunImplERNS_15SampleWorkspaceE(ptr noundef nonnull align 8 dereferenceable(492) %0, ptr noundef nonnull align 8 dereferenceable(576) %1) unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::vector.32", align 8
  %4 = alloca %"class.dali::TensorLayout", align 8
  %5 = alloca %"struct.dali::Box", align 4
  %6 = alloca %"struct.dali::TensorShape", align 8
  %7 = alloca %"struct.dali::TensorShape", align 8
  %8 = alloca %"class.std::vector.42", align 8
  %9 = tail call noundef nonnull align 8 dereferenceable(272) ptr @_ZNK4dali13WorkspaceBaseINS_6TensorESt13add_pointer_tE5InputINS_10CPUBackendEEERKDaiT_(ptr noundef nonnull align 8 dereferenceable(568) %1, i32 noundef 0)
  %10 = tail call noundef nonnull align 8 dereferenceable(272) ptr @_ZNK4dali13WorkspaceBaseINS_6TensorESt13add_pointer_tE5InputINS_10CPUBackendEEERKDaiT_(ptr noundef nonnull align 8 dereferenceable(568) %1, i32 noundef 1)
  %11 = load ptr, ptr %9, align 8, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %11, i64 24
  %13 = load ptr, ptr %12, align 8
  %14 = tail call noundef i64 %13(ptr noundef nonnull align 8 dereferenceable(272) %9, i32 noundef 0)
  %15 = tail call noundef ptr @_ZNK4dali6BufferINS_10CPUBackendEE4dataIiEEPKT_v(ptr noundef nonnull align 8 dereferenceable(138) %10)
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #7
  call void @_ZNSt6vectorIN4dali3BoxILi2EfEESaIS2_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  invoke void @_ZNSt6vectorIN4dali3BoxILi2EfEESaIS2_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %14)
          to label %16 unwind label %54

16:                                               ; preds = %2
  %17 = invoke { ptr, i64 } @_ZN4dali9make_spanISt6vectorINS_3BoxILi2EfEESaIS3_EEEEDaRT_(ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %18 unwind label %54

18:                                               ; preds = %16
  %19 = extractvalue { ptr, i64 } %17, 0
  %20 = extractvalue { ptr, i64 } %17, 1
  %21 = invoke noundef ptr @_ZNK4dali6BufferINS_10CPUBackendEE4dataIfEEPKT_v(ptr noundef nonnull align 8 dereferenceable(138) %9)
          to label %22 unwind label %54

22:                                               ; preds = %18
  %23 = call noundef i64 @_ZNK4dali6BufferINS_10CPUBackendEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(138) %9)
  %24 = invoke { ptr, i64 } @_ZN4dali10make_cspanILln1EfEENS_4spanIKT0_XT_EEEPS3_l(ptr noundef %21, i64 noundef %23)
          to label %25 unwind label %54

25:                                               ; preds = %22
  invoke void @_ZN4dali12TensorLayoutC2Ev(ptr noundef nonnull align 1 dereferenceable(16) %4)
          to label %26 unwind label %54

26:                                               ; preds = %25
  %27 = extractvalue { ptr, i64 } %24, 1
  %28 = extractvalue { ptr, i64 } %24, 0
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(16) %5, i8 0, i64 16, i1 false)
  %29 = load i64, ptr %4, align 8
  %30 = getelementptr inbounds i8, ptr %4, i64 8
  %31 = load i64, ptr %30, align 8
  invoke void @_ZN4dali9ReadBoxesILi2EEEvNS_4spanINS_3BoxIXT_EfEELln1EEENS1_IKfLln1EEENS_12TensorLayoutERKS3_(ptr %19, i64 %20, ptr %28, i64 %27, i64 %29, i64 %31, ptr noundef nonnull align 4 dereferenceable(16) %5)
          to label %32 unwind label %56

32:                                               ; preds = %26
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  %33 = invoke noundef nonnull align 8 dereferenceable(272) ptr @_ZNK4dali13WorkspaceBaseINS_6TensorESt13add_pointer_tE6OutputINS_10CPUBackendEEERDaiT_(ptr noundef nonnull align 8 dereferenceable(568) %1, i32 noundef 0)
          to label %34 unwind label %58

34:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %6) #7
  %35 = getelementptr inbounds i8, ptr %0, i64 408
  %36 = call noundef i64 @_ZNKSt6vectorIN4dali3BoxILi2EfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %35) #7
  %sext = shl i64 %36, 32
  %37 = ashr exact i64 %sext, 32
  invoke void @_ZN4dali11TensorShapeILin1EEC2IJiEvEElDpT_(ptr noundef nonnull align 8 dereferenceable(56) %6, i64 noundef %37, i32 noundef 4)
          to label %38 unwind label %60

38:                                               ; preds = %34
  %39 = call noundef i32 @_ZNK4dali6BufferINS_10CPUBackendEE4typeEv(ptr noundef nonnull align 8 dereferenceable(138) %9)
  invoke void @_ZN4dali6TensorINS_10CPUBackendEE6ResizeERKNS_11TensorShapeILin1EEE13_DALIDataType(ptr noundef nonnull align 8 dereferenceable(272) %33, ptr noundef nonnull align 8 dereferenceable(56) %6, i32 noundef %39)
          to label %40 unwind label %62

40:                                               ; preds = %38
  call void @_ZN4dali15TensorShapeBaseINS_11SmallVectorIlLm6ESaIlEEELin1EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %6) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %6) #7
  %41 = invoke noundef ptr @_ZN4dali6BufferINS_10CPUBackendEE12mutable_dataIfEEPT_v(ptr noundef nonnull align 8 dereferenceable(138) %33)
          to label %42 unwind label %65

42:                                               ; preds = %40
  %43 = invoke noundef nonnull align 8 dereferenceable(272) ptr @_ZNK4dali13WorkspaceBaseINS_6TensorESt13add_pointer_tE6OutputINS_10CPUBackendEEERDaiT_(ptr noundef nonnull align 8 dereferenceable(568) %1, i32 noundef 1)
          to label %44 unwind label %67

44:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %7) #7
  %45 = call noundef i64 @_ZNKSt6vectorIN4dali3BoxILi2EfEESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %35) #7
  %sext34 = shl i64 %45, 32
  %46 = ashr exact i64 %sext34, 32
  invoke void @_ZN4dali11TensorShapeILin1EEC2IJEvEElDpT_(ptr noundef nonnull align 8 dereferenceable(56) %7, i64 noundef %46)
          to label %47 unwind label %69

47:                                               ; preds = %44
  %48 = call noundef i32 @_ZNK4dali6BufferINS_10CPUBackendEE4typeEv(ptr noundef nonnull align 8 dereferenceable(138) %10)
  invoke void @_ZN4dali6TensorINS_10CPUBackendEE6ResizeERKNS_11TensorShapeILin1EEE13_DALIDataType(ptr noundef nonnull align 8 dereferenceable(272) %43, ptr noundef nonnull align 8 dereferenceable(56) %7, i32 noundef %48)
          to label %49 unwind label %71

49:                                               ; preds = %47
  call void @_ZN4dali15TensorShapeBaseINS_11SmallVectorIlLm6ESaIlEEELin1EED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %7) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %7) #7
  %50 = invoke noundef ptr @_ZN4dali6BufferINS_10CPUBackendEE12mutable_dataIiEEPT_v(ptr noundef nonnull align 8 dereferenceable(138) %43)
          to label %51 unwind label %74

51:                                               ; preds = %49
  invoke void @_ZNK4dali10BoxEncoderINS_10CPUBackendEE20WriteAnchorsToOutputEPfPi(ptr noundef nonnull align 8 dereferenceable(492) %0, ptr noundef %41, ptr noundef %50)
          to label %52 unwind label %74

52:                                               ; preds = %51
  %53 = icmp eq i64 %14, 0
  br i1 %53, label %79, label %76

54:                                               ; preds = %25, %22, %18, %16, %2
  %55 = landingpad { ptr, i32 }
          cleanup
  br label %85

56:                                               ; preds = %26
  %57 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #7
  br label %85

58:                                               ; preds = %32
  %59 = landingpad { ptr, i32 }
          cleanup
  br label %85

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

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

64:                                               ; preds = %62, %60
  %.pn = phi { ptr, i32 } [ %63, %62 ], [ %61, %60 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %6) #7
  br label %85

65:                                               ; preds = %40
  %66 = landingpad { ptr, i32 }
          cleanup
  br label %85

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

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

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

73:                                               ; preds = %71, %69
  %.pn35 = phi { ptr, i32 } [ %72, %71 ], [ %70, %69 ]
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %7) #7
  br label %85

74:                                               ; preds = %51, %49
  %75 = landingpad { ptr, i32 }
          cleanup
  br label %85

76:                                               ; preds = %52
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %8) #7
  invoke void @_ZNK4dali10BoxEncoderINS_10CPUBackendEE21MatchBoxesWithAnchorsERKSt6vectorINS_3BoxILi2EfEESaIS5_EE(ptr dead_on_unwind nonnull writable sret(%"class.std::vector.42") align 8 %8, ptr noundef nonnull align 8 dereferenceable(492) %0, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %77 unwind label %80

77:                                               ; preds = %76
  invoke void @_ZNK4dali10BoxEncoderINS_10CPUBackendEE20WriteMatchesToOutputERKSt6vectorISt4pairIjjESaIS5_EERKS3_INS_3BoxILi2EfEESaISB_EEPKiPfPi(ptr noundef nonnull align 8 dereferenceable(492) %0, ptr noundef nonnull align 8 dereferenceable(24) %8, ptr noundef nonnull align 8 dereferenceable(24) %3, ptr noundef %15, ptr noundef %41, ptr noundef %50)
          to label %78 unwind label %82

78:                                               ; preds = %77
  call void @_ZNSt6vectorISt4pairIjjESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #7
  br label %79

79:                                               ; preds = %52, %78
  call void @_ZNSt6vectorIN4dali3BoxILi2EfEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #7
  ret void

80:                                               ; preds = %76
  %81 = landingpad { ptr, i32 }
          cleanup
  br label %84

82:                                               ; preds = %77
  %83 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorISt4pairIjjESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %8) #7
  br label %84

84:                                               ; preds = %82, %80
  %.pn37 = phi { ptr, i32 } [ %83, %82 ], [ %81, %80 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %8) #7
  br label %85

85:                                               ; preds = %58, %64, %67, %73, %84, %74, %65, %56, %54
  %.pn37.pn.pn.pn.pn.pn = phi { ptr, i32 } [ %57, %56 ], [ %55, %54 ], [ %.pn, %64 ], [ %59, %58 ], [ %66, %65 ], [ %.pn35, %73 ], [ %68, %67 ], [ %.pn37, %84 ], [ %75, %74 ]
  call void @_ZNSt6vectorIN4dali3BoxILi2EfEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #7
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #7
  resume { ptr, i32 } %.pn37.pn.pn.pn.pn.pn
}

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(272) ptr @_ZNK4dali13WorkspaceBaseINS_6TensorESt13add_pointer_tE5InputINS_10CPUBackendEEERKDaiT_(ptr noundef nonnull align 8 dereferenceable(568), i32 noundef) local_unnamed_addr #2 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4dali9ReadBoxesILi2EEEvNS_4spanINS_3BoxIXT_EfEELln1EEENS1_IKfLln1EEENS_12TensorLayoutERKS3_(ptr, i64, ptr, i64, i64, i64, ptr noundef nonnull align 4 dereferenceable(16)) local_unnamed_addr #2

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZN4dali10make_cspanILln1EfEENS_4spanIKT0_XT_EEEPS3_l(ptr noundef, i64 noundef) local_unnamed_addr #2

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(272) ptr @_ZNK4dali13WorkspaceBaseINS_6TensorESt13add_pointer_tE6OutputINS_10CPUBackendEEERDaiT_(ptr noundef nonnull align 8 dereferenceable(568), i32 noundef) local_unnamed_addr #2 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 #5 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4dali11TensorShapeILin1EEC2IJiEvEElDpT_(ptr noundef nonnull align 8 dereferenceable(56), i64 noundef, i32 noundef) unnamed_addr #2 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 #6 align 2

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIN4dali3BoxILi2EfEESaIS2_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 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 = { mustprogress uwtable "min-legal-vector-width"="64" "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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { 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 #6 = { 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 #7 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}


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