; LLVM IR from nsccgz-storage/nvlsm :: db/log_writer.ll (ZN7leveldb3log6Writer18EmitPhysicalRecordENS0_10RecordTypeEPKcm)

; 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::Status" = type { ptr }
%"class.leveldb::Slice" = type { ptr, i64 }
%"class.leveldb::log::Writer" = type { ptr, i32, [5 x i32] }

@.str.1 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [17 x i8], align 1
@__PRETTY_FUNCTION__._ZN7leveldb3log6Writer18EmitPhysicalRecordENS0_10RecordTypeEPKcm = external hidden unnamed_addr constant [82 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [51 x i8], align 1

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

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

; 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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7leveldb3log6Writer18EmitPhysicalRecordENS0_10RecordTypeEPKcm(ptr dead_on_unwind noalias writable sret(%"class.leveldb::Status") align 8 %0, ptr noundef nonnull align 8 dereferenceable(32) %1, i32 noundef %2, ptr noundef %3, i64 noundef %4) #3 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca [7 x i8], align 1
  %12 = alloca i32, align 4
  %13 = alloca i1, align 1
  %14 = alloca %"class.leveldb::Slice", align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca %"class.leveldb::Status", align 8
  %18 = alloca %"class.leveldb::Slice", align 8
  %19 = alloca %"class.leveldb::Status", align 8
  store ptr %0, ptr %6, align 8
  store ptr %1, ptr %7, align 8, !tbaa !5
  store i32 %2, ptr %8, align 4, !tbaa !9
  store ptr %3, ptr %9, align 8, !tbaa !5
  store i64 %4, ptr %10, align 8, !tbaa !11
  %20 = load ptr, ptr %7, align 8
  %21 = load i64, ptr %10, align 8, !tbaa !11
  %22 = icmp ule i64 %21, 65535
  br i1 %22, label %23, label %24

23:                                               ; preds = %5
  br label %26

24:                                               ; preds = %5
  call void @__assert_fail(ptr noundef @.str.4, ptr noundef @.str.1, i32 noundef 84, ptr noundef @__PRETTY_FUNCTION__._ZN7leveldb3log6Writer18EmitPhysicalRecordENS0_10RecordTypeEPKcm) #6
  unreachable

25:                                               ; No predecessors!
  br label %26

26:                                               ; preds = %25, %23
  %27 = getelementptr inbounds %"class.leveldb::log::Writer", ptr %20, i32 0, i32 1
  %28 = load i32, ptr %27, align 8, !tbaa !13
  %29 = add nsw i32 %28, 7
  %30 = sext i32 %29 to i64
  %31 = load i64, ptr %10, align 8, !tbaa !11
  %32 = add i64 %30, %31
  %33 = icmp ule i64 %32, 32768
  br i1 %33, label %34, label %35

34:                                               ; preds = %26
  br label %37

35:                                               ; preds = %26
  call void @__assert_fail(ptr noundef @.str.5, ptr noundef @.str.1, i32 noundef 85, ptr noundef @__PRETTY_FUNCTION__._ZN7leveldb3log6Writer18EmitPhysicalRecordENS0_10RecordTypeEPKcm) #6
  unreachable

36:                                               ; No predecessors!
  br label %37

37:                                               ; preds = %36, %34
  call void @llvm.lifetime.start.p0(i64 7, ptr %11) #7
  %38 = load i64, ptr %10, align 8, !tbaa !11
  %39 = and i64 %38, 255
  %40 = trunc i64 %39 to i8
  %41 = getelementptr inbounds [7 x i8], ptr %11, i64 0, i64 4
  store i8 %40, ptr %41, align 1, !tbaa !16
  %42 = load i64, ptr %10, align 8, !tbaa !11
  %43 = lshr i64 %42, 8
  %44 = trunc i64 %43 to i8
  %45 = getelementptr inbounds [7 x i8], ptr %11, i64 0, i64 5
  store i8 %44, ptr %45, align 1, !tbaa !16
  %46 = load i32, ptr %8, align 4, !tbaa !9
  %47 = trunc i32 %46 to i8
  %48 = getelementptr inbounds [7 x i8], ptr %11, i64 0, i64 6
  store i8 %47, ptr %48, align 1, !tbaa !16
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %49 = getelementptr inbounds %"class.leveldb::log::Writer", ptr %20, i32 0, i32 2
  %50 = load i32, ptr %8, align 4, !tbaa !9
  %51 = zext i32 %50 to i64
  %52 = getelementptr inbounds [5 x i32], ptr %49, i64 0, i64 %51
  %53 = load i32, ptr %52, align 4, !tbaa !17
  %54 = load ptr, ptr %9, align 8, !tbaa !5
  %55 = load i64, ptr %10, align 8, !tbaa !11
  %56 = call noundef i32 @_ZN7leveldb6crc32c6ExtendEjPKcm(i32 noundef %53, ptr noundef %54, i64 noundef %55)
  store i32 %56, ptr %12, align 4, !tbaa !17
  %57 = load i32, ptr %12, align 4, !tbaa !17
  %58 = call noundef i32 @_ZN7leveldb6crc32c4MaskEj(i32 noundef %57)
  store i32 %58, ptr %12, align 4, !tbaa !17
  %59 = getelementptr inbounds [7 x i8], ptr %11, i64 0, i64 0
  %60 = load i32, ptr %12, align 4, !tbaa !17
  call void @_ZN7leveldb13EncodeFixed32EPcj(ptr noundef %59, i32 noundef %60)
  store i1 false, ptr %13, align 1
  %61 = getelementptr inbounds %"class.leveldb::log::Writer", ptr %20, i32 0, i32 0
  %62 = load ptr, ptr %61, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 16, ptr %14) #7
  %63 = getelementptr inbounds [7 x i8], ptr %11, i64 0, i64 0
  call void @_ZN7leveldb5SliceC2EPKcm(ptr noundef nonnull align 8 dereferenceable(16) %14, ptr noundef %63, i64 noundef 7)
  %64 = load ptr, ptr %62, align 8, !tbaa !19
  %65 = getelementptr inbounds ptr, ptr %64, i64 2
  %66 = load ptr, ptr %65, align 8
  call void %66(ptr dead_on_unwind writable sret(%"class.leveldb::Status") align 8 %0, ptr noundef nonnull align 8 dereferenceable(8) %62, ptr noundef nonnull align 8 dereferenceable(16) %14)
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #7
  %67 = invoke noundef zeroext i1 @_ZNK7leveldb6Status2okEv(ptr noundef nonnull align 8 dereferenceable(8) %0)
          to label %68 unwind label %90

68:                                               ; preds = %37
  br i1 %67, label %69, label %103

69:                                               ; preds = %68
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #7
  %70 = getelementptr inbounds %"class.leveldb::log::Writer", ptr %20, i32 0, i32 0
  %71 = load ptr, ptr %70, align 8, !tbaa !18
  call void @llvm.lifetime.start.p0(i64 16, ptr %18) #7
  %72 = load ptr, ptr %9, align 8, !tbaa !5
  %73 = load i64, ptr %10, align 8, !tbaa !11
  invoke void @_ZN7leveldb5SliceC2EPKcm(ptr noundef nonnull align 8 dereferenceable(16) %18, ptr noundef %72, i64 noundef %73)
          to label %74 unwind label %94

74:                                               ; preds = %69
  %75 = load ptr, ptr %71, align 8, !tbaa !19
  %76 = getelementptr inbounds ptr, ptr %75, i64 2
  %77 = load ptr, ptr %76, align 8
  invoke void %77(ptr dead_on_unwind writable sret(%"class.leveldb::Status") align 8 %17, ptr noundef nonnull align 8 dereferenceable(8) %71, ptr noundef nonnull align 8 dereferenceable(16) %18)
          to label %78 unwind label %94

78:                                               ; preds = %74
  %79 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7leveldb6StatusaSEOS0_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(8) %17) #7
  call void @_ZN7leveldb6StatusD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %17) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  %80 = invoke noundef zeroext i1 @_ZNK7leveldb6Status2okEv(ptr noundef nonnull align 8 dereferenceable(8) %0)
          to label %81 unwind label %90

81:                                               ; preds = %78
  br i1 %80, label %82, label %102

82:                                               ; preds = %81
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #7
  %83 = getelementptr inbounds %"class.leveldb::log::Writer", ptr %20, i32 0, i32 0
  %84 = load ptr, ptr %83, align 8, !tbaa !18
  %85 = load ptr, ptr %84, align 8, !tbaa !19
  %86 = getelementptr inbounds ptr, ptr %85, i64 4
  %87 = load ptr, ptr %86, align 8
  invoke void %87(ptr dead_on_unwind writable sret(%"class.leveldb::Status") align 8 %19, ptr noundef nonnull align 8 dereferenceable(8) %84)
          to label %88 unwind label %98

88:                                               ; preds = %82
  %89 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7leveldb6StatusaSEOS0_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(8) %19) #7
  call void @_ZN7leveldb6StatusD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %19) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  br label %102

90:                                               ; preds = %78, %37
  %91 = landingpad { ptr, i32 }
          cleanup
  %92 = extractvalue { ptr, i32 } %91, 0
  store ptr %92, ptr %15, align 8
  %93 = extractvalue { ptr, i32 } %91, 1
  store i32 %93, ptr %16, align 4
  br label %114

94:                                               ; preds = %74, %69
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %15, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #7
  br label %114

98:                                               ; preds = %82
  %99 = landingpad { ptr, i32 }
          cleanup
  %100 = extractvalue { ptr, i32 } %99, 0
  store ptr %100, ptr %15, align 8
  %101 = extractvalue { ptr, i32 } %99, 1
  store i32 %101, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #7
  br label %114

102:                                              ; preds = %88, %81
  br label %103

103:                                              ; preds = %102, %68
  %104 = load i64, ptr %10, align 8, !tbaa !11
  %105 = add i64 7, %104
  %106 = getelementptr inbounds %"class.leveldb::log::Writer", ptr %20, i32 0, i32 1
  %107 = load i32, ptr %106, align 8, !tbaa !13
  %108 = sext i32 %107 to i64
  %109 = add i64 %108, %105
  %110 = trunc i64 %109 to i32
  store i32 %110, ptr %106, align 8, !tbaa !13
  store i1 true, ptr %13, align 1
  %111 = load i1, ptr %13, align 1
  br i1 %111, label %113, label %112

112:                                              ; preds = %103
  call void @_ZN7leveldb6StatusD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  br label %113

113:                                              ; preds = %112, %103
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 7, ptr %11) #7
  ret void

114:                                              ; preds = %98, %94, %90
  call void @_ZN7leveldb6StatusD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 7, ptr %11) #7
  br label %115

115:                                              ; preds = %114
  %116 = load ptr, ptr %15, align 8
  %117 = load i32, ptr %16, align 4
  %118 = insertvalue { ptr, i32 } poison, ptr %116, 0
  %119 = insertvalue { ptr, i32 } %118, i32 %117, 1
  resume { ptr, i32 } %119
}

; 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)) #4 align 2

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

declare noundef i32 @_ZN7leveldb6crc32c6ExtendEjPKcm(i32 noundef, ptr noundef, i64 noundef) #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN7leveldb6crc32c4MaskEj(i32 noundef) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7leveldb13EncodeFixed32EPcj(ptr noundef, i32 noundef) #4

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 = { noreturn nounwind }
attributes #7 = { 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 = !{!"_ZTSN7leveldb3log10RecordTypeE", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !15, i64 8}
!14 = !{!"_ZTSN7leveldb3log6WriterE", !6, i64 0, !15, i64 8, !7, i64 12}
!15 = !{!"int", !7, i64 0}
!16 = !{!7, !7, i64 0}
!17 = !{!15, !15, i64 0}
!18 = !{!14, !6, i64 0}
!19 = !{!20, !20, i64 0}
!20 = !{!"vtable pointer", !8, 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::Status" = type { ptr }
%"class.leveldb::Slice" = type { ptr, i64 }

@.str.1 = external hidden unnamed_addr constant [71 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [17 x i8], align 1
@__PRETTY_FUNCTION__._ZN7leveldb3log6Writer18EmitPhysicalRecordENS0_10RecordTypeEPKcm = external hidden unnamed_addr constant [82 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [51 x i8], align 1

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

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

; 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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7leveldb3log6Writer18EmitPhysicalRecordENS0_10RecordTypeEPKcm(ptr dead_on_unwind noalias writable sret(%"class.leveldb::Status") align 8 %0, ptr nocapture noundef nonnull align 8 dereferenceable(32) %1, i32 noundef %2, ptr noundef %3, i64 noundef %4) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca [7 x i8], align 1
  %7 = alloca %"class.leveldb::Slice", align 8
  %8 = alloca %"class.leveldb::Status", align 8
  %9 = alloca %"class.leveldb::Slice", align 8
  %10 = alloca %"class.leveldb::Status", align 8
  %11 = icmp ult i64 %4, 65536
  br i1 %11, label %13, label %12

12:                                               ; preds = %5
  tail call void @__assert_fail(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.1, i32 noundef 84, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN7leveldb3log6Writer18EmitPhysicalRecordENS0_10RecordTypeEPKcm) #6
  unreachable

13:                                               ; preds = %5
  %14 = getelementptr inbounds i8, ptr %1, i64 8
  %15 = load i32, ptr %14, align 8, !tbaa !5
  %16 = add nsw i32 %15, 7
  %17 = sext i32 %16 to i64
  %18 = add nsw i64 %17, %4
  %19 = icmp ult i64 %18, 32769
  br i1 %19, label %21, label %20

20:                                               ; preds = %13
  tail call void @__assert_fail(ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.1, i32 noundef 85, ptr noundef nonnull @__PRETTY_FUNCTION__._ZN7leveldb3log6Writer18EmitPhysicalRecordENS0_10RecordTypeEPKcm) #6
  unreachable

21:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 7, ptr nonnull %6) #7
  %22 = trunc i64 %4 to i8
  %23 = getelementptr inbounds i8, ptr %6, i64 4
  store i8 %22, ptr %23, align 1, !tbaa !11
  %24 = lshr i64 %4, 8
  %25 = trunc nuw i64 %24 to i8
  %26 = getelementptr inbounds i8, ptr %6, i64 5
  store i8 %25, ptr %26, align 1, !tbaa !11
  %27 = trunc i32 %2 to i8
  %28 = getelementptr inbounds i8, ptr %6, i64 6
  store i8 %27, ptr %28, align 1, !tbaa !11
  %29 = getelementptr inbounds i8, ptr %1, i64 12
  %30 = zext i32 %2 to i64
  %31 = getelementptr inbounds [5 x i32], ptr %29, i64 0, i64 %30
  %32 = load i32, ptr %31, align 4, !tbaa !12
  %33 = tail call noundef i32 @_ZN7leveldb6crc32c6ExtendEjPKcm(i32 noundef %32, ptr noundef %3, i64 noundef %4)
  %34 = tail call noundef i32 @_ZN7leveldb6crc32c4MaskEj(i32 noundef %33)
  call void @_ZN7leveldb13EncodeFixed32EPcj(ptr noundef nonnull %6, i32 noundef %34)
  %35 = load ptr, ptr %1, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #7
  call void @_ZN7leveldb5SliceC2EPKcm(ptr noundef nonnull align 8 dereferenceable(16) %7, ptr noundef nonnull %6, i64 noundef 7)
  %36 = load ptr, ptr %35, align 8, !tbaa !14
  %37 = getelementptr inbounds i8, ptr %36, i64 16
  %38 = load ptr, ptr %37, align 8
  call void %38(ptr dead_on_unwind writable sret(%"class.leveldb::Status") align 8 %0, ptr noundef nonnull align 8 dereferenceable(8) %35, ptr noundef nonnull align 8 dereferenceable(16) %7)
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #7
  %39 = call noundef zeroext i1 @_ZNK7leveldb6Status2okEv(ptr noundef nonnull align 8 dereferenceable(8) %0)
  br i1 %39, label %40, label %59

40:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %41 = load ptr, ptr %1, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #7
  call void @_ZN7leveldb5SliceC2EPKcm(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef %3, i64 noundef %4)
  %42 = load ptr, ptr %41, align 8, !tbaa !14
  %43 = getelementptr inbounds i8, ptr %42, i64 16
  %44 = load ptr, ptr %43, align 8
  invoke void %44(ptr dead_on_unwind nonnull writable sret(%"class.leveldb::Status") align 8 %8, ptr noundef nonnull align 8 dereferenceable(8) %41, ptr noundef nonnull align 8 dereferenceable(16) %9)
          to label %45 unwind label %55

45:                                               ; preds = %40
  %46 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7leveldb6StatusaSEOS0_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  call void @_ZN7leveldb6StatusD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %8) #7
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  %47 = call noundef zeroext i1 @_ZNK7leveldb6Status2okEv(ptr noundef nonnull align 8 dereferenceable(8) %0)
  br i1 %47, label %48, label %59

48:                                               ; preds = %45
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #7
  %49 = load ptr, ptr %1, align 8, !tbaa !13
  %50 = load ptr, ptr %49, align 8, !tbaa !14
  %51 = getelementptr inbounds i8, ptr %50, i64 32
  %52 = load ptr, ptr %51, align 8
  invoke void %52(ptr dead_on_unwind nonnull writable sret(%"class.leveldb::Status") align 8 %10, ptr noundef nonnull align 8 dereferenceable(8) %49)
          to label %53 unwind label %57

53:                                               ; preds = %48
  %54 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZN7leveldb6StatusaSEOS0_(ptr noundef nonnull align 8 dereferenceable(8) %0, ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  call void @_ZN7leveldb6StatusD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %10) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  br label %59

55:                                               ; preds = %40
  %56 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  br label %64

57:                                               ; preds = %48
  %58 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #7
  br label %64

59:                                               ; preds = %45, %53, %21
  %60 = load i32, ptr %14, align 8, !tbaa !5
  %61 = trunc nuw i64 %4 to i32
  %62 = add nuw nsw i32 %61, 7
  %63 = add i32 %62, %60
  store i32 %63, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 7, ptr nonnull %6) #7
  ret void

64:                                               ; preds = %57, %55
  %.pn = phi { ptr, i32 } [ %58, %57 ], [ %56, %55 ]
  call void @_ZN7leveldb6StatusD2Ev(ptr noundef nonnull align 8 dereferenceable(8) %0) #7
  call void @llvm.lifetime.end.p0(i64 7, ptr nonnull %6) #7
  resume { ptr, i32 } %.pn
}

; 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 #4 align 2

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

declare noundef i32 @_ZN7leveldb6crc32c6ExtendEjPKcm(i32 noundef, ptr noundef, i64 noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZN7leveldb6crc32c4MaskEj(i32 noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN7leveldb13EncodeFixed32EPcj(ptr noundef, i32 noundef) local_unnamed_addr #4

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #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 = { 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 = { noreturn nounwind }
attributes #7 = { 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, !10, i64 8}
!6 = !{!"_ZTSN7leveldb3log6WriterE", !7, i64 0, !10, i64 8, !8, i64 12}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!8, !8, i64 0}
!12 = !{!10, !10, i64 0}
!13 = !{!6, !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"vtable pointer", !9, i64 0}


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