; LLVM IR from lynx-family/primjs :: src/napi/common/code_cache.ll (ZN9CacheBlob16get_enough_spaceEi)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.10" = type { ptr }
%class.CacheBlob = type { ptr, %"class.std::unordered_map", %"class.std::vector", i32, %"class.std::__cxx11::basic_string", i32, %"class.std::mutex", %"class.std::unique_ptr", i32, 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<CachedData *, std::allocator<CachedData *>>::_Vector_impl" }
%"struct.std::_Vector_base<CachedData *, std::allocator<CachedData *>>::_Vector_impl" = type { %"struct.std::_Vector_base<CachedData *, std::allocator<CachedData *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<CachedData *, std::allocator<CachedData *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"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::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.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 }
%struct.CachedData = type { i32, i32, ptr, %"class.std::__cxx11::basic_string" }

; 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 noundef zeroext i1 @_ZN9CacheBlob16get_enough_spaceEi(ptr noundef nonnull align 8 dereferenceable(200) %0, i32 noundef %1) #1 align 2 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %12 = alloca ptr, align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator.10", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator.10", align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i32 %1, ptr %5, align 4, !tbaa !9
  %19 = load ptr, ptr %4, align 8
  %20 = getelementptr inbounds %class.CacheBlob, ptr %19, i32 0, i32 3
  %21 = load i32, ptr %20, align 8, !tbaa !11
  %22 = load i32, ptr %5, align 4, !tbaa !9
  %23 = add nsw i32 %21, %22
  %24 = getelementptr inbounds %class.CacheBlob, ptr %19, i32 0, i32 5
  %25 = load i32, ptr %24, align 8, !tbaa !34
  %26 = icmp sle i32 %23, %25
  br i1 %26, label %27, label %28

27:                                               ; preds = %2
  store i1 true, ptr %3, align 1
  br label %111

28:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %29 = load i32, ptr %5, align 4, !tbaa !9
  %30 = getelementptr inbounds %class.CacheBlob, ptr %19, i32 0, i32 3
  %31 = load i32, ptr %30, align 8, !tbaa !11
  %32 = add nsw i32 %29, %31
  %33 = getelementptr inbounds %class.CacheBlob, ptr %19, i32 0, i32 5
  %34 = load i32, ptr %33, align 8, !tbaa !34
  %35 = sub nsw i32 %32, %34
  store i32 %35, ptr %6, align 4, !tbaa !9
  %36 = getelementptr inbounds %class.CacheBlob, ptr %19, i32 0, i32 2
  %37 = call ptr @_ZNSt6vectorIP10CachedDataSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %36) #4
  %38 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %7, i32 0, i32 0
  store ptr %37, ptr %38, align 8
  %39 = getelementptr inbounds %class.CacheBlob, ptr %19, i32 0, i32 2
  %40 = call ptr @_ZNSt6vectorIP10CachedDataSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %39) #4
  %41 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %8, i32 0, i32 0
  store ptr %40, ptr %41, align 8
  %42 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %7, i32 0, i32 0
  %43 = load ptr, ptr %42, align 8
  %44 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %8, i32 0, i32 0
  %45 = load ptr, ptr %44, align 8
  call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPP10CachedDataSt6vectorIS3_SaIS3_EEEEPFbS3_S3_EEvT_SB_T0_(ptr %43, ptr %45, ptr noundef @_ZN10CachedData7compareEPS_S0_)
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %46 = getelementptr inbounds %class.CacheBlob, ptr %19, i32 0, i32 2
  %47 = call noundef i64 @_ZNKSt6vectorIP10CachedDataSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %46) #4
  %48 = sub i64 %47, 1
  %49 = trunc i64 %48 to i32
  store i32 %49, ptr %9, align 4, !tbaa !9
  br label %50

50:                                               ; preds = %104, %28
  %51 = load i32, ptr %9, align 4, !tbaa !9
  %52 = icmp sge i32 %51, 0
  br i1 %52, label %54, label %53

53:                                               ; preds = %50
  store i32 2, ptr %10, align 4
  br label %107

54:                                               ; preds = %50
  %55 = getelementptr inbounds %class.CacheBlob, ptr %19, i32 0, i32 2
  %56 = load i32, ptr %9, align 4, !tbaa !9
  %57 = sext i32 %56 to i64
  %58 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10CachedDataSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %55, i64 noundef %57) #4
  %59 = load ptr, ptr %58, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.CachedData, ptr %59, i32 0, i32 1
  %61 = load i32, ptr %60, align 4, !tbaa !35
  %62 = load i32, ptr %6, align 4, !tbaa !9
  %63 = sub nsw i32 %62, %61
  store i32 %63, ptr %6, align 4, !tbaa !9
  %64 = load i32, ptr %6, align 4, !tbaa !9
  %65 = icmp sle i32 %64, 0
  br i1 %65, label %66, label %103

66:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %67 = load i32, ptr %9, align 4, !tbaa !9
  %68 = sext i32 %67 to i64
  store i64 %68, ptr %11, align 8, !tbaa !37
  br label %69

69:                                               ; preds = %82, %66
  %70 = load i64, ptr %11, align 8, !tbaa !37
  %71 = getelementptr inbounds %class.CacheBlob, ptr %19, i32 0, i32 2
  %72 = call noundef i64 @_ZNKSt6vectorIP10CachedDataSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %71) #4
  %73 = icmp ult i64 %70, %72
  br i1 %73, label %75, label %74

74:                                               ; preds = %69
  store i32 5, ptr %10, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  br label %85

75:                                               ; preds = %69
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %76 = getelementptr inbounds %class.CacheBlob, ptr %19, i32 0, i32 2
  %77 = load i64, ptr %11, align 8, !tbaa !37
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10CachedDataSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %76, i64 noundef %77) #4
  %79 = load ptr, ptr %78, align 8, !tbaa !5
  store ptr %79, ptr %12, align 8, !tbaa !5
  %80 = load ptr, ptr %12, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.CachedData, ptr %80, i32 0, i32 3
  call void @_ZN9CacheBlob6removeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(200) %19, ptr noundef nonnull align 8 dereferenceable(32) %81)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br label %82

82:                                               ; preds = %75
  %83 = load i64, ptr %11, align 8, !tbaa !37
  %84 = add i64 %83, 1
  store i64 %84, ptr %11, align 8, !tbaa !37
  br label %69, !llvm.loop !38

85:                                               ; preds = %74
  %86 = getelementptr inbounds %class.CacheBlob, ptr %19, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %87 = getelementptr inbounds %class.CacheBlob, ptr %19, i32 0, i32 2
  %88 = call ptr @_ZNSt6vectorIP10CachedDataSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %87) #4
  %89 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %15, i32 0, i32 0
  store ptr %88, ptr %89, align 8
  %90 = load i32, ptr %9, align 4, !tbaa !9
  %91 = sext i32 %90 to i64
  %92 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPP10CachedDataSt6vectorIS2_SaIS2_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %15, i64 noundef %91) #4
  %93 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %14, i32 0, i32 0
  store ptr %92, ptr %93, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKP10CachedDataSt6vectorIS2_SaIS2_EEEC2IPS2_vEERKNS0_IT_S7_EE(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %94 = getelementptr inbounds %class.CacheBlob, ptr %19, i32 0, i32 2
  %95 = call ptr @_ZNSt6vectorIP10CachedDataSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %94) #4
  %96 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  store ptr %95, ptr %96, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKP10CachedDataSt6vectorIS2_SaIS2_EEEC2IPS2_vEERKNS0_IT_S7_EE(ptr noundef nonnull align 8 dereferenceable(8) %16, ptr noundef nonnull align 8 dereferenceable(8) %17) #4
  %97 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.10", ptr %13, i32 0, i32 0
  %98 = load ptr, ptr %97, align 8
  %99 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.10", ptr %16, i32 0, i32 0
  %100 = load ptr, ptr %99, align 8
  %101 = call ptr @_ZNSt6vectorIP10CachedDataSaIS1_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS1_S3_EES8_(ptr noundef nonnull align 8 dereferenceable(24) %86, ptr %98, ptr %100)
  %102 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %18, i32 0, i32 0
  store ptr %101, ptr %102, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  store i1 true, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %107

103:                                              ; preds = %54
  br label %104

104:                                              ; preds = %103
  %105 = load i32, ptr %9, align 4, !tbaa !9
  %106 = add nsw i32 %105, -1
  store i32 %106, ptr %9, align 4, !tbaa !9
  br label %50, !llvm.loop !40

107:                                              ; preds = %85, %53
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  %108 = load i32, ptr %10, align 4
  switch i32 %108, label %110 [
    i32 2, label %109
  ]

109:                                              ; preds = %107
  store i1 false, ptr %3, align 1
  store i32 1, ptr %10, align 4
  br label %110

110:                                              ; preds = %109, %107
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %111

111:                                              ; preds = %110, %27
  %112 = load i1, ptr %3, align 1
  ret i1 %112
}

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPP10CachedDataSt6vectorIS3_SaIS3_EEEEPFbS3_S3_EEvT_SB_T0_(ptr, ptr, ptr noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN10CachedData7compareEPS_S0_(ptr noundef, ptr noundef) #2 align 2

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 88}
!12 = !{!"_ZTS9CacheBlob", !13, i64 8, !19, i64 64, !10, i64 88, !23, i64 96, !10, i64 128, !25, i64 136, !27, i64 176, !33, i64 184, !6, i64 192}
!13 = !{!"_ZTSSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP10CachedDataSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S7_EEE", !14, i64 0}
!14 = !{!"_ZTSSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P10CachedDataESaISA_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSC_18_Mod_range_hashingENSC_20_Default_ranged_hashENSC_20_Prime_rehash_policyENSC_17_Hashtable_traitsILb1ELb0ELb1EEEE", !6, i64 0, !15, i64 8, !16, i64 16, !15, i64 24, !17, i64 32, !6, i64 48}
!15 = !{!"long", !7, i64 0}
!16 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !6, i64 0}
!17 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !18, i64 0, !15, i64 8}
!18 = !{!"float", !7, i64 0}
!19 = !{!"_ZTSSt6vectorIP10CachedDataSaIS1_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIP10CachedDataSaIS1_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIP10CachedDataSaIS1_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIP10CachedDataSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !24, i64 0, !15, i64 8, !7, i64 16}
!24 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!25 = !{!"_ZTSSt5mutex", !26, i64 0}
!26 = !{!"_ZTSSt12__mutex_base", !7, i64 0}
!27 = !{!"_ZTSSt10unique_ptrI10CachedDataSt14default_deleteIS0_EE", !28, i64 0}
!28 = !{!"_ZTSSt15__uniq_ptr_dataI10CachedDataSt14default_deleteIS0_ELb1ELb1EE", !29, i64 0}
!29 = !{!"_ZTSSt15__uniq_ptr_implI10CachedDataSt14default_deleteIS0_EE", !30, i64 0}
!30 = !{!"_ZTSSt5tupleIJP10CachedDataSt14default_deleteIS0_EEE", !31, i64 0}
!31 = !{!"_ZTSSt11_Tuple_implILm0EJP10CachedDataSt14default_deleteIS0_EEE", !32, i64 0}
!32 = !{!"_ZTSSt10_Head_baseILm0EP10CachedDataLb0EE", !6, i64 0}
!33 = !{!"_ZTSN9CacheBlob9CacheModeE", !7, i64 0}
!34 = !{!12, !10, i64 128}
!35 = !{!36, !10, i64 4}
!36 = !{!"_ZTS10CachedData", !10, i64 0, !10, i64 4, !6, i64 8, !23, i64 16}
!37 = !{!15, !15, i64 0}
!38 = distinct !{!38, !39}
!39 = !{!"llvm.loop.mustprogress"}
!40 = distinct !{!40, !39}


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

%"class.__gnu_cxx::__normal_iterator.10" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN9CacheBlob16get_enough_spaceEi(ptr noundef nonnull align 8 dereferenceable(200) %0, i32 noundef %1) local_unnamed_addr #1 align 2 {
  %3 = alloca %"class.__gnu_cxx::__normal_iterator.10", align 8
  %4 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %6 = alloca %"class.__gnu_cxx::__normal_iterator.10", align 8
  %7 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %8 = getelementptr inbounds i8, ptr %0, i64 88
  %9 = load i32, ptr %8, align 8, !tbaa !5
  %10 = add nsw i32 %9, %1
  %11 = getelementptr inbounds i8, ptr %0, i64 128
  %12 = load i32, ptr %11, align 8, !tbaa !32
  %.not = icmp sgt i32 %10, %12
  br i1 %.not, label %13, label %.critedge

13:                                               ; preds = %2
  %14 = sub nsw i32 %10, %12
  %15 = getelementptr inbounds i8, ptr %0, i64 64
  %16 = tail call ptr @_ZNSt6vectorIP10CachedDataSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  %17 = tail call ptr @_ZNSt6vectorIP10CachedDataSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  tail call void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPP10CachedDataSt6vectorIS3_SaIS3_EEEEPFbS3_S3_EEvT_SB_T0_(ptr %16, ptr %17, ptr noundef nonnull @_ZN10CachedData7compareEPS_S0_)
  %18 = tail call noundef i64 @_ZNKSt6vectorIP10CachedDataSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  %19 = and i64 %18, 4294967295
  br label %20

20:                                               ; preds = %23, %13
  %indvars.iv = phi i64 [ %indvars.iv.next, %23 ], [ %19, %13 ]
  %.017 = phi i32 [ %29, %23 ], [ %14, %13 ]
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %21 = and i64 %indvars.iv.next, 2147483648
  %22 = icmp eq i64 %21, 0
  br i1 %22, label %23, label %.critedge

23:                                               ; preds = %20
  %24 = and i64 %indvars.iv.next, 2147483647
  %25 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10CachedDataSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %24) #4
  %26 = load ptr, ptr %25, align 8, !tbaa !33
  %27 = getelementptr inbounds i8, ptr %26, i64 4
  %28 = load i32, ptr %27, align 4, !tbaa !34
  %29 = sub nsw i32 %.017, %28
  %30 = icmp slt i32 %29, 1
  br i1 %30, label %.preheader, label %20, !llvm.loop !36

