; LLVM IR from nsccgz-storage/nvlsm :: db (memtable)

; 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.leveldb::Slice" = type { ptr, i64 }
%"class.leveldb::SkipList<const char *, leveldb::MemTable::KeyComparator>::Iterator" = type { ptr, ptr }
%"class.leveldb::Status" = type { ptr }
%"class.leveldb::MemTable" = type { %"struct.leveldb::MemTable::KeyComparator", i32, %"class.leveldb::Arena", %"class.leveldb::SkipList" }
%"struct.leveldb::MemTable::KeyComparator" = type { %"class.leveldb::InternalKeyComparator" }
%"class.leveldb::InternalKeyComparator" = type { %"class.leveldb::Comparator", ptr }
%"class.leveldb::Comparator" = type { ptr }
%"class.leveldb::Arena" = type { ptr, i64, %"class.std::vector", %"struct.std::atomic" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<char *, std::allocator<char *>>::_Vector_impl" }
%"struct.std::_Vector_base<char *, std::allocator<char *>>::_Vector_impl" = type { %"struct.std::_Vector_base<char *, std::allocator<char *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<char *, std::allocator<char *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i64 }
%"class.leveldb::SkipList" = type { %"struct.leveldb::MemTable::KeyComparator", ptr, ptr, %"struct.std::atomic.0", %"class.leveldb::Random" }
%"struct.std::atomic.0" = type { %"struct.std::__atomic_base.1" }
%"struct.std::__atomic_base.1" = type { i32 }
%"class.leveldb::Random" = type { i32 }

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

; Function Attrs: mustprogress uwtable
declare hidden { ptr, i64 } @_ZN7leveldbL22GetLengthPrefixedSliceEPKc(ptr noundef) #1

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7leveldb8MemTable3GetERKNS_9LookupKeyEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPNS_6StatusE(ptr noundef nonnull align 8 dereferenceable(112) %0, ptr noundef nonnull align 8 dereferenceable(224) %1, ptr noundef %2, ptr noundef %3) #1 align 2 {
  %5 = alloca i1, align 1
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca %"class.leveldb::Slice", align 8
  %11 = alloca %"class.leveldb::SkipList<const char *, leveldb::MemTable::KeyComparator>::Iterator", align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca %"class.leveldb::Slice", align 8
  %17 = alloca %"class.leveldb::Slice", align 8
  %18 = alloca i64, align 8
  %19 = alloca %"class.leveldb::Slice", align 8
  %20 = alloca i32, align 4
  %21 = alloca %"class.leveldb::Status", align 8
  %22 = alloca %"class.leveldb::Slice", align 8
  %23 = alloca %"class.leveldb::Slice", align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  %24 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #5
  %25 = load ptr, ptr %7, align 8, !tbaa !5
  %26 = call { ptr, i64 } @_ZNK7leveldb9LookupKey12memtable_keyEv(ptr noundef nonnull align 8 dereferenceable(224) %25)
  %27 = getelementptr inbounds { ptr, i64 }, ptr %10, i32 0, i32 0
  %28 = extractvalue { ptr, i64 } %26, 0
  store ptr %28, ptr %27, align 8
  %29 = getelementptr inbounds { ptr, i64 }, ptr %10, i32 0, i32 1
  %30 = extractvalue { ptr, i64 } %26, 1
  store i64 %30, ptr %29, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #5
  %31 = getelementptr inbounds %"class.leveldb::MemTable", ptr %24, i32 0, i32 3
  call void @_ZN7leveldb8SkipListIPKcNS_8MemTable13KeyComparatorEE8IteratorC2EPKS5_(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef %31)
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %32 = call noundef ptr @_ZNK7leveldb5Slice4dataEv(ptr noundef nonnull align 8 dereferenceable(16) %10)
  store ptr %32, ptr %12, align 8, !tbaa !5
  call void @_ZN7leveldb8SkipListIPKcNS_8MemTable13KeyComparatorEE8Iterator4SeekERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %11, ptr noundef nonnull align 8 dereferenceable(8) %12)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  %33 = call noundef zeroext i1 @_ZNK7leveldb8SkipListIPKcNS_8MemTable13KeyComparatorEE8Iterator5ValidEv(ptr noundef nonnull align 8 dereferenceable(16) %11)
  br i1 %33, label %34, label %94

34:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7leveldb8SkipListIPKcNS_8MemTable13KeyComparatorEE8Iterator3keyEv(ptr noundef nonnull align 8 dereferenceable(16) %11)
  %36 = load ptr, ptr %35, align 8, !tbaa !5
  store ptr %36, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %37 = load ptr, ptr %13, align 8, !tbaa !5
  %38 = load ptr, ptr %13, align 8, !tbaa !5
  %39 = getelementptr inbounds i8, ptr %38, i64 5
  %40 = call noundef ptr @_ZN7leveldb14GetVarint32PtrEPKcS1_Pj(ptr noundef %37, ptr noundef %39, ptr noundef %14)
  store ptr %40, ptr %15, align 8, !tbaa !5
  %41 = getelementptr inbounds %"class.leveldb::MemTable", ptr %24, i32 0, i32 0
  %42 = getelementptr inbounds %"struct.leveldb::MemTable::KeyComparator", ptr %41, i32 0, i32 0
  %43 = call noundef ptr @_ZNK7leveldb21InternalKeyComparator15user_comparatorEv(ptr noundef nonnull align 8 dereferenceable(16) %42)
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #5
  %44 = load ptr, ptr %15, align 8, !tbaa !5
  %45 = load i32, ptr %14, align 4, !tbaa !9
  %46 = sub i32 %45, 8
  %47 = zext i32 %46 to i64
  call void @_ZN7leveldb5SliceC2EPKcm(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef %44, i64 noundef %47)
  call void @llvm.lifetime.start.p0(i64 16, ptr %17) #5
  %48 = load ptr, ptr %7, align 8, !tbaa !5
  %49 = call { ptr, i64 } @_ZNK7leveldb9LookupKey8user_keyEv(ptr noundef nonnull align 8 dereferenceable(224) %48)
  %50 = getelementptr inbounds { ptr, i64 }, ptr %17, i32 0, i32 0
  %51 = extractvalue { ptr, i64 } %49, 0
  store ptr %51, ptr %50, align 8
  %52 = getelementptr inbounds { ptr, i64 }, ptr %17, i32 0, i32 1
  %53 = extractvalue { ptr, i64 } %49, 1
  store i64 %53, ptr %52, align 8
  %54 = load ptr, ptr %43, align 8, !tbaa !11
  %55 = getelementptr inbounds ptr, ptr %54, i64 2
  %56 = load ptr, ptr %55, align 8
  %57 = call noundef i32 %56(ptr noundef nonnull align 8 dereferenceable(8) %43, ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 8 dereferenceable(16) %17)
  %58 = icmp eq i32 %57, 0
  call void @llvm.lifetime.end.p0(i64 16, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #5
  br i1 %58, label %59, label %90

59:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %60 = load ptr, ptr %15, align 8, !tbaa !5
  %61 = load i32, ptr %14, align 4, !tbaa !9
  %62 = zext i32 %61 to i64
  %63 = getelementptr inbounds i8, ptr %60, i64 %62
  %64 = getelementptr inbounds i8, ptr %63, i64 -8
  %65 = call noundef i64 @_ZN7leveldb13DecodeFixed64EPKc(ptr noundef %64)
  store i64 %65, ptr %18, align 8, !tbaa !13
  %66 = load i64, ptr %18, align 8, !tbaa !13
  %67 = and i64 %66, 255
  %68 = trunc i64 %67 to i32
  switch i32 %68, label %86 [
    i32 1, label %69
    i32 0, label %83
  ]

69:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #5
  %70 = load ptr, ptr %15, align 8, !tbaa !5
  %71 = load i32, ptr %14, align 4, !tbaa !9
  %72 = zext i32 %71 to i64
  %73 = getelementptr inbounds i8, ptr %70, i64 %72
  %74 = call { ptr, i64 } @_ZN7leveldbL22GetLengthPrefixedSliceEPKc(ptr noundef %73)
  %75 = getelementptr inbounds { ptr, i64 }, ptr %19, i32 0, i32 0
  %76 = extractvalue { ptr, i64 } %74, 0
  store ptr %76, ptr %75, align 8
  %77 = getelementptr inbounds { ptr, i64 }, ptr %19, i32 0, i32 1
  %78 = extractvalue { ptr, i64 } %74, 1
  store i64 %78, ptr %77, align 8
  %79 = load ptr, ptr %8, align 8, !tbaa !5
  %80 = call noundef ptr @_ZNK7leveldb5Slice4dataEv(ptr noundef nonnull align 8 dereferenceable(16) %19)
  %81 = call noundef i64 @_ZNK7leveldb5Slice4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %19)
  %82 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %79, ptr noundef %80, i64 noundef %81)
  store i1 true, ptr %5, align 1
  store i32 1, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #5
  br label %87

