; LLVM IR from NVIDIA/DALI :: dali/operators/reader/loader (sequence_loader)

; 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.__gnu_cxx::__normal_iterator.41" = type { ptr }
%"struct.dali::TensorSequence" = type { %"class.std::vector.20" }
%"class.std::vector.20" = type { %"struct.std::_Vector_base.21" }
%"struct.std::_Vector_base.21" = type { %"struct.std::_Vector_base<dali::Tensor<dali::CPUBackend>, std::allocator<dali::Tensor<dali::CPUBackend>>>::_Vector_impl" }
%"struct.std::_Vector_base<dali::Tensor<dali::CPUBackend>, std::allocator<dali::Tensor<dali::CPUBackend>>>::_Vector_impl" = type { %"struct.std::_Vector_base<dali::Tensor<dali::CPUBackend>, std::allocator<dali::Tensor<dali::CPUBackend>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<dali::Tensor<dali::CPUBackend>, std::allocator<dali::Tensor<dali::CPUBackend>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.dali::SequenceLoader" = type <{ %"class.dali::Loader", %"class.std::__cxx11::basic_string", i32, i32, i32, [4 x i8], %"class.std::vector.3", %"class.std::vector.14", i64, i64, %"class.dali::FileStream::MappingReserver", [4 x i8] }>
%"class.dali::Loader" = type { ptr, %"class.std::vector.25", %"class.std::vector.30", i8, i32, i32, i32, %"class.std::linear_congruential_engine", i64, %"class.std::mutex", i32, i32, i8, i8, i8, i32, i8, %"class.std::mutex", i8, i8, %"class.dali::once_flag", %"class.std::shared_ptr", i64, i8, i8, i8, i32, i32, i32, %"struct.dali::Loader<dali::CPUBackend, dali::TensorSequence, true>::IndexedLoadTargetSharedPtr", %"class.std::deque", i8, i64, i64, %"struct.dali::LoaderStateSnapshot" }
%"class.std::vector.25" = type { %"struct.std::_Vector_base.26" }
%"struct.std::_Vector_base.26" = type { %"struct.std::_Vector_base<dali::Loader<dali::CPUBackend, dali::TensorSequence, true>::IndexedLoadTargetSharedPtr, std::allocator<dali::Loader<dali::CPUBackend, dali::TensorSequence, true>::IndexedLoadTargetSharedPtr>>::_Vector_impl" }
%"struct.std::_Vector_base<dali::Loader<dali::CPUBackend, dali::TensorSequence, true>::IndexedLoadTargetSharedPtr, std::allocator<dali::Loader<dali::CPUBackend, dali::TensorSequence, true>::IndexedLoadTargetSharedPtr>>::_Vector_impl" = type { %"struct.std::_Vector_base<dali::Loader<dali::CPUBackend, dali::TensorSequence, true>::IndexedLoadTargetSharedPtr, std::allocator<dali::Loader<dali::CPUBackend, dali::TensorSequence, true>::IndexedLoadTargetSharedPtr>>::_Vector_impl_data" }
%"struct.std::_Vector_base<dali::Loader<dali::CPUBackend, dali::TensorSequence, true>::IndexedLoadTargetSharedPtr, std::allocator<dali::Loader<dali::CPUBackend, dali::TensorSequence, true>::IndexedLoadTargetSharedPtr>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.30" = type { %"struct.std::_Vector_base.31" }
%"struct.std::_Vector_base.31" = type { %"struct.std::_Vector_base<std::unique_ptr<dali::TensorSequence>, std::allocator<std::unique_ptr<dali::TensorSequence>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::unique_ptr<dali::TensorSequence>, std::allocator<std::unique_ptr<dali::TensorSequence>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::unique_ptr<dali::TensorSequence>, std::allocator<std::unique_ptr<dali::TensorSequence>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::unique_ptr<dali::TensorSequence>, std::allocator<std::unique_ptr<dali::TensorSequence>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::linear_congruential_engine" = type { i64 }
%"class.std::mutex" = type { %"class.std::__mutex_base" }
%"class.std::__mutex_base" = type { %union.pthread_mutex_t }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.dali::once_flag" = type { i8, %"class.std::mutex" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"struct.dali::Loader<dali::CPUBackend, dali::TensorSequence, true>::IndexedLoadTargetSharedPtr" = type { i64, %"class.std::shared_ptr.35" }
%"class.std::shared_ptr.35" = type { %"class.std::__shared_ptr.36" }
%"class.std::__shared_ptr.36" = type { ptr, %"class.std::__shared_count" }
%"class.std::deque" = type { %"class.std::_Deque_base" }
%"class.std::_Deque_base" = type { %"struct.std::_Deque_base<dali::Loader<dali::CPUBackend, dali::TensorSequence, true>::ShardBoundaries, std::allocator<dali::Loader<dali::CPUBackend, dali::TensorSequence, true>::ShardBoundaries>>::_Deque_impl" }
%"struct.std::_Deque_base<dali::Loader<dali::CPUBackend, dali::TensorSequence, true>::ShardBoundaries, std::allocator<dali::Loader<dali::CPUBackend, dali::TensorSequence, true>::ShardBoundaries>>::_Deque_impl" = type { %"struct.std::_Deque_base<dali::Loader<dali::CPUBackend, dali::TensorSequence, true>::ShardBoundaries, std::allocator<dali::Loader<dali::CPUBackend, dali::TensorSequence, true>::ShardBoundaries>>::_Deque_impl_data" }
%"struct.std::_Deque_base<dali::Loader<dali::CPUBackend, dali::TensorSequence, true>::ShardBoundaries, std::allocator<dali::Loader<dali::CPUBackend, dali::TensorSequence, true>::ShardBoundaries>>::_Deque_impl_data" = type { ptr, i64, %"struct.std::_Deque_iterator", %"struct.std::_Deque_iterator" }
%"struct.std::_Deque_iterator" = type { ptr, ptr, ptr, ptr }
%"struct.dali::LoaderStateSnapshot" = type { %"class.std::linear_congruential_engine", i32, i64 }
%"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.3" = type { %"struct.std::_Vector_base.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<std::pair<std::__cxx11::basic_string<char>, std::vector<std::__cxx11::basic_string<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char>, std::vector<std::__cxx11::basic_string<char>>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::pair<std::__cxx11::basic_string<char>, std::vector<std::__cxx11::basic_string<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char>, std::vector<std::__cxx11::basic_string<char>>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::pair<std::__cxx11::basic_string<char>, std::vector<std::__cxx11::basic_string<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char>, std::vector<std::__cxx11::basic_string<char>>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::pair<std::__cxx11::basic_string<char>, std::vector<std::__cxx11::basic_string<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char>, std::vector<std::__cxx11::basic_string<char>>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.14" = type { %"struct.std::_Vector_base.15" }
%"struct.std::_Vector_base.15" = type { %"struct.std::_Vector_base<std::vector<std::__cxx11::basic_string<char>>, std::allocator<std::vector<std::__cxx11::basic_string<char>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<std::__cxx11::basic_string<char>>, std::allocator<std::vector<std::__cxx11::basic_string<char>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<std::__cxx11::basic_string<char>>, std::allocator<std::vector<std::__cxx11::basic_string<char>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<std::__cxx11::basic_string<char>>, std::allocator<std::vector<std::__cxx11::basic_string<char>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.dali::FileStream::MappingReserver" = type { i32 }

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4dali14SequenceLoader12PrepareEmptyERNS_14TensorSequenceE(ptr noundef nonnull align 8 dereferenceable(556) %0, ptr noundef nonnull align 8 dereferenceable(24) %1) unnamed_addr #1 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator.41", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.41", align 8
  %8 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %9 = load ptr, ptr %3, align 8
  %10 = load ptr, ptr %4, align 8, !tbaa !5
  %11 = getelementptr inbounds %"struct.dali::TensorSequence", ptr %10, i32 0, i32 0
  %12 = getelementptr inbounds %"class.dali::SequenceLoader", ptr %9, i32 0, i32 2
  %13 = load i32, ptr %12, align 8, !tbaa !9
  %14 = sext i32 %13 to i64
  call void @_ZNSt6vectorIN4dali6TensorINS0_10CPUBackendEEESaIS3_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %14)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = getelementptr inbounds %"struct.dali::TensorSequence", ptr %15, i32 0, i32 0
  store ptr %16, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = call ptr @_ZNSt6vectorIN4dali6TensorINS0_10CPUBackendEEESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #4
  %19 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.41", ptr %6, i32 0, i32 0
  store ptr %18, ptr %19, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  %21 = call ptr @_ZNSt6vectorIN4dali6TensorINS0_10CPUBackendEEESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #4
  %22 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.41", ptr %7, i32 0, i32 0
  store ptr %21, ptr %22, align 8
  br label %23

23:                                               ; preds = %29, %2
  %24 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN4dali6TensorINS1_10CPUBackendEEESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  br i1 %24, label %26, label %25

25:                                               ; preds = %23
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  br label %31

26:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %27 = call noundef nonnull align 8 dereferenceable(272) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN4dali6TensorINS1_10CPUBackendEEESt6vectorIS4_SaIS4_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  store ptr %27, ptr %8, align 8, !tbaa !5
  %28 = load ptr, ptr %8, align 8, !tbaa !5
  call void @_ZN4dali6LoaderINS_10CPUBackendENS_14TensorSequenceELb1EE18PrepareEmptyTensorINS_6TensorIS1_EEEENSt9enable_ifIXoosr3std7is_sameIT_NS5_INS_10GPUBackendEEEEE5valuesr3std7is_sameIS8_S6_EE5valueEvE4typeERS8_(ptr noundef nonnull align 8 dereferenceable(440) %9, ptr noundef nonnull align 8 dereferenceable(272) %28)
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %29

29:                                               ; preds = %26
  %30 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN4dali6TensorINS1_10CPUBackendEEESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  br label %23

31:                                               ; preds = %25
  ret void
}

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4dali6LoaderINS_10CPUBackendENS_14TensorSequenceELb1EE18PrepareEmptyTensorINS_6TensorIS1_EEEENSt9enable_ifIXoosr3std7is_sameIT_NS5_INS_10GPUBackendEEEEE5valuesr3std7is_sameIS8_S6_EE5valueEvE4typeERS8_(ptr noundef nonnull align 8 dereferenceable(440), ptr noundef nonnull align 8 dereferenceable(272)) #1 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress 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, !21, i64 472}
!10 = !{!"_ZTSN4dali14SequenceLoaderE", !11, i64 0, !39, i64 440, !21, i64 472, !21, i64 476, !21, i64 480, !41, i64 488, !45, i64 512, !23, i64 536, !23, i64 544, !49, i64 552}
!11 = !{!"_ZTSN4dali6LoaderINS_10CPUBackendENS_14TensorSequenceELb1EEE", !12, i64 8, !16, i64 32, !20, i64 56, !21, i64 60, !21, i64 64, !21, i64 68, !22, i64 72, !23, i64 80, !24, i64 88, !21, i64 128, !21, i64 132, !20, i64 136, !20, i64 137, !20, i64 138, !21, i64 140, !20, i64 144, !24, i64 152, !20, i64 192, !20, i64 193, !26, i64 200, !27, i64 248, !23, i64 264, !20, i64 272, !20, i64 273, !20, i64 274, !21, i64 276, !21, i64 280, !21, i64 284, !30, i64 288, !33, i64 312, !20, i64 392, !23, i64 400, !23, i64 408, !38, i64 416}
!12 = !{!"_ZTSSt6vectorIN4dali6LoaderINS0_10CPUBackendENS0_14TensorSequenceELb1EE26IndexedLoadTargetSharedPtrESaIS5_EE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseIN4dali6LoaderINS0_10CPUBackendENS0_14TensorSequenceELb1EE26IndexedLoadTargetSharedPtrESaIS5_EE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIN4dali6LoaderINS0_10CPUBackendENS0_14TensorSequenceELb1EE26IndexedLoadTargetSharedPtrESaIS5_EE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIN4dali6LoaderINS0_10CPUBackendENS0_14TensorSequenceELb1EE26IndexedLoadTargetSharedPtrESaIS5_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!16 = !{!"_ZTSSt6vectorISt10unique_ptrIN4dali14TensorSequenceESt14default_deleteIS2_EESaIS5_EE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseISt10unique_ptrIN4dali14TensorSequenceESt14default_deleteIS2_EESaIS5_EE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseISt10unique_ptrIN4dali14TensorSequenceESt14default_deleteIS2_EESaIS5_EE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseISt10unique_ptrIN4dali14TensorSequenceESt14default_deleteIS2_EESaIS5_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!"bool", !7, i64 0}
!21 = !{!"int", !7, i64 0}
!22 = !{!"_ZTSSt26linear_congruential_engineImLm16807ELm0ELm2147483647EE", !23, i64 0}
!23 = !{!"long", !7, i64 0}
!24 = !{!"_ZTSSt5mutex", !25, i64 0}
!25 = !{!"_ZTSSt12__mutex_base", !7, i64 0}
!26 = !{!"_ZTSN4dali9once_flagE", !20, i64 0, !24, i64 8}
!27 = !{!"_ZTSSt10shared_ptrIN4dali10ImageCacheEE", !28, i64 0}
!28 = !{!"_ZTSSt12__shared_ptrIN4dali10ImageCacheELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !29, i64 8}
!29 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0}
!30 = !{!"_ZTSN4dali6LoaderINS_10CPUBackendENS_14TensorSequenceELb1EE26IndexedLoadTargetSharedPtrE", !23, i64 0, !31, i64 8}
!31 = !{!"_ZTSSt10shared_ptrIN4dali14TensorSequenceEE", !32, i64 0}
!32 = !{!"_ZTSSt12__shared_ptrIN4dali14TensorSequenceELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !29, i64 8}
!33 = !{!"_ZTSSt5dequeIN4dali6LoaderINS0_10CPUBackendENS0_14TensorSequenceELb1EE15ShardBoundariesESaIS5_EE", !34, i64 0}
!34 = !{!"_ZTSSt11_Deque_baseIN4dali6LoaderINS0_10CPUBackendENS0_14TensorSequenceELb1EE15ShardBoundariesESaIS5_EE", !35, i64 0}
!35 = !{!"_ZTSNSt11_Deque_baseIN4dali6LoaderINS0_10CPUBackendENS0_14TensorSequenceELb1EE15ShardBoundariesESaIS5_EE11_Deque_implE", !36, i64 0}
!36 = !{!"_ZTSNSt11_Deque_baseIN4dali6LoaderINS0_10CPUBackendENS0_14TensorSequenceELb1EE15ShardBoundariesESaIS5_EE16_Deque_impl_dataE", !6, i64 0, !23, i64 8, !37, i64 16, !37, i64 48}
!37 = !{!"_ZTSSt15_Deque_iteratorIN4dali6LoaderINS0_10CPUBackendENS0_14TensorSequenceELb1EE15ShardBoundariesERS5_PS5_E", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!38 = !{!"_ZTSN4dali19LoaderStateSnapshotE", !22, i64 0, !21, i64 8, !23, i64 16}
!39 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !40, i64 0, !23, i64 8, !7, i64 16}
!40 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!41 = !{!"_ZTSSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES_IS6_SaIS6_EEESaIS9_EE", !42, i64 0}
!42 = !{!"_ZTSSt12_Vector_baseISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEESaISA_EE", !43, i64 0}
!43 = !{!"_ZTSNSt12_Vector_baseISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEESaISA_EE12_Vector_implE", !44, i64 0}
!44 = !{!"_ZTSNSt12_Vector_baseISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEESaISA_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!45 = !{!"_ZTSSt6vectorIS_INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EESaIS7_EE", !46, i64 0}
!46 = !{!"_ZTSSt12_Vector_baseISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EESaIS8_EE", !47, i64 0}
!47 = !{!"_ZTSNSt12_Vector_baseISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EESaIS8_EE12_Vector_implE", !48, i64 0}
!48 = !{!"_ZTSNSt12_Vector_baseISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EESaIS8_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!49 = !{!"_ZTSN4dali10FileStream15MappingReserverE", !21, 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.__gnu_cxx::__normal_iterator.41" = type { ptr }

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4dali14SequenceLoader12PrepareEmptyERNS_14TensorSequenceE(ptr noundef nonnull align 8 dereferenceable(556) %0, ptr noundef nonnull align 8 dereferenceable(24) %1) unnamed_addr #1 align 2 {
  %3 = alloca %"class.__gnu_cxx::__normal_iterator.41", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator.41", align 8
  %5 = getelementptr inbounds i8, ptr %0, i64 472
  %6 = load i32, ptr %5, align 8, !tbaa !5
  %7 = sext i32 %6 to i64
  tail call void @_ZNSt6vectorIN4dali6TensorINS0_10CPUBackendEEESaIS3_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %7)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  %8 = tail call ptr @_ZNSt6vectorIN4dali6TensorINS0_10CPUBackendEEESaIS3_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  store ptr %8, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %9 = tail call ptr @_ZNSt6vectorIN4dali6TensorINS0_10CPUBackendEEESaIS3_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  store ptr %9, ptr %4, align 8
  %10 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN4dali6TensorINS1_10CPUBackendEEESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  br i1 %10, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  ret void

.lr.ph:                                           ; preds = %2, %.lr.ph
  %11 = call noundef nonnull align 8 dereferenceable(272) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPN4dali6TensorINS1_10CPUBackendEEESt6vectorIS4_SaIS4_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  call void @_ZN4dali6LoaderINS_10CPUBackendENS_14TensorSequenceELb1EE18PrepareEmptyTensorINS_6TensorIS1_EEEENSt9enable_ifIXoosr3std7is_sameIT_NS5_INS_10GPUBackendEEEEE5valuesr3std7is_sameIS8_S6_EE5valueEvE4typeERS8_(ptr noundef nonnull align 8 dereferenceable(440) %0, ptr noundef nonnull align 8 dereferenceable(272) %11)
  %12 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPN4dali6TensorINS1_10CPUBackendEEESt6vectorIS4_SaIS4_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  %13 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPN4dali6TensorINS1_10CPUBackendEEESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  br i1 %13, label %.lr.ph, label %._crit_edge
}

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4dali6LoaderINS_10CPUBackendENS_14TensorSequenceELb1EE18PrepareEmptyTensorINS_6TensorIS1_EEEENSt9enable_ifIXoosr3std7is_sameIT_NS5_INS_10GPUBackendEEEEE5valuesr3std7is_sameIS8_S6_EE5valueEvE4typeERS8_(ptr noundef nonnull align 8 dereferenceable(440), ptr noundef nonnull align 8 dereferenceable(272)) local_unnamed_addr #1 align 2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress 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, !20, i64 472}
!6 = !{!"_ZTSN4dali14SequenceLoaderE", !7, i64 0, !38, i64 440, !20, i64 472, !20, i64 476, !20, i64 480, !40, i64 488, !44, i64 512, !22, i64 536, !22, i64 544, !48, i64 552}
!7 = !{!"_ZTSN4dali6LoaderINS_10CPUBackendENS_14TensorSequenceELb1EEE", !8, i64 8, !15, i64 32, !19, i64 56, !20, i64 60, !20, i64 64, !20, i64 68, !21, i64 72, !22, i64 80, !23, i64 88, !20, i64 128, !20, i64 132, !19, i64 136, !19, i64 137, !19, i64 138, !20, i64 140, !19, i64 144, !23, i64 152, !19, i64 192, !19, i64 193, !25, i64 200, !26, i64 248, !22, i64 264, !19, i64 272, !19, i64 273, !19, i64 274, !20, i64 276, !20, i64 280, !20, i64 284, !29, i64 288, !32, i64 312, !19, i64 392, !22, i64 400, !22, i64 408, !37, i64 416}
!8 = !{!"_ZTSSt6vectorIN4dali6LoaderINS0_10CPUBackendENS0_14TensorSequenceELb1EE26IndexedLoadTargetSharedPtrESaIS5_EE", !9, i64 0}
!9 = !{!"_ZTSSt12_Vector_baseIN4dali6LoaderINS0_10CPUBackendENS0_14TensorSequenceELb1EE26IndexedLoadTargetSharedPtrESaIS5_EE", !10, i64 0}
!10 = !{!"_ZTSNSt12_Vector_baseIN4dali6LoaderINS0_10CPUBackendENS0_14TensorSequenceELb1EE26IndexedLoadTargetSharedPtrESaIS5_EE12_Vector_implE", !11, i64 0}
!11 = !{!"_ZTSNSt12_Vector_baseIN4dali6LoaderINS0_10CPUBackendENS0_14TensorSequenceELb1EE26IndexedLoadTargetSharedPtrESaIS5_EE17_Vector_impl_dataE", !12, i64 0, !12, i64 8, !12, i64 16}
!12 = !{!"any pointer", !13, i64 0}
!13 = !{!"omnipotent char", !14, i64 0}
!14 = !{!"Simple C++ TBAA"}
!15 = !{!"_ZTSSt6vectorISt10unique_ptrIN4dali14TensorSequenceESt14default_deleteIS2_EESaIS5_EE", !16, i64 0}
!16 = !{!"_ZTSSt12_Vector_baseISt10unique_ptrIN4dali14TensorSequenceESt14default_deleteIS2_EESaIS5_EE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseISt10unique_ptrIN4dali14TensorSequenceESt14default_deleteIS2_EESaIS5_EE12_Vector_implE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseISt10unique_ptrIN4dali14TensorSequenceESt14default_deleteIS2_EESaIS5_EE17_Vector_impl_dataE", !12, i64 0, !12, i64 8, !12, i64 16}
!19 = !{!"bool", !13, i64 0}
!20 = !{!"int", !13, i64 0}
!21 = !{!"_ZTSSt26linear_congruential_engineImLm16807ELm0ELm2147483647EE", !22, i64 0}
!22 = !{!"long", !13, i64 0}
!23 = !{!"_ZTSSt5mutex", !24, i64 0}
!24 = !{!"_ZTSSt12__mutex_base", !13, i64 0}
!25 = !{!"_ZTSN4dali9once_flagE", !19, i64 0, !23, i64 8}
!26 = !{!"_ZTSSt10shared_ptrIN4dali10ImageCacheEE", !27, i64 0}
!27 = !{!"_ZTSSt12__shared_ptrIN4dali10ImageCacheELN9__gnu_cxx12_Lock_policyE2EE", !12, i64 0, !28, i64 8}
!28 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !12, i64 0}
!29 = !{!"_ZTSN4dali6LoaderINS_10CPUBackendENS_14TensorSequenceELb1EE26IndexedLoadTargetSharedPtrE", !22, i64 0, !30, i64 8}
!30 = !{!"_ZTSSt10shared_ptrIN4dali14TensorSequenceEE", !31, i64 0}
!31 = !{!"_ZTSSt12__shared_ptrIN4dali14TensorSequenceELN9__gnu_cxx12_Lock_policyE2EE", !12, i64 0, !28, i64 8}
!32 = !{!"_ZTSSt5dequeIN4dali6LoaderINS0_10CPUBackendENS0_14TensorSequenceELb1EE15ShardBoundariesESaIS5_EE", !33, i64 0}
!33 = !{!"_ZTSSt11_Deque_baseIN4dali6LoaderINS0_10CPUBackendENS0_14TensorSequenceELb1EE15ShardBoundariesESaIS5_EE", !34, i64 0}
!34 = !{!"_ZTSNSt11_Deque_baseIN4dali6LoaderINS0_10CPUBackendENS0_14TensorSequenceELb1EE15ShardBoundariesESaIS5_EE11_Deque_implE", !35, i64 0}
!35 = !{!"_ZTSNSt11_Deque_baseIN4dali6LoaderINS0_10CPUBackendENS0_14TensorSequenceELb1EE15ShardBoundariesESaIS5_EE16_Deque_impl_dataE", !12, i64 0, !22, i64 8, !36, i64 16, !36, i64 48}
!36 = !{!"_ZTSSt15_Deque_iteratorIN4dali6LoaderINS0_10CPUBackendENS0_14TensorSequenceELb1EE15ShardBoundariesERS5_PS5_E", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24}
!37 = !{!"_ZTSN4dali19LoaderStateSnapshotE", !21, i64 0, !20, i64 8, !22, i64 16}
!38 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !39, i64 0, !22, i64 8, !13, i64 16}
!39 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !12, i64 0}
!40 = !{!"_ZTSSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES_IS6_SaIS6_EEESaIS9_EE", !41, i64 0}
!41 = !{!"_ZTSSt12_Vector_baseISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEESaISA_EE", !42, i64 0}
!42 = !{!"_ZTSNSt12_Vector_baseISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEESaISA_EE12_Vector_implE", !43, i64 0}
!43 = !{!"_ZTSNSt12_Vector_baseISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEESaISA_EE17_Vector_impl_dataE", !12, i64 0, !12, i64 8, !12, i64 16}
!44 = !{!"_ZTSSt6vectorIS_INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EESaIS7_EE", !45, i64 0}
!45 = !{!"_ZTSSt12_Vector_baseISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EESaIS8_EE", !46, i64 0}
!46 = !{!"_ZTSNSt12_Vector_baseISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EESaIS8_EE12_Vector_implE", !47, i64 0}
!47 = !{!"_ZTSNSt12_Vector_baseISt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EESaIS8_EE17_Vector_impl_dataE", !12, i64 0, !12, i64 8, !12, i64 16}
!48 = !{!"_ZTSN4dali10FileStream15MappingReserverE", !20, i64 0}


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