; LLVM IR from nsccgz-storage/nvlsm :: table/block_builder.ll (ZN7leveldb12BlockBuilder3AddERKNS_5SliceES3_)

; 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::BlockBuilder" = type { ptr, %"class.std::__cxx11::basic_string", %"class.std::vector", i32, i8, %"class.std::__cxx11::basic_string" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl" = type { %"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<unsigned int, std::allocator<unsigned int>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"struct.leveldb::Options" = type { ptr, i8, i8, i8, ptr, ptr, i64, i32, ptr, i64, i32, i64, i32, i8, ptr, i64 }

@.str.1 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@__PRETTY_FUNCTION__._ZN7leveldb12BlockBuilder3AddERKNS_5SliceES3_ = external hidden unnamed_addr constant [62 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [24 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #0

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7leveldb12BlockBuilder3AddERKNS_5SliceES3_(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(16) %2) #1 align 2 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %"class.leveldb::Slice", align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca i64, align 8
  %14 = alloca %"class.leveldb::Slice", align 8
  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
  %15 = load ptr, ptr %4, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #6
  %16 = getelementptr inbounds %"class.leveldb::BlockBuilder", ptr %15, i32 0, i32 5
  call void @_ZN7leveldb5SliceC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull align 8 dereferenceable(32) %16)
  %17 = getelementptr inbounds %"class.leveldb::BlockBuilder", ptr %15, i32 0, i32 4
  %18 = load i8, ptr %17, align 4, !tbaa !9, !range !20, !noundef !21
  %19 = trunc i8 %18 to i1
  %20 = xor i1 %19, true
  br i1 %20, label %21, label %22

21:                                               ; preds = %3
  br label %24

22:                                               ; preds = %3
  call void @__assert_fail(ptr noundef @.str.2, ptr noundef @.str.1, i32 noundef 73, ptr noundef @__PRETTY_FUNCTION__._ZN7leveldb12BlockBuilder3AddERKNS_5SliceES3_) #7
  unreachable

23:                                               ; No predecessors!
  br label %24

24:                                               ; preds = %23, %21
  %25 = getelementptr inbounds %"class.leveldb::BlockBuilder", ptr %15, i32 0, i32 3
  %26 = load i32, ptr %25, align 8, !tbaa !22
  %27 = getelementptr inbounds %"class.leveldb::BlockBuilder", ptr %15, i32 0, i32 0
  %28 = load ptr, ptr %27, align 8, !tbaa !23
  %29 = getelementptr inbounds %"struct.leveldb::Options", ptr %28, i32 0, i32 10
  %30 = load i32, ptr %29, align 8, !tbaa !24
  %31 = icmp sle i32 %26, %30
  br i1 %31, label %32, label %33

32:                                               ; preds = %24
  br label %35

33:                                               ; preds = %24
  call void @__assert_fail(ptr noundef @.str.3, ptr noundef @.str.1, i32 noundef 74, ptr noundef @__PRETTY_FUNCTION__._ZN7leveldb12BlockBuilder3AddERKNS_5SliceES3_) #7
  unreachable

34:                                               ; No predecessors!
  br label %35

35:                                               ; preds = %34, %32
  %36 = getelementptr inbounds %"class.leveldb::BlockBuilder", ptr %15, i32 0, i32 1
  %37 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %36) #6
  br i1 %37, label %49, label %38

38:                                               ; preds = %35
  %39 = getelementptr inbounds %"class.leveldb::BlockBuilder", ptr %15, i32 0, i32 0
  %40 = load ptr, ptr %39, align 8, !tbaa !23
  %41 = getelementptr inbounds %"struct.leveldb::Options", ptr %40, i32 0, i32 0
  %42 = load ptr, ptr %41, align 8, !tbaa !27
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = load ptr, ptr %42, align 8, !tbaa !28
  %45 = getelementptr inbounds ptr, ptr %44, i64 2
  %46 = load ptr, ptr %45, align 8
  %47 = call noundef i32 %46(ptr noundef nonnull align 8 dereferenceable(8) %42, ptr noundef nonnull align 8 dereferenceable(16) %43, ptr noundef nonnull align 8 dereferenceable(16) %7)
  %48 = icmp sgt i32 %47, 0
  br label %49

49:                                               ; preds = %38, %35
  %50 = phi i1 [ true, %35 ], [ %48, %38 ]
  br i1 %50, label %51, label %52

51:                                               ; preds = %49
  br label %54

52:                                               ; preds = %49
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 76, ptr noundef @__PRETTY_FUNCTION__._ZN7leveldb12BlockBuilder3AddERKNS_5SliceES3_) #7
  unreachable

53:                                               ; No predecessors!
  br label %54

54:                                               ; preds = %53, %51
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store i64 0, ptr %8, align 8, !tbaa !30
  %55 = getelementptr inbounds %"class.leveldb::BlockBuilder", ptr %15, i32 0, i32 3
  %56 = load i32, ptr %55, align 8, !tbaa !22
  %57 = getelementptr inbounds %"class.leveldb::BlockBuilder", ptr %15, i32 0, i32 0
  %58 = load ptr, ptr %57, align 8, !tbaa !23
  %59 = getelementptr inbounds %"struct.leveldb::Options", ptr %58, i32 0, i32 10
  %60 = load i32, ptr %59, align 8, !tbaa !24
  %61 = icmp slt i32 %56, %60
  br i1 %61, label %62, label %87

62:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  %63 = call noundef i64 @_ZNK7leveldb5Slice4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %7)
  store i64 %63, ptr %10, align 8, !tbaa !30
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  %64 = load ptr, ptr %5, align 8, !tbaa !5
  %65 = call noundef i64 @_ZNK7leveldb5Slice4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %64)
  store i64 %65, ptr %11, align 8, !tbaa !30
  %66 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minImERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %10, ptr noundef nonnull align 8 dereferenceable(8) %11)
  %67 = load i64, ptr %66, align 8, !tbaa !30
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  store i64 %67, ptr %9, align 8, !tbaa !30
  br label %68

68:                                               ; preds = %83, %62
  %69 = load i64, ptr %8, align 8, !tbaa !30
  %70 = load i64, ptr %9, align 8, !tbaa !30
  %71 = icmp ult i64 %69, %70
  br i1 %71, label %72, label %81

72:                                               ; preds = %68
  %73 = load i64, ptr %8, align 8, !tbaa !30
  %74 = call noundef signext i8 @_ZNK7leveldb5SliceixEm(ptr noundef nonnull align 8 dereferenceable(16) %7, i64 noundef %73)
  %75 = sext i8 %74 to i32
  %76 = load ptr, ptr %5, align 8, !tbaa !5
  %77 = load i64, ptr %8, align 8, !tbaa !30
  %78 = call noundef signext i8 @_ZNK7leveldb5SliceixEm(ptr noundef nonnull align 8 dereferenceable(16) %76, i64 noundef %77)
  %79 = sext i8 %78 to i32
  %80 = icmp eq i32 %75, %79
  br label %81

81:                                               ; preds = %72, %68
  %82 = phi i1 [ false, %68 ], [ %80, %72 ]
  br i1 %82, label %83, label %86

83:                                               ; preds = %81
  %84 = load i64, ptr %8, align 8, !tbaa !30
  %85 = add i64 %84, 1
  store i64 %85, ptr %8, align 8, !tbaa !30
  br label %68, !llvm.loop !31

86:                                               ; preds = %81
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  br label %93

87:                                               ; preds = %54
  %88 = getelementptr inbounds %"class.leveldb::BlockBuilder", ptr %15, i32 0, i32 2
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #6
  %89 = getelementptr inbounds %"class.leveldb::BlockBuilder", ptr %15, i32 0, i32 1
  %90 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %89) #6
  %91 = trunc i64 %90 to i32
  store i32 %91, ptr %12, align 4, !tbaa !33
  call void @_ZNSt6vectorIjSaIjEE9push_backEOj(ptr noundef nonnull align 8 dereferenceable(24) %88, ptr noundef nonnull align 4 dereferenceable(4) %12)
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #6
  %92 = getelementptr inbounds %"class.leveldb::BlockBuilder", ptr %15, i32 0, i32 3
  store i32 0, ptr %92, align 8, !tbaa !22
  br label %93

93:                                               ; preds = %87, %86
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  %94 = load ptr, ptr %5, align 8, !tbaa !5
  %95 = call noundef i64 @_ZNK7leveldb5Slice4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %94)
  %96 = load i64, ptr %8, align 8, !tbaa !30
  %97 = sub i64 %95, %96
  store i64 %97, ptr %13, align 8, !tbaa !30
  %98 = getelementptr inbounds %"class.leveldb::BlockBuilder", ptr %15, i32 0, i32 1
  %99 = load i64, ptr %8, align 8, !tbaa !30
  %100 = trunc i64 %99 to i32
  call void @_ZN7leveldb11PutVarint32EPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEj(ptr noundef %98, i32 noundef %100)
  %101 = getelementptr inbounds %"class.leveldb::BlockBuilder", ptr %15, i32 0, i32 1
  %102 = load i64, ptr %13, align 8, !tbaa !30
  %103 = trunc i64 %102 to i32
  call void @_ZN7leveldb11PutVarint32EPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEj(ptr noundef %101, i32 noundef %103)
  %104 = getelementptr inbounds %"class.leveldb::BlockBuilder", ptr %15, i32 0, i32 1
  %105 = load ptr, ptr %6, align 8, !tbaa !5
  %106 = call noundef i64 @_ZNK7leveldb5Slice4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %105)
  %107 = trunc i64 %106 to i32
  call void @_ZN7leveldb11PutVarint32EPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEj(ptr noundef %104, i32 noundef %107)
  %108 = getelementptr inbounds %"class.leveldb::BlockBuilder", ptr %15, i32 0, i32 1
  %109 = load ptr, ptr %5, align 8, !tbaa !5
  %110 = call noundef ptr @_ZNK7leveldb5Slice4dataEv(ptr noundef nonnull align 8 dereferenceable(16) %109)
  %111 = load i64, ptr %8, align 8, !tbaa !30
  %112 = getelementptr inbounds i8, ptr %110, i64 %111
  %113 = load i64, ptr %13, align 8, !tbaa !30
  %114 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %108, ptr noundef %112, i64 noundef %113)
  %115 = getelementptr inbounds %"class.leveldb::BlockBuilder", ptr %15, i32 0, i32 1
  %116 = load ptr, ptr %6, align 8, !tbaa !5
  %117 = call noundef ptr @_ZNK7leveldb5Slice4dataEv(ptr noundef nonnull align 8 dereferenceable(16) %116)
  %118 = load ptr, ptr %6, align 8, !tbaa !5
  %119 = call noundef i64 @_ZNK7leveldb5Slice4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %118)
  %120 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %115, ptr noundef %117, i64 noundef %119)
  %121 = getelementptr inbounds %"class.leveldb::BlockBuilder", ptr %15, i32 0, i32 5
  %122 = load i64, ptr %8, align 8, !tbaa !30
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(32) %121, i64 noundef %122)
  %123 = getelementptr inbounds %"class.leveldb::BlockBuilder", ptr %15, i32 0, i32 5
  %124 = load ptr, ptr %5, align 8, !tbaa !5
  %125 = call noundef ptr @_ZNK7leveldb5Slice4dataEv(ptr noundef nonnull align 8 dereferenceable(16) %124)
  %126 = load i64, ptr %8, align 8, !tbaa !30
  %127 = getelementptr inbounds i8, ptr %125, i64 %126
  %128 = load i64, ptr %13, align 8, !tbaa !30
  %129 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %123, ptr noundef %127, i64 noundef %128)
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #6
  %130 = getelementptr inbounds %"class.leveldb::BlockBuilder", ptr %15, i32 0, i32 5
  call void @_ZN7leveldb5SliceC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 8 dereferenceable(32) %130)
  %131 = load ptr, ptr %5, align 8, !tbaa !5
  %132 = call noundef zeroext i1 @_ZN7leveldbeqERKNS_5SliceES2_(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef nonnull align 8 dereferenceable(16) %131)
  br i1 %132, label %133, label %134

133:                                              ; preds = %93
  br label %136

134:                                              ; preds = %93
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 103, ptr noundef @__PRETTY_FUNCTION__._ZN7leveldb12BlockBuilder3AddERKNS_5SliceES3_) #7
  unreachable

135:                                              ; No predecessors!
  br label %136

136:                                              ; preds = %135, %133
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #6
  %137 = getelementptr inbounds %"class.leveldb::BlockBuilder", ptr %15, i32 0, i32 3
  %138 = load i32, ptr %137, align 8, !tbaa !22
  %139 = add nsw i32 %138, 1
  store i32 %139, ptr %137, align 8, !tbaa !22
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #6
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32)) #3 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef signext i8 @_ZNK7leveldb5SliceixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) #3 align 2

declare void @_ZN7leveldb11PutVarint32EPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEj(ptr noundef, i32 noundef) #5

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

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

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZN7leveldbeqERKNS_5SliceES2_(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #4

attributes #0 = { noreturn 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 #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #5 = { "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 }
attributes #7 = { noreturn 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, !19, i64 68}
!10 = !{!"_ZTSN7leveldb12BlockBuilderE", !6, i64 0, !11, i64 8, !14, i64 40, !18, i64 64, !19, i64 68, !11, i64 72}
!11 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !12, i64 0, !13, i64 8, !7, i64 16}
!12 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!"_ZTSSt6vectorIjSaIjEE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!18 = !{!"int", !7, i64 0}
!19 = !{!"bool", !7, i64 0}
!20 = !{i8 0, i8 2}
!21 = !{}
!22 = !{!10, !18, i64 64}
!23 = !{!10, !6, i64 0}
!24 = !{!25, !18, i64 64}
!25 = !{!"_ZTSN7leveldb7OptionsE", !6, i64 0, !19, i64 8, !19, i64 9, !19, i64 10, !6, i64 16, !6, i64 24, !13, i64 32, !18, i64 40, !6, i64 48, !13, i64 56, !18, i64 64, !13, i64 72, !26, i64 80, !19, i64 84, !6, i64 88, !13, i64 96}
!26 = !{!"_ZTSN7leveldb15CompressionTypeE", !7, i64 0}
!27 = !{!25, !6, i64 0}
!28 = !{!29, !29, i64 0}
!29 = !{!"vtable pointer", !8, i64 0}
!30 = !{!13, !13, i64 0}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = !{!18, !18, 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 }

@.str.1 = external hidden unnamed_addr constant [77 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [11 x i8], align 1
@__PRETTY_FUNCTION__._ZN7leveldb12BlockBuilder3AddERKNS_5SliceES3_ = external hidden unnamed_addr constant [62 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [45 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [74 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [24 x i8], align 1

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

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

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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7leveldb12BlockBuilder3AddERKNS_5SliceES3_(ptr noundef nonnull align 8 dereferenceable(104) %0, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(16) %2) local_unnamed_addr #1 align 2 {
  %4 = alloca %"class.leveldb::Slice", align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  %8 = alloca %"class.leveldb::Slice", align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #6
  %9 = getelementptr inbounds i8, ptr %0, i64 72
  call void @_ZN7leveldb5SliceC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16) %4, ptr noundef nonnull align 8 dereferenceable(32) %9)
  %10 = getelementptr inbounds i8, ptr %0, i64 68
  %11 = load i8, ptr %10, align 4, !tbaa !5, !range !19, !noundef !20
  %12 = trunc nuw i8 %11 to i1
  br i1 %12, label %13, label %14

13:                                               ; preds = %3
  call void @__assert_fail(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.1, i32 noundef 73, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN7leveldb12BlockBuilder3AddERKNS_5SliceES3_) #7
  unreachable

14:                                               ; preds = %3
  %15 = getelementptr inbounds i8, ptr %0, i64 64
  %16 = load i32, ptr %15, align 8, !tbaa !21
  %17 = load ptr, ptr %0, align 8, !tbaa !22
  %18 = getelementptr inbounds i8, ptr %17, i64 64
  %19 = load i32, ptr %18, align 8, !tbaa !23
  %.not = icmp sgt i32 %16, %19
  br i1 %.not, label %20, label %21

20:                                               ; preds = %14
  call void @__assert_fail(ptr noundef nonnull @.str.3, ptr noundef nonnull @.str.1, i32 noundef 74, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN7leveldb12BlockBuilder3AddERKNS_5SliceES3_) #7
  unreachable

21:                                               ; preds = %14
  %22 = getelementptr inbounds i8, ptr %0, i64 8
  %23 = call noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32) %22) #6
  br i1 %23, label %.critedge, label %24

24:                                               ; preds = %21
  %25 = load ptr, ptr %0, align 8, !tbaa !22
  %26 = load ptr, ptr %25, align 8, !tbaa !26
  %27 = load ptr, ptr %26, align 8, !tbaa !27
  %28 = getelementptr inbounds i8, ptr %27, i64 16
  %29 = load ptr, ptr %28, align 8
  %30 = call noundef i32 %29(ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef nonnull align 8 dereferenceable(16) %1, ptr noundef nonnull align 8 dereferenceable(16) %4)
  %31 = icmp sgt i32 %30, 0
  br i1 %31, label %.critedge, label %32

32:                                               ; preds = %24
  call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 76, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN7leveldb12BlockBuilder3AddERKNS_5SliceES3_) #7
  unreachable

.critedge:                                        ; preds = %21, %24
  %33 = load i32, ptr %15, align 8, !tbaa !21
  %34 = load ptr, ptr %0, align 8, !tbaa !22
  %35 = getelementptr inbounds i8, ptr %34, i64 64
  %36 = load i32, ptr %35, align 8, !tbaa !23
  %37 = icmp slt i32 %33, %36
  br i1 %37, label %38, label %48

38:                                               ; preds = %.critedge
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #6
  %39 = call noundef i64 @_ZNK7leveldb5Slice4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %4)
  store i64 %39, ptr %5, align 8, !tbaa !29
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  %40 = call noundef i64 @_ZNK7leveldb5Slice4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %1)
  store i64 %40, ptr %6, align 8, !tbaa !29
  %41 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZSt3minImERKT_S2_S2_(ptr noundef nonnull align 8 dereferenceable(8) %5, ptr noundef nonnull align 8 dereferenceable(8) %6)
  %42 = load i64, ptr %41, align 8, !tbaa !29
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #6
  %.not28 = icmp eq i64 %42, 0
  br i1 %.not28, label %.critedge2, label %.lr.ph

.lr.ph:                                           ; preds = %38, %46
  %.025 = phi i64 [ %47, %46 ], [ 0, %38 ]
  %43 = call noundef signext i8 @_ZNK7leveldb5SliceixEm(ptr noundef nonnull align 8 dereferenceable(16) %4, i64 noundef %.025)
  %44 = call noundef signext i8 @_ZNK7leveldb5SliceixEm(ptr noundef nonnull align 8 dereferenceable(16) %1, i64 noundef %.025)
  %45 = icmp eq i8 %43, %44
  br i1 %45, label %46, label %.critedge2

46:                                               ; preds = %.lr.ph
  %47 = add nuw i64 %.025, 1
  %exitcond.not = icmp eq i64 %47, %42
  br i1 %exitcond.not, label %.critedge2, label %.lr.ph, !llvm.loop !30

48:                                               ; preds = %.critedge
  %49 = getelementptr inbounds i8, ptr %0, i64 40
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #6
  %50 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(32) %22) #6
  %51 = trunc i64 %50 to i32
  store i32 %51, ptr %7, align 4, !tbaa !32
  call void @_ZNSt6vectorIjSaIjEE9push_backEOj(ptr noundef nonnull align 8 dereferenceable(24) %49, ptr noundef nonnull align 4 dereferenceable(4) %7)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #6
  store i32 0, ptr %15, align 8, !tbaa !21
  br label %.critedge2

.critedge2:                                       ; preds = %46, %.lr.ph, %38, %48
  %.1 = phi i64 [ 0, %48 ], [ 0, %38 ], [ %42, %46 ], [ %.025, %.lr.ph ]
  %52 = call noundef i64 @_ZNK7leveldb5Slice4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %1)
  %53 = sub i64 %52, %.1
  %54 = trunc i64 %.1 to i32
  call void @_ZN7leveldb11PutVarint32EPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEj(ptr noundef nonnull %22, i32 noundef %54)
  %55 = trunc i64 %53 to i32
  call void @_ZN7leveldb11PutVarint32EPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEj(ptr noundef nonnull %22, i32 noundef %55)
  %56 = call noundef i64 @_ZNK7leveldb5Slice4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %2)
  %57 = trunc i64 %56 to i32
  call void @_ZN7leveldb11PutVarint32EPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEj(ptr noundef nonnull %22, i32 noundef %57)
  %58 = call noundef ptr @_ZNK7leveldb5Slice4dataEv(ptr noundef nonnull align 8 dereferenceable(16) %1)
  %59 = getelementptr inbounds i8, ptr %58, i64 %.1
  %60 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef %59, i64 noundef %53)
  %61 = call noundef ptr @_ZNK7leveldb5Slice4dataEv(ptr noundef nonnull align 8 dereferenceable(16) %2)
  %62 = call noundef i64 @_ZNK7leveldb5Slice4sizeEv(ptr noundef nonnull align 8 dereferenceable(16) %2)
  %63 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %22, ptr noundef %61, i64 noundef %62)
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(32) %9, i64 noundef %.1)
  %64 = call noundef ptr @_ZNK7leveldb5Slice4dataEv(ptr noundef nonnull align 8 dereferenceable(16) %1)
  %65 = getelementptr inbounds i8, ptr %64, i64 %.1
  %66 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %9, ptr noundef %65, i64 noundef %53)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #6
  call void @_ZN7leveldb5SliceC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(32) %9)
  %67 = call noundef zeroext i1 @_ZN7leveldbeqERKNS_5SliceES2_(ptr noundef nonnull align 8 dereferenceable(16) %8, ptr noundef nonnull align 8 dereferenceable(16) %1)
  br i1 %67, label %69, label %68

68:                                               ; preds = %.critedge2
  call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 103, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN7leveldb12BlockBuilder3AddERKNS_5SliceES3_) #7
  unreachable

69:                                               ; preds = %.critedge2
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #6
  %70 = load i32, ptr %15, align 8, !tbaa !21
  %71 = add nsw i32 %70, 1
  store i32 %71, ptr %15, align 8, !tbaa !21
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #6
  ret void
}

; Function Attrs: mustprogress nounwind uwtable
declare noundef zeroext i1 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv(ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3 align 2

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef signext i8 @_ZNK7leveldb5SliceixEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) local_unnamed_addr #3 align 2

declare void @_ZN7leveldb11PutVarint32EPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEj(ptr noundef, i32 noundef) local_unnamed_addr #5

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

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

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

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

attributes #0 = { noreturn 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 #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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #5 = { "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 }
attributes #7 = { noreturn 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, !18, i64 68}
!6 = !{!"_ZTSN7leveldb12BlockBuilderE", !7, i64 0, !10, i64 8, !13, i64 40, !17, i64 64, !18, i64 68, !10, i64 72}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !11, i64 0, !12, i64 8, !8, i64 16}
!11 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !7, i64 0}
!12 = !{!"long", !8, i64 0}
!13 = !{!"_ZTSSt6vectorIjSaIjEE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseIjSaIjEE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIjSaIjEE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!17 = !{!"int", !8, i64 0}
!18 = !{!"bool", !8, i64 0}
!19 = !{i8 0, i8 2}
!20 = !{}
!21 = !{!6, !17, i64 64}
!22 = !{!6, !7, i64 0}
!23 = !{!24, !17, i64 64}
!24 = !{!"_ZTSN7leveldb7OptionsE", !7, i64 0, !18, i64 8, !18, i64 9, !18, i64 10, !7, i64 16, !7, i64 24, !12, i64 32, !17, i64 40, !7, i64 48, !12, i64 56, !17, i64 64, !12, i64 72, !25, i64 80, !18, i64 84, !7, i64 88, !12, i64 96}
!25 = !{!"_ZTSN7leveldb15CompressionTypeE", !8, i64 0}
!26 = !{!24, !7, i64 0}
!27 = !{!28, !28, i64 0}
!28 = !{!"vtable pointer", !9, i64 0}
!29 = !{!12, !12, i64 0}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = !{!17, !17, i64 0}


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