.preheader:                                       ; preds = %23
  %31 = tail call noundef i64 @_ZNKSt6vectorIP10CachedDataSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  %32 = icmp ugt i64 %31, %24
  br i1 %32, label %.lr.ph, label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph, %.preheader
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  %33 = tail call ptr @_ZNSt6vectorIP10CachedDataSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  store ptr %33, ptr %5, align 8
  %34 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPP10CachedDataSt6vectorIS2_SaIS2_EEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %5, i64 noundef %24) #4
  store ptr %34, ptr %4, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKP10CachedDataSt6vectorIS2_SaIS2_EEEC2IPS2_vEERKNS0_IT_S7_EE(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  %35 = call ptr @_ZNSt6vectorIP10CachedDataSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  store ptr %35, ptr %7, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKP10CachedDataSt6vectorIS2_SaIS2_EEEC2IPS2_vEERKNS0_IT_S7_EE(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %7) #4
  %36 = load ptr, ptr %3, align 8
  %37 = load ptr, ptr %6, align 8
  %38 = call ptr @_ZNSt6vectorIP10CachedDataSaIS1_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS1_S3_EES8_(ptr noundef nonnull align 8 dereferenceable(24) %15, ptr %36, ptr %37)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  br label %.critedge

.lr.ph:                                           ; preds = %.preheader, %.lr.ph
  %.01823 = phi i64 [ %42, %.lr.ph ], [ %24, %.preheader ]
  %39 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIP10CachedDataSaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %15, i64 noundef %.01823) #4
  %40 = load ptr, ptr %39, align 8, !tbaa !33
  %41 = getelementptr inbounds i8, ptr %40, i64 16
  tail call void @_ZN9CacheBlob6removeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(200) %0, ptr noundef nonnull align 8 dereferenceable(32) %41)
  %42 = add nuw i64 %.01823, 1
  %43 = tail call noundef i64 @_ZNKSt6vectorIP10CachedDataSaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %15) #4
  %44 = icmp ult i64 %42, %43
  br i1 %44, label %.lr.ph, label %._crit_edge, !llvm.loop !38

.critedge:                                        ; preds = %20, %._crit_edge, %2
  %.2 = phi i1 [ true, %2 ], [ true, %._crit_edge ], [ false, %20 ]
  ret i1 %.2
}

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

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

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

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt4sortIN9__gnu_cxx17__normal_iteratorIPP10CachedDataSt6vectorIS3_SaIS3_EEEEPFbS3_S3_EEvT_SB_T0_(ptr, ptr, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN10CachedData7compareEPS_S0_(ptr noundef, ptr noundef) #2 align 2

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !20, i64 88}
!6 = !{!"_ZTS9CacheBlob", !7, i64 8, !16, i64 64, !20, i64 88, !21, i64 96, !20, i64 128, !23, i64 136, !25, i64 176, !31, i64 184, !9, i64 192}
!7 = !{!"_ZTSSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEP10CachedDataSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S7_EEE", !8, i64 0}
!8 = !{!"_ZTSSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P10CachedDataESaISA_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSC_18_Mod_range_hashingENSC_20_Default_ranged_hashENSC_20_Prime_rehash_policyENSC_17_Hashtable_traitsILb1ELb0ELb1EEEE", !9, i64 0, !12, i64 8, !13, i64 16, !12, i64 24, !14, i64 32, !9, i64 48}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"long", !10, i64 0}
!13 = !{!"_ZTSNSt8__detail15_Hash_node_baseE", !9, i64 0}
!14 = !{!"_ZTSNSt8__detail20_Prime_rehash_policyE", !15, i64 0, !12, i64 8}
!15 = !{!"float", !10, i64 0}
!16 = !{!"_ZTSSt6vectorIP10CachedDataSaIS1_EE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIP10CachedDataSaIS1_EE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIP10CachedDataSaIS1_EE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIP10CachedDataSaIS1_EE17_Vector_impl_dataE", !9, i64 0, !9, i64 8, !9, i64 16}
!20 = !{!"int", !10, i64 0}
!21 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !22, i64 0, !12, i64 8, !10, i64 16}
!22 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !9, i64 0}
!23 = !{!"_ZTSSt5mutex", !24, i64 0}
!24 = !{!"_ZTSSt12__mutex_base", !10, i64 0}
!25 = !{!"_ZTSSt10unique_ptrI10CachedDataSt14default_deleteIS0_EE", !26, i64 0}
!26 = !{!"_ZTSSt15__uniq_ptr_dataI10CachedDataSt14default_deleteIS0_ELb1ELb1EE", !27, i64 0}
!27 = !{!"_ZTSSt15__uniq_ptr_implI10CachedDataSt14default_deleteIS0_EE", !28, i64 0}
!28 = !{!"_ZTSSt5tupleIJP10CachedDataSt14default_deleteIS0_EEE", !29, i64 0}
!29 = !{!"_ZTSSt11_Tuple_implILm0EJP10CachedDataSt14default_deleteIS0_EEE", !30, i64 0}
!30 = !{!"_ZTSSt10_Head_baseILm0EP10CachedDataLb0EE", !9, i64 0}
!31 = !{!"_ZTSN9CacheBlob9CacheModeE", !10, i64 0}
!32 = !{!6, !20, i64 128}
!33 = !{!9, !9, i64 0}
!34 = !{!35, !20, i64 4}
!35 = !{!"_ZTS10CachedData", !20, i64 0, !20, i64 4, !9, i64 8, !21, i64 16}
!36 = distinct !{!36, !37}
!37 = !{!"llvm.loop.mustprogress"}
!38 = distinct !{!38, !37}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass