; LLVM IR from justinxu9905/bustub-2022-fall :: test/buffer/lru_k_replacer_test.ll (ZN6bustub28LRUKReplacerTest_MyTest_Test8TestBodyEv)

; 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.testing::AssertionResult" = type { i8, %"class.std::unique_ptr" }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.20" }
%"struct.std::_Head_base.20" = type { ptr }
%"class.bustub::LRUKReplacer" = type { %"class.std::unordered_map", %"class.std::unordered_map", %"class.std::unordered_map.5", %"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.5" = type { %"class.std::_Hashtable.6" }
%"class.std::_Hashtable.6" = 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 }
%"class.testing::Message" = type { %"class.std::unique_ptr.21" }
%"class.std::unique_ptr.21" = type { %"struct.std::__uniq_ptr_data.22" }
%"struct.std::__uniq_ptr_data.22" = type { %"class.std::__uniq_ptr_impl.23" }
%"class.std::__uniq_ptr_impl.23" = type { %"class.std::tuple.24" }
%"class.std::tuple.24" = type { %"struct.std::_Tuple_impl.25" }
%"struct.std::_Tuple_impl.25" = type { %"struct.std::_Head_base.28" }
%"struct.std::_Head_base.28" = type { ptr }
%"class.testing::internal::AssertHelper" = type { ptr }

@.str.3 = external hidden unnamed_addr constant [99 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [2 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

declare void @_ZN6bustub12LRUKReplacerC1Emm(ptr noundef nonnull align 8 dereferenceable(232), i64 noundef, i64 noundef) unnamed_addr #1

declare void @_ZN6bustub12LRUKReplacer12RecordAccessEi(ptr noundef nonnull align 8 dereferenceable(232), i32 noundef) #1

declare void @_ZN6bustub12LRUKReplacer12SetEvictableEib(ptr noundef nonnull align 8 dereferenceable(232), i32 noundef, i1 noundef zeroext) #1

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

declare void @_ZN7testing7MessageC1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1

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

declare void @_ZN7testing8internal12AssertHelperC1ENS_14TestPartResult4TypeEPKciS5_(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef, ptr noundef, i32 noundef, ptr noundef) unnamed_addr #1

declare void @_ZNK7testing8internal12AssertHelperaSERKNS_7MessageE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #1

; Function Attrs: nounwind
declare void @_ZN7testing8internal12AssertHelperD1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #4

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

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

declare noundef zeroext i1 @_ZN6bustub12LRUKReplacer5EvictEPi(ptr noundef nonnull align 8 dereferenceable(232), ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7testing8internal8EqHelper7CompareIiiTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_(ptr dead_on_unwind noalias writable sret(%"class.testing::AssertionResult") align 8, ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #3 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6bustub28LRUKReplacerTest_MyTest_Test8TestBodyEv(ptr noundef nonnull align 8 dereferenceable(16) %0) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca %"class.bustub::LRUKReplacer", align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca %"class.testing::AssertionResult", align 8
  %11 = alloca i32, align 4
  %12 = alloca %"class.testing::Message", align 8
  %13 = alloca %"class.testing::internal::AssertHelper", align 8
  %14 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %15 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 10, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  store i32 3, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 232, ptr %5) #6
  %16 = load i32, ptr %3, align 4, !tbaa !9
  %17 = sext i32 %16 to i64
  %18 = load i32, ptr %4, align 4, !tbaa !9
  %19 = sext i32 %18 to i64
  call void @_ZN6bustub12LRUKReplacerC1Emm(ptr noundef nonnull align 8 dereferenceable(232) %5, i64 noundef %17, i64 noundef %19)
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  store i32 0, ptr %6, align 4, !tbaa !9
  br label %20

20:                                               ; preds = %30, %1
  %21 = load i32, ptr %6, align 4, !tbaa !9
  %22 = load i32, ptr %3, align 4, !tbaa !9
  %23 = icmp slt i32 %21, %22
  br i1 %23, label %25, label %24

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

25:                                               ; preds = %20
  %26 = load i32, ptr %6, align 4, !tbaa !9
  invoke void @_ZN6bustub12LRUKReplacer12RecordAccessEi(ptr noundef nonnull align 8 dereferenceable(232) %5, i32 noundef %26)
          to label %27 unwind label %33

27:                                               ; preds = %25
  %28 = load i32, ptr %6, align 4, !tbaa !9
  invoke void @_ZN6bustub12LRUKReplacer12SetEvictableEib(ptr noundef nonnull align 8 dereferenceable(232) %5, i32 noundef %28, i1 noundef zeroext true)
          to label %29 unwind label %33

29:                                               ; preds = %27
  br label %30

30:                                               ; preds = %29
  %31 = load i32, ptr %6, align 4, !tbaa !9
  %32 = add nsw i32 %31, 1
  store i32 %32, ptr %6, align 4, !tbaa !9
  br label %20, !llvm.loop !11

33:                                               ; preds = %27, %25
  %34 = landingpad { ptr, i32 }
          cleanup
  %35 = extractvalue { ptr, i32 } %34, 0
  store ptr %35, ptr %7, align 8
  %36 = extractvalue { ptr, i32 } %34, 1
  store i32 %36, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %87

37:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #6
  invoke void @_ZN6bustub12LRUKReplacer12RecordAccessEi(ptr noundef nonnull align 8 dereferenceable(232) %5, i32 noundef 11)
          to label %38 unwind label %45

38:                                               ; preds = %37
  %39 = invoke noundef zeroext i1 @_ZN6bustub12LRUKReplacer5EvictEPi(ptr noundef nonnull align 8 dereferenceable(232) %5, ptr noundef %9)
          to label %40 unwind label %45

40:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #6
  store i32 1, ptr %11, align 4, !tbaa !9
  invoke void @_ZN7testing8internal8EqHelper7CompareIiiTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_(ptr dead_on_unwind writable sret(%"class.testing::AssertionResult") align 8 %10, ptr noundef @.str.13, ptr noundef @.str.7, ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %41 unwind label %49

41:                                               ; preds = %40
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  %42 = invoke noundef zeroext i1 @_ZNK7testing15AssertionResultcvbEv(ptr noundef nonnull align 8 dereferenceable(16) %10)
          to label %43 unwind label %53

43:                                               ; preds = %41
  br i1 %42, label %44, label %57

44:                                               ; preds = %43
  br label %77

45:                                               ; preds = %38, %37
  %46 = landingpad { ptr, i32 }
          cleanup
  %47 = extractvalue { ptr, i32 } %46, 0
  store ptr %47, ptr %7, align 8
  %48 = extractvalue { ptr, i32 } %46, 1
  store i32 %48, ptr %8, align 4
  br label %86

49:                                               ; preds = %40
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %7, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #6
  br label %85

53:                                               ; preds = %41
  %54 = landingpad { ptr, i32 }
          cleanup
  %55 = extractvalue { ptr, i32 } %54, 0
  store ptr %55, ptr %7, align 8
  %56 = extractvalue { ptr, i32 } %54, 1
  store i32 %56, ptr %8, align 4
  br label %84

57:                                               ; preds = %43
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  invoke void @_ZN7testing7MessageC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %58 unwind label %63

58:                                               ; preds = %57
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %59 = invoke noundef ptr @_ZNK7testing15AssertionResult15failure_messageEv(ptr noundef nonnull align 8 dereferenceable(16) %10)
          to label %60 unwind label %67

60:                                               ; preds = %58
  invoke void @_ZN7testing8internal12AssertHelperC1ENS_14TestPartResult4TypeEPKciS5_(ptr noundef nonnull align 8 dereferenceable(8) %13, i32 noundef 2, ptr noundef @.str.3, i32 noundef 136, ptr noundef %59)
          to label %61 unwind label %67

61:                                               ; preds = %60
  invoke void @_ZNK7testing8internal12AssertHelperaSERKNS_7MessageE(ptr noundef nonnull align 8 dereferenceable(8) %13, ptr noundef nonnull align 8 dereferenceable(8) %12)
          to label %62 unwind label %71

62:                                               ; preds = %61
  call void @_ZN7testing8internal12AssertHelperD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @_ZN7testing7MessageD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  store i32 1, ptr %14, align 4
  br label %78

63:                                               ; preds = %57
  %64 = landingpad { ptr, i32 }
          cleanup
  %65 = extractvalue { ptr, i32 } %64, 0
  store ptr %65, ptr %7, align 8
  %66 = extractvalue { ptr, i32 } %64, 1
  store i32 %66, ptr %8, align 4
  br label %76

67:                                               ; preds = %60, %58
  %68 = landingpad { ptr, i32 }
          cleanup
  %69 = extractvalue { ptr, i32 } %68, 0
  store ptr %69, ptr %7, align 8
  %70 = extractvalue { ptr, i32 } %68, 1
  store i32 %70, ptr %8, align 4
  br label %75

71:                                               ; preds = %61
  %72 = landingpad { ptr, i32 }
          cleanup
  %73 = extractvalue { ptr, i32 } %72, 0
  store ptr %73, ptr %7, align 8
  %74 = extractvalue { ptr, i32 } %72, 1
  store i32 %74, ptr %8, align 4
  call void @_ZN7testing8internal12AssertHelperD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %13) #6
  br label %75

75:                                               ; preds = %71, %67
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @_ZN7testing7MessageD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #6
  br label %76

76:                                               ; preds = %75, %63
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  br label %84

77:                                               ; preds = %44
  store i32 0, ptr %14, align 4
  br label %78

78:                                               ; preds = %77, %62
  call void @_ZN7testing15AssertionResultD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #6
  %79 = load i32, ptr %14, align 4
  switch i32 %79, label %81 [
    i32 0, label %80
  ]

80:                                               ; preds = %78
  store i32 0, ptr %14, align 4
  br label %81

81:                                               ; preds = %80, %78
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  call void @_ZN6bustub12LRUKReplacerD2Ev(ptr noundef nonnull align 8 dereferenceable(232) %5) #6
  call void @llvm.lifetime.end.p0(i64 232, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  %82 = load i32, ptr %14, align 4
  switch i32 %82, label %93 [
    i32 0, label %83
    i32 1, label %83
  ]

83:                                               ; preds = %81, %81
  ret void

84:                                               ; preds = %76, %53
  call void @_ZN7testing15AssertionResultD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %10) #6
  br label %85

85:                                               ; preds = %84, %49
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #6
  br label %86

86:                                               ; preds = %85, %45
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #6
  br label %87

87:                                               ; preds = %86, %33
  call void @_ZN6bustub12LRUKReplacerD2Ev(ptr noundef nonnull align 8 dereferenceable(232) %5) #6
  call void @llvm.lifetime.end.p0(i64 232, ptr %5) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %88

88:                                               ; preds = %87
  %89 = load ptr, ptr %7, align 8
  %90 = load i32, ptr %8, align 4
  %91 = insertvalue { ptr, i32 } poison, ptr %89, 0
  %92 = insertvalue { ptr, i32 } %91, i32 %90, 1
  resume { ptr, i32 } %92

93:                                               ; preds = %81
  unreachable
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 "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 = { 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 #6 = { 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 = distinct !{!11, !12}
!12 = !{!"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"

%"class.testing::AssertionResult" = type { i8, %"class.std::unique_ptr" }
%"class.std::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.20" }
%"struct.std::_Head_base.20" = type { ptr }
%"class.bustub::LRUKReplacer" = type { %"class.std::unordered_map", %"class.std::unordered_map", %"class.std::unordered_map.5", %"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.5" = type { %"class.std::_Hashtable.6" }
%"class.std::_Hashtable.6" = 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 }
%"class.testing::Message" = type { %"class.std::unique_ptr.21" }
%"class.std::unique_ptr.21" = type { %"struct.std::__uniq_ptr_data.22" }
%"struct.std::__uniq_ptr_data.22" = type { %"class.std::__uniq_ptr_impl.23" }
%"class.std::__uniq_ptr_impl.23" = type { %"class.std::tuple.24" }
%"class.std::tuple.24" = type { %"struct.std::_Tuple_impl.25" }
%"struct.std::_Tuple_impl.25" = type { %"struct.std::_Head_base.28" }
%"struct.std::_Head_base.28" = type { ptr }
%"class.testing::internal::AssertHelper" = type { ptr }

@.str.3 = external hidden unnamed_addr constant [99 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [2 x i8], align 1

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

declare i32 @__gxx_personality_v0(...)

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

declare void @_ZN6bustub12LRUKReplacerC1Emm(ptr noundef nonnull align 8 dereferenceable(232), i64 noundef, i64 noundef) unnamed_addr #1

declare void @_ZN6bustub12LRUKReplacer12RecordAccessEi(ptr noundef nonnull align 8 dereferenceable(232), i32 noundef) local_unnamed_addr #1

declare void @_ZN6bustub12LRUKReplacer12SetEvictableEib(ptr noundef nonnull align 8 dereferenceable(232), i32 noundef, i1 noundef zeroext) local_unnamed_addr #1

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

declare void @_ZN7testing7MessageC1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #1

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

declare void @_ZN7testing8internal12AssertHelperC1ENS_14TestPartResult4TypeEPKciS5_(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef, ptr noundef, i32 noundef, ptr noundef) unnamed_addr #1

declare void @_ZNK7testing8internal12AssertHelperaSERKNS_7MessageE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

; Function Attrs: nounwind
declare void @_ZN7testing8internal12AssertHelperD1Ev(ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #4

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

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

declare noundef zeroext i1 @_ZN6bustub12LRUKReplacer5EvictEPi(ptr noundef nonnull align 8 dereferenceable(232), ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7testing8internal8EqHelper7CompareIiiTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_(ptr dead_on_unwind noalias writable sret(%"class.testing::AssertionResult") align 8, ptr noundef, ptr noundef, ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6bustub28LRUKReplacerTest_MyTest_Test8TestBodyEv(ptr nocapture noundef nonnull readnone align 8 dereferenceable(16) %0) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.bustub::LRUKReplacer", align 8
  %3 = alloca i32, align 4
  %4 = alloca %"class.testing::AssertionResult", align 8
  %5 = alloca i32, align 4
  %6 = alloca %"class.testing::Message", align 8
  %7 = alloca %"class.testing::internal::AssertHelper", align 8
  call void @llvm.lifetime.start.p0(i64 232, ptr nonnull %2) #6
  call void @_ZN6bustub12LRUKReplacerC1Emm(ptr noundef nonnull align 8 dereferenceable(232) %2, i64 noundef 10, i64 noundef 3)
  invoke void @_ZN6bustub12LRUKReplacer12RecordAccessEi(ptr noundef nonnull align 8 dereferenceable(232) %2, i32 noundef 0)
          to label %8 unwind label %28

8:                                                ; preds = %1
  invoke void @_ZN6bustub12LRUKReplacer12SetEvictableEib(ptr noundef nonnull align 8 dereferenceable(232) %2, i32 noundef 0, i1 noundef zeroext true)
          to label %9 unwind label %28

9:                                                ; preds = %8
  invoke void @_ZN6bustub12LRUKReplacer12RecordAccessEi(ptr noundef nonnull align 8 dereferenceable(232) %2, i32 noundef 1)
          to label %10 unwind label %28

10:                                               ; preds = %9
  invoke void @_ZN6bustub12LRUKReplacer12SetEvictableEib(ptr noundef nonnull align 8 dereferenceable(232) %2, i32 noundef 1, i1 noundef zeroext true)
          to label %11 unwind label %28

11:                                               ; preds = %10
  invoke void @_ZN6bustub12LRUKReplacer12RecordAccessEi(ptr noundef nonnull align 8 dereferenceable(232) %2, i32 noundef 2)
          to label %12 unwind label %28

12:                                               ; preds = %11
  invoke void @_ZN6bustub12LRUKReplacer12SetEvictableEib(ptr noundef nonnull align 8 dereferenceable(232) %2, i32 noundef 2, i1 noundef zeroext true)
          to label %13 unwind label %28

13:                                               ; preds = %12
  invoke void @_ZN6bustub12LRUKReplacer12RecordAccessEi(ptr noundef nonnull align 8 dereferenceable(232) %2, i32 noundef 3)
          to label %14 unwind label %28

14:                                               ; preds = %13
  invoke void @_ZN6bustub12LRUKReplacer12SetEvictableEib(ptr noundef nonnull align 8 dereferenceable(232) %2, i32 noundef 3, i1 noundef zeroext true)
          to label %15 unwind label %28

15:                                               ; preds = %14
  invoke void @_ZN6bustub12LRUKReplacer12RecordAccessEi(ptr noundef nonnull align 8 dereferenceable(232) %2, i32 noundef 4)
          to label %16 unwind label %28

16:                                               ; preds = %15
  invoke void @_ZN6bustub12LRUKReplacer12SetEvictableEib(ptr noundef nonnull align 8 dereferenceable(232) %2, i32 noundef 4, i1 noundef zeroext true)
          to label %17 unwind label %28

17:                                               ; preds = %16
  invoke void @_ZN6bustub12LRUKReplacer12RecordAccessEi(ptr noundef nonnull align 8 dereferenceable(232) %2, i32 noundef 5)
          to label %18 unwind label %28

18:                                               ; preds = %17
  invoke void @_ZN6bustub12LRUKReplacer12SetEvictableEib(ptr noundef nonnull align 8 dereferenceable(232) %2, i32 noundef 5, i1 noundef zeroext true)
          to label %19 unwind label %28

19:                                               ; preds = %18
  invoke void @_ZN6bustub12LRUKReplacer12RecordAccessEi(ptr noundef nonnull align 8 dereferenceable(232) %2, i32 noundef 6)
          to label %20 unwind label %28

20:                                               ; preds = %19
  invoke void @_ZN6bustub12LRUKReplacer12SetEvictableEib(ptr noundef nonnull align 8 dereferenceable(232) %2, i32 noundef 6, i1 noundef zeroext true)
          to label %21 unwind label %28

21:                                               ; preds = %20
  invoke void @_ZN6bustub12LRUKReplacer12RecordAccessEi(ptr noundef nonnull align 8 dereferenceable(232) %2, i32 noundef 7)
          to label %22 unwind label %28

22:                                               ; preds = %21
  invoke void @_ZN6bustub12LRUKReplacer12SetEvictableEib(ptr noundef nonnull align 8 dereferenceable(232) %2, i32 noundef 7, i1 noundef zeroext true)
          to label %23 unwind label %28

23:                                               ; preds = %22
  invoke void @_ZN6bustub12LRUKReplacer12RecordAccessEi(ptr noundef nonnull align 8 dereferenceable(232) %2, i32 noundef 8)
          to label %24 unwind label %28

24:                                               ; preds = %23
  invoke void @_ZN6bustub12LRUKReplacer12SetEvictableEib(ptr noundef nonnull align 8 dereferenceable(232) %2, i32 noundef 8, i1 noundef zeroext true)
          to label %25 unwind label %28

25:                                               ; preds = %24
  invoke void @_ZN6bustub12LRUKReplacer12RecordAccessEi(ptr noundef nonnull align 8 dereferenceable(232) %2, i32 noundef 9)
          to label %26 unwind label %28

26:                                               ; preds = %25
  invoke void @_ZN6bustub12LRUKReplacer12SetEvictableEib(ptr noundef nonnull align 8 dereferenceable(232) %2, i32 noundef 9, i1 noundef zeroext true)
          to label %27 unwind label %28

27:                                               ; preds = %26
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  invoke void @_ZN6bustub12LRUKReplacer12RecordAccessEi(ptr noundef nonnull align 8 dereferenceable(232) %2, i32 noundef 11)
          to label %30 unwind label %35

28:                                               ; preds = %26, %25, %24, %23, %22, %21, %20, %19, %18, %17, %16, %15, %14, %13, %12, %11, %10, %9, %8, %1
  %29 = landingpad { ptr, i32 }
          cleanup
  br label %56

30:                                               ; preds = %27
  %31 = invoke noundef zeroext i1 @_ZN6bustub12LRUKReplacer5EvictEPi(ptr noundef nonnull align 8 dereferenceable(232) %2, ptr noundef nonnull %3)
          to label %32 unwind label %35

32:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #6
  store i32 1, ptr %5, align 4, !tbaa !5
  invoke void @_ZN7testing8internal8EqHelper7CompareIiiTnPNSt9enable_ifIXoontsr3std11is_integralIT_EE5valuentsr3std10is_pointerIT0_EE5valueEvE4typeELPv0EEENS_15AssertionResultEPKcSC_RKS4_RKS5_(ptr dead_on_unwind nonnull writable sret(%"class.testing::AssertionResult") align 8 %4, ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.7, ptr noundef nonnull align 4 dereferenceable(4) %5, ptr noundef nonnull align 4 dereferenceable(4) %3)
          to label %33 unwind label %37

33:                                               ; preds = %32
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  %34 = call noundef zeroext i1 @_ZNK7testing15AssertionResultcvbEv(ptr noundef nonnull align 8 dereferenceable(16) %4)
  br i1 %34, label %53, label %39

35:                                               ; preds = %30, %27
  %36 = landingpad { ptr, i32 }
          cleanup
  br label %55

37:                                               ; preds = %32
  %38 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #6
  br label %54

39:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  invoke void @_ZN7testing7MessageC1Ev(ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %40 unwind label %45

40:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  %41 = invoke noundef ptr @_ZNK7testing15AssertionResult15failure_messageEv(ptr noundef nonnull align 8 dereferenceable(16) %4)
          to label %42 unwind label %47

42:                                               ; preds = %40
  invoke void @_ZN7testing8internal12AssertHelperC1ENS_14TestPartResult4TypeEPKciS5_(ptr noundef nonnull align 8 dereferenceable(8) %7, i32 noundef 2, ptr noundef nonnull @.str.3, i32 noundef 136, ptr noundef %41)
          to label %43 unwind label %47

43:                                               ; preds = %42
  invoke void @_ZNK7testing8internal12AssertHelperaSERKNS_7MessageE(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull align 8 dereferenceable(8) %6)
          to label %44 unwind label %49

44:                                               ; preds = %43
  call void @_ZN7testing8internal12AssertHelperD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @_ZN7testing7MessageD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  br label %53

45:                                               ; preds = %39
  %46 = landingpad { ptr, i32 }
          cleanup
  br label %52

47:                                               ; preds = %42, %40
  %48 = landingpad { ptr, i32 }
          cleanup
  br label %51

49:                                               ; preds = %43
  %50 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN7testing8internal12AssertHelperD1Ev(ptr noundef nonnull align 8 dereferenceable(8) %7) #6
  br label %51

51:                                               ; preds = %49, %47
  %.pn = phi { ptr, i32 } [ %50, %49 ], [ %48, %47 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @_ZN7testing7MessageD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %6) #6
  br label %52

52:                                               ; preds = %51, %45
  %.pn.pn = phi { ptr, i32 } [ %.pn, %51 ], [ %46, %45 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @_ZN7testing15AssertionResultD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #6
  br label %54

53:                                               ; preds = %33, %44
  call void @_ZN7testing15AssertionResultD2Ev(ptr noundef nonnull align 8 dereferenceable(16) %4) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  call void @_ZN6bustub12LRUKReplacerD2Ev(ptr noundef nonnull align 8 dereferenceable(232) %2) #6
  call void @llvm.lifetime.end.p0(i64 232, ptr nonnull %2) #6
  ret void

54:                                               ; preds = %52, %37
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %52 ], [ %38, %37 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #6
  br label %55

55:                                               ; preds = %54, %35
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %54 ], [ %36, %35 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  br label %56

56:                                               ; preds = %55, %28
  %.pn21 = phi { ptr, i32 } [ %29, %28 ], [ %.pn.pn.pn.pn, %55 ]
  call void @_ZN6bustub12LRUKReplacerD2Ev(ptr noundef nonnull align 8 dereferenceable(232) %2) #6
  call void @llvm.lifetime.end.p0(i64 232, ptr nonnull %2) #6
  resume { ptr, i32 } %.pn21
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 "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 = { 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 #6 = { 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"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass