; LLVM IR from justinxu9905/bustub-2022-fall :: src/buffer/lru_k_replacer.ll (ZN6bustub12LRUKReplacer5EvictEPi)

; 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::scoped_lock" = type { ptr }
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }
%"struct.std::pair" = type { i32, %"class.std::__cxx11::list" }
%"class.std::__cxx11::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<unsigned long, std::allocator<unsigned long>>::_List_impl" }
%"struct.std::__cxx11::_List_base<unsigned long, std::allocator<unsigned long>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { ptr, ptr }
%"struct.std::__detail::_Node_iterator.19" = type { %"struct.std::__detail::_Node_iterator_base.20" }
%"struct.std::__detail::_Node_iterator_base.20" = type { ptr }
%"class.bustub::LRUKReplacer" = type { %"class.std::unordered_map", %"class.std::unordered_map", %"class.std::unordered_map.2", %"struct.std::atomic", i64, i64, %"class.std::mutex" }
%"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::unordered_map.2" = type { %"class.std::_Hashtable.3" }
%"class.std::_Hashtable.3" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i64 }
%"class.std::mutex" = type { %"class.std::__mutex_base" }
%"class.std::__mutex_base" = type { %union.pthread_mutex_t }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }

; 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 @_ZN6bustub12LRUKReplacer5EvictEPi(ptr noundef nonnull align 8 dereferenceable(232) %0, ptr noundef %1) #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %"class.std::scoped_lock", align 8
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %11 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %12 = alloca %"struct.std::pair", align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca %"struct.std::__detail::_Node_iterator.19", align 8
  %16 = alloca %"struct.std::__detail::_Node_iterator.19", align 8
  %17 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %18 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %19 = alloca ptr, align 8
  %20 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %21 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %22 = alloca %"struct.std::pair", align 8
  %23 = alloca %"struct.std::__detail::_Node_iterator.19", align 8
  %24 = alloca %"struct.std::__detail::_Node_iterator.19", align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %25 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  %26 = getelementptr inbounds %"class.bustub::LRUKReplacer", ptr %25, i32 0, i32 6
  call void @_ZNSt11scoped_lockIJSt5mutexEEC2ERS0_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(40) %26)
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  store i32 -1, ptr %27, align 4, !tbaa !9
  %28 = getelementptr inbounds %"class.bustub::LRUKReplacer", ptr %25, i32 0, i32 3
  %29 = call noundef i64 @_ZNSt13__atomic_baseImEppEi(ptr noundef nonnull align 8 dereferenceable(8) %28, i32 noundef 0) #4
  %30 = getelementptr inbounds %"class.bustub::LRUKReplacer", ptr %25, i32 0, i32 0
  %31 = call noundef zeroext i1 @_ZNKSt13unordered_mapIiNSt7__cxx114listImSaImEEESt4hashIiESt8equal_toIiESaISt4pairIKiS3_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(56) %30) #4
  br i1 %31, label %32, label %36

32:                                               ; preds = %2
  %33 = getelementptr inbounds %"class.bustub::LRUKReplacer", ptr %25, i32 0, i32 1
  %34 = call noundef zeroext i1 @_ZNKSt13unordered_mapIiNSt7__cxx114listImSaImEEESt4hashIiESt8equal_toIiESaISt4pairIKiS3_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(56) %33) #4
  br i1 %34, label %35, label %36

35:                                               ; preds = %32
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %195

36:                                               ; preds = %32, %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  %37 = getelementptr inbounds %"class.bustub::LRUKReplacer", ptr %25, i32 0, i32 3
  %38 = call noundef i64 @_ZNKSt13__atomic_baseImEcvmEv(ptr noundef nonnull align 8 dereferenceable(8) %37) #4
  store i64 %38, ptr %8, align 8, !tbaa !11
  %39 = getelementptr inbounds %"class.bustub::LRUKReplacer", ptr %25, i32 0, i32 0
  %40 = call noundef zeroext i1 @_ZNKSt13unordered_mapIiNSt7__cxx114listImSaImEEESt4hashIiESt8equal_toIiESaISt4pairIKiS3_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(56) %39) #4
  br i1 %40, label %96, label %41

41:                                               ; preds = %36
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %42 = getelementptr inbounds %"class.bustub::LRUKReplacer", ptr %25, i32 0, i32 0
  store ptr %42, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %43 = load ptr, ptr %9, align 8, !tbaa !5
  %44 = call ptr @_ZNSt13unordered_mapIiNSt7__cxx114listImSaImEEESt4hashIiESt8equal_toIiESaISt4pairIKiS3_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %43) #4
  %45 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %10, i32 0, i32 0
  %46 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %45, i32 0, i32 0
  store ptr %44, ptr %46, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #4
  %47 = load ptr, ptr %9, align 8, !tbaa !5
  %48 = call ptr @_ZNSt13unordered_mapIiNSt7__cxx114listImSaImEEESt4hashIiESt8equal_toIiESaISt4pairIKiS3_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %47) #4
  %49 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %11, i32 0, i32 0
  %50 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %49, i32 0, i32 0
  store ptr %48, ptr %50, align 8
  br label %51

51:                                               ; preds = %92, %41
  %52 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKiNSt7__cxx114listImSaImEEEELb0EEESA_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11) #4
  br i1 %52, label %54, label %53

53:                                               ; preds = %51
  store i32 2, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br label %95

54:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #4
  %55 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKiNSt7__cxx114listImSaImEEEELb0ELb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #4
  invoke void @_ZNSt4pairIKiNSt7__cxx114listImSaImEEEEC2ERKS5_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull align 8 dereferenceable(32) %55)
          to label %56 unwind label %83

56:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #4
  %57 = getelementptr inbounds %"class.bustub::LRUKReplacer", ptr %25, i32 0, i32 2
  %58 = getelementptr inbounds %"struct.std::pair", ptr %12, i32 0, i32 0
  %59 = invoke ptr @_ZNSt13unordered_mapIibSt4hashIiESt8equal_toIiESaISt4pairIKibEEE4findERS5_(ptr noundef nonnull align 8 dereferenceable(56) %57, ptr noundef nonnull align 4 dereferenceable(4) %58)
          to label %60 unwind label %87

60:                                               ; preds = %56
  %61 = getelementptr inbounds %"struct.std::__detail::_Node_iterator.19", ptr %15, i32 0, i32 0
  %62 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base.20", ptr %61, i32 0, i32 0
  store ptr %59, ptr %62, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #4
  %63 = getelementptr inbounds %"class.bustub::LRUKReplacer", ptr %25, i32 0, i32 2
  %64 = call ptr @_ZNSt13unordered_mapIibSt4hashIiESt8equal_toIiESaISt4pairIKibEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %63) #4
  %65 = getelementptr inbounds %"struct.std::__detail::_Node_iterator.19", ptr %16, i32 0, i32 0
  %66 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base.20", ptr %65, i32 0, i32 0
  store ptr %64, ptr %66, align 8
  %67 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKibELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 8 dereferenceable(8) %16) #4
  br i1 %67, label %68, label %74

68:                                               ; preds = %60
  %69 = getelementptr inbounds %"struct.std::pair", ptr %12, i32 0, i32 1
  %70 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt7__cxx114listImSaImEE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %69) #4
  %71 = load i64, ptr %70, align 8, !tbaa !11
  %72 = load i64, ptr %8, align 8, !tbaa !11
  %73 = icmp ult i64 %71, %72
  br label %74

74:                                               ; preds = %68, %60
  %75 = phi i1 [ false, %60 ], [ %73, %68 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  br i1 %75, label %76, label %91

76:                                               ; preds = %74
  %77 = getelementptr inbounds %"struct.std::pair", ptr %12, i32 0, i32 0
  %78 = load i32, ptr %77, align 8, !tbaa !13
  %79 = load ptr, ptr %5, align 8, !tbaa !5
  store i32 %78, ptr %79, align 4, !tbaa !9
  %80 = getelementptr inbounds %"struct.std::pair", ptr %12, i32 0, i32 1
  %81 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt7__cxx114listImSaImEE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %80) #4
  %82 = load i64, ptr %81, align 8, !tbaa !11
  store i64 %82, ptr %8, align 8, !tbaa !11
  br label %91

83:                                               ; preds = %54
  %84 = landingpad { ptr, i32 }
          cleanup
  %85 = extractvalue { ptr, i32 } %84, 0
  store ptr %85, ptr %13, align 8
  %86 = extractvalue { ptr, i32 } %84, 1
  store i32 %86, ptr %14, align 4
  br label %94

87:                                               ; preds = %56
  %88 = landingpad { ptr, i32 }
          cleanup
  %89 = extractvalue { ptr, i32 } %88, 0
  store ptr %89, ptr %13, align 8
  %90 = extractvalue { ptr, i32 } %88, 1
  store i32 %90, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @_ZNSt4pairIKiNSt7__cxx114listImSaImEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #4
  br label %94

91:                                               ; preds = %76, %74
  call void @_ZNSt4pairIKiNSt7__cxx114listImSaImEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #4
  br label %92

92:                                               ; preds = %91
  %93 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorISt4pairIKiNSt7__cxx114listImSaImEEEELb0ELb0EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %10) #4
  br label %51

94:                                               ; preds = %87, %83
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br label %194

95:                                               ; preds = %53
  br label %96

96:                                               ; preds = %95, %36
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %97 = getelementptr inbounds %"class.bustub::LRUKReplacer", ptr %25, i32 0, i32 0
  %98 = load ptr, ptr %5, align 8, !tbaa !5
  %99 = invoke ptr @_ZNSt13unordered_mapIiNSt7__cxx114listImSaImEEESt4hashIiESt8equal_toIiESaISt4pairIKiS3_EEE4findERS9_(ptr noundef nonnull align 8 dereferenceable(56) %97, ptr noundef nonnull align 4 dereferenceable(4) %98)
          to label %100 unwind label %117

100:                                              ; preds = %96
  %101 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %17, i32 0, i32 0
  %102 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %101, i32 0, i32 0
  store ptr %99, ptr %102, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  %103 = getelementptr inbounds %"class.bustub::LRUKReplacer", ptr %25, i32 0, i32 0
  %104 = call ptr @_ZNSt13unordered_mapIiNSt7__cxx114listImSaImEEESt4hashIiESt8equal_toIiESaISt4pairIKiS3_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %103) #4
  %105 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %18, i32 0, i32 0
  %106 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %105, i32 0, i32 0
  store ptr %104, ptr %106, align 8
  %107 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKiNSt7__cxx114listImSaImEEEELb0EEESA_(ptr noundef nonnull align 8 dereferenceable(8) %17, ptr noundef nonnull align 8 dereferenceable(8) %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  br i1 %107, label %108, label %125

108:                                              ; preds = %100
  %109 = getelementptr inbounds %"class.bustub::LRUKReplacer", ptr %25, i32 0, i32 0
  %110 = load ptr, ptr %5, align 8, !tbaa !5
  %111 = invoke noundef i64 @_ZNSt13unordered_mapIiNSt7__cxx114listImSaImEEESt4hashIiESt8equal_toIiESaISt4pairIKiS3_EEE5eraseERS9_(ptr noundef nonnull align 8 dereferenceable(56) %109, ptr noundef nonnull align 4 dereferenceable(4) %110)
          to label %112 unwind label %121

112:                                              ; preds = %108
  %113 = getelementptr inbounds %"class.bustub::LRUKReplacer", ptr %25, i32 0, i32 2
  %114 = load ptr, ptr %5, align 8, !tbaa !5
  %115 = invoke noundef i64 @_ZNSt13unordered_mapIibSt4hashIiESt8equal_toIiESaISt4pairIKibEEE5eraseERS5_(ptr noundef nonnull align 8 dereferenceable(56) %113, ptr noundef nonnull align 4 dereferenceable(4) %114)
          to label %116 unwind label %121

116:                                              ; preds = %112
  store i1 true, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %193

117:                                              ; preds = %96
  %118 = landingpad { ptr, i32 }
          cleanup
  %119 = extractvalue { ptr, i32 } %118, 0
  store ptr %119, ptr %13, align 8
  %120 = extractvalue { ptr, i32 } %118, 1
  store i32 %120, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  br label %194

121:                                              ; preds = %188, %184, %112, %108
  %122 = landingpad { ptr, i32 }
          cleanup
  %123 = extractvalue { ptr, i32 } %122, 0
  store ptr %123, ptr %13, align 8
  %124 = extractvalue { ptr, i32 } %122, 1
  store i32 %124, ptr %14, align 4
  br label %194

125:                                              ; preds = %100
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #4
  %126 = getelementptr inbounds %"class.bustub::LRUKReplacer", ptr %25, i32 0, i32 1
  store ptr %126, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #4
  %127 = load ptr, ptr %19, align 8, !tbaa !5
  %128 = call ptr @_ZNSt13unordered_mapIiNSt7__cxx114listImSaImEEESt4hashIiESt8equal_toIiESaISt4pairIKiS3_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %127) #4
  %129 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %20, i32 0, i32 0
  %130 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %129, i32 0, i32 0
  store ptr %128, ptr %130, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #4
  %131 = load ptr, ptr %19, align 8, !tbaa !5
  %132 = call ptr @_ZNSt13unordered_mapIiNSt7__cxx114listImSaImEEESt4hashIiESt8equal_toIiESaISt4pairIKiS3_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %131) #4
  %133 = getelementptr inbounds %"struct.std::__detail::_Node_iterator", ptr %21, i32 0, i32 0
  %134 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base", ptr %133, i32 0, i32 0
  store ptr %132, ptr %134, align 8
  br label %135

135:                                              ; preds = %176, %125
  %136 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKiNSt7__cxx114listImSaImEEEELb0EEESA_(ptr noundef nonnull align 8 dereferenceable(8) %20, ptr noundef nonnull align 8 dereferenceable(8) %21) #4
  br i1 %136, label %138, label %137

137:                                              ; preds = %135
  store i32 4, ptr %7, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  br label %179

138:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 32, ptr %22) #4
  %139 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKiNSt7__cxx114listImSaImEEEELb0ELb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %20) #4
  invoke void @_ZNSt4pairIKiNSt7__cxx114listImSaImEEEEC2ERKS5_(ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef nonnull align 8 dereferenceable(32) %139)
          to label %140 unwind label %167

140:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #4
  %141 = getelementptr inbounds %"class.bustub::LRUKReplacer", ptr %25, i32 0, i32 2
  %142 = getelementptr inbounds %"struct.std::pair", ptr %22, i32 0, i32 0
  %143 = invoke ptr @_ZNSt13unordered_mapIibSt4hashIiESt8equal_toIiESaISt4pairIKibEEE4findERS5_(ptr noundef nonnull align 8 dereferenceable(56) %141, ptr noundef nonnull align 4 dereferenceable(4) %142)
          to label %144 unwind label %171

144:                                              ; preds = %140
  %145 = getelementptr inbounds %"struct.std::__detail::_Node_iterator.19", ptr %23, i32 0, i32 0
  %146 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base.20", ptr %145, i32 0, i32 0
  store ptr %143, ptr %146, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #4
  %147 = getelementptr inbounds %"class.bustub::LRUKReplacer", ptr %25, i32 0, i32 2
  %148 = call ptr @_ZNSt13unordered_mapIibSt4hashIiESt8equal_toIiESaISt4pairIKibEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %147) #4
  %149 = getelementptr inbounds %"struct.std::__detail::_Node_iterator.19", ptr %24, i32 0, i32 0
  %150 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base.20", ptr %149, i32 0, i32 0
  store ptr %148, ptr %150, align 8
  %151 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKibELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8) %23, ptr noundef nonnull align 8 dereferenceable(8) %24) #4
  br i1 %151, label %152, label %158

152:                                              ; preds = %144
  %153 = getelementptr inbounds %"struct.std::pair", ptr %22, i32 0, i32 1
  %154 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt7__cxx114listImSaImEE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %153) #4
  %155 = load i64, ptr %154, align 8, !tbaa !11
  %156 = load i64, ptr %8, align 8, !tbaa !11
  %157 = icmp ult i64 %155, %156
  br label %158

158:                                              ; preds = %152, %144
  %159 = phi i1 [ false, %144 ], [ %157, %152 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  br i1 %159, label %160, label %175

160:                                              ; preds = %158
  %161 = getelementptr inbounds %"struct.std::pair", ptr %22, i32 0, i32 0
  %162 = load i32, ptr %161, align 8, !tbaa !13
  %163 = load ptr, ptr %5, align 8, !tbaa !5
  store i32 %162, ptr %163, align 4, !tbaa !9
  %164 = getelementptr inbounds %"struct.std::pair", ptr %22, i32 0, i32 1
  %165 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt7__cxx114listImSaImEE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %164) #4
  %166 = load i64, ptr %165, align 8, !tbaa !11
  store i64 %166, ptr %8, align 8, !tbaa !11
  br label %175

167:                                              ; preds = %138
  %168 = landingpad { ptr, i32 }
          cleanup
  %169 = extractvalue { ptr, i32 } %168, 0
  store ptr %169, ptr %13, align 8
  %170 = extractvalue { ptr, i32 } %168, 1
  store i32 %170, ptr %14, align 4
  br label %178

171:                                              ; preds = %140
  %172 = landingpad { ptr, i32 }
          cleanup
  %173 = extractvalue { ptr, i32 } %172, 0
  store ptr %173, ptr %13, align 8
  %174 = extractvalue { ptr, i32 } %172, 1
  store i32 %174, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  call void @_ZNSt4pairIKiNSt7__cxx114listImSaImEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #4
  br label %178

175:                                              ; preds = %160, %158
  call void @_ZNSt4pairIKiNSt7__cxx114listImSaImEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %22) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #4
  br label %176

176:                                              ; preds = %175
  %177 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorISt4pairIKiNSt7__cxx114listImSaImEEEELb0ELb0EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %20) #4
  br label %135

