; 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.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 }
%"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 }

; 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 @_ZN4dali14SequenceLoader10ReadSampleERNS_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 i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %7 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  %8 = getelementptr inbounds %"class.dali::SequenceLoader", ptr %7, i32 0, i32 7
  %9 = getelementptr inbounds %"class.dali::SequenceLoader", ptr %7, i32 0, i32 9
  %10 = load i64, ptr %9, align 8, !tbaa !9
  %11 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EESaIS7_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %8, i64 noundef %10) #3
  store ptr %11, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #3
  store i32 0, ptr %6, align 4, !tbaa !50
  br label %12

12:                                               ; preds = %27, %2
  %13 = load i32, ptr %6, align 4, !tbaa !50
  %14 = getelementptr inbounds %"class.dali::SequenceLoader", ptr %7, i32 0, i32 2
  %15 = load i32, ptr %14, align 8, !tbaa !51
  %16 = icmp slt i32 %13, %15
  br i1 %16, label %18, label %17

17:                                               ; preds = %12
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #3
  br label %30

18:                                               ; preds = %12
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = load i32, ptr %6, align 4, !tbaa !50
  %21 = sext i32 %20 to i64
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = getelementptr inbounds %"struct.dali::TensorSequence", ptr %22, i32 0, i32 0
  %24 = load i32, ptr %6, align 4, !tbaa !50
  %25 = sext i32 %24 to i64
  %26 = call noundef nonnull align 8 dereferenceable(272) ptr @_ZNSt6vectorIN4dali6TensorINS0_10CPUBackendEEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %23, i64 noundef %25) #3
  call void @_ZN4dali14SequenceLoader9LoadFrameERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EElPNS_6TensorINS_10CPUBackendEEE(ptr noundef nonnull align 8 dereferenceable(556) %7, ptr noundef nonnull align 8 dereferenceable(24) %19, i64 noundef %21, ptr noundef %26)
  br label %27

27:                                               ; preds = %18
  %28 = load i32, ptr %6, align 4, !tbaa !50
  %29 = add nsw i32 %28, 1
  store i32 %29, ptr %6, align 4, !tbaa !50
  br label %12, !llvm.loop !52

30:                                               ; preds = %17
  %31 = getelementptr inbounds %"class.dali::SequenceLoader", ptr %7, i32 0, i32 9
  %32 = load i64, ptr %31, align 8, !tbaa !9
  %33 = add nsw i64 %32, 1
  store i64 %33, ptr %31, align 8, !tbaa !9
  %34 = getelementptr inbounds %"class.dali::SequenceLoader", ptr %7, i32 0, i32 9
  %35 = load i64, ptr %34, align 8, !tbaa !9
  %36 = load ptr, ptr %7, align 8, !tbaa !54
  %37 = getelementptr inbounds ptr, ptr %36, i64 7
  %38 = load ptr, ptr %37, align 8
  call void %38(ptr noundef nonnull align 8 dereferenceable(440) %7, i64 noundef %35)
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  ret void
}

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(272) ptr @_ZNSt6vectorIN4dali6TensorINS0_10CPUBackendEEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #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 = { 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, !23, i64 544}
!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}
!50 = !{!21, !21, i64 0}
!51 = !{!10, !21, i64 472}
!52 = distinct !{!52, !53}
!53 = !{!"llvm.loop.mustprogress"}
!54 = !{!55, !55, i64 0}
!55 = !{!"vtable pointer", !8, 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"

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN4dali14SequenceLoader10ReadSampleERNS_14TensorSequenceE(ptr noundef nonnull align 8 dereferenceable(556) %0, ptr noundef nonnull align 8 dereferenceable(24) %1) unnamed_addr #0 align 2 {
  %3 = getelementptr inbounds i8, ptr %0, i64 512
  %4 = getelementptr inbounds i8, ptr %0, i64 544
  %5 = load i64, ptr %4, align 8, !tbaa !5
  %6 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EESaIS7_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %3, i64 noundef %5) #2
  %7 = getelementptr inbounds i8, ptr %0, i64 472
  %8 = load i32, ptr %7, align 8, !tbaa !49
  %9 = icmp sgt i32 %8, 0
  br i1 %9, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %2
  %10 = load i64, ptr %4, align 8, !tbaa !5
  %11 = add nsw i64 %10, 1
  store i64 %11, ptr %4, align 8, !tbaa !5
  %12 = load ptr, ptr %0, align 8, !tbaa !50
  %13 = getelementptr inbounds i8, ptr %12, i64 56
  %14 = load ptr, ptr %13, align 8
  tail call void %14(ptr noundef nonnull align 8 dereferenceable(440) %0, i64 noundef %11)
  ret void

.lr.ph:                                           ; preds = %2, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %2 ]
  %15 = tail call noundef nonnull align 8 dereferenceable(272) ptr @_ZNSt6vectorIN4dali6TensorINS0_10CPUBackendEEESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv) #2
  tail call void @_ZN4dali14SequenceLoader9LoadFrameERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS7_EElPNS_6TensorINS_10CPUBackendEEE(ptr noundef nonnull align 8 dereferenceable(556) %0, ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv, ptr noundef nonnull %15)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %16 = load i32, ptr %7, align 8, !tbaa !49
  %17 = sext i32 %16 to i64
  %18 = icmp slt i64 %indvars.iv.next, %17
  br i1 %18, label %.lr.ph, label %._crit_edge, !llvm.loop !52
}

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

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

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

attributes #0 = { 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 #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 = { 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, !22, i64 544}
!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}
!49 = !{!6, !20, i64 472}
!50 = !{!51, !51, i64 0}
!51 = !{!"vtable pointer", !14, i64 0}
!52 = distinct !{!52, !53}
!53 = !{!"llvm.loop.mustprogress"}


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