; LLVM IR from erthink/libmdbx :: src (meta)

; 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.libmdbx_globals = type { %union.bin128, i32, i32, i8, i8, i8, i8, i32, %union.logger_union, %union.pthread_mutex_t, i64, ptr }
%union.bin128 = type { %struct.anon }
%struct.anon = type { i64, i64 }
%union.logger_union = type { 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 }
%struct.meta_ptr = type { i64, %union.anon, i64 }
%union.anon = type { ptr }
%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.2, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, ptr, ptr, i64, %struct.anon.3, %struct.anon.7, i8, ptr, ptr, ptr, %struct.anon.8, %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.1, i32, i64, i64, i64 }
%union.anon.1 = type { ptr }
%union.mdbx_atomic_uint32_t = type { i32 }
%struct.anon.2 = type { ptr, ptr, ptr, ptr }
%struct.anon.3 = type { i32, i32, i32, i32, i64, i8, i8, i8, i8, i32, i32, i8, i8, i8, %struct.anon.4, %union.anon.5 }
%struct.anon.4 = type { i16, i16, i16, i16 }
%union.anon.5 = type { i32 }
%struct.anon.7 = type { i64, i64, i64, i64, i64 }
%struct.anon.8 = type { i64 }
%struct.osal_ioring = type { i32, i32, i32, ptr, 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.11, %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.9 }
%struct.anon.9 = 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.10 }
%struct.anon.10 = type { i64, i64, i32 }
%struct.anon.11 = 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 }

@globals = external global %struct.libmdbx_globals, align 8
@.str.11 = external hidden unnamed_addr constant [78 x i8], align 1
@__func__.meta_sync = external hidden unnamed_addr constant [10 x i8], align 1

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