178:                                              ; preds = %171, %167
  call void @llvm.lifetime.end.p0(i64 32, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  br label %194

179:                                              ; preds = %137
  %180 = load ptr, ptr %5, align 8, !tbaa !5
  %181 = load i32, ptr %180, align 4, !tbaa !9
  %182 = icmp eq i32 %181, -1
  br i1 %182, label %183, label %184

183:                                              ; preds = %179
  store i1 false, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %193

184:                                              ; preds = %179
  %185 = getelementptr inbounds %"class.bustub::LRUKReplacer", ptr %25, i32 0, i32 1
  %186 = load ptr, ptr %5, align 8, !tbaa !5
  %187 = invoke noundef i64 @_ZNSt13unordered_mapIiNSt7__cxx114listImSaImEEESt4hashIiESt8equal_toIiESaISt4pairIKiS3_EEE5eraseERS9_(ptr noundef nonnull align 8 dereferenceable(56) %185, ptr noundef nonnull align 4 dereferenceable(4) %186)
          to label %188 unwind label %121

188:                                              ; preds = %184
  %189 = getelementptr inbounds %"class.bustub::LRUKReplacer", ptr %25, i32 0, i32 2
  %190 = load ptr, ptr %5, align 8, !tbaa !5
  %191 = invoke noundef i64 @_ZNSt13unordered_mapIibSt4hashIiESt8equal_toIiESaISt4pairIKibEEE5eraseERS5_(ptr noundef nonnull align 8 dereferenceable(56) %189, ptr noundef nonnull align 4 dereferenceable(4) %190)
          to label %192 unwind label %121

192:                                              ; preds = %188
  store i1 true, ptr %3, align 1
  store i32 1, ptr %7, align 4
  br label %193

193:                                              ; preds = %192, %183, %116
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  br label %195

194:                                              ; preds = %178, %121, %117, %94
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @_ZNSt11scoped_lockIJSt5mutexEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  br label %197

195:                                              ; preds = %193, %35
  call void @_ZNSt11scoped_lockIJSt5mutexEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  %196 = load i1, ptr %3, align 1
  ret i1 %196

197:                                              ; preds = %194
  %198 = load ptr, ptr %13, align 8
  %199 = load i32, ptr %14, align 4
  %200 = insertvalue { ptr, i32 } poison, ptr %198, 0
  %201 = insertvalue { ptr, i32 } %200, i32 %199, 1
  resume { ptr, i32 } %201
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt11scoped_lockIJSt5mutexEEC2ERS0_(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 @_ZNSt13__atomic_baseImEppEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #2 align 2

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

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKiNSt7__cxx114listImSaImEEEELb0EEESA_(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(32) ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKiNSt7__cxx114listImSaImEEEELb0ELb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(8)) #2 align 2

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !10, i64 0}
!14 = !{!"_ZTSSt4pairIKiNSt7__cxx114listImSaImEEEE", !10, i64 0, !15, i64 8}
!15 = !{!"_ZTSNSt7__cxx114listImSaImEEE", !16, i64 0}
!16 = !{!"_ZTSNSt7__cxx1110_List_baseImSaImEEE", !17, i64 0}
!17 = !{!"_ZTSNSt7__cxx1110_List_baseImSaImEE10_List_implE", !18, i64 0}
!18 = !{!"_ZTSNSt8__detail17_List_node_headerE", !19, i64 0, !12, i64 16}
!19 = !{!"_ZTSNSt8__detail15_List_node_baseE", !6, i64 0, !6, i64 8}


; 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::scoped_lock" = type { ptr }
%"struct.std::__detail::_Node_iterator" = type { %"struct.std::__detail::_Node_iterator_base" }
%"struct.std::__detail::_Node_iterator_base" = type { ptr }
%"struct.std::pair" = type { i32, %"class.std::__cxx11::list" }
%"class.std::__cxx11::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<unsigned long, std::allocator<unsigned long>>::_List_impl" }
%"struct.std::__cxx11::_List_base<unsigned long, std::allocator<unsigned long>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { ptr, ptr }
%"struct.std::__detail::_Node_iterator.19" = type { %"struct.std::__detail::_Node_iterator_base.20" }
%"struct.std::__detail::_Node_iterator_base.20" = 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 @_ZN6bustub12LRUKReplacer5EvictEPi(ptr noundef nonnull align 8 dereferenceable(232) %0, ptr noundef %1) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.std::scoped_lock", align 8
  %4 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %5 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %6 = alloca %"struct.std::pair", align 8
  %7 = alloca %"struct.std::__detail::_Node_iterator.19", align 8
  %8 = alloca %"struct.std::__detail::_Node_iterator.19", align 8
  %9 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %10 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %11 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %12 = alloca %"struct.std::__detail::_Node_iterator", align 8
  %13 = alloca %"struct.std::pair", align 8
  %14 = alloca %"struct.std::__detail::_Node_iterator.19", align 8
  %15 = alloca %"struct.std::__detail::_Node_iterator.19", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  %16 = getelementptr inbounds i8, ptr %0, i64 192
  call void @_ZNSt11scoped_lockIJSt5mutexEEC2ERS0_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(40) %16)
  store i32 -1, ptr %1, align 4, !tbaa !5
  %17 = getelementptr inbounds i8, ptr %0, i64 168
  %18 = call noundef i64 @_ZNSt13__atomic_baseImEppEi(ptr noundef nonnull align 8 dereferenceable(8) %17, i32 noundef 0) #4
  %19 = call noundef zeroext i1 @_ZNKSt13unordered_mapIiNSt7__cxx114listImSaImEEESt4hashIiESt8equal_toIiESaISt4pairIKiS3_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(56) %0) #4
  br i1 %19, label %20, label %23