83:                                               ; preds = %59
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %22) #5
  call void @_ZN7leveldb5SliceC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %22)
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #5
  call void @_ZN7leveldb5SliceC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %23)
  call void @_ZN7leveldb6Status8NotFoundERKNS_5SliceES3_(ptr dead_on_unwind writable sret(%"class.leveldb::Status") align 8 %21, ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 8 dereferenceable(16) %23)
  %84 = load ptr, ptr %9, align 8, !tbaa !5
  %85 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7leveldb6StatusaSEOS0_(ptr noundef nonnull align 8 dereferenceable(8) %84, ptr noundef nonnull align 8 dereferenceable(8) %21) #5
  call void @_ZN7leveldb6StatusD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %21) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  store i1 true, ptr %5, align 1
  store i32 1, ptr %20, align 4
  br label %87

86:                                               ; preds = %59
  store i32 0, ptr %20, align 4
  br label %87

87:                                               ; preds = %86, %83, %69
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  %88 = load i32, ptr %20, align 4
  switch i32 %88, label %91 [
    i32 0, label %89
  ]

89:                                               ; preds = %87
  br label %90

90:                                               ; preds = %89, %34
  store i32 0, ptr %20, align 4
  br label %91

91:                                               ; preds = %90, %87
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  %92 = load i32, ptr %20, align 4
  switch i32 %92, label %95 [
    i32 0, label %93
  ]

93:                                               ; preds = %91
  br label %94

94:                                               ; preds = %93, %4
  store i1 false, ptr %5, align 1
  store i32 1, ptr %20, align 4
  br label %95

95:                                               ; preds = %94, %91
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #5
  %96 = load i1, ptr %5, align 1
  ret i1 %96
}

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNK7leveldb9LookupKey12memtable_keyEv(ptr noundef nonnull align 8 dereferenceable(224)) #1 align 2

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN7leveldb14GetVarint32PtrEPKcS1_Pj(ptr noundef, ptr noundef, ptr noundef) #4

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNK7leveldb9LookupKey8user_keyEv(ptr noundef nonnull align 8 dereferenceable(224)) #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN7leveldb13DecodeFixed64EPKc(ptr noundef) #3

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKcm(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i64 noundef) #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN7leveldb6Status8NotFoundERKNS_5SliceES3_(ptr dead_on_unwind noalias writable sret(%"class.leveldb::Status") align 8, ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #1 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7leveldb6StatusD2Ev(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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 = !{!"vtable pointer", !8, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}


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

%"class.leveldb::Slice" = type { ptr, i64 }
%"class.leveldb::SkipList<const char *, leveldb::MemTable::KeyComparator>::Iterator" = type { ptr, ptr }
%"class.leveldb::Status" = 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 uwtable
declare hidden { ptr, i64 } @_ZN7leveldbL22GetLengthPrefixedSliceEPKc(ptr noundef) local_unnamed_addr #1

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN7leveldb8MemTable3GetERKNS_9LookupKeyEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPNS_6StatusE(ptr noundef nonnull align 8 dereferenceable(112) %0, ptr noundef nonnull align 8 dereferenceable(224) %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #1 align 2 {
  %5 = alloca %"class.leveldb::Slice", align 8
  %6 = alloca %"class.leveldb::SkipList<const char *, leveldb::MemTable::KeyComparator>::Iterator", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca %"class.leveldb::Slice", align 8
  %10 = alloca %"class.leveldb::Slice", align 8
  %11 = alloca %"class.leveldb::Slice", align 8
  %12 = alloca %"class.leveldb::Status", align 8
  %13 = alloca %"class.leveldb::Slice", align 8
  %14 = alloca %"class.leveldb::Slice", align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #5
  %15 = tail call { ptr, i64 } @_ZNK7leveldb9LookupKey12memtable_keyEv(ptr noundef nonnull align 8 dereferenceable(224) %1)
  %16 = extractvalue { ptr, i64 } %15, 0
  store ptr %16, ptr %5, align 8
  %17 = getelementptr inbounds i8, ptr %5, i64 8
  %18 = extractvalue { ptr, i64 } %15, 1
  store i64 %18, ptr %17, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #5
  %19 = getelementptr inbounds i8, ptr %0, i64 72
  call void @_ZN7leveldb8SkipListIPKcNS_8MemTable13KeyComparatorEE8IteratorC2EPKS5_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull %19)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #5
  %20 = call noundef ptr @_ZNK7leveldb5Slice4dataEv(ptr noundef nonnull align 8 dereferenceable(16) %5)
  store ptr %20, ptr %7, align 8, !tbaa !5
  call void @_ZN7leveldb8SkipListIPKcNS_8MemTable13KeyComparatorEE8Iterator4SeekERKS2_(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(8) %7)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #5
  %21 = call noundef zeroext i1 @_ZNK7leveldb8SkipListIPKcNS_8MemTable13KeyComparatorEE8Iterator5ValidEv(ptr noundef nonnull align 8 dereferenceable(16) %6)
  br i1 %21, label %22, label %60

22:                                               ; preds = %4
  %23 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNK7leveldb8SkipListIPKcNS_8MemTable13KeyComparatorEE8Iterator3keyEv(ptr noundef nonnull align 8 dereferenceable(16) %6)
  %24 = load ptr, ptr %23, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #5
  %25 = getelementptr inbounds i8, ptr %24, i64 5
  %26 = call noundef ptr @_ZN7leveldb14GetVarint32PtrEPKcS1_Pj(ptr noundef %24, ptr noundef nonnull %25, ptr noundef nonnull %8)
  %27 = call noundef ptr @_ZNK7leveldb21InternalKeyComparator15user_comparatorEv(ptr noundef nonnull align 8 dereferenceable(16) %0)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #5
  %28 = load i32, ptr %8, align 4, !tbaa !9
  %29 = add i32 %28, -8
  %30 = zext i32 %29 to i64
  call void @_ZN7leveldb5SliceC2EPKcm(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef %26, i64 noundef %30)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #5
  %31 = call { ptr, i64 } @_ZNK7leveldb9LookupKey8user_keyEv(ptr noundef nonnull align 8 dereferenceable(224) %1)
  %32 = extractvalue { ptr, i64 } %31, 0
  store ptr %32, ptr %10, align 8
  %33 = getelementptr inbounds i8, ptr %10, i64 8
  %34 = extractvalue { ptr, i64 } %31, 1
  store i64 %34, ptr %33, align 8
  %35 = load ptr, ptr %27, align 8, !tbaa !11
  %36 = getelementptr inbounds i8, ptr %35, i64 16
  %37 = load ptr, ptr %36, align 8
  %38 = call noundef i32 %37(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(16) %10)
  %39 = icmp eq i32 %38, 0
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #5
  br i1 %39, label %40, label %.critedge16

40:                                               ; preds = %22
  %41 = load i32, ptr %8, align 4, !tbaa !9
  %42 = zext i32 %41 to i64
  %43 = getelementptr inbounds i8, ptr %26, i64 %42
  %44 = getelementptr inbounds i8, ptr %43, i64 -8
  %45 = call noundef i64 @_ZN7leveldb13DecodeFixed64EPKc(ptr noundef nonnull %44)
  %46 = trunc i64 %45 to i8
  switch i8 %46, label %.critedge16 [
    i8 1, label %47
    i8 0, label %58
  ]

47:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %11) #5
  %48 = load i32, ptr %8, align 4, !tbaa !9
  %49 = zext i32 %48 to i64
  %50 = getelementptr inbounds i8, ptr %26, i64 %49
  %51 = call { ptr, i64 } @_ZN7leveldbL22GetLengthPrefixedSliceEPKc(ptr noundef %50)
  %52 = extractvalue { ptr, i64 } %51, 0
  store ptr %52, ptr %11, align 8
  %53 = getelementptr inbounds i8, ptr %11, i64 8
  %54 = extractvalue { ptr, i64 } %51, 1
  store i64 %54, ptr %53, align 8
  %55 = call noundef ptr @_ZNK7leveldb5Slice4dataEv(ptr noundef nonnull align 8 dereferenceable(16) %11)
  %56 = call noundef i64 @_ZNK7leveldb5Slice4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %11)
  %57 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef %55, i64 noundef %56)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #5
  br label %.critedge

58:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %13) #5
  call void @_ZN7leveldb5SliceC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %13)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %14) #5
  call void @_ZN7leveldb5SliceC2Ev(ptr noundef nonnull align 8 dereferenceable(16) %14)
  call void @_ZN7leveldb6Status8NotFoundERKNS_5SliceES3_(ptr dead_on_unwind nonnull writable sret(%"class.leveldb::Status") align 8 %12, ptr noundef nonnull align 8 dereferenceable(16) %13, ptr noundef nonnull align 8 dereferenceable(16) %14)
  %59 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7leveldb6StatusaSEOS0_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %12) #5
  call void @_ZN7leveldb6StatusD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %12) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %13) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #5
  br label %.critedge

.critedge:                                        ; preds = %58, %47
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  br label %60

.critedge16:                                      ; preds = %22, %40
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  br label %60

60:                                               ; preds = %4, %.critedge16, %.critedge
  %.3 = phi i1 [ true, %.critedge ], [ false, %.critedge16 ], [ false, %4 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  ret i1 %.3
}

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNK7leveldb9LookupKey12memtable_keyEv(ptr noundef nonnull align 8 dereferenceable(224)) local_unnamed_addr #1 align 2

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

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

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

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef ptr @_ZN7leveldb14GetVarint32PtrEPKcS1_Pj(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #4

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNK7leveldb9LookupKey8user_keyEv(ptr noundef nonnull align 8 dereferenceable(224)) local_unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZN7leveldb13DecodeFixed64EPKc(ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKcm(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i64 noundef) local_unnamed_addr #1 align 2

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

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7leveldb6StatusD2Ev(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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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 = !{!"vtable pointer", !8, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass