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

; 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.9 }
%struct.anon.9 = 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.MDBX_version_info = type { i16, i16, i16, i16, ptr, %struct.anon.11, ptr }
%struct.anon.11 = type { ptr, ptr, ptr, ptr }
%union.mdbx_atomic_uint32_t = type { i32 }

@globals = external global %struct.libmdbx_globals, align 8
@rthc_thread_state = external hidden thread_local(localdynamic) global i64, align 8
@__func__.thread_rthc_set = external hidden unnamed_addr constant [16 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [25 x i8], align 1
@mdbx_version = external constant %struct.MDBX_version_info, align 8
@rthc_key = external hidden global i32, align 4
@.str.8 = external hidden unnamed_addr constant [55 x i8], align 1
@rthc_pending = external hidden global %union.mdbx_atomic_uint32_t, align 4
@.str.9 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [37 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: nocallback nofree nosync nounwind willreturn memory(none)
declare i64 @llvm.expect.i64(i64, i64) #1

declare void @debug_log(i32 noundef, ptr noundef, i32 noundef, ptr noundef, ...) #2

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

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

; Function Attrs: nounwind uwtable
define dso_local void @thread_rthc_set(i32 noundef %0, ptr noundef %1) #4 {
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i32, align 4
  store i32 %0, ptr %3, align 4, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #10
  %8 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @rthc_thread_state)
  %9 = call i64 @rthc_signature(ptr noundef %8, i8 noundef zeroext 13)
  store i64 %9, ptr %5, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #10
  %10 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @rthc_thread_state)
  %11 = call i64 @rthc_signature(ptr noundef %10, i8 noundef zeroext -64)
  store i64 %11, ptr %6, align 8, !tbaa !11
  %12 = load ptr, ptr %4, align 8, !tbaa !9
  %13 = icmp ne ptr %12, null
  br i1 %13, label %14, label %106

14:                                               ; preds = %2
  %15 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @rthc_thread_state)
  %16 = load i64, ptr %15, align 8, !tbaa !11
  %17 = load i64, ptr %5, align 8, !tbaa !11
  %18 = icmp ne i64 %16, %17
  br i1 %18, label %19, label %24

19:                                               ; preds = %14
  %20 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @rthc_thread_state)
  %21 = load i64, ptr %20, align 8, !tbaa !11
  %22 = load i64, ptr %6, align 8, !tbaa !11
  %23 = icmp ne i64 %21, %22
  br label %24

24:                                               ; preds = %19, %14
  %25 = phi i1 [ false, %14 ], [ %23, %19 ]
  %26 = xor i1 %25, true
  %27 = xor i1 %26, true
  %28 = zext i1 %27 to i32
  %29 = sext i32 %28 to i64
  %30 = call i64 @llvm.expect.i64(i64 %29, i64 0)
  %31 = icmp ne i64 %30, 0
  br i1 %31, label %32, label %106

32:                                               ; preds = %24
  %33 = load i64, ptr %5, align 8, !tbaa !11
  %34 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @rthc_thread_state)
  store i64 %33, ptr %34, align 8, !tbaa !11
  br label %35

35:                                               ; preds = %32
  %36 = load i8, ptr getelementptr inbounds (%struct.libmdbx_globals, ptr @globals, i32 0, i32 5), align 2, !tbaa !13
  %37 = zext i8 %36 to i32
  %38 = icmp sle i32 6, %37
  %39 = xor i1 %38, true
  %40 = xor i1 %39, true
  %41 = zext i1 %40 to i32
  %42 = sext i32 %41 to i64
  %43 = call i64 @llvm.expect.i64(i64 %42, i64 0)
  %44 = icmp ne i64 %43, 0
  br i1 %44, label %45, label %47

45:                                               ; preds = %35
  %46 = call i64 @osal_thread_self()
  call void (i32, ptr, i32, ptr, ...) @debug_log(i32 noundef 6, ptr noundef @__func__.thread_rthc_set, i32 noundef 243, ptr noundef @.str.7, i64 noundef %46)
  br label %47

47:                                               ; preds = %45, %35
  br label %48

48:                                               ; preds = %47
  br label %49

49:                                               ; preds = %48
  %50 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @rthc_thread_state)
  %51 = call i32 @rthc_atexit(ptr noundef @rthc_thread_dtor, ptr noundef %50, ptr noundef @mdbx_version)
  %52 = icmp ne i32 %51, 0
  br i1 %52, label %53, label %105

53:                                               ; preds = %49
  br label %54

54:                                               ; preds = %53
  %55 = load i32, ptr @rthc_key, align 4, !tbaa !5
  %56 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @rthc_thread_state)
  %57 = call i32 @pthread_setspecific(i32 noundef %55, ptr noundef %56) #10
  %58 = icmp eq i32 %57, 0
  %59 = xor i1 %58, true
  %60 = xor i1 %59, true
  %61 = xor i1 %60, true
  %62 = zext i1 %61 to i32
  %63 = sext i32 %62 to i64
  %64 = call i64 @llvm.expect.i64(i64 %63, i64 0)
  %65 = icmp ne i64 %64, 0
  br i1 %65, label %66, label %67

66:                                               ; preds = %54
  call void @mdbx_assert_fail(ptr noundef null, ptr noundef @.str.8, ptr noundef @__func__.thread_rthc_set, i32 noundef 245) #11
  unreachable

67:                                               ; preds = %54
  br label %68

68:                                               ; preds = %67
  br label %69

69:                                               ; preds = %68
  %70 = load i64, ptr %6, align 8, !tbaa !11
  %71 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @rthc_thread_state)
  store i64 %70, ptr %71, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #10
  %72 = call i32 @atomic_add32(ptr noundef @rthc_pending, i32 noundef 1)
  store i32 %72, ptr %7, align 4, !tbaa !5
  br label %73

73:                                               ; preds = %69
  %74 = load i32, ptr %7, align 4, !tbaa !5
  %75 = icmp ult i32 %74, 2147483647
  %76 = xor i1 %75, true
  %77 = xor i1 %76, true
  %78 = xor i1 %77, true
  %79 = zext i1 %78 to i32
  %80 = sext i32 %79 to i64
  %81 = call i64 @llvm.expect.i64(i64 %80, i64 0)
  %82 = icmp ne i64 %81, 0
  br i1 %82, label %83, label %84

83:                                               ; preds = %73
  call void @mdbx_assert_fail(ptr noundef null, ptr noundef @.str.9, ptr noundef @__func__.thread_rthc_set, i32 noundef 248) #11
  unreachable

84:                                               ; preds = %73
  br label %85

85:                                               ; preds = %84
  br label %86

86:                                               ; preds = %85
  br label %87

87:                                               ; preds = %86
  %88 = load i8, ptr getelementptr inbounds (%struct.libmdbx_globals, ptr @globals, i32 0, i32 5), align 2, !tbaa !13
  %89 = zext i8 %88 to i32
  %90 = icmp sle i32 3, %89
  %91 = xor i1 %90, true
  %92 = xor i1 %91, true
  %93 = zext i1 %92 to i32
  %94 = sext i32 %93 to i64
  %95 = call i64 @llvm.expect.i64(i64 %94, i64 0)
  %96 = icmp ne i64 %95, 0
  br i1 %96, label %97, label %101

97:                                               ; preds = %87
  %98 = load i32, ptr @rthc_key, align 4, !tbaa !5
  %99 = zext i32 %98 to i64
  %100 = load i32, ptr %7, align 4, !tbaa !5
  call void (i32, ptr, i32, ptr, ...) @debug_log(i32 noundef 3, ptr noundef @__func__.thread_rthc_set, i32 noundef 249, ptr noundef @.str.10, i64 noundef %99, i32 noundef %100)
  br label %101

101:                                              ; preds = %97, %87
  br label %102

102:                                              ; preds = %101
  br label %103

103:                                              ; preds = %102
  %104 = load i32, ptr %7, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #10
  br label %105

105:                                              ; preds = %103, %49
  br label %106

106:                                              ; preds = %105, %24, %2
  br label %107

107:                                              ; preds = %106
  %108 = load i32, ptr %3, align 4, !tbaa !5
  %109 = load ptr, ptr %4, align 8, !tbaa !9
  %110 = call i32 @pthread_setspecific(i32 noundef %108, ptr noundef %109) #10
  %111 = icmp eq i32 %110, 0
  %112 = xor i1 %111, true
  %113 = xor i1 %112, true
  %114 = xor i1 %113, true
  %115 = zext i1 %114 to i32
  %116 = sext i32 %115 to i64
  %117 = call i64 @llvm.expect.i64(i64 %116, i64 0)
  %118 = icmp ne i64 %117, 0
  br i1 %118, label %119, label %120

119:                                              ; preds = %107
  call void @mdbx_assert_fail(ptr noundef null, ptr noundef @.str.11, ptr noundef @__func__.thread_rthc_set, i32 noundef 253) #11
  unreachable

120:                                              ; preds = %107
  br label %121

121:                                              ; preds = %120
  br label %122

122:                                              ; preds = %121
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #10
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #10
  ret void
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @rthc_signature(ptr noundef, i8 noundef zeroext) #5

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare nonnull ptr @llvm.threadlocal.address.p0(ptr nonnull) #6

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @osal_thread_self() #5

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

; Function Attrs: cold nounwind optsize uwtable
declare dso_local void @rthc_thread_dtor(ptr noundef) #7

; Function Attrs: nounwind
declare i32 @pthread_setspecific(i32 noundef, ptr noundef) #8

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(none) }
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 = { 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 #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 = { 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 #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { 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 #8 = { 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 #9 = { 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 #10 = { nounwind }
attributes #11 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !7, i64 26}
!14 = !{!"libmdbx_globals", !7, i64 0, !6, i64 16, !6, i64 20, !7, i64 24, !7, i64 25, !7, i64 26, !15, i64 27, !6, i64 28, !7, i64 32, !7, i64 40, !12, i64 80, !10, i64 88}
!15 = !{!"_Bool", !7, 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"

%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.9 }
%struct.anon.9 = 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.MDBX_version_info = type { i16, i16, i16, i16, ptr, %struct.anon.11, ptr }
%struct.anon.11 = type { ptr, ptr, ptr, ptr }
%union.mdbx_atomic_uint32_t = type { i32 }

@globals = external local_unnamed_addr global %struct.libmdbx_globals, align 8
@rthc_thread_state = external hidden thread_local(localdynamic) global i64, align 8
@__func__.thread_rthc_set = external hidden unnamed_addr constant [16 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [25 x i8], align 1
@mdbx_version = external constant %struct.MDBX_version_info, align 8
@rthc_key = external hidden local_unnamed_addr global i32, align 4
@.str.8 = external hidden unnamed_addr constant [55 x i8], align 1
@rthc_pending = external hidden global %union.mdbx_atomic_uint32_t, align 4
@.str.9 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [46 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [37 x i8], align 1

declare void @debug_log(i32 noundef, ptr noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
define dso_local void @thread_rthc_set(i32 noundef %0, ptr noundef %1) local_unnamed_addr #2 {
  %3 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @rthc_thread_state)
  %4 = tail call i64 @rthc_signature(ptr noundef nonnull %3, i8 noundef zeroext 13)
  %5 = tail call i64 @rthc_signature(ptr noundef nonnull %3, i8 noundef zeroext -64)
  %.not = icmp eq ptr %1, null
  br i1 %.not, label %32, label %6

6:                                                ; preds = %2
  %7 = load i64, ptr %3, align 8
  %8 = icmp ne i64 %7, %4
  %9 = icmp ne i64 %7, %5
  %10 = select i1 %8, i1 %9, i1 false
  br i1 %10, label %11, label %32, !prof !5

11:                                               ; preds = %6
  store i64 %4, ptr %3, align 8, !tbaa !6
  %12 = load i8, ptr getelementptr inbounds (i8, ptr @globals, i64 26), align 2, !tbaa !10
  %13 = icmp ugt i8 %12, 5
  br i1 %13, label %14, label %16, !prof !5

14:                                               ; preds = %11
  %15 = tail call i64 @osal_thread_self()
  tail call void (i32, ptr, i32, ptr, ...) @debug_log(i32 noundef 6, ptr noundef nonnull @__func__.thread_rthc_set, i32 noundef 243, ptr noundef nonnull @.str.7, i64 noundef %15) #8
  br label %16

16:                                               ; preds = %14, %11
  %17 = tail call i32 @rthc_atexit(ptr noundef nonnull @rthc_thread_dtor, ptr noundef nonnull %3, ptr noundef nonnull @mdbx_version)
  %.not10 = icmp eq i32 %17, 0
  br i1 %.not10, label %32, label %18

18:                                               ; preds = %16
  %19 = load i32, ptr @rthc_key, align 4, !tbaa !15
  %20 = tail call i32 @pthread_setspecific(i32 noundef %19, ptr noundef nonnull %3) #8
  %.not11 = icmp eq i32 %20, 0
  br i1 %.not11, label %22, label %21, !prof !16

21:                                               ; preds = %18
  tail call void @mdbx_assert_fail(ptr noundef null, ptr noundef nonnull @.str.8, ptr noundef nonnull @__func__.thread_rthc_set, i32 noundef 245) #9
  unreachable

22:                                               ; preds = %18
  store i64 %5, ptr %3, align 8, !tbaa !6
  %23 = tail call i32 @atomic_add32(ptr noundef nonnull @rthc_pending, i32 noundef 1)
  %24 = icmp ugt i32 %23, 2147483646
  br i1 %24, label %25, label %26, !prof !5

25:                                               ; preds = %22
  tail call void @mdbx_assert_fail(ptr noundef null, ptr noundef nonnull @.str.9, ptr noundef nonnull @__func__.thread_rthc_set, i32 noundef 248) #9
  unreachable

26:                                               ; preds = %22
  %27 = load i8, ptr getelementptr inbounds (i8, ptr @globals, i64 26), align 2, !tbaa !10
  %28 = icmp ugt i8 %27, 2
  br i1 %28, label %29, label %32, !prof !5

29:                                               ; preds = %26
  %30 = load i32, ptr @rthc_key, align 4, !tbaa !15
  %31 = zext i32 %30 to i64
  tail call void (i32, ptr, i32, ptr, ...) @debug_log(i32 noundef 3, ptr noundef nonnull @__func__.thread_rthc_set, i32 noundef 249, ptr noundef nonnull @.str.10, i64 noundef %31, i32 noundef %23) #8
  br label %32

32:                                               ; preds = %26, %29, %2, %6, %16
  %33 = tail call i32 @pthread_setspecific(i32 noundef %0, ptr noundef %1) #8
  %.not12 = icmp eq i32 %33, 0
  br i1 %.not12, label %35, label %34, !prof !16

34:                                               ; preds = %32
  tail call void @mdbx_assert_fail(ptr noundef null, ptr noundef nonnull @.str.11, ptr noundef nonnull @__func__.thread_rthc_set, i32 noundef 253) #9
  unreachable

35:                                               ; preds = %32
  ret void
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @rthc_signature(ptr noundef, i8 noundef zeroext) local_unnamed_addr #3

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare nonnull ptr @llvm.threadlocal.address.p0(ptr nonnull) #4

; Function Attrs: inlinehint nounwind uwtable
declare hidden i64 @osal_thread_self() local_unnamed_addr #3

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

; Function Attrs: cold nounwind optsize uwtable
declare dso_local void @rthc_thread_dtor(ptr noundef) #5

; Function Attrs: nounwind
declare i32 @pthread_setspecific(i32 noundef, ptr noundef) local_unnamed_addr #6

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

attributes #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 = { 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 = { 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 = { 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 #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = { 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 #7 = { 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 #8 = { nounwind }
attributes #9 = { noreturn 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 = !{!7, !7, i64 0}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!11, !8, i64 26}
!11 = !{!"libmdbx_globals", !8, i64 0, !12, i64 16, !12, i64 20, !8, i64 24, !8, i64 25, !8, i64 26, !13, i64 27, !12, i64 28, !8, i64 32, !8, i64 40, !7, i64 80, !14, i64 88}
!12 = !{!"int", !8, i64 0}
!13 = !{!"_Bool", !8, i64 0}
!14 = !{!"any pointer", !8, i64 0}
!15 = !{!12, !12, i64 0}
!16 = !{!"branch_weights", !"expected", i32 2000, i32 1}


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