; LLVM IR from flashlight/flashlight :: flashlight/fl/dataset (BlobDataset)

; 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"

%"struct.fl::BlobDatasetEntry" = type { i32, %"class.fl::Shape", i64 }
%"class.fl::Shape" = type { %"class.std::vector.0" }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::lock_guard" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"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::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 }

@.str = external hidden unnamed_addr constant [79 x i8], align 1
@_ZTISt16invalid_argument = external constant ptr

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK2fl22BlobDatasetEntryBuffer3getEl(ptr dead_on_unwind noalias writable sret(%"struct.fl::BlobDatasetEntry") align 8, ptr noundef nonnull align 8 dereferenceable(28), i64 noundef) #1 align 2

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN2fl5ShapeaSERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) #4 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2fl22BlobDatasetEntryBuffer3addERKNS_16BlobDatasetEntryE(ptr noundef nonnull align 8 dereferenceable(28), ptr noundef nonnull align 8 dereferenceable(40)) #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2fl11BlobDataset3addERKSt6vectorINS_6TensorESaIS2_EE(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(24) %1) #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca %"class.std::lock_guard", align 8
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %14 = alloca ptr, align 8
  %15 = alloca %"struct.fl::BlobDatasetEntry", align 8
  %16 = alloca i64, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca %"struct.fl::BlobDatasetEntry", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %20 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %21 = getelementptr inbounds %"class.fl::BlobDataset", ptr %20, i32 0, i32 8
  call void @_ZNSt10lock_guardISt5mutexEC2ERS0_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(40) %21)
  %22 = getelementptr inbounds %"class.fl::BlobDataset", ptr %20, i32 0, i32 3
  %23 = call noundef i64 @_ZNK2fl22BlobDatasetEntryBuffer4sizeEv(ptr noundef nonnull align 8 dereferenceable(28) %22)
  store i64 %23, ptr %5, align 8, !tbaa !9
  %24 = getelementptr inbounds %"class.fl::BlobDataset", ptr %20, i32 0, i32 5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #7
  %25 = getelementptr inbounds %"class.fl::BlobDataset", ptr %20, i32 0, i32 3
  %26 = call noundef i64 @_ZNK2fl22BlobDatasetEntryBuffer4sizeEv(ptr noundef nonnull align 8 dereferenceable(28) %25)
  store i64 %26, ptr %7, align 8, !tbaa !9
  invoke void @_ZNSt6vectorIlSaIlEE9push_backEOl(ptr noundef nonnull align 8 dereferenceable(24) %24, ptr noundef nonnull align 8 dereferenceable(8) %7)
          to label %27 unwind label %42

27:                                               ; preds = %2
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  %28 = getelementptr inbounds %"class.fl::BlobDataset", ptr %20, i32 0, i32 4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #7
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = call noundef i64 @_ZNKSt6vectorIN2fl6TensorESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %29) #7
  store i64 %30, ptr %10, align 8, !tbaa !9
  invoke void @_ZNSt6vectorIlSaIlEE9push_backEOl(ptr noundef nonnull align 8 dereferenceable(24) %28, ptr noundef nonnull align 8 dereferenceable(8) %10)
          to label %31 unwind label %46

31:                                               ; preds = %27
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #7
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  store ptr %32, ptr %11, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  %33 = load ptr, ptr %11, align 8, !tbaa !5
  %34 = call ptr @_ZNKSt6vectorIN2fl6TensorESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %33) #7
  %35 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %12, i32 0, i32 0
  store ptr %34, ptr %35, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  %36 = load ptr, ptr %11, align 8, !tbaa !5
  %37 = call ptr @_ZNKSt6vectorIN2fl6TensorESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %36) #7
  %38 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %13, i32 0, i32 0
  store ptr %37, ptr %38, align 8
  br label %39

39:                                               ; preds = %91, %31
  %40 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN2fl6TensorESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull align 8 dereferenceable(8) %13) #7
  br i1 %40, label %50, label %41

41:                                               ; preds = %39
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %98

42:                                               ; preds = %2
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %8, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #7
  br label %105

46:                                               ; preds = %27
  %47 = landingpad { ptr, i32 }
          cleanup
  %48 = extractvalue { ptr, i32 } %47, 0
  store ptr %48, ptr %8, align 8
  %49 = extractvalue { ptr, i32 } %47, 1
  store i32 %49, ptr %9, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #7
  br label %105

50:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %51 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKN2fl6TensorESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  store ptr %51, ptr %14, align 8, !tbaa !5
  %52 = load ptr, ptr %14, align 8, !tbaa !5
  %53 = invoke noundef i32 @_ZNK2fl6Tensor4ndimEv(ptr noundef nonnull align 8 dereferenceable(16) %52)
          to label %54 unwind label %61

54:                                               ; preds = %50
  %55 = getelementptr inbounds %"class.fl::BlobDataset", ptr %20, i32 0, i32 1
  %56 = load i32, ptr %55, align 8, !tbaa !11
  %57 = icmp sgt i32 %53, %56
  br i1 %57, label %58, label %69

58:                                               ; preds = %54
  %59 = call ptr @__cxa_allocate_exception(i64 16) #7
  invoke void @_ZNSt16invalid_argumentC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %59, ptr noundef @.str)
          to label %60 unwind label %65

60:                                               ; preds = %58
  invoke void @__cxa_throw(ptr %59, ptr @_ZTISt16invalid_argument, ptr @_ZNSt16invalid_argumentD1Ev) #8
          to label %131 unwind label %61

61:                                               ; preds = %60, %50
  %62 = landingpad { ptr, i32 }
          cleanup
  %63 = extractvalue { ptr, i32 } %62, 0
  store ptr %63, ptr %8, align 8
  %64 = extractvalue { ptr, i32 } %62, 1
  store i32 %64, ptr %9, align 4
  br label %97

65:                                               ; preds = %58
  %66 = landingpad { ptr, i32 }
          cleanup
  %67 = extractvalue { ptr, i32 } %66, 0
  store ptr %67, ptr %8, align 8
  %68 = extractvalue { ptr, i32 } %66, 1
  store i32 %68, ptr %9, align 4
  call void @__cxa_free_exception(ptr %59) #7
  br label %97

69:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 40, ptr %15) #7
  call void @_ZN2fl16BlobDatasetEntryC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %15) #7
  %70 = load ptr, ptr %14, align 8, !tbaa !5
  %71 = invoke noundef i32 @_ZNK2fl6Tensor4typeEv(ptr noundef nonnull align 8 dereferenceable(16) %70)
          to label %72 unwind label %93

72:                                               ; preds = %69
  %73 = getelementptr inbounds %"struct.fl::BlobDatasetEntry", ptr %15, i32 0, i32 0
  store i32 %71, ptr %73, align 8, !tbaa !27
  %74 = load ptr, ptr %14, align 8, !tbaa !5
  %75 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK2fl6Tensor5shapeEv(ptr noundef nonnull align 8 dereferenceable(16) %74)
          to label %76 unwind label %93

76:                                               ; preds = %72
  %77 = getelementptr inbounds %"struct.fl::BlobDatasetEntry", ptr %15, i32 0, i32 1
  %78 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN2fl5ShapeaSERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %77, ptr noundef nonnull align 8 dereferenceable(24) %75)
          to label %79 unwind label %93

79:                                               ; preds = %76
  %80 = getelementptr inbounds %"class.fl::BlobDataset", ptr %20, i32 0, i32 6
  %81 = load i64, ptr %80, align 8, !tbaa !35
  %82 = getelementptr inbounds %"struct.fl::BlobDatasetEntry", ptr %15, i32 0, i32 2
  store i64 %81, ptr %82, align 8, !tbaa !36
  %83 = load ptr, ptr %14, align 8, !tbaa !5
  %84 = invoke noundef i64 @_ZNK2fl6Tensor5bytesEv(ptr noundef nonnull align 8 dereferenceable(16) %83)
          to label %85 unwind label %93

85:                                               ; preds = %79
  %86 = getelementptr inbounds %"class.fl::BlobDataset", ptr %20, i32 0, i32 6
  %87 = load i64, ptr %86, align 8, !tbaa !35
  %88 = add i64 %87, %84
  store i64 %88, ptr %86, align 8, !tbaa !35
  %89 = getelementptr inbounds %"class.fl::BlobDataset", ptr %20, i32 0, i32 3
  invoke void @_ZN2fl22BlobDatasetEntryBuffer3addERKNS_16BlobDatasetEntryE(ptr noundef nonnull align 8 dereferenceable(28) %89, ptr noundef nonnull align 8 dereferenceable(40) %15)
          to label %90 unwind label %93

90:                                               ; preds = %85
  call void @_ZN2fl16BlobDatasetEntryD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %15) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %91

91:                                               ; preds = %90
  %92 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKN2fl6TensorESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %12) #7
  br label %39

93:                                               ; preds = %85, %79, %76, %72, %69
  %94 = landingpad { ptr, i32 }
          cleanup
  %95 = extractvalue { ptr, i32 } %94, 0
  store ptr %95, ptr %8, align 8
  %96 = extractvalue { ptr, i32 } %94, 1
  store i32 %96, ptr %9, align 4
  call void @_ZN2fl16BlobDatasetEntryD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %15) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %15) #7
  br label %97

97:                                               ; preds = %93, %65, %61
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #7
  br label %105

98:                                               ; preds = %41
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  store i64 0, ptr %16, align 8, !tbaa !9
  br label %99

99:                                               ; preds = %117, %98
  %100 = load i64, ptr %16, align 8, !tbaa !9
  %101 = load ptr, ptr %4, align 8, !tbaa !5
  %102 = call noundef i64 @_ZNKSt6vectorIN2fl6TensorESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %101) #7
  %103 = icmp ult i64 %100, %102
  br i1 %103, label %106, label %104

104:                                              ; preds = %99
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %124

105:                                              ; preds = %97, %46, %42
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  br label %125

106:                                              ; preds = %99
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %107 = load ptr, ptr %4, align 8, !tbaa !5
  %108 = load i64, ptr %16, align 8, !tbaa !9
  %109 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN2fl6TensorESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %107, i64 noundef %108) #7
  store ptr %109, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.start.p0(i64 40, ptr %19) #7
  %110 = getelementptr inbounds %"class.fl::BlobDataset", ptr %20, i32 0, i32 3
  %111 = load i64, ptr %5, align 8, !tbaa !9
  %112 = load i64, ptr %16, align 8, !tbaa !9
  %113 = add nsw i64 %111, %112
  call void @_ZNK2fl22BlobDatasetEntryBuffer3getEl(ptr dead_on_unwind writable sret(%"struct.fl::BlobDatasetEntry") align 8 %19, ptr noundef nonnull align 8 dereferenceable(28) %110, i64 noundef %113)
  store ptr %19, ptr %18, align 8, !tbaa !5
  %114 = load ptr, ptr %18, align 8, !tbaa !5
  %115 = load ptr, ptr %17, align 8, !tbaa !5
  invoke void @_ZN2fl11BlobDataset10writeArrayERKNS_16BlobDatasetEntryERKNS_6TensorE(ptr noundef nonnull align 8 dereferenceable(200) %20, ptr noundef nonnull align 8 dereferenceable(40) %114, ptr noundef nonnull align 8 dereferenceable(16) %115)
          to label %116 unwind label %120

116:                                              ; preds = %106
  call void @_ZN2fl16BlobDatasetEntryD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %19) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %117

117:                                              ; preds = %116
  %118 = load i64, ptr %16, align 8, !tbaa !9
  %119 = add nsw i64 %118, 1
  store i64 %119, ptr %16, align 8, !tbaa !9
  br label %99, !llvm.loop !37

120:                                              ; preds = %106
  %121 = landingpad { ptr, i32 }
          cleanup
  %122 = extractvalue { ptr, i32 } %121, 0
  store ptr %122, ptr %8, align 8
  %123 = extractvalue { ptr, i32 } %121, 1
  store i32 %123, ptr %9, align 4
  call void @_ZN2fl16BlobDatasetEntryD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %19) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %125

124:                                              ; preds = %104
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  ret void

125:                                              ; preds = %120, %105
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  br label %126

126:                                              ; preds = %125
  %127 = load ptr, ptr %8, align 8
  %128 = load i32, ptr %9, align 4
  %129 = insertvalue { ptr, i32 } poison, ptr %127, 0
  %130 = insertvalue { ptr, i32 } %129, i32 %128, 1
  resume { ptr, i32 } %130

131:                                              ; preds = %60
  unreachable
}

; 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 #1 align 2

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

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

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

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

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

declare noundef i32 @_ZNK2fl6Tensor4ndimEv(ptr noundef nonnull align 8 dereferenceable(16)) #5

declare ptr @__cxa_allocate_exception(i64)

declare void @_ZNSt16invalid_argumentC1EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #5

declare void @__cxa_free_exception(ptr)

; Function Attrs: nounwind
declare void @_ZNSt16invalid_argumentD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #6

declare void @__cxa_throw(ptr, ptr, ptr)

declare noundef i32 @_ZNK2fl6Tensor4typeEv(ptr noundef nonnull align 8 dereferenceable(16)) #5

declare noundef nonnull align 8 dereferenceable(24) ptr @_ZNK2fl6Tensor5shapeEv(ptr noundef nonnull align 8 dereferenceable(16)) #5

declare noundef i64 @_ZNK2fl6Tensor5bytesEv(ptr noundef nonnull align 8 dereferenceable(16)) #5

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2fl11BlobDataset10writeArrayERKNS_16BlobDatasetEntryERKNS_6TensorE(ptr noundef nonnull align 8 dereferenceable(200), ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

attributes #0 = { 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 #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 = { 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 #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { "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 "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 }
attributes #8 = { noreturn }

!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 = !{!"long", !7, i64 0}
!11 = !{!12, !14, i64 8}
!12 = !{!"_ZTSN2fl11BlobDatasetE", !13, i64 0, !14, i64 8, !15, i64 16, !16, i64 48, !16, i64 72, !10, i64 96, !20, i64 104, !25, i64 160}
!13 = !{!"_ZTSN2fl7DatasetE"}
!14 = !{!"int", !7, i64 0}
!15 = !{!"_ZTSN2fl22BlobDatasetEntryBufferE", !16, i64 0, !14, i64 24}
!16 = !{!"_ZTSSt6vectorIlSaIlEE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIlSaIlEE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIlSaIlEE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIlSaIlEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!"_ZTSSt13unordered_mapIiSt8functionIFN2fl6TensorEPvNS1_5ShapeENS1_5dtypeEEESt4hashIiESt8equal_toIiESaISt4pairIKiS7_EEE", !21, i64 0}
!21 = !{!"_ZTSSt10_HashtableIiSt4pairIKiSt8functionIFN2fl6TensorEPvNS3_5ShapeENS3_5dtypeEEEESaISA_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENSC_18_Mod_range_hashingENSC_20_Default_ranged_hashENSC_20_Prime_rehash_policyENSC_17_Hashtable_traitsILb0ELb0ELb1EEEE", !6, i64 0, !10, i64 8, !22, i64 16, !10, i64 24, !23, i64 32, !6, i64 48}
!22 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!23 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !24, i64 0, !10, i64 8}
!24 = !{!"float", !7, i64 0}
!25 = !{!"_ZTSSt5mutex", !26, i64 0}
!26 = !{!"_ZTSSt12__mutex_base", !7, i64 0}
!27 = !{!28, !29, i64 0}
!28 = !{!"_ZTSN2fl16BlobDatasetEntryE", !29, i64 0, !30, i64 8, !10, i64 32}
!29 = !{!"_ZTSN2fl5dtypeE", !7, i64 0}
!30 = !{!"_ZTSN2fl5ShapeE", !31, i64 0}
!31 = !{!"_ZTSSt6vectorIxSaIxEE", !32, i64 0}
!32 = !{!"_ZTSSt12_Vector_baseIxSaIxEE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseIxSaIxEE12_Vector_implE", !34, i64 0}
!34 = !{!"_ZTSNSt12_Vector_baseIxSaIxEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!35 = !{!12, !10, i64 96}
!36 = !{!28, !10, i64 32}
!37 = distinct !{!37, !38}
!38 = !{!"llvm.loop.mustprogress"}


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

%"struct.fl::BlobDatasetEntry" = type { i32, %"class.fl::Shape", i64 }
%"class.fl::Shape" = type { %"class.std::vector.0" }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl" = type { %"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" }
%"struct.std::_Vector_base<long long, std::allocator<long long>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::lock_guard" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@.str = external hidden unnamed_addr constant [79 x i8], align 1
@_ZTISt16invalid_argument = external constant ptr

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNK2fl22BlobDatasetEntryBuffer3getEl(ptr dead_on_unwind noalias writable sret(%"struct.fl::BlobDatasetEntry") align 8, ptr noundef nonnull align 8 dereferenceable(28), i64 noundef) local_unnamed_addr #1 align 2

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZN2fl5ShapeaSERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #4 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2fl22BlobDatasetEntryBuffer3addERKNS_16BlobDatasetEntryE(ptr noundef nonnull align 8 dereferenceable(28), ptr noundef nonnull align 8 dereferenceable(40)) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN2fl11BlobDataset3addERKSt6vectorINS_6TensorESaIS2_EE(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(24) %1) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::lock_guard", align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"struct.fl::BlobDatasetEntry", align 8
  %9 = alloca %"struct.fl::BlobDatasetEntry", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  %10 = getelementptr inbounds i8, ptr %0, i64 160
  call void @_ZNSt10lock_guardISt5mutexEC2ERS0_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(40) %10)
  %11 = getelementptr inbounds i8, ptr %0, i64 16
  %12 = call noundef i64 @_ZNK2fl22BlobDatasetEntryBuffer4sizeEv(ptr noundef nonnull align 8 dereferenceable(28) %11)
  %13 = getelementptr inbounds i8, ptr %0, i64 72
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #7
  %14 = call noundef i64 @_ZNK2fl22BlobDatasetEntryBuffer4sizeEv(ptr noundef nonnull align 8 dereferenceable(28) %11)
  store i64 %14, ptr %4, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIlSaIlEE9push_backEOl(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 8 dereferenceable(8) %4)
          to label %15 unwind label %27

15:                                               ; preds = %2
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  %16 = getelementptr inbounds i8, ptr %0, i64 48
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  %17 = call noundef i64 @_ZNKSt6vectorIN2fl6TensorESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  store i64 %17, ptr %5, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIlSaIlEE9push_backEOl(ptr noundef nonnull align 8 dereferenceable(24) %16, ptr noundef nonnull align 8 dereferenceable(8) %5)
          to label %18 unwind label %29

18:                                               ; preds = %15
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %19 = call ptr @_ZNKSt6vectorIN2fl6TensorESaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  store ptr %19, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  %20 = call ptr @_ZNKSt6vectorIN2fl6TensorESaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  store ptr %20, ptr %7, align 8
  %21 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN2fl6TensorESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  br i1 %21, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %18
  %22 = getelementptr inbounds i8, ptr %0, i64 8
  %23 = getelementptr inbounds i8, ptr %8, i64 8
  %24 = getelementptr inbounds i8, ptr %0, i64 96
  %25 = getelementptr inbounds i8, ptr %8, i64 32
  br label %31

._crit_edge:                                      ; preds = %54, %18
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  %26 = call noundef i64 @_ZNKSt6vectorIN2fl6TensorESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  %.not = icmp eq i64 %26, 0
  br i1 %.not, label %._crit_edge29, label %.lr.ph28

27:                                               ; preds = %2
  %28 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #7
  br label %60

29:                                               ; preds = %15
  %30 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  br label %60

31:                                               ; preds = %.lr.ph, %54
  %32 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNK9__gnu_cxx17__normal_iteratorIPKN2fl6TensorESt6vectorIS2_SaIS2_EEEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  %33 = invoke noundef i32 @_ZNK2fl6Tensor4ndimEv(ptr noundef nonnull align 8 dereferenceable(16) %32)
          to label %34 unwind label %.loopexit

34:                                               ; preds = %31
  %35 = load i32, ptr %22, align 8, !tbaa !9
  %36 = icmp sgt i32 %33, %35
  br i1 %36, label %37, label %42

37:                                               ; preds = %34
  %38 = call ptr @__cxa_allocate_exception(i64 16) #7
  invoke void @_ZNSt16invalid_argumentC1EPKc(ptr noundef nonnull align 8 dereferenceable(16) %38, ptr noundef nonnull @.str)
          to label %39 unwind label %40

39:                                               ; preds = %37
  invoke void @__cxa_throw(ptr nonnull %38, ptr nonnull @_ZTISt16invalid_argument, ptr nonnull @_ZNSt16invalid_argumentD1Ev) #8
          to label %70 unwind label %.loopexit.split-lp

.loopexit:                                        ; preds = %31
  %lpad.loopexit = landingpad { ptr, i32 }
          cleanup
  br label %59

.loopexit.split-lp:                               ; preds = %39
  %lpad.loopexit.split-lp = landingpad { ptr, i32 }
          cleanup
  br label %59

40:                                               ; preds = %37
  %41 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %38) #7
  br label %59

42:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %8) #7
  call void @_ZN2fl16BlobDatasetEntryC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %8) #7
  %43 = invoke noundef i32 @_ZNK2fl6Tensor4typeEv(ptr noundef nonnull align 8 dereferenceable(16) %32)
          to label %44 unwind label %57

44:                                               ; preds = %42
  store i32 %43, ptr %8, align 8, !tbaa !26
  %45 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZNK2fl6Tensor5shapeEv(ptr noundef nonnull align 8 dereferenceable(16) %32)
          to label %46 unwind label %57

46:                                               ; preds = %44
  %47 = invoke noundef nonnull align 8 dereferenceable(24) ptr @_ZN2fl5ShapeaSERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %23, ptr noundef nonnull align 8 dereferenceable(24) %45)
          to label %48 unwind label %57

48:                                               ; preds = %46
  %49 = load i64, ptr %24, align 8, !tbaa !34
  store i64 %49, ptr %25, align 8, !tbaa !35
  %50 = invoke noundef i64 @_ZNK2fl6Tensor5bytesEv(ptr noundef nonnull align 8 dereferenceable(16) %32)
          to label %51 unwind label %57

51:                                               ; preds = %48
  %52 = load i64, ptr %24, align 8, !tbaa !34
  %53 = add i64 %52, %50
  store i64 %53, ptr %24, align 8, !tbaa !34
  invoke void @_ZN2fl22BlobDatasetEntryBuffer3addERKNS_16BlobDatasetEntryE(ptr noundef nonnull align 8 dereferenceable(28) %11, ptr noundef nonnull align 8 dereferenceable(40) %8)
          to label %54 unwind label %57

54:                                               ; preds = %51
  call void @_ZN2fl16BlobDatasetEntryD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %8) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #7
  %55 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN9__gnu_cxx17__normal_iteratorIPKN2fl6TensorESt6vectorIS2_SaIS2_EEEppEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #7
  %56 = call noundef zeroext i1 @_ZN9__gnu_cxxneIPKN2fl6TensorESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #7
  br i1 %56, label %31, label %._crit_edge

57:                                               ; preds = %51, %48, %46, %44, %42
  %58 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN2fl16BlobDatasetEntryD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %8) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #7
  br label %59

59:                                               ; preds = %.loopexit, %.loopexit.split-lp, %57, %40
  %.pn = phi { ptr, i32 } [ %41, %40 ], [ %58, %57 ], [ %lpad.loopexit, %.loopexit ], [ %lpad.loopexit.split-lp, %.loopexit.split-lp ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  br label %60

._crit_edge29:                                    ; preds = %63, %._crit_edge
  ret void

60:                                               ; preds = %59, %29, %27
  %.pn.pn = phi { ptr, i32 } [ %.pn, %59 ], [ %30, %29 ], [ %28, %27 ]
  call void @_ZNSt10lock_guardISt5mutexED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #7
  br label %69

.lr.ph28:                                         ; preds = %._crit_edge, %63
  %.02226 = phi i64 [ %64, %63 ], [ 0, %._crit_edge ]
  %61 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNKSt6vectorIN2fl6TensorESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %.02226) #7
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %9) #7
  %62 = add nsw i64 %.02226, %12
  call void @_ZNK2fl22BlobDatasetEntryBuffer3getEl(ptr dead_on_unwind nonnull writable sret(%"struct.fl::BlobDatasetEntry") align 8 %9, ptr noundef nonnull align 8 dereferenceable(28) %11, i64 noundef %62)
  invoke void @_ZN2fl11BlobDataset10writeArrayERKNS_16BlobDatasetEntryERKNS_6TensorE(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(40) %9, ptr noundef nonnull align 8 dereferenceable(16) %61)
          to label %63 unwind label %67

63:                                               ; preds = %.lr.ph28
  call void @_ZN2fl16BlobDatasetEntryD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %9) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #7
  %64 = add nuw nsw i64 %.02226, 1
  %65 = call noundef i64 @_ZNKSt6vectorIN2fl6TensorESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #7
  %66 = icmp ult i64 %64, %65
  br i1 %66, label %.lr.ph28, label %._crit_edge29, !llvm.loop !36

67:                                               ; preds = %.lr.ph28
  %68 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN2fl16BlobDatasetEntryD2Ev(ptr noundef nonnull align 8 dereferenceable(40) %9) #7
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %9) #7
  br label %69

69:                                               ; preds = %67, %60
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %60 ], [ %68, %67 ]
  resume { ptr, i32 } %.pn.pn.pn

70:                                               ; preds = %39
  unreachable
}

; 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 #1 align 2

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

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

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

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

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

declare noundef i32 @_ZNK2fl6Tensor4ndimEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #5

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

declare void @_ZNSt16invalid_argumentC1EPKc(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef) unnamed_addr #5

declare void @__cxa_free_exception(ptr) local_unnamed_addr

; Function Attrs: nounwind
declare void @_ZNSt16invalid_argumentD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #6

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

declare noundef i32 @_ZNK2fl6Tensor4typeEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #5

declare noundef nonnull align 8 dereferenceable(24) ptr @_ZNK2fl6Tensor5shapeEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #5

declare noundef i64 @_ZNK2fl6Tensor5bytesEv(ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #5

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN2fl11BlobDataset10writeArrayERKNS_16BlobDatasetEntryERKNS_6TensorE(ptr noundef nonnull align 8 dereferenceable(200), ptr noundef nonnull align 8 dereferenceable(40), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #1 align 2

attributes #0 = { 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 #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 = { 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 #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { "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 "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 }
attributes #8 = { noreturn }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !12, i64 8}
!10 = !{!"_ZTSN2fl11BlobDatasetE", !11, i64 0, !12, i64 8, !13, i64 16, !14, i64 48, !14, i64 72, !6, i64 96, !19, i64 104, !24, i64 160}
!11 = !{!"_ZTSN2fl7DatasetE"}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_ZTSN2fl22BlobDatasetEntryBufferE", !14, i64 0, !12, i64 24}
!14 = !{!"_ZTSSt6vectorIlSaIlEE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseIlSaIlEE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIlSaIlEE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIlSaIlEE17_Vector_impl_dataE", !18, i64 0, !18, i64 8, !18, i64 16}
!18 = !{!"any pointer", !7, i64 0}
!19 = !{!"_ZTSSt13unordered_mapIiSt8functionIFN2fl6TensorEPvNS1_5ShapeENS1_5dtypeEEESt4hashIiESt8equal_toIiESaISt4pairIKiS7_EEE", !20, i64 0}
!20 = !{!"_ZTSSt10_HashtableIiSt4pairIKiSt8functionIFN2fl6TensorEPvNS3_5ShapeENS3_5dtypeEEEESaISA_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENSC_18_Mod_range_hashingENSC_20_Default_ranged_hashENSC_20_Prime_rehash_policyENSC_17_Hashtable_traitsILb0ELb0ELb1EEEE", !18, i64 0, !6, i64 8, !21, i64 16, !6, i64 24, !22, i64 32, !18, i64 48}
!21 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !18, i64 0}
!22 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !23, i64 0, !6, i64 8}
!23 = !{!"float", !7, i64 0}
!24 = !{!"_ZTSSt5mutex", !25, i64 0}
!25 = !{!"_ZTSSt12__mutex_base", !7, i64 0}
!26 = !{!27, !28, i64 0}
!27 = !{!"_ZTSN2fl16BlobDatasetEntryE", !28, i64 0, !29, i64 8, !6, i64 32}
!28 = !{!"_ZTSN2fl5dtypeE", !7, i64 0}
!29 = !{!"_ZTSN2fl5ShapeE", !30, i64 0}
!30 = !{!"_ZTSSt6vectorIxSaIxEE", !31, i64 0}
!31 = !{!"_ZTSSt12_Vector_baseIxSaIxEE", !32, i64 0}
!32 = !{!"_ZTSNSt12_Vector_baseIxSaIxEE12_Vector_implE", !33, i64 0}
!33 = !{!"_ZTSNSt12_Vector_baseIxSaIxEE17_Vector_impl_dataE", !18, i64 0, !18, i64 8, !18, i64 16}
!34 = !{!10, !6, i64 96}
!35 = !{!27, !6, i64 32}
!36 = distinct !{!36, !37}
!37 = !{!"llvm.loop.mustprogress"}


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