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

; 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.6 }
%struct.anon.6 = 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 }

@globals = external global %struct.libmdbx_globals, align 8
@__func__.mdbx_get_sysraminfo = external hidden unnamed_addr constant [20 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [29 x i8], align 1

; Function Attrs: cold noreturn nounwind optsize uwtable
declare dso_local void @mdbx_assert_fail(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #0

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

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

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__errno_location() #3

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

; Function Attrs: inlinehint nounwind willreturn memory(none) uwtable
declare hidden zeroext i1 @is_powerof2(i64 noundef) #4

; Function Attrs: cold nounwind optsize uwtable
define dso_local i32 @mdbx_get_sysraminfo(ptr noundef %0, ptr noundef %1, ptr noundef %2) #5 {
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  %13 = load ptr, ptr %5, align 8, !tbaa !5
  %14 = icmp ne ptr %13, null
  br i1 %14, label %23, label %15

15:                                               ; preds = %3
  %16 = load ptr, ptr %6, align 8, !tbaa !5
  %17 = icmp ne ptr %16, null
  br i1 %17, label %23, label %18

18:                                               ; preds = %15
  %19 = load ptr, ptr %7, align 8, !tbaa !5
  %20 = icmp ne ptr %19, null
  br i1 %20, label %23, label %21

21:                                               ; preds = %18
  %22 = call i32 @log_if_error(i32 noundef 22, ptr noundef @__func__.mdbx_get_sysraminfo, i32 noundef 3225)
  store i32 %22, ptr %4, align 4
  br label %140

23:                                               ; preds = %18, %15, %3
  %24 = load ptr, ptr %6, align 8, !tbaa !5
  %25 = icmp ne ptr %24, null
  br i1 %25, label %26, label %28

26:                                               ; preds = %23
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  store i64 -1, ptr %27, align 8, !tbaa !9
  br label %28

28:                                               ; preds = %26, %23
  %29 = load ptr, ptr %7, align 8, !tbaa !5
  %30 = icmp ne ptr %29, null
  br i1 %30, label %31, label %33

31:                                               ; preds = %28
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  store i64 -1, ptr %32, align 8, !tbaa !9
  br label %33

33:                                               ; preds = %31, %28
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  %34 = load i32, ptr getelementptr inbounds (%struct.libmdbx_globals, ptr @globals, i32 0, i32 1), align 8, !tbaa !11
  %35 = zext i32 %34 to i64
  store i64 %35, ptr %8, align 8, !tbaa !9
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = icmp ne ptr %36, null
  br i1 %37, label %38, label %41

38:                                               ; preds = %33
  %39 = load i64, ptr %8, align 8, !tbaa !9
  %40 = load ptr, ptr %5, align 8, !tbaa !5
  store i64 %39, ptr %40, align 8, !tbaa !9
  br label %41

41:                                               ; preds = %38, %33
  %42 = load i64, ptr %8, align 8, !tbaa !9
  %43 = icmp slt i64 %42, 256
  br i1 %43, label %48, label %44

44:                                               ; preds = %41
  %45 = load i64, ptr %8, align 8, !tbaa !9
  %46 = call zeroext i1 @is_powerof2(i64 noundef %45) #9
  %47 = xor i1 %46, true
  br label %48

48:                                               ; preds = %44, %41
  %49 = phi i1 [ true, %41 ], [ %47, %44 ]
  %50 = xor i1 %49, true
  %51 = xor i1 %50, true
  %52 = zext i1 %51 to i32
  %53 = sext i32 %52 to i64
  %54 = call i64 @llvm.expect.i64(i64 %53, i64 0)
  %55 = icmp ne i64 %54, 0
  br i1 %55, label %56, label %58

56:                                               ; preds = %48
  %57 = call i32 @log_if_error(i32 noundef -30784, ptr noundef @__func__.mdbx_get_sysraminfo, i32 noundef 3235)
  store i32 %57, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %139

58:                                               ; preds = %48
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  %59 = load i64, ptr %8, align 8, !tbaa !9
  %60 = call i32 @log2n_powerof2(i64 noundef %59) #9
  store i32 %60, ptr %10, align 4, !tbaa !15
  br label %61

61:                                               ; preds = %58
  %62 = load i8, ptr getelementptr inbounds (%struct.libmdbx_globals, ptr @globals, i32 0, i32 4), align 1, !tbaa !16
  %63 = zext i8 %62 to i32
  %64 = and i32 %63, 1
  %65 = icmp ne i32 %64, 0
  %66 = xor i1 %65, true
  %67 = xor i1 %66, true
  %68 = zext i1 %67 to i32
  %69 = sext i32 %68 to i64
  %70 = call i64 @llvm.expect.i64(i64 %69, i64 1)
  %71 = icmp ne i64 %70, 0
  br i1 %71, label %72, label %90

72:                                               ; preds = %61
  br label %73

73:                                               ; preds = %72
  %74 = load i64, ptr %8, align 8, !tbaa !9
  %75 = load i32, ptr %10, align 4, !tbaa !15
  %76 = zext i32 %75 to i64
  %77 = shl i64 1, %76
  %78 = icmp eq i64 %74, %77
  %79 = xor i1 %78, true
  %80 = xor i1 %79, true
  %81 = xor i1 %80, true
  %82 = zext i1 %81 to i32
  %83 = sext i32 %82 to i64
  %84 = call i64 @llvm.expect.i64(i64 %83, i64 0)
  %85 = icmp ne i64 %84, 0
  br i1 %85, label %86, label %87

86:                                               ; preds = %73
  call void @mdbx_assert_fail(ptr noundef null, ptr noundef @.str.53, ptr noundef @__func__.mdbx_get_sysraminfo, i32 noundef 3238) #10
  unreachable

87:                                               ; preds = %73
  br label %88

88:                                               ; preds = %87
  br label %89

89:                                               ; preds = %88
  br label %90

90:                                               ; preds = %89, %61
  br label %91

91:                                               ; preds = %90
  br label %92

92:                                               ; preds = %91
  %93 = load i32, ptr %10, align 4, !tbaa !15
  %94 = load ptr, ptr %6, align 8, !tbaa !5
  %95 = icmp ne ptr %94, null
  br i1 %95, label %96, label %115

96:                                               ; preds = %92
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #8
  %97 = call i64 @sysconf(i32 noundef 85) #8
  store i64 %97, ptr %11, align 8, !tbaa !9
  %98 = load i64, ptr %11, align 8, !tbaa !9
  %99 = icmp eq i64 %98, -1
  br i1 %99, label %100, label %104

100:                                              ; preds = %96
  %101 = call ptr @__errno_location() #9
  %102 = load i32, ptr %101, align 4, !tbaa !15
  %103 = call i32 @log_if_error(i32 noundef %102, ptr noundef @__func__.mdbx_get_sysraminfo, i32 noundef 3255)
  store i32 %103, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %112

104:                                              ; preds = %96
  %105 = load i64, ptr %11, align 8, !tbaa !9
  %106 = load ptr, ptr %6, align 8, !tbaa !5
  store i64 %105, ptr %106, align 8, !tbaa !9
  %107 = load i64, ptr %11, align 8, !tbaa !9
  %108 = icmp slt i64 %107, 1
  br i1 %108, label %109, label %111

109:                                              ; preds = %104
  %110 = call i32 @log_if_error(i32 noundef 38, ptr noundef @__func__.mdbx_get_sysraminfo, i32 noundef 3289)
  store i32 %110, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %112

111:                                              ; preds = %104
  store i32 0, ptr %9, align 4
  br label %112

112:                                              ; preds = %111, %109, %100
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #8
  %113 = load i32, ptr %9, align 4
  switch i32 %113, label %138 [
    i32 0, label %114
  ]

114:                                              ; preds = %112
  br label %115

115:                                              ; preds = %114, %92
  %116 = load ptr, ptr %7, align 8, !tbaa !5
  %117 = icmp ne ptr %116, null
  br i1 %117, label %118, label %137

118:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #8
  %119 = call i64 @sysconf(i32 noundef 86) #8
  store i64 %119, ptr %12, align 8, !tbaa !9
  %120 = load i64, ptr %12, align 8, !tbaa !9
  %121 = icmp eq i64 %120, -1
  br i1 %121, label %122, label %126

122:                                              ; preds = %118
  %123 = call ptr @__errno_location() #9
  %124 = load i32, ptr %123, align 4, !tbaa !15
  %125 = call i32 @log_if_error(i32 noundef %124, ptr noundef @__func__.mdbx_get_sysraminfo, i32 noundef 3298)
  store i32 %125, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %134

126:                                              ; preds = %118
  %127 = load i64, ptr %12, align 8, !tbaa !9
  %128 = load ptr, ptr %7, align 8, !tbaa !5
  store i64 %127, ptr %128, align 8, !tbaa !9
  %129 = load i64, ptr %12, align 8, !tbaa !9
  %130 = icmp slt i64 %129, 1
  br i1 %130, label %131, label %133

131:                                              ; preds = %126
  %132 = call i32 @log_if_error(i32 noundef 38, ptr noundef @__func__.mdbx_get_sysraminfo, i32 noundef 3333)
  store i32 %132, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %134

133:                                              ; preds = %126
  store i32 0, ptr %9, align 4
  br label %134

134:                                              ; preds = %133, %131, %122
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #8
  %135 = load i32, ptr %9, align 4
  switch i32 %135, label %138 [
    i32 0, label %136
  ]

136:                                              ; preds = %134
  br label %137

137:                                              ; preds = %136, %115
  store i32 0, ptr %4, align 4
  store i32 1, ptr %9, align 4
  br label %138

138:                                              ; preds = %137, %134, %112
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  br label %139

139:                                              ; preds = %138, %56
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  br label %140

140:                                              ; preds = %139, %21
  %141 = load i32, ptr %4, align 4
  ret i32 %141
}

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

; Function Attrs: nounwind willreturn memory(none)
declare i32 @log2n_powerof2(i64 noundef) #3

; Function Attrs: nounwind
declare i64 @sysconf(i32 noundef) #7

attributes #0 = { cold noreturn nounwind optsize 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(none) }
attributes #3 = { nounwind willreturn memory(none) "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 nounwind willreturn memory(none) 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 = { cold nounwind optsize 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 = { 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 #7 = { 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 #8 = { nounwind }
attributes #9 = { nounwind willreturn memory(none) }
attributes #10 = { cold noreturn }

!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 = !{!"long", !7, i64 0}
!11 = !{!12, !13, i64 16}
!12 = !{!"libmdbx_globals", !7, i64 0, !13, i64 16, !13, i64 20, !7, i64 24, !7, i64 25, !7, i64 26, !14, i64 27, !13, i64 28, !7, i64 32, !7, i64 40, !10, i64 80, !6, i64 88}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_Bool", !7, i64 0}
!15 = !{!13, !13, i64 0}
!16 = !{!12, !7, i64 25}


; 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.6 }
%struct.anon.6 = 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 }

@globals = external local_unnamed_addr global %struct.libmdbx_globals, align 8
@__func__.mdbx_get_sysraminfo = external hidden unnamed_addr constant [20 x i8], align 1
@.str.53 = external hidden unnamed_addr constant [29 x i8], align 1

; Function Attrs: cold noreturn nounwind optsize uwtable
declare dso_local void @mdbx_assert_fail(ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare ptr @__errno_location() local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress nofree nosync nounwind willreturn memory(none) uwtable
declare hidden zeroext i1 @is_powerof2(i64 noundef) local_unnamed_addr #2

; Function Attrs: cold nounwind optsize uwtable
define dso_local i32 @mdbx_get_sysraminfo(ptr noundef writeonly %0, ptr noundef writeonly %1, ptr noundef writeonly %2) local_unnamed_addr #3 {
  %4 = icmp ne ptr %0, null
  %5 = icmp ne ptr %1, null
  %or.cond = or i1 %4, %5
  %6 = icmp ne ptr %2, null
  %or.cond4 = or i1 %or.cond, %6
  br i1 %or.cond4, label %9, label %7

7:                                                ; preds = %3
  %8 = tail call i32 @log_if_error(i32 noundef 22, ptr noundef nonnull @__func__.mdbx_get_sysraminfo, i32 noundef 3225)
  br label %.thread

9:                                                ; preds = %3
  br i1 %5, label %10, label %11

10:                                               ; preds = %9
  store i64 -1, ptr %1, align 8, !tbaa !5
  br label %11

11:                                               ; preds = %10, %9
  br i1 %6, label %12, label %13

12:                                               ; preds = %11
  store i64 -1, ptr %2, align 8, !tbaa !5
  br label %13

13:                                               ; preds = %12, %11
  %14 = load i32, ptr getelementptr inbounds (i8, ptr @globals, i64 16), align 8, !tbaa !9
  %15 = zext i32 %14 to i64
  br i1 %4, label %16, label %17

16:                                               ; preds = %13
  store i64 %15, ptr %0, align 8, !tbaa !5
  br label %17

17:                                               ; preds = %16, %13
  %18 = icmp ult i32 %14, 256
  br i1 %18, label %.critedge, label %19, !prof !14

19:                                               ; preds = %17
  %20 = tail call zeroext i1 @is_powerof2(i64 noundef %15) #6
  br i1 %20, label %22, label %.critedge, !prof !15

.critedge:                                        ; preds = %17, %19
  %21 = tail call i32 @log_if_error(i32 noundef -30784, ptr noundef nonnull @__func__.mdbx_get_sysraminfo, i32 noundef 3235)
  br label %.thread

22:                                               ; preds = %19
  %23 = load i8, ptr getelementptr inbounds (i8, ptr @globals, i64 25), align 1, !tbaa !16
  %24 = and i8 %23, 1
  %.not = icmp eq i8 %24, 0
  br i1 %.not, label %30, label %25, !prof !14

25:                                               ; preds = %22
  %26 = tail call i32 @log2n_powerof2(i64 noundef %15) #6
  %27 = zext nneg i32 %26 to i64
  %28 = shl nuw i64 1, %27
  %.not42 = icmp eq i64 %28, %15
  br i1 %.not42, label %30, label %29, !prof !15

29:                                               ; preds = %25
  tail call void @mdbx_assert_fail(ptr noundef null, ptr noundef nonnull @.str.53, ptr noundef nonnull @__func__.mdbx_get_sysraminfo, i32 noundef 3238) #7
  unreachable

30:                                               ; preds = %25, %22
  br i1 %5, label %31, label %42

31:                                               ; preds = %30
  %32 = tail call i64 @sysconf(i32 noundef 85) #8
  %33 = icmp eq i64 %32, -1
  br i1 %33, label %34, label %38

34:                                               ; preds = %31
  %35 = tail call ptr @__errno_location() #6
  %36 = load i32, ptr %35, align 4, !tbaa !17
  %37 = tail call i32 @log_if_error(i32 noundef %36, ptr noundef nonnull @__func__.mdbx_get_sysraminfo, i32 noundef 3255)
  br label %.thread

38:                                               ; preds = %31
  store i64 %32, ptr %1, align 8, !tbaa !5
  %39 = icmp slt i64 %32, 1
  br i1 %39, label %40, label %42

40:                                               ; preds = %38
  %41 = tail call i32 @log_if_error(i32 noundef 38, ptr noundef nonnull @__func__.mdbx_get_sysraminfo, i32 noundef 3289)
  br label %.thread

42:                                               ; preds = %38, %30
  br i1 %6, label %43, label %.thread

43:                                               ; preds = %42
  %44 = tail call i64 @sysconf(i32 noundef 86) #8
  %45 = icmp eq i64 %44, -1
  br i1 %45, label %46, label %50

46:                                               ; preds = %43
  %47 = tail call ptr @__errno_location() #6
  %48 = load i32, ptr %47, align 4, !tbaa !17
  %49 = tail call i32 @log_if_error(i32 noundef %48, ptr noundef nonnull @__func__.mdbx_get_sysraminfo, i32 noundef 3298)
  br label %.thread

50:                                               ; preds = %43
  store i64 %44, ptr %2, align 8, !tbaa !5
  %51 = icmp slt i64 %44, 1
  br i1 %51, label %52, label %.thread

52:                                               ; preds = %50
  %53 = tail call i32 @log_if_error(i32 noundef 38, ptr noundef nonnull @__func__.mdbx_get_sysraminfo, i32 noundef 3333)
  br label %.thread

.thread:                                          ; preds = %52, %46, %40, %34, %42, %50, %.critedge, %7
  %.5 = phi i32 [ %8, %7 ], [ %21, %.critedge ], [ 0, %50 ], [ 0, %42 ], [ %41, %40 ], [ %37, %34 ], [ %53, %52 ], [ %49, %46 ]
  ret i32 %.5
}

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

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare i32 @log2n_powerof2(i64 noundef) local_unnamed_addr #1

; Function Attrs: nounwind
declare i64 @sysconf(i32 noundef) local_unnamed_addr #5

attributes #0 = { cold noreturn nounwind optsize 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 nofree nosync nounwind willreturn memory(none) "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 = { inlinehint mustprogress nofree nosync nounwind willreturn memory(none) 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 = { cold nounwind optsize 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 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 "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 willreturn memory(none) }
attributes #7 = { cold noreturn }
attributes #8 = { 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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 16}
!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, !6, i64 80, !13, i64 88}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_Bool", !7, i64 0}
!13 = !{!"any pointer", !7, i64 0}
!14 = !{!"branch_weights", !"expected", i32 1, i32 2000}
!15 = !{!"branch_weights", !"expected", i32 2000, i32 1}
!16 = !{!10, !7, i64 25}
!17 = !{!11, !11, i64 0}


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