; Function Attrs: noreturn
declare void @mdbx_assert_fail(ptr noundef, ptr 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

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

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

; Function Attrs: nounwind willreturn memory(read)
declare i64 @pgno_align2os_bytes(ptr noundef, i64 noundef) #4

declare i32 @osal_fsync(i32 noundef, i32 noundef) #3

; Function Attrs: nounwind uwtable
define dso_local i32 @meta_sync(ptr noundef %0, ptr noundef byval(%struct.meta_ptr) align 8 %1) #5 {
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  br label %5

5:                                                ; preds = %2
  %6 = load i8, ptr getelementptr inbounds (%struct.libmdbx_globals, ptr @globals, i32 0, i32 4), align 1, !tbaa !9
  %7 = zext i8 %6 to i32
  %8 = and i32 %7, 1
  %9 = icmp ne i32 %8, 0
  %10 = xor i1 %9, true
  %11 = xor i1 %10, true
  %12 = zext i1 %11 to i32
  %13 = sext i32 %12 to i64
  %14 = call i64 @llvm.expect.i64(i64 %13, i64 1)
  %15 = icmp ne i64 %14, 0
  br i1 %15, label %16, label %38

16:                                               ; preds = %5
  br label %17

17:                                               ; preds = %16
  %18 = load ptr, ptr %3, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.MDBX_env, ptr %18, i32 0, i32 7
  %20 = load ptr, ptr %19, align 8, !tbaa !14
  %21 = getelementptr inbounds %struct.shared_lck, ptr %20, i32 0, i32 4
  %22 = call i32 @atomic_load32(ptr noundef %21, i32 noundef 0)
  %23 = getelementptr inbounds %struct.meta_ptr, ptr %1, i32 0, i32 0
  %24 = load i64, ptr %23, align 8, !tbaa !24
  %25 = trunc i64 %24 to i32
  %26 = icmp ne i32 %22, %25
  %27 = xor i1 %26, true
  %28 = xor i1 %27, true
  %29 = xor i1 %28, true
  %30 = zext i1 %29 to i32
  %31 = sext i32 %30 to i64
  %32 = call i64 @llvm.expect.i64(i64 %31, i64 0)
  %33 = icmp ne i64 %32, 0
  br i1 %33, label %34, label %36

34:                                               ; preds = %17
  %35 = load ptr, ptr %3, align 8, !tbaa !5
  call void @mdbx_assert_fail(ptr noundef %35, ptr noundef @.str.11, ptr noundef @__func__.meta_sync, i32 noundef 262) #7
  unreachable

36:                                               ; preds = %17
  br label %37

37:                                               ; preds = %36
  br label %38

38:                                               ; preds = %37, %5
  br label %39

39:                                               ; preds = %38
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #8
  store i32 -1, ptr %4, align 4, !tbaa !26
  %40 = load ptr, ptr %3, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.MDBX_env, ptr %40, i32 0, i32 1
  %42 = load i32, ptr %41, align 4, !tbaa !27
  %43 = and i32 %42, 524288
  %44 = icmp ne i32 %43, 0
  br i1 %44, label %45, label %58

45:                                               ; preds = %39
  %46 = load ptr, ptr %3, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.MDBX_env, ptr %46, i32 0, i32 3
  %48 = load ptr, ptr %3, align 8, !tbaa !5
  %49 = call i64 @pgno_align2os_bytes(ptr noundef %48, i64 noundef 3) #9
  %50 = call i32 @osal_msync(ptr noundef %47, i64 noundef 0, i64 noundef %49, i32 noundef 10)
  store i32 %50, ptr %4, align 4, !tbaa !26
  %51 = load ptr, ptr %3, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.MDBX_env, ptr %51, i32 0, i32 7
  %53 = load ptr, ptr %52, align 8, !tbaa !14
  %54 = getelementptr inbounds %struct.shared_lck, ptr %53, i32 0, i32 9
  %55 = getelementptr inbounds %struct.pgops, ptr %54, i32 0, i32 8
  %56 = load volatile i64, ptr %55, align 64, !tbaa !28
  %57 = add i64 %56, 1
  store volatile i64 %57, ptr %55, align 64, !tbaa !28
  br label %71

58:                                               ; preds = %39
  %59 = load ptr, ptr %3, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.MDBX_env, ptr %59, i32 0, i32 3
  %61 = getelementptr inbounds %struct.osal_mmap, ptr %60, i32 0, i32 1
  %62 = load i32, ptr %61, align 8, !tbaa !29
  %63 = call i32 @osal_fsync(i32 noundef %62, i32 noundef 10)
  store i32 %63, ptr %4, align 4, !tbaa !26
  %64 = load ptr, ptr %3, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.MDBX_env, ptr %64, i32 0, i32 7
  %66 = load ptr, ptr %65, align 8, !tbaa !14
  %67 = getelementptr inbounds %struct.shared_lck, ptr %66, i32 0, i32 9
  %68 = getelementptr inbounds %struct.pgops, ptr %67, i32 0, i32 9
  %69 = load volatile i64, ptr %68, align 8, !tbaa !28
  %70 = add i64 %69, 1
  store volatile i64 %70, ptr %68, align 8, !tbaa !28
  br label %71

71:                                               ; preds = %58, %45
  %72 = load i32, ptr %4, align 4, !tbaa !26
  %73 = icmp eq i32 %72, 0
  %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 1)
  %79 = icmp ne i64 %78, 0
  br i1 %79, label %80, label %88

80:                                               ; preds = %71
  %81 = getelementptr inbounds %struct.meta_ptr, ptr %1, i32 0, i32 0
  %82 = load i64, ptr %81, align 8, !tbaa !24
  %83 = trunc i64 %82 to i32
  %84 = load ptr, ptr %3, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.MDBX_env, ptr %84, i32 0, i32 7
  %86 = load ptr, ptr %85, align 8, !tbaa !14
  %87 = getelementptr inbounds %struct.shared_lck, ptr %86, i32 0, i32 4
  store volatile i32 %83, ptr %87, align 4, !tbaa !28
  br label %88

88:                                               ; preds = %80, %71
  %89 = load i32, ptr %4, align 4, !tbaa !26
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #8
  ret i32 %89
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(none) }
attributes #1 = { noreturn "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 = { nounwind willreturn memory(read) "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 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 = { 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 #7 = { noreturn }
attributes #8 = { nounwind }
attributes #9 = { nounwind willreturn memory(read) }

!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, !7, i64 25}
!10 = !{!"libmdbx_globals", !7, i64 0, !11, i64 16, !11, i64 20, !7, i64 24, !7, i64 25, !7, i64 26, !12, i64 27, !11, i64 28, !7, i64 32, !7, i64 40, !13, i64 80, !6, i64 88}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_Bool", !7, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!15, !6, i64 104}
!15 = !{!"MDBX_env", !7, i64 0, !11, i64 4, !11, i64 8, !16, i64 16, !11, i64 56, !11, 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, !11, i64 132, !11, i64 136, !11, i64 140, !11, i64 144, !18, i64 152, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !11, i64 224, !11, i64 228, !11, i64 232, !6, i64 240, !6, i64 248, !13, i64 256, !19, i64 264, !21, i64 320, !12, i64 360, !6, i64 368, !6, i64 376, !6, i64 384, !22, i64 392, !7, i64 400, !11, i64 440, !11, i64 444, !6, i64 448, !23, i64 456, !7, i64 496, !7, i64 536}
!16 = !{!"osal_mmap", !7, i64 0, !11, 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 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !13, i64 16, !7, i64 24, !7, i64 25, !7, i64 26, !7, i64 27, !11, i64 28, !11, i64 32, !12, i64 36, !12, i64 37, !12, i64 38, !20, i64 40, !7, i64 48}
!20 = !{!"", !17, i64 0, !17, i64 2, !17, i64 4, !17, i64 6}
!21 = !{!"", !13, i64 0, !13, i64 8, !13, i64 16, !13, i64 24, !13, i64 32}
!22 = !{!"", !13, i64 0}
!23 = !{!"osal_ioring", !11, i64 0, !11, i64 4, !11, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!24 = !{!25, !13, i64 0}
!25 = !{!"meta_ptr", !13, i64 0, !7, i64 8, !13, i64 16}
!26 = !{!11, !11, i64 0}
!27 = !{!15, !11, i64 4}
!28 = !{!7, !7, i64 0}
!29 = !{!15, !11, i64 24}


; 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.libmdbx_globals = type { %union.bin128, i32, i32, i8, i8, i8, i8, i32, %union.logger_union, %union.pthread_mutex_t, i64, ptr }
%union.bin128 = type { %struct.anon }
%struct.anon = type { i64, i64 }
%union.logger_union = type { 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 }
%struct.meta_ptr = type { i64, %union.anon, i64 }
%union.anon = type { ptr }

@globals = external local_unnamed_addr global %struct.libmdbx_globals, align 8
@.str.11 = external hidden unnamed_addr constant [78 x i8], align 1
@__func__.meta_sync = external hidden unnamed_addr constant [10 x i8], align 1

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

declare i32 @osal_msync(ptr noundef, i64 noundef, i64 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn memory(read)
declare i64 @pgno_align2os_bytes(ptr noundef, i64 noundef) local_unnamed_addr #2

declare i32 @osal_fsync(i32 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local i32 @meta_sync(ptr noundef %0, ptr nocapture noundef readonly byval(%struct.meta_ptr) align 8 %1) local_unnamed_addr #3 {
  %3 = load i8, ptr getelementptr inbounds (i8, ptr @globals, i64 25), align 1, !tbaa !5
  %4 = and i8 %3, 1
  %.not = icmp eq i8 %4, 0
  br i1 %.not, label %13, label %5, !prof !13

5:                                                ; preds = %2
  %6 = getelementptr inbounds i8, ptr %0, i64 104
  %7 = load ptr, ptr %6, align 8, !tbaa !14
  %8 = getelementptr inbounds i8, ptr %7, i64 20
  %9 = tail call i32 @atomic_load32(ptr noundef nonnull %8, i32 noundef 0)
  %10 = load i64, ptr %1, align 8, !tbaa !24
  %11 = trunc i64 %10 to i32
  %.not10 = icmp eq i32 %9, %11
  br i1 %.not10, label %12, label %13, !prof !13

12:                                               ; preds = %5
  tail call void @mdbx_assert_fail(ptr noundef nonnull %0, ptr noundef nonnull @.str.11, ptr noundef nonnull @__func__.meta_sync, i32 noundef 262) #5
  unreachable

13:                                               ; preds = %2, %5
  %14 = getelementptr inbounds i8, ptr %0, i64 4
  %15 = load i32, ptr %14, align 4, !tbaa !26
  %16 = and i32 %15, 524288
  %.not11 = icmp eq i32 %16, 0
  %17 = getelementptr inbounds i8, ptr %0, i64 104
  br i1 %.not11, label %26, label %18

18:                                               ; preds = %13
  %19 = getelementptr inbounds i8, ptr %0, i64 16
  %20 = tail call i64 @pgno_align2os_bytes(ptr noundef nonnull %0, i64 noundef 3) #6
  %21 = tail call i32 @osal_msync(ptr noundef nonnull %19, i64 noundef 0, i64 noundef %20, i32 noundef 10) #7
  %22 = load ptr, ptr %17, align 8, !tbaa !14
  %23 = getelementptr inbounds i8, ptr %22, i64 128
  %24 = load volatile i64, ptr %23, align 64, !tbaa !27
  %25 = add i64 %24, 1
  store volatile i64 %25, ptr %23, align 64, !tbaa !27
  br label %34

26:                                               ; preds = %13
  %27 = getelementptr inbounds i8, ptr %0, i64 24
  %28 = load i32, ptr %27, align 8, !tbaa !28
  %29 = tail call i32 @osal_fsync(i32 noundef %28, i32 noundef 10) #7
  %30 = load ptr, ptr %17, align 8, !tbaa !14
  %31 = getelementptr inbounds i8, ptr %30, i64 136
  %32 = load volatile i64, ptr %31, align 8, !tbaa !27
  %33 = add i64 %32, 1
  store volatile i64 %33, ptr %31, align 8, !tbaa !27
  br label %34

34:                                               ; preds = %26, %18
  %.0 = phi i32 [ %21, %18 ], [ %29, %26 ]
  %35 = icmp eq i32 %.0, 0
  br i1 %35, label %36, label %42, !prof !29

36:                                               ; preds = %34
  %37 = load i64, ptr %1, align 8, !tbaa !24
  %38 = trunc i64 %37 to i32
  %39 = getelementptr inbounds i8, ptr %0, i64 104
  %40 = load ptr, ptr %39, align 8, !tbaa !14
  %41 = getelementptr inbounds i8, ptr %40, i64 20
  store volatile i32 %38, ptr %41, align 4, !tbaa !27
  br label %42

42:                                               ; preds = %36, %34
  ret i32 %.0
}

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

attributes #0 = { noreturn "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 = { "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 nofree nounwind willreturn memory(read) "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 = { 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 #5 = { noreturn nounwind }
attributes #6 = { nounwind willreturn memory(read) }
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, !7, i64 25}
!6 = !{!"libmdbx_globals", !7, i64 0, !9, i64 16, !9, i64 20, !7, i64 24, !7, i64 25, !7, i64 26, !10, i64 27, !9, i64 28, !7, i64 32, !7, i64 40, !11, i64 80, !12, i64 88}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!"int", !7, i64 0}
!10 = !{!"_Bool", !7, i64 0}
!11 = !{!"long", !7, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!"branch_weights", !"expected", i32 1, i32 2000}
!14 = !{!15, !12, i64 104}
!15 = !{!"MDBX_env", !7, i64 0, !9, i64 4, !9, i64 8, !16, i64 16, !9, i64 56, !9, i64 60, !16, i64 64, !12, 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, !9, i64 132, !9, i64 136, !9, i64 140, !9, i64 144, !18, i64 152, !12, i64 184, !12, i64 192, !12, i64 200, !12, i64 208, !12, i64 216, !9, i64 224, !9, i64 228, !9, i64 232, !12, i64 240, !12, i64 248, !11, i64 256, !19, i64 264, !21, i64 320, !10, i64 360, !12, i64 368, !12, i64 376, !12, i64 384, !22, i64 392, !7, i64 400, !9, i64 440, !9, i64 444, !12, i64 448, !23, i64 456, !7, i64 496, !7, i64 536}
!16 = !{!"osal_mmap", !7, i64 0, !9, i64 8, !11, i64 16, !11, i64 24, !11, i64 32}
!17 = !{!"short", !7, i64 0}
!18 = !{!"", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24}
!19 = !{!"", !9, i64 0, !9, i64 4, !9, i64 8, !9, i64 12, !11, i64 16, !7, i64 24, !7, i64 25, !7, i64 26, !7, i64 27, !9, i64 28, !9, i64 32, !10, i64 36, !10, i64 37, !10, i64 38, !20, i64 40, !7, i64 48}
!20 = !{!"", !17, i64 0, !17, i64 2, !17, i64 4, !17, i64 6}
!21 = !{!"", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32}
!22 = !{!"", !11, i64 0}
!23 = !{!"osal_ioring", !9, i64 0, !9, i64 4, !9, i64 8, !12, i64 16, !12, i64 24, !12, i64 32}
!24 = !{!25, !11, i64 0}
!25 = !{!"meta_ptr", !11, i64 0, !7, i64 8, !11, i64 16}
!26 = !{!15, !9, i64 4}
!27 = !{!7, !7, i64 0}
!28 = !{!15, !9, i64 24}
!29 = !{!"branch_weights", !"expected", i32 2000, i32 1}


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