20:                                               ; preds = %2
  %21 = getelementptr inbounds i8, ptr %0, i64 56
  %22 = call noundef zeroext i1 @_ZNKSt13unordered_mapIiNSt7__cxx114listImSaImEEESt4hashIiESt8equal_toIiESaISt4pairIKiS3_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(56) %21) #4
  br i1 %22, label %101, label %23

23:                                               ; preds = %20, %2
  %24 = call noundef i64 @_ZNKSt13__atomic_baseImEcvmEv(ptr noundef nonnull align 8 dereferenceable(8) %17) #4
  %25 = call noundef zeroext i1 @_ZNKSt13unordered_mapIiNSt7__cxx114listImSaImEEESt4hashIiESt8equal_toIiESaISt4pairIKiS3_EEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(56) %0) #4
  br i1 %25, label %55, label %26

26:                                               ; preds = %23
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %27 = call ptr @_ZNSt13unordered_mapIiNSt7__cxx114listImSaImEEESt4hashIiESt8equal_toIiESaISt4pairIKiS3_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %0) #4
  store ptr %27, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  %28 = call ptr @_ZNSt13unordered_mapIiNSt7__cxx114listImSaImEEESt4hashIiESt8equal_toIiESaISt4pairIKiS3_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %0) #4
  store ptr %28, ptr %5, align 8
  %29 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKiNSt7__cxx114listImSaImEEEELb0EEESA_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  br i1 %29, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %26
  %30 = getelementptr inbounds i8, ptr %0, i64 112
  %31 = getelementptr inbounds i8, ptr %6, i64 8
  br label %32

._crit_edge:                                      ; preds = %51, %26
  %.025.lcssa = phi i64 [ %24, %26 ], [ %.126, %51 ]
  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 %55

32:                                               ; preds = %.lr.ph, %51
  %.02535 = phi i64 [ %24, %.lr.ph ], [ %.126, %51 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #4
  %33 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKiNSt7__cxx114listImSaImEEEELb0ELb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  invoke void @_ZNSt4pairIKiNSt7__cxx114listImSaImEEEEC2ERKS5_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(32) %33)
          to label %34 unwind label %47

34:                                               ; preds = %32
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  %35 = invoke ptr @_ZNSt13unordered_mapIibSt4hashIiESt8equal_toIiESaISt4pairIKibEEE4findERS5_(ptr noundef nonnull align 8 dereferenceable(56) %30, ptr noundef nonnull align 4 dereferenceable(4) %6)
          to label %36 unwind label %49

36:                                               ; preds = %34
  store ptr %35, ptr %7, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #4
  %37 = call ptr @_ZNSt13unordered_mapIibSt4hashIiESt8equal_toIiESaISt4pairIKibEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %30) #4
  store ptr %37, ptr %8, align 8
  %38 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKibELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %8) #4
  br i1 %38, label %39, label %.critedge

39:                                               ; preds = %36
  %40 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt7__cxx114listImSaImEE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %31) #4
  %41 = load i64, ptr %40, align 8, !tbaa !9
  %42 = icmp ult i64 %41, %.02535
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  br i1 %42, label %43, label %51

43:                                               ; preds = %39
  %44 = load i32, ptr %6, align 8, !tbaa !11
  store i32 %44, ptr %1, align 4, !tbaa !5
  %45 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt7__cxx114listImSaImEE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %31) #4
  %46 = load i64, ptr %45, align 8, !tbaa !9
  br label %51

47:                                               ; preds = %32
  %48 = landingpad { ptr, i32 }
          cleanup
  br label %54

49:                                               ; preds = %34
  %50 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  call void @_ZNSt4pairIKiNSt7__cxx114listImSaImEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  br label %54

.critedge:                                        ; preds = %36
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #4
  br label %51

51:                                               ; preds = %.critedge, %43, %39
  %.126 = phi i64 [ %46, %43 ], [ %.02535, %39 ], [ %.02535, %.critedge ]
  call void @_ZNSt4pairIKiNSt7__cxx114listImSaImEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #4
  %52 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorISt4pairIKiNSt7__cxx114listImSaImEEEELb0ELb0EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %4) #4
  %53 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKiNSt7__cxx114listImSaImEEEELb0EEESA_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5) #4
  br i1 %53, label %32, label %._crit_edge

54:                                               ; preds = %49, %47
  %.pn = phi { ptr, i32 } [ %50, %49 ], [ %48, %47 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #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 %100

55:                                               ; preds = %._crit_edge, %23
  %.227 = phi i64 [ %24, %23 ], [ %.025.lcssa, %._crit_edge ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #4
  %56 = invoke ptr @_ZNSt13unordered_mapIiNSt7__cxx114listImSaImEEESt4hashIiESt8equal_toIiESaISt4pairIKiS3_EEE4findERS9_(ptr noundef nonnull align 8 dereferenceable(56) %0, ptr noundef nonnull align 4 dereferenceable(4) %1)
          to label %57 unwind label %60

57:                                               ; preds = %55
  store ptr %56, ptr %9, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #4
  %58 = call ptr @_ZNSt13unordered_mapIiNSt7__cxx114listImSaImEEESt4hashIiESt8equal_toIiESaISt4pairIKiS3_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %0) #4
  store ptr %58, ptr %10, align 8
  %59 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKiNSt7__cxx114listImSaImEEEELb0EEESA_(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 8 dereferenceable(8) %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  br i1 %59, label %.invoke40, label %64

60:                                               ; preds = %55
  %61 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #4
  br label %100

62:                                               ; preds = %.invoke40, %.invoke
  %63 = landingpad { ptr, i32 }
          cleanup
  br label %100

64:                                               ; preds = %57
  %65 = getelementptr inbounds i8, ptr %0, i64 56
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #4
  %66 = call ptr @_ZNSt13unordered_mapIiNSt7__cxx114listImSaImEEESt4hashIiESt8equal_toIiESaISt4pairIKiS3_EEE5beginEv(ptr noundef nonnull align 8 dereferenceable(56) %65) #4
  store ptr %66, ptr %11, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #4
  %67 = call ptr @_ZNSt13unordered_mapIiNSt7__cxx114listImSaImEEESt4hashIiESt8equal_toIiESaISt4pairIKiS3_EEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %65) #4
  store ptr %67, ptr %12, align 8
  %68 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKiNSt7__cxx114listImSaImEEEELb0EEESA_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #4
  br i1 %68, label %.lr.ph38, label %._crit_edge39

.lr.ph38:                                         ; preds = %64
  %69 = getelementptr inbounds i8, ptr %0, i64 112
  %70 = getelementptr inbounds i8, ptr %13, i64 8
  br label %73

._crit_edge39:                                    ; preds = %92, %64
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #4
  %71 = load i32, ptr %1, align 4, !tbaa !5
  %72 = icmp eq i32 %71, -1
  br i1 %72, label %101, label %.invoke40

73:                                               ; preds = %.lr.ph38, %92
  %.336 = phi i64 [ %.227, %.lr.ph38 ], [ %.4, %92 ]
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %13) #4
  %74 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNKSt8__detail14_Node_iteratorISt4pairIKiNSt7__cxx114listImSaImEEEELb0ELb0EEdeEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #4
  invoke void @_ZNSt4pairIKiNSt7__cxx114listImSaImEEEEC2ERKS5_(ptr noundef nonnull align 8 dereferenceable(32) %13, ptr noundef nonnull align 8 dereferenceable(32) %74)
          to label %75 unwind label %88

75:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %14) #4
  %76 = invoke ptr @_ZNSt13unordered_mapIibSt4hashIiESt8equal_toIiESaISt4pairIKibEEE4findERS5_(ptr noundef nonnull align 8 dereferenceable(56) %69, ptr noundef nonnull align 4 dereferenceable(4) %13)
          to label %77 unwind label %90

