; LLVM IR from flashlight/flashlight :: flashlight/fl/dataset/FileBlobDataset.ll (ZN2fl15FileBlobDatasetD2Ev)

; 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::shared_ptr.17" = type { %"class.std::__shared_ptr.18" }
%"class.std::__shared_ptr.18" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::lock_guard" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.fl::FileBlobDataset" = type { %"class.fl::BlobDataset", %"class.std::filesystem::__cxx11::path", i32, %"class.std::vector.10", %"class.std::mutex" }
%"class.fl::BlobDataset" = type { %"class.fl::Dataset", i32, [4 x i8], %"class.fl::BlobDatasetEntryBuffer", %"class.std::vector", %"class.std::vector", i64, %"class.std::unordered_map", %"class.std::mutex" }
%"class.fl::Dataset" = type { ptr }
%"class.fl::BlobDatasetEntryBuffer" = type <{ %"class.std::vector", i32, [4 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long, std::allocator<long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::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::filesystem::__cxx11::path" = type { %"class.std::__cxx11::basic_string", %"struct.std::filesystem::__cxx11::path::_List" }
%"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] }
%"struct.std::filesystem::__cxx11::path::_List" = type { %"class.std::unique_ptr" }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.9" }
%"struct.std::_Head_base.9" = type { ptr }
%"class.std::vector.10" = type { %"struct.std::_Vector_base.11" }
%"struct.std::_Vector_base.11" = type { %"struct.std::_Vector_base<std::weak_ptr<std::unordered_map<unsigned long, std::shared_ptr<std::basic_fstream<char>>>>, std::allocator<std::weak_ptr<std::unordered_map<unsigned long, std::shared_ptr<std::basic_fstream<char>>>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::weak_ptr<std::unordered_map<unsigned long, std::shared_ptr<std::basic_fstream<char>>>>, std::allocator<std::weak_ptr<std::unordered_map<unsigned long, std::shared_ptr<std::basic_fstream<char>>>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::weak_ptr<std::unordered_map<unsigned long, std::shared_ptr<std::basic_fstream<char>>>>, std::allocator<std::weak_ptr<std::unordered_map<unsigned long, std::shared_ptr<std::basic_fstream<char>>>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::weak_ptr<std::unordered_map<unsigned long, std::shared_ptr<std::basic_fstream<char>>>>, std::allocator<std::weak_ptr<std::unordered_map<unsigned long, std::shared_ptr<std::basic_fstream<char>>>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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 }

@_ZTVN2fl15FileBlobDatasetE = external dso_local unnamed_addr constant { [10 x ptr] }, align 8

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: nounwind
declare void @_ZN2fl11BlobDatasetD2Ev(ptr noundef nonnull align 8 dereferenceable(200)) unnamed_addr #2

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNKSt8weak_ptrISt13unordered_mapImSt10shared_ptrISt13basic_fstreamIcSt11char_traitsIcEEESt4hashImESt8equal_toImESaISt4pairIKmS6_EEEE4lockEv(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.17") align 8, ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN2fl15FileBlobDatasetD2Ev(ptr noundef nonnull align 8 dereferenceable(312) %0) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %"class.std::lock_guard", align 8
  %4 = alloca ptr, align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca ptr, align 8
  %8 = alloca %"class.std::shared_ptr.17", align 8
  %9 = alloca i64, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %10 = load ptr, ptr %2, align 8
  store ptr getelementptr inbounds inrange(-16, 64) ({ [10 x ptr] }, ptr @_ZTVN2fl15FileBlobDatasetE, i32 0, i32 0, i32 2), ptr %10, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #6
  %11 = getelementptr inbounds %"class.fl::FileBlobDataset", ptr %10, i32 0, i32 4
  invoke void @_ZNSt10lock_guardISt5mutexEC2ERS0_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(40) %11)
          to label %12 unwind label %38

12:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  %13 = getelementptr inbounds %"class.fl::FileBlobDataset", ptr %10, i32 0, i32 3
  store ptr %13, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  %14 = load ptr, ptr %4, align 8, !tbaa !5
  %15 = call ptr @_ZNSt6vectorISt8weak_ptrISt13unordered_mapImSt10shared_ptrISt13basic_fstreamIcSt11char_traitsIcEEESt4hashImESt8equal_toImESaISt4pairIKmS7_EEEESaISH_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %14) #6
  %16 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %5, i32 0, i32 0
  store ptr %15, ptr %16, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #6
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = call ptr @_ZNSt6vectorISt8weak_ptrISt13unordered_mapImSt10shared_ptrISt13basic_fstreamIcSt11char_traitsIcEEESt4hashImESt8equal_toImESaISt4pairIKmS7_EEEESaISH_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #6
  %19 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %6, i32 0, i32 0
  store ptr %18, ptr %19, align 8
  br label %20

20:                                               ; preds = %33, %12
  %21 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt8weak_ptrISt13unordered_mapImSt10shared_ptrISt13basic_fstreamIcSt11char_traitsIcEEESt4hashImESt8equal_toImESaISt4pairIKmS8_EEEESt6vectorISI_SaISI_EEEEbRKNS_17__normal_iteratorIT_T0_EESS_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  br i1 %21, label %23, label %22

22:                                               ; preds = %20
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #6
  br label %35

23:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %24 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt8weak_ptrISt13unordered_mapImSt10shared_ptrISt13basic_fstreamIcSt11char_traitsIcEEESt4hashImESt8equal_toImESaISt4pairIKmS8_EEEESt6vectorISI_SaISI_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  store ptr %24, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #6
  %25 = load ptr, ptr %7, align 8, !tbaa !5
  call void @_ZNKSt8weak_ptrISt13unordered_mapImSt10shared_ptrISt13basic_fstreamIcSt11char_traitsIcEEESt4hashImESt8equal_toImESaISt4pairIKmS6_EEEE4lockEv(ptr dead_on_unwind writable sret(%"class.std::shared_ptr.17") align 8 %8, ptr noundef nonnull align 8 dereferenceable(16) %25) #6
  %26 = call noundef zeroext i1 @_ZNKSt12__shared_ptrISt13unordered_mapImSt10shared_ptrISt13basic_fstreamIcSt11char_traitsIcEEESt4hashImESt8equal_toImESaISt4pairIKmS6_EEELN9__gnu_cxx12_Lock_policyE2EEcvbEv(ptr noundef nonnull align 8 dereferenceable(16) %8) #6
  br i1 %26, label %27, label %32

27:                                               ; preds = %23
  %28 = call noundef ptr @_ZNKSt19__shared_ptr_accessISt13unordered_mapImSt10shared_ptrISt13basic_fstreamIcSt11char_traitsIcEEESt4hashImESt8equal_toImESaISt4pairIKmS6_EEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %8) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %29 = ptrtoint ptr %10 to i64
  store i64 %29, ptr %9, align 8, !tbaa !11
  %30 = invoke noundef i64 @_ZNSt13unordered_mapImSt10shared_ptrISt13basic_fstreamIcSt11char_traitsIcEEESt4hashImESt8equal_toImESaISt4pairIKmS5_EEE5eraseERSB_(ptr noundef nonnull align 8 dereferenceable(56) %28, ptr noundef nonnull align 8 dereferenceable(8) %9)
          to label %31 unwind label %38

31:                                               ; preds = %27
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %32

32:                                               ; preds = %31, %23
  call void @_ZNSt12__shared_ptrISt13unordered_mapImSt10shared_ptrISt13basic_fstreamIcSt11char_traitsIcEEESt4hashImESt8equal_toImESaISt4pairIKmS6_EEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %8) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  br label %33

33:                                               ; preds = %32
  %34 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt8weak_ptrISt13unordered_mapImSt10shared_ptrISt13basic_fstreamIcSt11char_traitsIcEEESt4hashImESt8equal_toImESaISt4pairIKmS8_EEEESt6vectorISI_SaISI_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %5) #6
  br label %20

35:                                               ; preds = %22
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #6
  %36 = getelementptr inbounds %"class.fl::FileBlobDataset", ptr %10, i32 0, i32 3
  call void @_ZNSt6vectorISt8weak_ptrISt13unordered_mapImSt10shared_ptrISt13basic_fstreamIcSt11char_traitsIcEEESt4hashImESt8equal_toImESaISt4pairIKmS7_EEEESaISH_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %36) #6
  %37 = getelementptr inbounds %"class.fl::FileBlobDataset", ptr %10, i32 0, i32 1
  call void @_ZNSt10filesystem7__cxx114pathD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %37) #6
  call void @_ZN2fl11BlobDatasetD2Ev(ptr noundef nonnull align 8 dereferenceable(200) %10) #6
  ret void

38:                                               ; preds = %27, %1
  %39 = landingpad { ptr, i32 }
          catch ptr null
  %40 = extractvalue { ptr, i32 } %39, 0
  call void @__clang_call_terminate(ptr %40) #7
  unreachable
}

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) #5

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

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind "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"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { noinline noreturn nounwind uwtable "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 = { nounwind }
attributes #7 = { noreturn 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::shared_ptr.17" = type { %"class.std::__shared_ptr.18" }
%"class.std::__shared_ptr.18" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::lock_guard" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@_ZTVN2fl15FileBlobDatasetE = external dso_local unnamed_addr constant { [10 x ptr] }, align 8

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: nounwind
declare void @_ZN2fl11BlobDatasetD2Ev(ptr noundef nonnull align 8 dereferenceable(200)) unnamed_addr #2

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

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNKSt8weak_ptrISt13unordered_mapImSt10shared_ptrISt13basic_fstreamIcSt11char_traitsIcEEESt4hashImESt8equal_toImESaISt4pairIKmS6_EEEE4lockEv(ptr dead_on_unwind noalias writable sret(%"class.std::shared_ptr.17") align 8, ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNKSt12__shared_ptrISt13unordered_mapImSt10shared_ptrISt13basic_fstreamIcSt11char_traitsIcEEESt4hashImESt8equal_toImESaISt4pairIKmS6_EEELN9__gnu_cxx12_Lock_policyE2EEcvbEv(ptr noundef nonnull align 8 dereferenceable(16)) 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_iteratorIPSt8weak_ptrISt13unordered_mapImSt10shared_ptrISt13basic_fstreamIcSt11char_traitsIcEEESt4hashImESt8equal_toImESaISt4pairIKmS8_EEEESt6vectorISI_SaISI_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN2fl15FileBlobDatasetD2Ev(ptr noundef nonnull align 8 dereferenceable(312) %0) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::lock_guard", align 8
  %3 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca %"class.std::shared_ptr.17", align 8
  %6 = alloca i64, align 8
  store ptr getelementptr inbounds inrange(-16, 64) (i8, ptr @_ZTVN2fl15FileBlobDatasetE, i64 16), ptr %0, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #6
  %7 = getelementptr inbounds i8, ptr %0, i64 272
  invoke void @_ZNSt10lock_guardISt5mutexEC2ERS0_(ptr noundef nonnull align 8 dereferenceable(8) %2, ptr noundef nonnull align 8 dereferenceable(40) %7)
          to label %8 unwind label %.loopexit.split-lp

8:                                                ; preds = %1
  %9 = getelementptr inbounds i8, ptr %0, i64 248
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #6
  %10 = call ptr @_ZNSt6vectorISt8weak_ptrISt13unordered_mapImSt10shared_ptrISt13basic_fstreamIcSt11char_traitsIcEEESt4hashImESt8equal_toImESaISt4pairIKmS7_EEEESaISH_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  store ptr %10, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #6
  %11 = call ptr @_ZNSt6vectorISt8weak_ptrISt13unordered_mapImSt10shared_ptrISt13basic_fstreamIcSt11char_traitsIcEEESt4hashImESt8equal_toImESaISt4pairIKmS7_EEEESaISH_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  store ptr %11, ptr %4, align 8
  %12 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt8weak_ptrISt13unordered_mapImSt10shared_ptrISt13basic_fstreamIcSt11char_traitsIcEEESt4hashImESt8equal_toImESaISt4pairIKmS8_EEEESt6vectorISI_SaISI_EEEEbRKNS_17__normal_iteratorIT_T0_EESS_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  br i1 %12, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %8
  %13 = ptrtoint ptr %0 to i64
  br label %15

._crit_edge:                                      ; preds = %22, %8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #6
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #6
  call void @_ZNSt6vectorISt8weak_ptrISt13unordered_mapImSt10shared_ptrISt13basic_fstreamIcSt11char_traitsIcEEESt4hashImESt8equal_toImESaISt4pairIKmS7_EEEESaISH_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #6
  %14 = getelementptr inbounds i8, ptr %0, i64 200
  call void @_ZNSt10filesystem7__cxx114pathD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %14) #6
  call void @_ZN2fl11BlobDatasetD2Ev(ptr noundef nonnull align 8 dereferenceable(200) %0) #6
  ret void

15:                                               ; preds = %.lr.ph, %22
  %16 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPSt8weak_ptrISt13unordered_mapImSt10shared_ptrISt13basic_fstreamIcSt11char_traitsIcEEESt4hashImESt8equal_toImESaISt4pairIKmS8_EEEESt6vectorISI_SaISI_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #6
  call void @_ZNKSt8weak_ptrISt13unordered_mapImSt10shared_ptrISt13basic_fstreamIcSt11char_traitsIcEEESt4hashImESt8equal_toImESaISt4pairIKmS6_EEEE4lockEv(ptr dead_on_unwind nonnull writable sret(%"class.std::shared_ptr.17") align 8 %5, ptr noundef nonnull align 8 dereferenceable(16) %16) #6
  %17 = call noundef zeroext i1 @_ZNKSt12__shared_ptrISt13unordered_mapImSt10shared_ptrISt13basic_fstreamIcSt11char_traitsIcEEESt4hashImESt8equal_toImESaISt4pairIKmS6_EEELN9__gnu_cxx12_Lock_policyE2EEcvbEv(ptr noundef nonnull align 8 dereferenceable(16) %5) #6
  br i1 %17, label %18, label %22

18:                                               ; preds = %15
  %19 = call noundef ptr @_ZNKSt19__shared_ptr_accessISt13unordered_mapImSt10shared_ptrISt13basic_fstreamIcSt11char_traitsIcEEESt4hashImESt8equal_toImESaISt4pairIKmS6_EEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv(ptr noundef nonnull align 1 dereferenceable(1) %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  store i64 %13, ptr %6, align 8, !tbaa !8
  %20 = invoke noundef i64 @_ZNSt13unordered_mapImSt10shared_ptrISt13basic_fstreamIcSt11char_traitsIcEEESt4hashImESt8equal_toImESaISt4pairIKmS5_EEE5eraseERSB_(ptr noundef nonnull align 8 dereferenceable(56) %19, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %21 unwind label %.loopexit

21:                                               ; preds = %18
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  br label %22

22:                                               ; preds = %21, %15
  call void @_ZNSt12__shared_ptrISt13unordered_mapImSt10shared_ptrISt13basic_fstreamIcSt11char_traitsIcEEESt4hashImESt8equal_toImESaISt4pairIKmS6_EEELN9__gnu_cxx12_Lock_policyE2EED2Ev(ptr noundef nonnull align 8 dereferenceable(16) %5) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  %23 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPSt8weak_ptrISt13unordered_mapImSt10shared_ptrISt13basic_fstreamIcSt11char_traitsIcEEESt4hashImESt8equal_toImESaISt4pairIKmS8_EEEESt6vectorISI_SaISI_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %3) #6
  %24 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPSt8weak_ptrISt13unordered_mapImSt10shared_ptrISt13basic_fstreamIcSt11char_traitsIcEEESt4hashImESt8equal_toImESaISt4pairIKmS8_EEEESt6vectorISI_SaISI_EEEEbRKNS_17__normal_iteratorIT_T0_EESS_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #6
  br i1 %24, label %15, label %._crit_edge

.loopexit:                                        ; preds = %18
  %lpad.loopexit = landingpad { ptr, i32 }
          catch ptr null
  br label %25

.loopexit.split-lp:                               ; preds = %1
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          catch ptr null
  br label %25

25:                                               ; preds = %.loopexit.split-lp, %.loopexit
  %lpad.phi = phi { ptr, i32 } [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  %26 = extractvalue { ptr, i32 } %lpad.phi, 0
  call void @__clang_call_terminate(ptr %26) #7
  unreachable
}

; Function Attrs: noinline noreturn nounwind uwtable
declare hidden void @__clang_call_terminate(ptr noundef) local_unnamed_addr #5

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

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef i64 @_ZNSt13unordered_mapImSt10shared_ptrISt13basic_fstreamIcSt11char_traitsIcEEESt4hashImESt8equal_toImESaISt4pairIKmS5_EEE5eraseERSB_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3 align 2

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


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