; LLVM IR from erthink/libmdbx :: src (api-txn-data)

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

%struct.cursor_couple = type { %struct.MDBX_cursor, ptr, %struct.inner_cursor }
%struct.MDBX_cursor = type { i32, %union.anon, i8, i8, ptr, ptr, ptr, ptr, ptr, [32 x ptr], [32 x i16], ptr, ptr }
%union.anon = type { i16 }
%struct.inner_cursor = type { %struct.MDBX_cursor, %struct.tree }
%struct.tree = type { i16, i16, i32, i32, i32, i32, i32, i64, i64, i64 }
%struct.iovec = type { ptr, i64 }
%struct.cursor_set_result = type { i32, i8 }
%struct.MDBX_txn = type { i32, i32, i64, i64, ptr, ptr, %struct.geo, i64, i64, ptr, ptr, ptr, ptr, ptr, ptr, %struct.MDBX_canary, ptr, %union.anon.4 }
%struct.geo = type { i16, i16, i32, i32, %union.anon.2, %union.anon.3 }
%union.anon.2 = type { i32 }
%union.anon.3 = type { i32 }
%struct.MDBX_canary = type { i64, i64, i64, i64 }
%union.anon.4 = type { %struct.anon.6 }
%struct.anon.6 = type { %struct.troika, ptr, %struct.anon.7, i8, i32, i32, i64, ptr, ptr, ptr, i64, %union.anon.8 }
%struct.troika = type { i8, i8, i8, i8, i32, [3 x i64] }
%struct.anon.7 = type { %struct.MDBX_rkl, i64, %struct.MDBX_rkl }
%struct.MDBX_rkl = type { i64, i64, i32, i32, ptr, [12 x i64] }
%union.anon.8 = type { %struct.anon.9 }
%struct.anon.9 = type { i64, ptr }

@__func__.mdbx_del = external hidden unnamed_addr constant [9 x i8], align 1

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)
declare i64 @llvm.expect.i64(i64, i64) #0

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @log_if_error(i32 noundef, ptr noundef, i32 noundef) #1

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

declare i32 @cursor_init(ptr noundef, ptr noundef, i64 noundef) #3

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

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

declare i64 @cursor_seek(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @check_txn_rw(ptr noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @mdbx_del(ptr noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3) #5 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca %struct.cursor_couple, align 8
  %13 = alloca %struct.iovec, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca %struct.cursor_set_result, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  %17 = load ptr, ptr %8, align 8, !tbaa !5
  %18 = icmp ne ptr %17, null
  %19 = xor i1 %18, true
  %20 = xor i1 %19, true
  %21 = xor i1 %20, true
  %22 = zext i1 %21 to i32
  %23 = sext i32 %22 to i64
  %24 = call i64 @llvm.expect.i64(i64 %23, i64 0)
  %25 = icmp ne i64 %24, 0
  br i1 %25, label %26, label %28

26:                                               ; preds = %4
  %27 = call i32 @log_if_error(i32 noundef 22, ptr noundef @__func__.mdbx_del, i32 noundef 216)
  store i32 %27, ptr %5, align 4
  br label %128

28:                                               ; preds = %4
  %29 = load i32, ptr %7, align 4, !tbaa !9
  %30 = icmp ule i32 %29, 0
  %31 = xor i1 %30, true
  %32 = xor i1 %31, true
  %33 = zext i1 %32 to i32
  %34 = sext i32 %33 to i64
  %35 = call i64 @llvm.expect.i64(i64 %34, i64 0)
  %36 = icmp ne i64 %35, 0
  br i1 %36, label %37, label %39

37:                                               ; preds = %28
  %38 = call i32 @log_if_error(i32 noundef -30780, ptr noundef @__func__.mdbx_del, i32 noundef 219)
  store i32 %38, ptr %5, align 4
  br label %128

39:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #6
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  %41 = call i32 @check_txn_rw(ptr noundef %40, i32 noundef 51)
  store i32 %41, ptr %10, align 4, !tbaa !9
  %42 = load i32, ptr %10, align 4, !tbaa !9
  %43 = icmp ne i32 %42, 0
  %44 = xor i1 %43, true
  %45 = xor i1 %44, true
  %46 = zext i1 %45 to i32
  %47 = sext i32 %46 to i64
  %48 = call i64 @llvm.expect.i64(i64 %47, i64 0)
  %49 = icmp ne i64 %48, 0
  br i1 %49, label %50, label %53

50:                                               ; preds = %39
  %51 = load i32, ptr %10, align 4, !tbaa !9
  %52 = call i32 @log_if_error(i32 noundef %51, ptr noundef @__func__.mdbx_del, i32 noundef 223)
  store i32 %52, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %127

53:                                               ; preds = %39
  call void @llvm.lifetime.start.p0(i64 824, ptr %12) #6
  %54 = getelementptr inbounds %struct.cursor_couple, ptr %12, i32 0, i32 0
  %55 = load ptr, ptr %6, align 8, !tbaa !5
  %56 = load i32, ptr %7, align 4, !tbaa !9
  %57 = zext i32 %56 to i64
  %58 = call i32 @cursor_init(ptr noundef %54, ptr noundef %55, i64 noundef %57)
  store i32 %58, ptr %10, align 4, !tbaa !9
  %59 = load i32, ptr %10, align 4, !tbaa !9
  %60 = icmp ne i32 %59, 0
  %61 = xor i1 %60, true
  %62 = xor i1 %61, true
  %63 = zext i1 %62 to i32
  %64 = sext i32 %63 to i64
  %65 = call i64 @llvm.expect.i64(i64 %64, i64 0)
  %66 = icmp ne i64 %65, 0
  br i1 %66, label %67, label %70

67:                                               ; preds = %53
  %68 = load i32, ptr %10, align 4, !tbaa !9
  %69 = call i32 @log_if_error(i32 noundef %68, ptr noundef @__func__.mdbx_del, i32 noundef 228)
  store i32 %69, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %126

70:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #6
  store i32 15, ptr %14, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #6
  store i32 128, ptr %15, align 4, !tbaa !9
  %71 = load ptr, ptr %9, align 8, !tbaa !5
  %72 = icmp ne ptr %71, null
  br i1 %72, label %73, label %75

73:                                               ; preds = %70
  %74 = load ptr, ptr %9, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %13, ptr align 8 %74, i64 16, i1 false), !tbaa.struct !11
  store ptr %13, ptr %9, align 8, !tbaa !5
  store i32 2, ptr %14, align 4, !tbaa !9
  store i32 0, ptr %15, align 4, !tbaa !9
  br label %75

75:                                               ; preds = %73, %70
  %76 = getelementptr inbounds %struct.cursor_couple, ptr %12, i32 0, i32 0
  %77 = load ptr, ptr %8, align 8, !tbaa !5
  %78 = load ptr, ptr %9, align 8, !tbaa !5
  %79 = load i32, ptr %14, align 4, !tbaa !9
  %80 = call i64 @cursor_seek(ptr noundef %76, ptr noundef %77, ptr noundef %78, i32 noundef %79)
  store i64 %80, ptr %16, align 4
  %81 = getelementptr inbounds %struct.cursor_set_result, ptr %16, i32 0, i32 0
  %82 = load i32, ptr %81, align 4, !tbaa !14
  store i32 %82, ptr %10, align 4, !tbaa !9
  %83 = load i32, ptr %10, align 4, !tbaa !9
  %84 = icmp ne i32 %83, 0
  %85 = xor i1 %84, true
  %86 = xor i1 %85, true
  %87 = zext i1 %86 to i32
  %88 = sext i32 %87 to i64
  %89 = call i64 @llvm.expect.i64(i64 %88, i64 0)
  %90 = icmp ne i64 %89, 0
  br i1 %90, label %91, label %94

91:                                               ; preds = %75
  %92 = load i32, ptr %10, align 4, !tbaa !9
  %93 = call i32 @log_if_error(i32 noundef %92, ptr noundef @__func__.mdbx_del, i32 noundef 241)
  store i32 %93, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %125

94:                                               ; preds = %75
  %95 = load ptr, ptr %6, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.MDBX_txn, ptr %95, i32 0, i32 14
  %97 = load ptr, ptr %96, align 8, !tbaa !17
  %98 = load i32, ptr %7, align 4, !tbaa !9
  %99 = zext i32 %98 to i64
  %100 = getelementptr inbounds ptr, ptr %97, i64 %99
  %101 = load ptr, ptr %100, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.cursor_couple, ptr %12, i32 0, i32 0
  %103 = getelementptr inbounds %struct.MDBX_cursor, ptr %102, i32 0, i32 11
  store ptr %101, ptr %103, align 8, !tbaa !22
  %104 = getelementptr inbounds %struct.cursor_couple, ptr %12, i32 0, i32 0
  %105 = load ptr, ptr %6, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.MDBX_txn, ptr %105, i32 0, i32 14
  %107 = load ptr, ptr %106, align 8, !tbaa !17
  %108 = load i32, ptr %7, align 4, !tbaa !9
  %109 = zext i32 %108 to i64
  %110 = getelementptr inbounds ptr, ptr %107, i64 %109
  store ptr %104, ptr %110, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.cursor_couple, ptr %12, i32 0, i32 0
  %112 = load i32, ptr %15, align 4, !tbaa !9
  %113 = call i32 @cursor_del(ptr noundef %111, i32 noundef %112)
  store i32 %113, ptr %10, align 4, !tbaa !9
  %114 = getelementptr inbounds %struct.cursor_couple, ptr %12, i32 0, i32 0
  %115 = getelementptr inbounds %struct.MDBX_cursor, ptr %114, i32 0, i32 11
  %116 = load ptr, ptr %115, align 8, !tbaa !22
  %117 = load ptr, ptr %6, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.MDBX_txn, ptr %117, i32 0, i32 14
  %119 = load ptr, ptr %118, align 8, !tbaa !17
  %120 = load i32, ptr %7, align 4, !tbaa !9
  %121 = zext i32 %120 to i64
  %122 = getelementptr inbounds ptr, ptr %119, i64 %121
  store ptr %116, ptr %122, align 8, !tbaa !5
  %123 = load i32, ptr %10, align 4, !tbaa !9
  %124 = call i32 @log_if_error(i32 noundef %123, ptr noundef @__func__.mdbx_del, i32 noundef 247)
  store i32 %124, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %125

125:                                              ; preds = %94, %91
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #6
  br label %126

126:                                              ; preds = %125, %67
  call void @llvm.lifetime.end.p0(i64 824, ptr %12) #6
  br label %127

127:                                              ; preds = %126, %50
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #6
  br label %128

128:                                              ; preds = %127, %37, %26
  %129 = load i32, ptr %5, align 4
  ret i32 %129
}

declare i32 @cursor_del(ptr noundef, i32 noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(none) }
attributes #1 = { inlinehint 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 #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { "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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{i64 0, i64 8, !5, i64 8, i64 8, !12}
!12 = !{!13, !13, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!15, !10, i64 0}
!15 = !{!"cursor_set_result", !10, i64 0, !16, i64 4}
!16 = !{!"_Bool", !7, i64 0}
!17 = !{!18, !6, i64 120}
!18 = !{!"MDBX_txn", !10, i64 0, !10, i64 4, !13, i64 8, !13, i64 16, !6, i64 24, !6, i64 32, !19, i64 40, !13, i64 64, !13, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !21, i64 128, !6, i64 160, !7, i64 168}
!19 = !{!"geo", !20, i64 0, !20, i64 2, !10, i64 4, !10, i64 8, !7, i64 12, !7, i64 16}
!20 = !{!"short", !7, i64 0}
!21 = !{!"MDBX_canary", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24}
!22 = !{!23, !6, i64 368}
!23 = !{!"cursor_couple", !24, i64 0, !6, i64 384, !25, i64 392}
!24 = !{!"MDBX_cursor", !10, i64 0, !7, i64 4, !7, i64 6, !7, i64 7, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !7, i64 48, !7, i64 304, !6, i64 368, !6, i64 376}
!25 = !{!"inner_cursor", !24, i64 0, !26, i64 384}
!26 = !{!"tree", !20, i64 0, !20, i64 2, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !13, i64 24, !13, i64 32, !13, 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"

%struct.cursor_couple = type { %struct.MDBX_cursor, ptr, %struct.inner_cursor }
%struct.MDBX_cursor = type { i32, %union.anon, i8, i8, ptr, ptr, ptr, ptr, ptr, [32 x ptr], [32 x i16], ptr, ptr }
%union.anon = type { i16 }
%struct.inner_cursor = type { %struct.MDBX_cursor, %struct.tree }
%struct.tree = type { i16, i16, i32, i32, i32, i32, i32, i64, i64, i64 }
%struct.iovec = type { ptr, i64 }

@__func__.mdbx_del = external hidden unnamed_addr constant [9 x i8], align 1

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @log_if_error(i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

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

declare i32 @cursor_init(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

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

; 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) #3

declare i64 @cursor_seek(ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @check_txn_rw(ptr noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local i32 @mdbx_del(ptr noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef readonly %3) local_unnamed_addr #4 {
  %5 = alloca %struct.cursor_couple, align 8
  %6 = alloca %struct.iovec, align 8
  %.not = icmp eq ptr %2, null
  br i1 %.not, label %7, label %9, !prof !5

7:                                                ; preds = %4
  %8 = tail call i32 @log_if_error(i32 noundef 22, ptr noundef nonnull @__func__.mdbx_del, i32 noundef 216)
  br label %41

9:                                                ; preds = %4
  %10 = icmp eq i32 %1, 0
  br i1 %10, label %11, label %13, !prof !5

11:                                               ; preds = %9
  %12 = tail call i32 @log_if_error(i32 noundef -30780, ptr noundef nonnull @__func__.mdbx_del, i32 noundef 219)
  br label %41

13:                                               ; preds = %9
  %14 = tail call i32 @check_txn_rw(ptr noundef %0, i32 noundef 51)
  %.not32 = icmp eq i32 %14, 0
  br i1 %.not32, label %17, label %15, !prof !6

15:                                               ; preds = %13
  %16 = tail call i32 @log_if_error(i32 noundef %14, ptr noundef nonnull @__func__.mdbx_del, i32 noundef 223)
  br label %41

17:                                               ; preds = %13
  call void @llvm.lifetime.start.p0(i64 824, ptr nonnull %5) #5
  %18 = zext i32 %1 to i64
  %19 = call i32 @cursor_init(ptr noundef nonnull %5, ptr noundef %0, i64 noundef %18) #5
  %.not33 = icmp eq i32 %19, 0
  br i1 %.not33, label %22, label %20, !prof !6

20:                                               ; preds = %17
  %21 = call i32 @log_if_error(i32 noundef %19, ptr noundef nonnull @__func__.mdbx_del, i32 noundef 228)
  br label %40

22:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #5
  %.not34 = icmp eq ptr %3, null
  br i1 %.not34, label %24, label %23

23:                                               ; preds = %22
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) %3, i64 16, i1 false), !tbaa.struct !7
  br label %24

24:                                               ; preds = %23, %22
  %.026 = phi i32 [ 2, %23 ], [ 15, %22 ]
  %.025 = phi i32 [ 0, %23 ], [ 128, %22 ]
  %.024 = phi ptr [ %6, %23 ], [ null, %22 ]
  %25 = call i64 @cursor_seek(ptr noundef nonnull %5, ptr noundef nonnull %2, ptr noundef %.024, i32 noundef %.026) #5
  %.sroa.0.0.extract.trunc = trunc i64 %25 to i32
  %.not35 = icmp eq i32 %.sroa.0.0.extract.trunc, 0
  br i1 %.not35, label %28, label %26, !prof !6

26:                                               ; preds = %24
  %27 = call i32 @log_if_error(i32 noundef %.sroa.0.0.extract.trunc, ptr noundef nonnull @__func__.mdbx_del, i32 noundef 241)
  br label %39

28:                                               ; preds = %24
  %29 = getelementptr inbounds i8, ptr %0, i64 120
  %30 = load ptr, ptr %29, align 8, !tbaa !14
  %31 = getelementptr inbounds ptr, ptr %30, i64 %18
  %32 = load ptr, ptr %31, align 8, !tbaa !8
  %33 = getelementptr inbounds i8, ptr %5, i64 368
  store ptr %32, ptr %33, align 8, !tbaa !20
  store ptr %5, ptr %31, align 8, !tbaa !8
  %34 = call i32 @cursor_del(ptr noundef nonnull %5, i32 noundef %.025) #5
  %35 = load ptr, ptr %33, align 8, !tbaa !20
  %36 = load ptr, ptr %29, align 8, !tbaa !14
  %37 = getelementptr inbounds ptr, ptr %36, i64 %18
  store ptr %35, ptr %37, align 8, !tbaa !8
  %38 = call i32 @log_if_error(i32 noundef %34, ptr noundef nonnull @__func__.mdbx_del, i32 noundef 247)
  br label %39

39:                                               ; preds = %28, %26
  %.0 = phi i32 [ %27, %26 ], [ %38, %28 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  br label %40

40:                                               ; preds = %39, %20
  %.1 = phi i32 [ %21, %20 ], [ %.0, %39 ]
  call void @llvm.lifetime.end.p0(i64 824, ptr nonnull %5) #5
  br label %41

41:                                               ; preds = %15, %40, %11, %7
  %.3 = phi i32 [ %8, %7 ], [ %12, %11 ], [ %16, %15 ], [ %.1, %40 ]
  ret i32 %.3
}

declare i32 @cursor_del(ptr noundef, i32 noundef) local_unnamed_addr #2

attributes #0 = { inlinehint 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 = { 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 = !{!"branch_weights", !"expected", i32 1, i32 2000}
!6 = !{!"branch_weights", !"expected", i32 2000, i32 1}
!7 = !{i64 0, i64 8, !8, i64 8, i64 8, !12}
!8 = !{!9, !9, i64 0}
!9 = !{!"any pointer", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C/C++ TBAA"}
!12 = !{!13, !13, i64 0}
!13 = !{!"long", !10, i64 0}
!14 = !{!15, !9, i64 120}
!15 = !{!"MDBX_txn", !16, i64 0, !16, i64 4, !13, i64 8, !13, i64 16, !9, i64 24, !9, i64 32, !17, i64 40, !13, i64 64, !13, i64 72, !9, i64 80, !9, i64 88, !9, i64 96, !9, i64 104, !9, i64 112, !9, i64 120, !19, i64 128, !9, i64 160, !10, i64 168}
!16 = !{!"int", !10, i64 0}
!17 = !{!"geo", !18, i64 0, !18, i64 2, !16, i64 4, !16, i64 8, !10, i64 12, !10, i64 16}
!18 = !{!"short", !10, i64 0}
!19 = !{!"MDBX_canary", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24}
!20 = !{!21, !9, i64 368}
!21 = !{!"cursor_couple", !22, i64 0, !9, i64 384, !23, i64 392}
!22 = !{!"MDBX_cursor", !16, i64 0, !10, i64 4, !10, i64 6, !10, i64 7, !9, i64 8, !9, i64 16, !9, i64 24, !9, i64 32, !9, i64 40, !10, i64 48, !10, i64 304, !9, i64 368, !9, i64 376}
!23 = !{!"inner_cursor", !22, i64 0, !24, i64 384}
!24 = !{!"tree", !18, i64 0, !18, i64 2, !16, i64 4, !16, i64 8, !16, i64 12, !16, i64 16, !16, i64 20, !13, i64 24, !13, i64 32, !13, i64 40}


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