77:                                               ; preds = %75
  store ptr %76, ptr %14, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #4
  %78 = call ptr @_ZNSt13unordered_mapIibSt4hashIiESt8equal_toIiESaISt4pairIKibEEE3endEv(ptr noundef nonnull align 8 dereferenceable(56) %69) #4
  store ptr %78, ptr %15, align 8
  %79 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKibELb0EEES6_(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #4
  br i1 %79, label %80, label %.critedge2

80:                                               ; preds = %77
  %81 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt7__cxx114listImSaImEE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %70) #4
  %82 = load i64, ptr %81, align 8, !tbaa !9
  %83 = icmp ult i64 %82, %.336
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #4
  br i1 %83, label %84, label %92

84:                                               ; preds = %80
  %85 = load i32, ptr %13, align 8, !tbaa !11
  store i32 %85, ptr %1, align 4, !tbaa !5
  %86 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt7__cxx114listImSaImEE5frontEv(ptr noundef nonnull align 8 dereferenceable(24) %70) #4
  %87 = load i64, ptr %86, align 8, !tbaa !9
  br label %92

88:                                               ; preds = %73
  %89 = landingpad { ptr, i32 }
          cleanup
  br label %95

90:                                               ; preds = %75
  %91 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #4
  call void @_ZNSt4pairIKiNSt7__cxx114listImSaImEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #4
  br label %95

.critedge2:                                       ; preds = %77
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #4
  br label %92

92:                                               ; preds = %.critedge2, %84, %80
  %.4 = phi i64 [ %87, %84 ], [ %.336, %80 ], [ %.336, %.critedge2 ]
  call void @_ZNSt4pairIKiNSt7__cxx114listImSaImEEEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %13) #4
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #4
  %93 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt8__detail14_Node_iteratorISt4pairIKiNSt7__cxx114listImSaImEEEELb0ELb0EEppEv(ptr noundef nonnull align 8 dereferenceable(8) %11) #4
  %94 = call noundef zeroext i1 @_ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKiNSt7__cxx114listImSaImEEEELb0EEESA_(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #4
  br i1 %94, label %73, label %._crit_edge39

95:                                               ; preds = %90, %88
  %.pn29 = phi { ptr, i32 } [ %91, %90 ], [ %89, %88 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #4
  br label %100

.invoke40:                                        ; preds = %57, %._crit_edge39
  %96 = phi ptr [ %65, %._crit_edge39 ], [ %0, %57 ]
  %97 = invoke noundef i64 @_ZNSt13unordered_mapIiNSt7__cxx114listImSaImEEESt4hashIiESt8equal_toIiESaISt4pairIKiS3_EEE5eraseERS9_(ptr noundef nonnull align 8 dereferenceable(56) %96, ptr noundef nonnull align 4 dereferenceable(4) %1)
          to label %.invoke unwind label %62

.invoke:                                          ; preds = %.invoke40
  %98 = getelementptr inbounds i8, ptr %0, i64 112
  %99 = invoke noundef i64 @_ZNSt13unordered_mapIibSt4hashIiESt8equal_toIiESaISt4pairIKibEEE5eraseERS5_(ptr noundef nonnull align 8 dereferenceable(56) %98, ptr noundef nonnull align 4 dereferenceable(4) %1)
          to label %101 unwind label %62

100:                                              ; preds = %95, %62, %60, %54
  %.pn31 = phi { ptr, i32 } [ %63, %62 ], [ %.pn29, %95 ], [ %61, %60 ], [ %.pn, %54 ]
  call void @_ZNSt11scoped_lockIJSt5mutexEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  resume { ptr, i32 } %.pn31

101:                                              ; preds = %.invoke, %._crit_edge39, %20
  %.1 = phi i1 [ false, %20 ], [ false, %._crit_edge39 ], [ true, %.invoke ]
  call void @_ZNSt11scoped_lockIJSt5mutexEED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  ret i1 %.1
}

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt11scoped_lockIJSt5mutexEEC2ERS0_(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 @_ZNSt13__atomic_baseImEppEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #2 align 2

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

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

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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

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

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

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

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

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

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

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

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !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, !6, i64 0}
!12 = !{!"_ZTSSt4pairIKiNSt7__cxx114listImSaImEEEE", !6, i64 0, !13, i64 8}
!13 = !{!"_ZTSNSt7__cxx114listImSaImEEE", !14, i64 0}
!14 = !{!"_ZTSNSt7__cxx1110_List_baseImSaImEEE", !15, i64 0}
!15 = !{!"_ZTSNSt7__cxx1110_List_baseImSaImEE10_List_implE", !16, i64 0}
!16 = !{!"_ZTSNSt8__detail17_List_node_headerE", !17, i64 0, !10, i64 16}
!17 = !{!"_ZTSNSt8__detail15_List_node_baseE", !18, i64 0, !18, i64 8}
!18 = !{!"any pointer", !7, i64 0}


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