; LLVM IR from nsccgz-storage/nvlsm :: table_nvm/table_nvm.ll (ZNK7leveldb7Segment10GetMidKeysERNS_13SegSepKeyDataES2_)

; 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::Segment" = type { ptr }
%"struct.leveldb::Segment::SegRep" = type { %"struct.leveldb::Options", i64, i64, ptr, i64, i64, ptr, %"class.std::vector.15" }
%"struct.leveldb::Options" = type { ptr, i8, i8, i8, ptr, ptr, i64, i32, ptr, i64, i32, i64, i32, i8, ptr, i64 }
%"class.std::vector.15" = type { %"struct.std::_Vector_base.16" }
%"struct.std::_Vector_base.16" = type { %"struct.std::_Vector_base<leveldb::KeyMetaData *, std::allocator<leveldb::KeyMetaData *>>::_Vector_impl" }
%"struct.std::_Vector_base<leveldb::KeyMetaData *, std::allocator<leveldb::KeyMetaData *>>::_Vector_impl" = type { %"struct.std::_Vector_base<leveldb::KeyMetaData *, std::allocator<leveldb::KeyMetaData *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<leveldb::KeyMetaData *, std::allocator<leveldb::KeyMetaData *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.leveldb::KeyMetaData" = type { %"class.leveldb::Slice", %"class.leveldb::Slice", %"class.leveldb::Slice", %"class.leveldb::Slice" }
%"class.leveldb::Slice" = type { ptr, i64 }
%"struct.leveldb::SegSepKeyData" = type { %"class.leveldb::Slice", %"class.leveldb::Slice", i64, i64 }

; 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: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK7leveldb7Segment10GetMidKeysERNS_13SegSepKeyDataES2_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(48) %2) #4 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  %14 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %15 = getelementptr inbounds %"class.leveldb::Segment", ptr %14, i32 0, i32 0
  %16 = load ptr, ptr %15, align 8, !tbaa !9
  %17 = getelementptr inbounds %"struct.leveldb::Segment::SegRep", ptr %16, i32 0, i32 7
  %18 = call noundef i64 @_ZNKSt6vectorIPN7leveldb11KeyMetaDataESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #5
  %19 = trunc i64 %18 to i32
  store i32 %19, ptr %7, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %20 = load i32, ptr %7, align 4, !tbaa !11
  %21 = sub nsw i32 %20, 1
  %22 = sdiv i32 %21, 2
  store i32 %22, ptr %8, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %23 = load i32, ptr %8, align 4, !tbaa !11
  %24 = add nsw i32 %23, 1
  store i32 %24, ptr %9, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %25 = getelementptr inbounds %"class.leveldb::Segment", ptr %14, i32 0, i32 0
  %26 = load ptr, ptr %25, align 8, !tbaa !9
  %27 = getelementptr inbounds %"struct.leveldb::Segment::SegRep", ptr %26, i32 0, i32 4
  %28 = load i64, ptr %27, align 8, !tbaa !13
  %29 = getelementptr inbounds %"class.leveldb::Segment", ptr %14, i32 0, i32 0
  %30 = load ptr, ptr %29, align 8, !tbaa !9
  %31 = getelementptr inbounds %"struct.leveldb::Segment::SegRep", ptr %30, i32 0, i32 5
  %32 = load i64, ptr %31, align 8, !tbaa !23
  %33 = add i64 %28, %32
  store i64 %33, ptr %10, align 8, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  %34 = getelementptr inbounds %"class.leveldb::Segment", ptr %14, i32 0, i32 0
  %35 = load ptr, ptr %34, align 8, !tbaa !9
  %36 = getelementptr inbounds %"struct.leveldb::Segment::SegRep", ptr %35, i32 0, i32 1
  %37 = load i64, ptr %36, align 8, !tbaa !25
  %38 = getelementptr inbounds %"class.leveldb::Segment", ptr %14, i32 0, i32 0
  %39 = load ptr, ptr %38, align 8, !tbaa !9
  %40 = getelementptr inbounds %"struct.leveldb::Segment::SegRep", ptr %39, i32 0, i32 2
  %41 = load i64, ptr %40, align 8, !tbaa !26
  %42 = add i64 %37, %41
  store i64 %42, ptr %11, align 8, !tbaa !24
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %43 = getelementptr inbounds %"class.leveldb::Segment", ptr %14, i32 0, i32 0
  %44 = load ptr, ptr %43, align 8, !tbaa !9
  %45 = getelementptr inbounds %"struct.leveldb::Segment::SegRep", ptr %44, i32 0, i32 7
  %46 = load i32, ptr %8, align 4, !tbaa !11
  %47 = sext i32 %46 to i64
  %48 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN7leveldb11KeyMetaDataESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %45, i64 noundef %47) #5
  %49 = load ptr, ptr %48, align 8, !tbaa !5
  store ptr %49, ptr %12, align 8, !tbaa !5
  %50 = load ptr, ptr %12, align 8, !tbaa !5
  %51 = getelementptr inbounds %"struct.leveldb::KeyMetaData", ptr %50, i32 0, i32 0
  %52 = load ptr, ptr %5, align 8, !tbaa !5
  %53 = getelementptr inbounds %"struct.leveldb::SegSepKeyData", ptr %52, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %53, ptr align 8 %51, i64 16, i1 false), !tbaa.struct !27
  %54 = load ptr, ptr %12, align 8, !tbaa !5
  %55 = getelementptr inbounds %"struct.leveldb::KeyMetaData", ptr %54, i32 0, i32 3
  %56 = load ptr, ptr %5, align 8, !tbaa !5
  %57 = getelementptr inbounds %"struct.leveldb::SegSepKeyData", ptr %56, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %57, ptr align 8 %55, i64 16, i1 false), !tbaa.struct !27
  %58 = load i32, ptr %9, align 4, !tbaa !11
  %59 = sext i32 %58 to i64
  %60 = getelementptr inbounds %"class.leveldb::Segment", ptr %14, i32 0, i32 0
  %61 = load ptr, ptr %60, align 8, !tbaa !9
  %62 = getelementptr inbounds %"struct.leveldb::Segment::SegRep", ptr %61, i32 0, i32 7
  %63 = call noundef i64 @_ZNKSt6vectorIPN7leveldb11KeyMetaDataESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %62) #5
  %64 = icmp uge i64 %59, %63
  br i1 %64, label %65, label %72

65:                                               ; preds = %3
  %66 = load i64, ptr %10, align 8, !tbaa !24
  %67 = load ptr, ptr %5, align 8, !tbaa !5
  %68 = getelementptr inbounds %"struct.leveldb::SegSepKeyData", ptr %67, i32 0, i32 2
  store i64 %66, ptr %68, align 8, !tbaa !28
  %69 = load i64, ptr %11, align 8, !tbaa !24
  %70 = load ptr, ptr %5, align 8, !tbaa !5
  %71 = getelementptr inbounds %"struct.leveldb::SegSepKeyData", ptr %70, i32 0, i32 3
  store i64 %69, ptr %71, align 8, !tbaa !31
  br label %135

72:                                               ; preds = %3
  %73 = getelementptr inbounds %"class.leveldb::Segment", ptr %14, i32 0, i32 0
  %74 = load ptr, ptr %73, align 8, !tbaa !9
  %75 = getelementptr inbounds %"struct.leveldb::Segment::SegRep", ptr %74, i32 0, i32 7
  %76 = load i32, ptr %9, align 4, !tbaa !11
  %77 = sext i32 %76 to i64
  %78 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN7leveldb11KeyMetaDataESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %75, i64 noundef %77) #5
  %79 = load ptr, ptr %78, align 8, !tbaa !5
  %80 = getelementptr inbounds %"struct.leveldb::KeyMetaData", ptr %79, i32 0, i32 0
  %81 = load ptr, ptr %6, align 8, !tbaa !5
  %82 = getelementptr inbounds %"struct.leveldb::SegSepKeyData", ptr %81, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %82, ptr align 8 %80, i64 16, i1 false), !tbaa.struct !27
  %83 = getelementptr inbounds %"class.leveldb::Segment", ptr %14, i32 0, i32 0
  %84 = load ptr, ptr %83, align 8, !tbaa !9
  %85 = getelementptr inbounds %"struct.leveldb::Segment::SegRep", ptr %84, i32 0, i32 7
  %86 = load i32, ptr %9, align 4, !tbaa !11
  %87 = sext i32 %86 to i64
  %88 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN7leveldb11KeyMetaDataESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %85, i64 noundef %87) #5
  %89 = load ptr, ptr %88, align 8, !tbaa !5
  %90 = getelementptr inbounds %"struct.leveldb::KeyMetaData", ptr %89, i32 0, i32 3
  %91 = load ptr, ptr %6, align 8, !tbaa !5
  %92 = getelementptr inbounds %"struct.leveldb::SegSepKeyData", ptr %91, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %92, ptr align 8 %90, i64 16, i1 false), !tbaa.struct !27
  %93 = getelementptr inbounds %"class.leveldb::Segment", ptr %14, i32 0, i32 0
  %94 = load ptr, ptr %93, align 8, !tbaa !9
  %95 = getelementptr inbounds %"struct.leveldb::Segment::SegRep", ptr %94, i32 0, i32 7
  %96 = load i32, ptr %9, align 4, !tbaa !11
  %97 = sext i32 %96 to i64
  %98 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN7leveldb11KeyMetaDataESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %95, i64 noundef %97) #5
  %99 = load ptr, ptr %98, align 8, !tbaa !5
  %100 = getelementptr inbounds %"struct.leveldb::KeyMetaData", ptr %99, i32 0, i32 3
  %101 = load ptr, ptr %5, align 8, !tbaa !5
  %102 = getelementptr inbounds %"struct.leveldb::SegSepKeyData", ptr %101, i32 0, i32 2
  %103 = load ptr, ptr %5, align 8, !tbaa !5
  %104 = getelementptr inbounds %"struct.leveldb::SegSepKeyData", ptr %103, i32 0, i32 3
  call void @_ZN7leveldbL14DecodeMetaValsERNS_5SliceEPmS2_(ptr noundef nonnull align 8 dereferenceable(16) %100, ptr noundef %102, ptr noundef %104)
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  %105 = load i32, ptr %9, align 4, !tbaa !11
  %106 = add nsw i32 %105, 1
  store i32 %106, ptr %13, align 4, !tbaa !11
  %107 = load i32, ptr %13, align 4, !tbaa !11
  %108 = sext i32 %107 to i64
  %109 = getelementptr inbounds %"class.leveldb::Segment", ptr %14, i32 0, i32 0
  %110 = load ptr, ptr %109, align 8, !tbaa !9
  %111 = getelementptr inbounds %"struct.leveldb::Segment::SegRep", ptr %110, i32 0, i32 7
  %112 = call noundef i64 @_ZNKSt6vectorIPN7leveldb11KeyMetaDataESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %111) #5
  %113 = icmp uge i64 %108, %112
  br i1 %113, label %114, label %121

114:                                              ; preds = %72
  %115 = load i64, ptr %10, align 8, !tbaa !24
  %116 = load ptr, ptr %6, align 8, !tbaa !5
  %117 = getelementptr inbounds %"struct.leveldb::SegSepKeyData", ptr %116, i32 0, i32 2
  store i64 %115, ptr %117, align 8, !tbaa !28
  %118 = load i64, ptr %11, align 8, !tbaa !24
  %119 = load ptr, ptr %6, align 8, !tbaa !5
  %120 = getelementptr inbounds %"struct.leveldb::SegSepKeyData", ptr %119, i32 0, i32 3
  store i64 %118, ptr %120, align 8, !tbaa !31
  br label %134

121:                                              ; preds = %72
  %122 = getelementptr inbounds %"class.leveldb::Segment", ptr %14, i32 0, i32 0
  %123 = load ptr, ptr %122, align 8, !tbaa !9
  %124 = getelementptr inbounds %"struct.leveldb::Segment::SegRep", ptr %123, i32 0, i32 7
  %125 = load i32, ptr %13, align 4, !tbaa !11
  %126 = sext i32 %125 to i64
  %127 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN7leveldb11KeyMetaDataESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %124, i64 noundef %126) #5
  %128 = load ptr, ptr %127, align 8, !tbaa !5
  %129 = getelementptr inbounds %"struct.leveldb::KeyMetaData", ptr %128, i32 0, i32 3
  %130 = load ptr, ptr %6, align 8, !tbaa !5
  %131 = getelementptr inbounds %"struct.leveldb::SegSepKeyData", ptr %130, i32 0, i32 2
  %132 = load ptr, ptr %6, align 8, !tbaa !5
  %133 = getelementptr inbounds %"struct.leveldb::SegSepKeyData", ptr %132, i32 0, i32 3
  call void @_ZN7leveldbL14DecodeMetaValsERNS_5SliceEPmS2_(ptr noundef nonnull align 8 dereferenceable(16) %129, ptr noundef %131, ptr noundef %133)
  br label %134

134:                                              ; preds = %121, %114
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %135

135:                                              ; preds = %134, %65
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { 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 = { 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, !6, i64 0}
!10 = !{!"_ZTSN7leveldb7SegmentE", !6, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !17, i64 128}
!14 = !{!"_ZTSN7leveldb7Segment6SegRepE", !15, i64 0, !17, i64 104, !17, i64 112, !6, i64 120, !17, i64 128, !17, i64 136, !6, i64 144, !19, i64 152}
!15 = !{!"_ZTSN7leveldb7OptionsE", !6, i64 0, !16, i64 8, !16, i64 9, !16, i64 10, !6, i64 16, !6, i64 24, !17, i64 32, !12, i64 40, !6, i64 48, !17, i64 56, !12, i64 64, !17, i64 72, !18, i64 80, !16, i64 84, !6, i64 88, !17, i64 96}
!16 = !{!"bool", !7, i64 0}
!17 = !{!"long", !7, i64 0}
!18 = !{!"_ZTSN7leveldb15CompressionTypeE", !7, i64 0}
!19 = !{!"_ZTSSt6vectorIPN7leveldb11KeyMetaDataESaIS2_EE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIPN7leveldb11KeyMetaDataESaIS2_EE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIPN7leveldb11KeyMetaDataESaIS2_EE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIPN7leveldb11KeyMetaDataESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!14, !17, i64 136}
!24 = !{!17, !17, i64 0}
!25 = !{!14, !17, i64 104}
!26 = !{!14, !17, i64 112}
!27 = !{i64 0, i64 8, !5, i64 8, i64 8, !24}
!28 = !{!29, !17, i64 32}
!29 = !{!"_ZTSN7leveldb13SegSepKeyDataE", !30, i64 0, !30, i64 16, !17, i64 32, !17, i64 40}
!30 = !{!"_ZTSN7leveldb5SliceE", !6, i64 0, !17, i64 8}
!31 = !{!29, !17, i64 40}


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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #0

; Function Attrs: inlinehint mustprogress uwtable
declare hidden void @_ZN7leveldbL14DecodeMetaValsERNS_5SliceEPmS2_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef, ptr noundef) local_unnamed_addr #1

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK7leveldb7Segment10GetMidKeysERNS_13SegSepKeyDataES2_(ptr nocapture noundef nonnull readonly align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 8 dereferenceable(48) %2) local_unnamed_addr #3 align 2 {
  %4 = load ptr, ptr %0, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %4, i64 152
  %6 = tail call noundef i64 @_ZNKSt6vectorIPN7leveldb11KeyMetaDataESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #4
  %7 = trunc i64 %6 to i32
  %8 = add nsw i32 %7, -1
  %9 = sdiv i32 %8, 2
  %10 = add nsw i32 %9, 1
  %11 = load ptr, ptr %0, align 8, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %11, i64 128
  %13 = load i64, ptr %12, align 8, !tbaa !10
  %14 = getelementptr inbounds i8, ptr %11, i64 136
  %15 = load i64, ptr %14, align 8, !tbaa !21
  %16 = add i64 %15, %13
  %17 = getelementptr inbounds i8, ptr %11, i64 104
  %18 = load i64, ptr %17, align 8, !tbaa !22
  %19 = getelementptr inbounds i8, ptr %11, i64 112
  %20 = load i64, ptr %19, align 8, !tbaa !23
  %21 = add i64 %20, %18
  %22 = getelementptr inbounds i8, ptr %11, i64 152
  %23 = sext i32 %9 to i64
  %24 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN7leveldb11KeyMetaDataESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef %23) #4
  %25 = load ptr, ptr %24, align 8, !tbaa !24
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(16) %25, i64 16, i1 false), !tbaa.struct !25
  %26 = getelementptr inbounds i8, ptr %25, i64 48
  %27 = getelementptr inbounds i8, ptr %1, i64 16
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %27, ptr noundef nonnull align 8 dereferenceable(16) %26, i64 16, i1 false), !tbaa.struct !25
  %28 = sext i32 %10 to i64
  %29 = load ptr, ptr %0, align 8, !tbaa !5
  %30 = getelementptr inbounds i8, ptr %29, i64 152
  %31 = tail call noundef i64 @_ZNKSt6vectorIPN7leveldb11KeyMetaDataESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %30) #4
  %.not = icmp ugt i64 %31, %28
  br i1 %.not, label %35, label %32

32:                                               ; preds = %3
  %33 = getelementptr inbounds i8, ptr %1, i64 32
  store i64 %16, ptr %33, align 8, !tbaa !27
  %34 = getelementptr inbounds i8, ptr %1, i64 40
  store i64 %21, ptr %34, align 8, !tbaa !30
  br label %69

35:                                               ; preds = %3
  %36 = load ptr, ptr %0, align 8, !tbaa !5
  %37 = getelementptr inbounds i8, ptr %36, i64 152
  %38 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN7leveldb11KeyMetaDataESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %37, i64 noundef %28) #4
  %39 = load ptr, ptr %38, align 8, !tbaa !24
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %2, ptr noundef nonnull align 8 dereferenceable(16) %39, i64 16, i1 false), !tbaa.struct !25
  %40 = load ptr, ptr %0, align 8, !tbaa !5
  %41 = getelementptr inbounds i8, ptr %40, i64 152
  %42 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN7leveldb11KeyMetaDataESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %41, i64 noundef %28) #4
  %43 = load ptr, ptr %42, align 8, !tbaa !24
  %44 = getelementptr inbounds i8, ptr %43, i64 48
  %45 = getelementptr inbounds i8, ptr %2, i64 16
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %45, ptr noundef nonnull align 8 dereferenceable(16) %44, i64 16, i1 false), !tbaa.struct !25
  %46 = load ptr, ptr %0, align 8, !tbaa !5
  %47 = getelementptr inbounds i8, ptr %46, i64 152
  %48 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN7leveldb11KeyMetaDataESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %47, i64 noundef %28) #4
  %49 = load ptr, ptr %48, align 8, !tbaa !24
  %50 = getelementptr inbounds i8, ptr %49, i64 48
  %51 = getelementptr inbounds i8, ptr %1, i64 32
  %52 = getelementptr inbounds i8, ptr %1, i64 40
  tail call void @_ZN7leveldbL14DecodeMetaValsERNS_5SliceEPmS2_(ptr noundef nonnull align 8 dereferenceable(16) %50, ptr noundef nonnull %51, ptr noundef nonnull %52)
  %53 = add nsw i32 %9, 2
  %54 = sext i32 %53 to i64
  %55 = load ptr, ptr %0, align 8, !tbaa !5
  %56 = getelementptr inbounds i8, ptr %55, i64 152
  %57 = tail call noundef i64 @_ZNKSt6vectorIPN7leveldb11KeyMetaDataESaIS2_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %56) #4
  %.not29 = icmp ugt i64 %57, %54
  br i1 %.not29, label %61, label %58

58:                                               ; preds = %35
  %59 = getelementptr inbounds i8, ptr %2, i64 32
  store i64 %16, ptr %59, align 8, !tbaa !27
  %60 = getelementptr inbounds i8, ptr %2, i64 40
  store i64 %21, ptr %60, align 8, !tbaa !30
  br label %69

61:                                               ; preds = %35
  %62 = load ptr, ptr %0, align 8, !tbaa !5
  %63 = getelementptr inbounds i8, ptr %62, i64 152
  %64 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIPN7leveldb11KeyMetaDataESaIS2_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %63, i64 noundef %54) #4
  %65 = load ptr, ptr %64, align 8, !tbaa !24
  %66 = getelementptr inbounds i8, ptr %65, i64 48
  %67 = getelementptr inbounds i8, ptr %2, i64 32
  %68 = getelementptr inbounds i8, ptr %2, i64 40
  tail call void @_ZN7leveldbL14DecodeMetaValsERNS_5SliceEPmS2_(ptr noundef nonnull align 8 dereferenceable(16) %66, ptr noundef nonnull %67, ptr noundef nonnull %68)
  br label %69

69:                                               ; preds = %58, %61, %32
  ret void
}

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

!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, !7, i64 0}
!6 = !{!"_ZTSN7leveldb7SegmentE", !7, i64 0}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!11, !14, i64 128}
!11 = !{!"_ZTSN7leveldb7Segment6SegRepE", !12, i64 0, !14, i64 104, !14, i64 112, !7, i64 120, !14, i64 128, !14, i64 136, !7, i64 144, !17, i64 152}
!12 = !{!"_ZTSN7leveldb7OptionsE", !7, i64 0, !13, i64 8, !13, i64 9, !13, i64 10, !7, i64 16, !7, i64 24, !14, i64 32, !15, i64 40, !7, i64 48, !14, i64 56, !15, i64 64, !14, i64 72, !16, i64 80, !13, i64 84, !7, i64 88, !14, i64 96}
!13 = !{!"bool", !8, i64 0}
!14 = !{!"long", !8, i64 0}
!15 = !{!"int", !8, i64 0}
!16 = !{!"_ZTSN7leveldb15CompressionTypeE", !8, i64 0}
!17 = !{!"_ZTSSt6vectorIPN7leveldb11KeyMetaDataESaIS2_EE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIPN7leveldb11KeyMetaDataESaIS2_EE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIPN7leveldb11KeyMetaDataESaIS2_EE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIPN7leveldb11KeyMetaDataESaIS2_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!21 = !{!11, !14, i64 136}
!22 = !{!11, !14, i64 104}
!23 = !{!11, !14, i64 112}
!24 = !{!7, !7, i64 0}
!25 = !{i64 0, i64 8, !24, i64 8, i64 8, !26}
!26 = !{!14, !14, i64 0}
!27 = !{!28, !14, i64 32}
!28 = !{!"_ZTSN7leveldb13SegSepKeyDataE", !29, i64 0, !29, i64 16, !14, i64 32, !14, i64 40}
!29 = !{!"_ZTSN7leveldb5SliceE", !7, i64 0, !14, i64 8}
!30 = !{!28, !14, i64 40}


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