; LLVM IR from erthink/libmdbx :: src (mvcc-readers)

; 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.MDBX_env = type { %union.mdbx_atomic_uint32_t, i32, i32, %struct.osal_mmap, i32, i32, %struct.osal_mmap, ptr, i16, i16, i16, i16, i16, i16, %union.mdbx_atomic_uint32_t, i8, i8, i16, i32, i32, i32, i32, %struct.anon.1, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, ptr, ptr, i64, %struct.anon.2, %struct.anon.6, i8, ptr, ptr, ptr, %struct.anon.7, %union.pthread_mutex_t, i32, i32, ptr, %struct.osal_ioring, %union.pthread_mutex_t, [71 x %union.mdbx_atomic_uint64_t] }
%struct.osal_mmap = type { %union.anon, i32, i64, i64, i64 }
%union.anon = type { ptr }
%union.mdbx_atomic_uint32_t = type { i32 }
%struct.anon.1 = type { ptr, ptr, ptr, ptr }
%struct.anon.2 = type { i32, i32, i32, i32, i64, i8, i8, i8, i8, i32, i32, i8, i8, i8, %struct.anon.3, %union.anon.4 }
%struct.anon.3 = type { i16, i16, i16, i16 }
%union.anon.4 = type { i32 }
%struct.anon.6 = type { i64, i64, i64, i64, i64 }
%struct.anon.7 = type { i64 }
%struct.osal_ioring = type { i32, i32, i32, ptr, ptr, ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%union.mdbx_atomic_uint64_t = type { i64 }
%struct.shared_lck = type { i64, i32, %union.mdbx_atomic_uint32_t, %union.mdbx_atomic_uint32_t, %union.mdbx_atomic_uint32_t, %union.mdbx_atomic_uint64_t, %union.mdbx_atomic_uint64_t, [2 x %union.mdbx_atomic_uint32_t], [16 x i8], %struct.pgops, [16 x i8], %union.pthread_mutex_t, %union.mdbx_atomic_uint64_t, %union.mdbx_atomic_uint64_t, %union.mdbx_atomic_uint64_t, %union.mdbx_atomic_uint64_t, %union.mdbx_atomic_uint32_t, i32, %struct.anon.10, %union.pthread_mutex_t, %union.mdbx_atomic_uint32_t, %union.mdbx_atomic_uint32_t, [16 x i8], [0 x %struct.reader_slot] }
%struct.pgops = type { %union.mdbx_atomic_uint64_t, %union.mdbx_atomic_uint64_t, %union.mdbx_atomic_uint64_t, %union.mdbx_atomic_uint64_t, %union.mdbx_atomic_uint64_t, %union.mdbx_atomic_uint64_t, %union.mdbx_atomic_uint64_t, %union.mdbx_atomic_uint64_t, %union.mdbx_atomic_uint64_t, %union.mdbx_atomic_uint64_t, %union.mdbx_atomic_uint64_t, %union.mdbx_atomic_uint64_t, %union.mdbx_atomic_uint32_t, %union.mdbx_atomic_uint32_t, %struct.anon.8 }
%struct.anon.8 = type { %struct.gc_prof_stat, %struct.gc_prof_stat, i32, i32, i32, i32, i32 }
%struct.gc_prof_stat = type { i64, i64, i32, i32, i32, i32, %struct.anon.9 }
%struct.anon.9 = type { i64, i64, i32 }
%struct.anon.10 = type { [4 x i32], [4 x i64] }
%struct.reader_slot = type { %union.mdbx_atomic_uint64_t, %union.mdbx_atomic_uint64_t, %union.mdbx_atomic_uint32_t, %union.mdbx_atomic_uint32_t, %union.mdbx_atomic_uint64_t }
%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.13 }
%struct.geo = type { i16, i16, i32, i32, %union.anon.11, %union.anon.12 }
%union.anon.11 = type { i32 }
%union.anon.12 = type { i32 }
%struct.MDBX_canary = type { i64, i64, i64, i64 }
%union.anon.13 = type { %struct.anon.15 }
%struct.anon.15 = type { %struct.troika, ptr, %struct.anon.16, i8, i32, i32, i64, ptr, ptr, ptr, i64, %union.anon.17 }
%struct.troika = type { i8, i8, i8, i8, i32, [3 x i64] }
%struct.anon.16 = type { %struct.MDBX_rkl, i64, %struct.MDBX_rkl }
%struct.MDBX_rkl = type { i64, i64, i32, i32, ptr, [12 x i64] }
%union.anon.17 = type { %struct.anon.18 }
%struct.anon.18 = type { i64, ptr }

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

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

; Function Attrs: alwaysinline nounwind uwtable
declare hidden i32 @atomic_load32(ptr noundef, i32 noundef) #2

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

; Function Attrs: alwaysinline nounwind uwtable
declare hidden i64 @safe64_read(ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local i32 @mvcc_snapshot_largest(ptr noundef %0, i32 noundef %1) #3 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i32 %1, ptr %4, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %11 = load ptr, ptr %3, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.MDBX_env, ptr %11, i32 0, i32 6
  %13 = getelementptr inbounds %struct.osal_mmap, ptr %12, i32 0, i32 0
  %14 = load ptr, ptr %13, align 8, !tbaa !11
  store ptr %14, ptr %5, align 8, !tbaa !5
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  %16 = icmp ne ptr %15, null
  %17 = xor i1 %16, true
  %18 = xor i1 %17, true
  %19 = zext i1 %18 to i32
  %20 = sext i32 %19 to i64
  %21 = call i64 @llvm.expect.i64(i64 %20, i64 1)
  %22 = icmp ne i64 %21, 0
  br i1 %22, label %23, label %106

23:                                               ; preds = %2
  br label %24

24:                                               ; preds = %103, %23
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct.shared_lck, ptr %25, i32 0, i32 20
  %27 = call i32 @atomic_load32(ptr noundef %26, i32 noundef 1)
  %28 = zext i32 %27 to i64
  store i64 %28, ptr %6, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  store i64 0, ptr %7, align 8, !tbaa !12
  br label %29

29:                                               ; preds = %100, %24
  %30 = load i64, ptr %7, align 8, !tbaa !12
  %31 = load i64, ptr %6, align 8, !tbaa !12
  %32 = icmp ult i64 %30, %31
  br i1 %32, label %34, label %33

33:                                               ; preds = %29
  store i32 3, ptr %8, align 4
  br label %103

34:                                               ; preds = %29
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.shared_lck, ptr %35, i32 0, i32 23
  %37 = load i64, ptr %7, align 8, !tbaa !12
  %38 = getelementptr inbounds [0 x %struct.reader_slot], ptr %36, i64 0, i64 %37
  %39 = getelementptr inbounds %struct.reader_slot, ptr %38, i32 0, i32 2
  %40 = call i32 @atomic_load32(ptr noundef %39, i32 noundef 1)
  %41 = icmp ne i32 %40, 0
  br i1 %41, label %42, label %99

42:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.shared_lck, ptr %43, i32 0, i32 23
  %45 = load i64, ptr %7, align 8, !tbaa !12
  %46 = getelementptr inbounds [0 x %struct.reader_slot], ptr %44, i64 0, i64 %45
  %47 = getelementptr inbounds %struct.reader_slot, ptr %46, i32 0, i32 3
  %48 = call i32 @atomic_load32(ptr noundef %47, i32 noundef 0)
  store i32 %48, ptr %9, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.shared_lck, ptr %49, i32 0, i32 23
  %51 = load i64, ptr %7, align 8, !tbaa !12
  %52 = getelementptr inbounds [0 x %struct.reader_slot], ptr %50, i64 0, i64 %51
  %53 = getelementptr inbounds %struct.reader_slot, ptr %52, i32 0, i32 0
  %54 = call i64 @safe64_read(ptr noundef %53)
  store i64 %54, ptr %10, align 8, !tbaa !12
  %55 = load i32, ptr %9, align 4, !tbaa !9
  %56 = load ptr, ptr %5, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.shared_lck, ptr %56, i32 0, i32 23
  %58 = load i64, ptr %7, align 8, !tbaa !12
  %59 = getelementptr inbounds [0 x %struct.reader_slot], ptr %57, i64 0, i64 %58
  %60 = getelementptr inbounds %struct.reader_slot, ptr %59, i32 0, i32 3
  %61 = call i32 @atomic_load32(ptr noundef %60, i32 noundef 1)
  %62 = icmp ne i32 %55, %61
  br i1 %62, label %72, label %63

63:                                               ; preds = %42
  %64 = load i64, ptr %10, align 8, !tbaa !12
  %65 = load ptr, ptr %5, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.shared_lck, ptr %65, i32 0, i32 23
  %67 = load i64, ptr %7, align 8, !tbaa !12
  %68 = getelementptr inbounds [0 x %struct.reader_slot], ptr %66, i64 0, i64 %67
  %69 = getelementptr inbounds %struct.reader_slot, ptr %68, i32 0, i32 0
  %70 = call i64 @safe64_read(ptr noundef %69)
  %71 = icmp ne i64 %64, %70
  br label %72

72:                                               ; preds = %63, %42
  %73 = phi i1 [ true, %42 ], [ %71, %63 ]
  %74 = xor i1 %73, true
  %75 = xor i1 %74, true
  %76 = zext i1 %75 to i32
  %77 = sext i32 %76 to i64
  %78 = call i64 @llvm.expect.i64(i64 %77, i64 0)
  %79 = icmp ne i64 %78, 0
  br i1 %79, label %80, label %81

80:                                               ; preds = %72
  store i32 2, ptr %8, align 4
  br label %96

81:                                               ; preds = %72
  %82 = load i32, ptr %4, align 4, !tbaa !9
  %83 = load i32, ptr %9, align 4, !tbaa !9
  %84 = icmp ult i32 %82, %83
  br i1 %84, label %85, label %95

85:                                               ; preds = %81
  %86 = load i64, ptr %10, align 8, !tbaa !12
  %87 = load ptr, ptr %3, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.MDBX_env, ptr %87, i32 0, i32 24
  %89 = load ptr, ptr %88, align 8, !tbaa !14
  %90 = getelementptr inbounds %struct.MDBX_txn, ptr %89, i32 0, i32 7
  %91 = load i64, ptr %90, align 8, !tbaa !25
  %92 = icmp ule i64 %86, %91
  br i1 %92, label %93, label %95

93:                                               ; preds = %85
  %94 = load i32, ptr %9, align 4, !tbaa !9
  store i32 %94, ptr %4, align 4, !tbaa !9
  br label %95

95:                                               ; preds = %93, %85, %81
  store i32 0, ptr %8, align 4
  br label %96

96:                                               ; preds = %95, %80
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  %97 = load i32, ptr %8, align 4
  switch i32 %97, label %103 [
    i32 0, label %98
  ]

98:                                               ; preds = %96
  br label %99

99:                                               ; preds = %98, %34
  br label %100

100:                                              ; preds = %99
  %101 = load i64, ptr %7, align 8, !tbaa !12
  %102 = add i64 %101, 1
  store i64 %102, ptr %7, align 8, !tbaa !12
  br label %29, !llvm.loop !29

103:                                              ; preds = %96, %33
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  %104 = load i32, ptr %8, align 4
  switch i32 %104, label %108 [
    i32 3, label %105
    i32 2, label %24
  ]

105:                                              ; preds = %103
  br label %106

106:                                              ; preds = %105, %2
  %107 = load i32, ptr %4, align 4, !tbaa !9
  store i32 1, ptr %8, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  ret i32 %107

108:                                              ; preds = %103
  unreachable
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(none) }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { alwaysinline 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 = { 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 = { 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 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!15, !6, i64 192}
!15 = !{!"MDBX_env", !7, i64 0, !10, i64 4, !10, i64 8, !16, i64 16, !10, i64 56, !10, i64 60, !16, i64 64, !6, i64 104, !17, i64 112, !17, i64 114, !17, i64 116, !17, i64 118, !17, i64 120, !17, i64 122, !7, i64 124, !7, i64 128, !7, i64 129, !17, i64 130, !10, i64 132, !10, i64 136, !10, i64 140, !10, i64 144, !18, i64 152, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !10, i64 224, !10, i64 228, !10, i64 232, !6, i64 240, !6, i64 248, !13, i64 256, !19, i64 264, !22, i64 320, !20, i64 360, !6, i64 368, !6, i64 376, !6, i64 384, !23, i64 392, !7, i64 400, !10, i64 440, !10, i64 444, !6, i64 448, !24, i64 456, !7, i64 496, !7, i64 536}
!16 = !{!"osal_mmap", !7, i64 0, !10, i64 8, !13, i64 16, !13, i64 24, !13, i64 32}
!17 = !{!"short", !7, i64 0}
!18 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!19 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !13, i64 16, !7, i64 24, !7, i64 25, !7, i64 26, !7, i64 27, !10, i64 28, !10, i64 32, !20, i64 36, !20, i64 37, !20, i64 38, !21, i64 40, !7, i64 48}
!20 = !{!"_Bool", !7, i64 0}
!21 = !{!"", !17, i64 0, !17, i64 2, !17, i64 4, !17, i64 6}
!22 = !{!"", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24, !13, i64 32}
!23 = !{!"", !13, i64 0}
!24 = !{!"osal_ioring", !10, i64 0, !10, i64 4, !10, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!25 = !{!26, !13, i64 64}
!26 = !{!"MDBX_txn", !10, i64 0, !10, i64 4, !13, i64 8, !13, i64 16, !6, i64 24, !6, i64 32, !27, 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, !28, i64 128, !6, i64 160, !7, i64 168}
!27 = !{!"geo", !17, i64 0, !17, i64 2, !10, i64 4, !10, i64 8, !7, i64 12, !7, i64 16}
!28 = !{!"MDBX_canary", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}


; 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.reader_slot = type { %union.mdbx_atomic_uint64_t, %union.mdbx_atomic_uint64_t, %union.mdbx_atomic_uint32_t, %union.mdbx_atomic_uint32_t, %union.mdbx_atomic_uint64_t }
%union.mdbx_atomic_uint32_t = type { i32 }
%union.mdbx_atomic_uint64_t = type { i64 }

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

; Function Attrs: alwaysinline nounwind uwtable
declare hidden i64 @safe64_read(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local i32 @mvcc_snapshot_largest(ptr nocapture noundef readonly %0, i32 noundef %1) local_unnamed_addr #1 {
  %3 = getelementptr inbounds i8, ptr %0, i64 64
  %4 = load ptr, ptr %3, align 8, !tbaa !5
  %.not = icmp eq ptr %4, null
  br i1 %.not, label %.thread35, label %.preheader, !prof !8

.preheader:                                       ; preds = %2
  %5 = getelementptr inbounds i8, ptr %4, i64 488
  %6 = tail call i32 @atomic_load32(ptr noundef nonnull %5, i32 noundef 1)
  %.not48 = icmp eq i32 %6, 0
  br i1 %.not48, label %.thread35, label %.lr.ph.lr.ph

.lr.ph.lr.ph:                                     ; preds = %.preheader
  %7 = getelementptr inbounds i8, ptr %4, i64 512
  %8 = getelementptr inbounds i8, ptr %0, i64 192
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.lr.ph, %.thread
  %.in = phi i32 [ %6, %.lr.ph.lr.ph ], [ %28, %.thread ]
  %.046 = phi i32 [ %1, %.lr.ph.lr.ph ], [ %.143, %.thread ]
  %umax = zext i32 %.in to i64
  br label %9

9:                                                ; preds = %.lr.ph, %26
  %.143 = phi i32 [ %.046, %.lr.ph ], [ %.4, %26 ]
  %.02542 = phi i64 [ 0, %.lr.ph ], [ %27, %26 ]
  %10 = getelementptr inbounds [0 x %struct.reader_slot], ptr %7, i64 0, i64 %.02542
  %11 = getelementptr inbounds i8, ptr %10, i64 16
  %12 = tail call i32 @atomic_load32(ptr noundef nonnull %11, i32 noundef 1)
  %.not29 = icmp eq i32 %12, 0
  br i1 %.not29, label %26, label %13

13:                                               ; preds = %9
  %14 = getelementptr inbounds i8, ptr %10, i64 20
  %15 = tail call i32 @atomic_load32(ptr noundef nonnull %14, i32 noundef 0)
  %16 = tail call i64 @safe64_read(ptr noundef nonnull %10)
  %17 = tail call i32 @atomic_load32(ptr noundef nonnull %14, i32 noundef 1)
  %.not30 = icmp eq i32 %15, %17
  br i1 %.not30, label %18, label %.thread, !prof !9

18:                                               ; preds = %13
  %19 = tail call i64 @safe64_read(ptr noundef nonnull %10)
  %.not40 = icmp eq i64 %16, %19
  br i1 %.not40, label %20, label %.thread, !prof !10

20:                                               ; preds = %18
  %21 = icmp ult i32 %.143, %15
  br i1 %21, label %22, label %26

22:                                               ; preds = %20
  %23 = load ptr, ptr %8, align 8, !tbaa !11
  %24 = getelementptr inbounds i8, ptr %23, i64 64
  %25 = load i64, ptr %24, align 8, !tbaa !25
  %.not31 = icmp ugt i64 %16, %25
  %spec.select = select i1 %.not31, i32 %.143, i32 %15
  br label %26

26:                                               ; preds = %20, %22, %9
  %.4 = phi i32 [ %.143, %9 ], [ %.143, %20 ], [ %spec.select, %22 ]
  %27 = add nuw nsw i64 %.02542, 1
  %exitcond.not = icmp eq i64 %27, %umax
  br i1 %exitcond.not, label %.thread35, label %9, !llvm.loop !29

.thread:                                          ; preds = %13, %18
  %28 = tail call i32 @atomic_load32(ptr noundef nonnull %5, i32 noundef 1)
  %.not49 = icmp eq i32 %28, 0
  br i1 %.not49, label %.thread35, label %.lr.ph

.thread35:                                        ; preds = %.thread, %26, %.preheader, %2
  %.6 = phi i32 [ %1, %2 ], [ %1, %.preheader ], [ %.4, %26 ], [ %.143, %.thread ]
  ret i32 %.6
}

attributes #0 = { alwaysinline 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 = { 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" }

!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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!"branch_weights", !"expected", i32 1, i32 2000}
!9 = !{!"branch_weights", !"expected", i32 2000, i32 1}
!10 = !{!"branch_weights", !"expected", i32 -2147483648, i32 0}
!11 = !{!12, !16, i64 192}
!12 = !{!"MDBX_env", !6, i64 0, !13, i64 4, !13, i64 8, !14, i64 16, !13, i64 56, !13, i64 60, !14, i64 64, !16, i64 104, !17, i64 112, !17, i64 114, !17, i64 116, !17, i64 118, !17, i64 120, !17, i64 122, !6, i64 124, !6, i64 128, !6, i64 129, !17, i64 130, !13, i64 132, !13, i64 136, !13, i64 140, !13, i64 144, !18, i64 152, !16, i64 184, !16, i64 192, !16, i64 200, !16, i64 208, !16, i64 216, !13, i64 224, !13, i64 228, !13, i64 232, !16, i64 240, !16, i64 248, !15, i64 256, !19, i64 264, !22, i64 320, !20, i64 360, !16, i64 368, !16, i64 376, !16, i64 384, !23, i64 392, !6, i64 400, !13, i64 440, !13, i64 444, !16, i64 448, !24, i64 456, !6, i64 496, !6, i64 536}
!13 = !{!"int", !6, i64 0}
!14 = !{!"osal_mmap", !6, i64 0, !13, i64 8, !15, i64 16, !15, i64 24, !15, i64 32}
!15 = !{!"long", !6, i64 0}
!16 = !{!"any pointer", !6, i64 0}
!17 = !{!"short", !6, i64 0}
!18 = !{!"", !16, i64 0, !16, i64 8, !16, i64 16, !16, i64 24}
!19 = !{!"", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !15, i64 16, !6, i64 24, !6, i64 25, !6, i64 26, !6, i64 27, !13, i64 28, !13, i64 32, !20, i64 36, !20, i64 37, !20, i64 38, !21, i64 40, !6, i64 48}
!20 = !{!"_Bool", !6, i64 0}
!21 = !{!"", !17, i64 0, !17, i64 2, !17, i64 4, !17, i64 6}
!22 = !{!"", !15, i64 0, !15, i64 8, !15, i64 16, !15, i64 24, !15, i64 32}
!23 = !{!"", !15, i64 0}
!24 = !{!"osal_ioring", !13, i64 0, !13, i64 4, !13, i64 8, !16, i64 16, !16, i64 24, !16, i64 32}
!25 = !{!26, !15, i64 64}
!26 = !{!"MDBX_txn", !13, i64 0, !13, i64 4, !15, i64 8, !15, i64 16, !16, i64 24, !16, i64 32, !27, i64 40, !15, i64 64, !15, i64 72, !16, i64 80, !16, i64 88, !16, i64 96, !16, i64 104, !16, i64 112, !16, i64 120, !28, i64 128, !16, i64 160, !6, i64 168}
!27 = !{!"geo", !17, i64 0, !17, i64 2, !13, i64 4, !13, i64 8, !6, i64 12, !6, i64 16}
!28 = !{!"MDBX_canary", !15, i64 0, !15, i64 8, !15, i64 16, !15, i64 24}
!29 = distinct !{!29, !30}
!30 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LowerExpectIntrinsicPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass