; 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.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.meta = type { [2 x i32], %union.anon.20, i16, i8, i8, %struct.geo, %union.anon.21, %struct.MDBX_canary, %union.anon.24, [2 x %union.mdbx_atomic_uint32_t], [2 x i32], %union.bin128, %union.bin128 }
%union.anon.20 = type { i64 }
%struct.geo = type { i16, i16, i32, i32, %union.anon.12, %union.anon.13 }
%union.anon.12 = type { i32 }
%union.anon.13 = type { i32 }
%union.anon.21 = type { %struct.anon.22 }
%struct.anon.22 = type { %struct.tree, %struct.tree }
%struct.tree = type { i16, i16, i32, i32, i32, i32, i32, i64, i64, i64 }
%struct.MDBX_canary = type { i64, i64, i64, i64 }
%union.anon.24 = 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.12 = external hidden unnamed_addr constant [38 x i8], align 1
@__func__.meta_override = external hidden unnamed_addr constant [14 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [149 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: inlinehint nounwind willreturn memory(read) uwtable
declare hidden ptr @page_meta(ptr noundef) #3

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare hidden ptr @pgno2page(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 void @debug_log(i32 noundef, ptr noundef, i32 noundef, ptr noundef, ...) #5

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

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @osal_flush_incoherent_mmap(ptr noundef, i64 noundef, i64 noundef) #7

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare hidden i64 @pgno2bytes(ptr noundef, i64 noundef) #3

declare { i64, i64 } @osal_guid(ptr noundef) #5

; Function Attrs: cold nounwind optsize uwtable
declare hidden ptr @meta_model(ptr noundef, ptr noundef, i64 noundef, ptr noundef) #8

; Function Attrs: cold nounwind optsize uwtable
define dso_local i32 @meta_override(ptr noundef %0, i64 noundef %1, i64 noundef %2, ptr noundef %3) #8 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca %union.bin128, align 8
  %14 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i64 %1, ptr %7, align 8, !tbaa !9
  store i64 %2, ptr %8, align 8, !tbaa !9
  store ptr %3, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #9
  %15 = load ptr, ptr %6, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct.MDBX_env, ptr %15, i32 0, i32 23
  %17 = load ptr, ptr %16, align 8, !tbaa !11
  store ptr %17, ptr %10, align 8, !tbaa !5
  %18 = load ptr, ptr %6, align 8, !tbaa !5
  %19 = load ptr, ptr %10, align 8, !tbaa !5
  %20 = load i64, ptr %7, align 8, !tbaa !9
  %21 = load i64, ptr %7, align 8, !tbaa !9
  %22 = icmp eq i64 %21, 0
  br i1 %22, label %23, label %28

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

26:                                               ; preds = %23
  %27 = load ptr, ptr %9, align 8, !tbaa !5
  br label %32

28:                                               ; preds = %23, %4
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = call ptr @pgno2page(ptr noundef %29, i64 noundef 0) #10
  %31 = call ptr @page_meta(ptr noundef %30) #10
  br label %32

32:                                               ; preds = %28, %26
  %33 = phi ptr [ %27, %26 ], [ %31, %28 ]
  %34 = getelementptr inbounds %struct.meta, ptr %33, i32 0, i32 12
  %35 = call ptr @meta_model(ptr noundef %18, ptr noundef %19, i64 noundef %20, ptr noundef %34) #11
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #9
  %36 = load ptr, ptr %10, align 8, !tbaa !5
  %37 = call ptr @page_meta(ptr noundef %36) #10
  store ptr %37, ptr %11, align 8, !tbaa !5
  %38 = load ptr, ptr %6, align 8, !tbaa !5
  %39 = load ptr, ptr %11, align 8, !tbaa !5
  %40 = load i64, ptr %8, align 8, !tbaa !9
  call void @meta_set_txnid(ptr noundef %38, ptr noundef %39, i64 noundef %40)
  %41 = load i64, ptr %8, align 8, !tbaa !9
  %42 = icmp ne i64 %41, 0
  br i1 %42, label %43, label %75

43:                                               ; preds = %32
  br label %44

44:                                               ; preds = %43
  %45 = load i8, ptr getelementptr inbounds (%struct.libmdbx_globals, ptr @globals, i32 0, i32 4), align 1, !tbaa !23
  %46 = zext i8 %45 to i32
  %47 = and i32 %46, 1
  %48 = icmp ne i32 %47, 0
  %49 = xor i1 %48, true
  %50 = xor i1 %49, true
  %51 = zext i1 %50 to i32
  %52 = sext i32 %51 to i64
  %53 = call i64 @llvm.expect.i64(i64 %52, i64 1)
  %54 = icmp ne i64 %53, 0
  br i1 %54, label %55, label %72

55:                                               ; preds = %44
  br label %56

56:                                               ; preds = %55
  %57 = load ptr, ptr %6, align 8, !tbaa !5
  %58 = load ptr, ptr %11, align 8, !tbaa !5
  %59 = call zeroext i1 @coherency_check_meta(ptr noundef %57, ptr noundef %58, i1 noundef zeroext true)
  %60 = xor i1 %59, true
  %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 %69

67:                                               ; preds = %56
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  call void @mdbx_assert_fail(ptr noundef %68, ptr noundef @.str.12, ptr noundef @__func__.meta_override, i32 noundef 357) #12
  unreachable

69:                                               ; preds = %56
  br label %70

70:                                               ; preds = %69
  br label %71

71:                                               ; preds = %70
  br label %72

72:                                               ; preds = %71, %44
  br label %73

73:                                               ; preds = %72
  br label %74

74:                                               ; preds = %73
  br label %75

75:                                               ; preds = %74, %32
  %76 = load ptr, ptr %9, align 8, !tbaa !5
  %77 = icmp ne ptr %76, null
  br i1 %77, label %78, label %217

78:                                               ; preds = %75
  %79 = load i64, ptr %8, align 8, !tbaa !9
  %80 = icmp ne i64 %79, 0
  br i1 %80, label %81, label %110

81:                                               ; preds = %78
  %82 = load ptr, ptr %6, align 8, !tbaa !5
  %83 = load ptr, ptr %9, align 8, !tbaa !5
  %84 = call zeroext i1 @coherency_check_meta(ptr noundef %82, ptr noundef %83, i1 noundef zeroext false)
  %85 = xor i1 %84, true
  %86 = xor i1 %85, true
  %87 = xor i1 %86, true
  %88 = zext i1 %87 to i32
  %89 = sext i32 %88 to i64
  %90 = call i64 @llvm.expect.i64(i64 %89, i64 0)
  %91 = icmp ne i64 %90, 0
  br i1 %91, label %92, label %110

92:                                               ; preds = %81
  br label %93

93:                                               ; preds = %92
  %94 = load i8, ptr getelementptr inbounds (%struct.libmdbx_globals, ptr @globals, i32 0, i32 5), align 2, !tbaa !25
  %95 = zext i8 %94 to i32
  %96 = icmp sle i32 1, %95
  %97 = xor i1 %96, true
  %98 = xor i1 %97, true
  %99 = zext i1 %98 to i32
  %100 = sext i32 %99 to i64
  %101 = call i64 @llvm.expect.i64(i64 %100, i64 0)
  %102 = icmp ne i64 %101, 0
  br i1 %102, label %103, label %107

103:                                              ; preds = %93
  %104 = load i64, ptr %7, align 8, !tbaa !9
  %105 = load ptr, ptr %9, align 8, !tbaa !5
  %106 = call i64 @constmeta_txnid(ptr noundef %105) #10
  call void (i32, ptr, i32, ptr, ...) @debug_log(i32 noundef 1, ptr noundef @__func__.meta_override, i32 noundef 362, ptr noundef @.str.13, i64 noundef %104, ptr noundef @.str.14, i64 noundef %106)
  br label %107

107:                                              ; preds = %103, %93
  br label %108

108:                                              ; preds = %107
  br label %109

109:                                              ; preds = %108
  store i32 -30779, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %457

110:                                              ; preds = %81, %78
  %111 = load i8, ptr getelementptr inbounds (%struct.libmdbx_globals, ptr @globals, i32 0, i32 4), align 1, !tbaa !23
  %112 = zext i8 %111 to i32
  %113 = and i32 %112, 64
  %114 = icmp ne i32 %113, 0
  br i1 %114, label %115, label %120

115:                                              ; preds = %110
  %116 = load ptr, ptr %11, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.meta, ptr %116, i32 0, i32 0
  %118 = load ptr, ptr %9, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.meta, ptr %118, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %117, ptr align 4 %119, i64 8, i1 false)
  br label %120

120:                                              ; preds = %115, %110
  %121 = load ptr, ptr %9, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.meta, ptr %121, i32 0, i32 2
  %123 = load i16, ptr %122, align 4, !tbaa !26
  %124 = load ptr, ptr %11, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.meta, ptr %124, i32 0, i32 2
  store i16 %123, ptr %125, align 4, !tbaa !26
  %126 = load ptr, ptr %9, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.meta, ptr %126, i32 0, i32 3
  %128 = load i8, ptr %127, align 2, !tbaa !30
  %129 = load ptr, ptr %11, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.meta, ptr %129, i32 0, i32 3
  store i8 %128, ptr %130, align 2, !tbaa !30
  %131 = load ptr, ptr %9, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.meta, ptr %131, i32 0, i32 4
  %133 = load i8, ptr %132, align 1, !tbaa !31
  %134 = load ptr, ptr %11, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.meta, ptr %134, i32 0, i32 4
  store i8 %133, ptr %135, align 1, !tbaa !31
  %136 = load ptr, ptr %11, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.meta, ptr %136, i32 0, i32 5
  %138 = load ptr, ptr %9, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.meta, ptr %138, i32 0, i32 5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %137, ptr align 4 %139, i64 20, i1 false)
  %140 = load ptr, ptr %11, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.meta, ptr %140, i32 0, i32 6
  %142 = load ptr, ptr %9, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.meta, ptr %142, i32 0, i32 6
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %141, ptr align 4 %143, i64 96, i1 false)
  %144 = load ptr, ptr %11, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.meta, ptr %144, i32 0, i32 7
  %146 = load ptr, ptr %9, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.meta, ptr %146, i32 0, i32 7
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %145, ptr align 4 %147, i64 32, i1 false)
  %148 = load ptr, ptr %11, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.meta, ptr %148, i32 0, i32 10
  %150 = load ptr, ptr %9, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.meta, ptr %150, i32 0, i32 10
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %149, ptr align 4 %151, i64 8, i1 false)
  %152 = load i64, ptr %8, align 8, !tbaa !9
  %153 = icmp ne i64 %152, 0
  br i1 %153, label %154, label %216

154:                                              ; preds = %120
  %155 = load ptr, ptr %11, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.meta, ptr %155, i32 0, i32 6
  %157 = getelementptr inbounds %struct.anon.22, ptr %156, i32 0, i32 0
  %158 = getelementptr inbounds %struct.tree, ptr %157, i32 0, i32 9
  %159 = load i64, ptr %158, align 4, !tbaa !32
  %160 = icmp ne i64 %159, 0
  br i1 %160, label %168, label %161

161:                                              ; preds = %154
  %162 = load ptr, ptr %11, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.meta, ptr %162, i32 0, i32 6
  %164 = getelementptr inbounds %struct.anon.22, ptr %163, i32 0, i32 0
  %165 = getelementptr inbounds %struct.tree, ptr %164, i32 0, i32 3
  %166 = load i32, ptr %165, align 4, !tbaa !32
  %167 = icmp ne i32 %166, -1
  br i1 %167, label %182, label %168

168:                                              ; preds = %161, %154
  %169 = load ptr, ptr %11, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.meta, ptr %169, i32 0, i32 6
  %171 = getelementptr inbounds %struct.anon.22, ptr %170, i32 0, i32 1
  %172 = getelementptr inbounds %struct.tree, ptr %171, i32 0, i32 9
  %173 = load i64, ptr %172, align 4, !tbaa !32
  %174 = icmp ne i64 %173, 0
  br i1 %174, label %187, label %175

175:                                              ; preds = %168
  %176 = load ptr, ptr %11, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.meta, ptr %176, i32 0, i32 6
  %178 = getelementptr inbounds %struct.anon.22, ptr %177, i32 0, i32 1
  %179 = getelementptr inbounds %struct.tree, ptr %178, i32 0, i32 3
  %180 = load i32, ptr %179, align 4, !tbaa !32
  %181 = icmp ne i32 %180, -1
  br i1 %181, label %182, label %187

182:                                              ; preds = %175, %161
  %183 = load ptr, ptr %11, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.meta, ptr %183, i32 0, i32 0
  %185 = load ptr, ptr %9, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.meta, ptr %185, i32 0, i32 0
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %184, ptr align 4 %186, i64 8, i1 false)
  br label %187

187:                                              ; preds = %182, %175, %168
  %188 = load ptr, ptr %6, align 8, !tbaa !5
  %189 = load ptr, ptr %11, align 8, !tbaa !5
  %190 = call zeroext i1 @coherency_check_meta(ptr noundef %188, ptr noundef %189, i1 noundef zeroext false)
  %191 = xor i1 %190, true
  %192 = xor i1 %191, true
  %193 = xor i1 %192, true
  %194 = zext i1 %193 to i32
  %195 = sext i32 %194 to i64
  %196 = call i64 @llvm.expect.i64(i64 %195, i64 0)
  %197 = icmp ne i64 %196, 0
  br i1 %197, label %198, label %215

198:                                              ; preds = %187
  br label %199

199:                                              ; preds = %198
  %200 = load i8, ptr getelementptr inbounds (%struct.libmdbx_globals, ptr @globals, i32 0, i32 5), align 2, !tbaa !25
  %201 = zext i8 %200 to i32
  %202 = icmp sle i32 1, %201
  %203 = xor i1 %202, true
  %204 = xor i1 %203, true
  %205 = zext i1 %204 to i32
  %206 = sext i32 %205 to i64
  %207 = call i64 @llvm.expect.i64(i64 %206, i64 0)
  %208 = icmp ne i64 %207, 0
  br i1 %208, label %209, label %212

209:                                              ; preds = %199
  %210 = load i64, ptr %7, align 8, !tbaa !9
  %211 = load i64, ptr %8, align 8, !tbaa !9
  call void (i32, ptr, i32, ptr, ...) @debug_log(i32 noundef 1, ptr noundef @__func__.meta_override, i32 noundef 381, ptr noundef @.str.13, i64 noundef %210, ptr noundef @.str.15, i64 noundef %211)
  br label %212

212:                                              ; preds = %209, %199
  br label %213

213:                                              ; preds = %212
  br label %214

214:                                              ; preds = %213
  store i32 -30779, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %457

215:                                              ; preds = %187
  br label %216

216:                                              ; preds = %215, %120
  br label %217

217:                                              ; preds = %216, %75
  %218 = load i64, ptr %7, align 8, !tbaa !9
  %219 = icmp eq i64 %218, 0
  br i1 %219, label %220, label %241

220:                                              ; preds = %217
  %221 = load ptr, ptr %11, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.meta, ptr %221, i32 0, i32 12
  %223 = getelementptr inbounds %struct.anon, ptr %222, i32 0, i32 0
  %224 = load i64, ptr %223, align 4, !tbaa !32
  %225 = load ptr, ptr %11, align 8, !tbaa !5
  %226 = getelementptr inbounds %struct.meta, ptr %225, i32 0, i32 12
  %227 = getelementptr inbounds %struct.anon, ptr %226, i32 0, i32 1
  %228 = load i64, ptr %227, align 4, !tbaa !32
  %229 = or i64 %224, %228
  %230 = icmp eq i64 %229, 0
  br i1 %230, label %231, label %241

231:                                              ; preds = %220
  call void @llvm.lifetime.start.p0(i64 16, ptr %13) #9
  %232 = load ptr, ptr %6, align 8, !tbaa !5
  %233 = call { i64, i64 } @osal_guid(ptr noundef %232)
  %234 = getelementptr inbounds %union.bin128, ptr %13, i32 0, i32 0
  %235 = getelementptr inbounds { i64, i64 }, ptr %234, i32 0, i32 0
  %236 = extractvalue { i64, i64 } %233, 0
  store i64 %236, ptr %235, align 8
  %237 = getelementptr inbounds { i64, i64 }, ptr %234, i32 0, i32 1
  %238 = extractvalue { i64, i64 } %233, 1
  store i64 %238, ptr %237, align 8
  %239 = load ptr, ptr %11, align 8, !tbaa !5
  %240 = getelementptr inbounds %struct.meta, ptr %239, i32 0, i32 12
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %240, ptr align 8 %13, i64 16, i1 false)
  call void @llvm.lifetime.end.p0(i64 16, ptr %13) #9
  br label %241

241:                                              ; preds = %231, %220, %217
  %242 = load ptr, ptr %11, align 8, !tbaa !5
  call void @meta_sign_as_steady(ptr noundef %242)
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #9
  %243 = load ptr, ptr %6, align 8, !tbaa !5
  %244 = load ptr, ptr %11, align 8, !tbaa !5
  %245 = load ptr, ptr %10, align 8, !tbaa !5
  %246 = load i64, ptr %7, align 8, !tbaa !9
  %247 = trunc i64 %246 to i32
  %248 = call i32 @meta_validate(ptr noundef %243, ptr noundef %244, ptr noundef %245, i32 noundef %247, ptr noundef null)
  store i32 %248, ptr %14, align 4, !tbaa !33
  %249 = load i32, ptr %14, align 4, !tbaa !33
  %250 = icmp ne i32 %249, -1
  br i1 %250, label %251, label %254

251:                                              ; preds = %241
  %252 = load i32, ptr %14, align 4, !tbaa !33
  %253 = icmp ne i32 %252, 0
  br label %254

254:                                              ; preds = %251, %241
  %255 = phi i1 [ false, %241 ], [ %253, %251 ]
  %256 = xor i1 %255, true
  %257 = xor i1 %256, true
  %258 = zext i1 %257 to i32
  %259 = sext i32 %258 to i64
  %260 = call i64 @llvm.expect.i64(i64 %259, i64 0)
  %261 = icmp ne i64 %260, 0
  br i1 %261, label %262, label %263

262:                                              ; preds = %254
  store i32 -30779, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %456

263:                                              ; preds = %254
  %264 = load ptr, ptr %9, align 8, !tbaa !5
  %265 = icmp ne ptr %264, null
  br i1 %265, label %266, label %288

266:                                              ; preds = %263
  %267 = load ptr, ptr %11, align 8, !tbaa !5
  %268 = load ptr, ptr %9, align 8, !tbaa !5
  %269 = call i32 @memcmp(ptr noundef %267, ptr noundef %268, i64 noundef 224) #10
  %270 = icmp eq i32 %269, 0
  br i1 %270, label %271, label %288

271:                                              ; preds = %266
  br label %272

272:                                              ; preds = %271
  %273 = load i8, ptr getelementptr inbounds (%struct.libmdbx_globals, ptr @globals, i32 0, i32 5), align 2, !tbaa !25
  %274 = zext i8 %273 to i32
  %275 = icmp sle i32 3, %274
  %276 = xor i1 %275, true
  %277 = xor i1 %276, true
  %278 = zext i1 %277 to i32
  %279 = sext i32 %278 to i64
  %280 = call i64 @llvm.expect.i64(i64 %279, i64 0)
  %281 = icmp ne i64 %280, 0
  br i1 %281, label %282, label %285

282:                                              ; preds = %272
  %283 = load i64, ptr %7, align 8, !tbaa !9
  %284 = load i64, ptr %8, align 8, !tbaa !9
  call void (i32, ptr, i32, ptr, ...) @debug_log(i32 noundef 3, ptr noundef @__func__.meta_override, i32 noundef 400, ptr noundef @.str.16, i64 noundef %283, i64 noundef %284)
  br label %285

285:                                              ; preds = %282, %272
  br label %286

286:                                              ; preds = %285
  br label %287

287:                                              ; preds = %286
  store i32 0, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %456

288:                                              ; preds = %266, %263
  %289 = load ptr, ptr %6, align 8, !tbaa !5
  %290 = getelementptr inbounds %struct.MDBX_env, ptr %289, i32 0, i32 1
  %291 = load i32, ptr %290, align 4, !tbaa !34
  %292 = and i32 %291, 524288
  %293 = icmp ne i32 %292, 0
  br i1 %293, label %294, label %345

294:                                              ; preds = %288
  %295 = load ptr, ptr %6, align 8, !tbaa !5
  %296 = getelementptr inbounds %struct.MDBX_env, ptr %295, i32 0, i32 7
  %297 = load ptr, ptr %296, align 8, !tbaa !35
  %298 = getelementptr inbounds %struct.shared_lck, ptr %297, i32 0, i32 9
  %299 = getelementptr inbounds %struct.pgops, ptr %298, i32 0, i32 8
  %300 = load volatile i64, ptr %299, align 64, !tbaa !32
  %301 = add i64 %300, 1
  store volatile i64 %301, ptr %299, align 64, !tbaa !32
  %302 = load ptr, ptr %6, align 8, !tbaa !5
  %303 = getelementptr inbounds %struct.MDBX_env, ptr %302, i32 0, i32 3
  %304 = load ptr, ptr %6, align 8, !tbaa !5
  %305 = load ptr, ptr %11, align 8, !tbaa !5
  %306 = getelementptr inbounds %struct.meta, ptr %305, i32 0, i32 5
  %307 = getelementptr inbounds %struct.geo, ptr %306, i32 0, i32 5
  %308 = load i32, ptr %307, align 4, !tbaa !32
  %309 = zext i32 %308 to i64
  %310 = call i64 @pgno_align2os_bytes(ptr noundef %304, i64 noundef %309) #10
  %311 = call i32 @osal_msync(ptr noundef %303, i64 noundef 0, i64 noundef %310, i32 noundef 10)
  store i32 %311, ptr %14, align 4, !tbaa !33
  %312 = load i32, ptr %14, align 4, !tbaa !33
  %313 = icmp ne i32 %312, 0
  %314 = xor i1 %313, true
  %315 = xor i1 %314, true
  %316 = zext i1 %315 to i32
  %317 = sext i32 %316 to i64
  %318 = call i64 @llvm.expect.i64(i64 %317, i64 0)
  %319 = icmp ne i64 %318, 0
  br i1 %319, label %320, label %322

320:                                              ; preds = %294
  %321 = load i32, ptr %14, align 4, !tbaa !33
  store i32 %321, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %456

322:                                              ; preds = %294
  %323 = load ptr, ptr %6, align 8, !tbaa !5
  %324 = load i64, ptr %7, align 8, !tbaa !9
  %325 = call ptr @pgno2page(ptr noundef %323, i64 noundef %324) #10
  %326 = load ptr, ptr %10, align 8, !tbaa !5
  %327 = load ptr, ptr %6, align 8, !tbaa !5
  %328 = getelementptr inbounds %struct.MDBX_env, ptr %327, i32 0, i32 2
  %329 = load i32, ptr %328, align 8, !tbaa !36
  %330 = zext i32 %329 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %325, ptr align 1 %326, i64 %330, i1 false)
  call void @osal_compiler_barrier()
  %331 = load ptr, ptr %6, align 8, !tbaa !5
  %332 = getelementptr inbounds %struct.MDBX_env, ptr %331, i32 0, i32 7
  %333 = load ptr, ptr %332, align 8, !tbaa !35
  %334 = getelementptr inbounds %struct.shared_lck, ptr %333, i32 0, i32 9
  %335 = getelementptr inbounds %struct.pgops, ptr %334, i32 0, i32 8
  %336 = load volatile i64, ptr %335, align 64, !tbaa !32
  %337 = add i64 %336, 1
  store volatile i64 %337, ptr %335, align 64, !tbaa !32
  %338 = load ptr, ptr %6, align 8, !tbaa !5
  %339 = getelementptr inbounds %struct.MDBX_env, ptr %338, i32 0, i32 3
  %340 = load ptr, ptr %6, align 8, !tbaa !5
  %341 = load i64, ptr %7, align 8, !tbaa !9
  %342 = add i64 %341, 1
  %343 = call i64 @pgno_align2os_bytes(ptr noundef %340, i64 noundef %342) #10
  %344 = call i32 @osal_msync(ptr noundef %339, i64 noundef 0, i64 noundef %343, i32 noundef 10)
  store i32 %344, ptr %14, align 4, !tbaa !33
  br label %398

345:                                              ; preds = %288
  %346 = load ptr, ptr %6, align 8, !tbaa !5
  %347 = getelementptr inbounds %struct.MDBX_env, ptr %346, i32 0, i32 7
  %348 = load ptr, ptr %347, align 8, !tbaa !35
  %349 = getelementptr inbounds %struct.shared_lck, ptr %348, i32 0, i32 9
  %350 = getelementptr inbounds %struct.pgops, ptr %349, i32 0, i32 7
  %351 = load volatile i64, ptr %350, align 8, !tbaa !32
  %352 = add i64 %351, 1
  store volatile i64 %352, ptr %350, align 8, !tbaa !32
  %353 = load ptr, ptr %6, align 8, !tbaa !5
  %354 = getelementptr inbounds %struct.MDBX_env, ptr %353, i32 0, i32 5
  %355 = load i32, ptr %354, align 4, !tbaa !37
  %356 = load ptr, ptr %10, align 8, !tbaa !5
  %357 = load ptr, ptr %6, align 8, !tbaa !5
  %358 = getelementptr inbounds %struct.MDBX_env, ptr %357, i32 0, i32 2
  %359 = load i32, ptr %358, align 8, !tbaa !36
  %360 = zext i32 %359 to i64
  %361 = load ptr, ptr %6, align 8, !tbaa !5
  %362 = load i64, ptr %7, align 8, !tbaa !9
  %363 = call i64 @pgno2bytes(ptr noundef %361, i64 noundef %362) #10
  %364 = call i32 @osal_pwrite(i32 noundef %355, ptr noundef %356, i64 noundef %360, i64 noundef %363)
  store i32 %364, ptr %14, align 4, !tbaa !33
  %365 = load i32, ptr %14, align 4, !tbaa !33
  %366 = icmp eq i32 %365, 0
  br i1 %366, label %367, label %389

367:                                              ; preds = %345
  %368 = load ptr, ptr %6, align 8, !tbaa !5
  %369 = getelementptr inbounds %struct.MDBX_env, ptr %368, i32 0, i32 5
  %370 = load i32, ptr %369, align 4, !tbaa !37
  %371 = load ptr, ptr %6, align 8, !tbaa !5
  %372 = getelementptr inbounds %struct.MDBX_env, ptr %371, i32 0, i32 3
  %373 = getelementptr inbounds %struct.osal_mmap, ptr %372, i32 0, i32 1
  %374 = load i32, ptr %373, align 8, !tbaa !38
  %375 = icmp eq i32 %370, %374
  br i1 %375, label %376, label %389

376:                                              ; preds = %367
  %377 = load ptr, ptr %6, align 8, !tbaa !5
  %378 = getelementptr inbounds %struct.MDBX_env, ptr %377, i32 0, i32 7
  %379 = load ptr, ptr %378, align 8, !tbaa !35
  %380 = getelementptr inbounds %struct.shared_lck, ptr %379, i32 0, i32 9
  %381 = getelementptr inbounds %struct.pgops, ptr %380, i32 0, i32 9
  %382 = load volatile i64, ptr %381, align 8, !tbaa !32
  %383 = add i64 %382, 1
  store volatile i64 %383, ptr %381, align 8, !tbaa !32
  %384 = load ptr, ptr %6, align 8, !tbaa !5
  %385 = getelementptr inbounds %struct.MDBX_env, ptr %384, i32 0, i32 3
  %386 = getelementptr inbounds %struct.osal_mmap, ptr %385, i32 0, i32 1
  %387 = load i32, ptr %386, align 8, !tbaa !38
  %388 = call i32 @osal_fsync(i32 noundef %387, i32 noundef 10)
  store i32 %388, ptr %14, align 4, !tbaa !33
  br label %389

389:                                              ; preds = %376, %367, %345
  %390 = load ptr, ptr %6, align 8, !tbaa !5
  %391 = getelementptr inbounds %struct.MDBX_env, ptr %390, i32 0, i32 3
  %392 = getelementptr inbounds %struct.osal_mmap, ptr %391, i32 0, i32 0
  %393 = load ptr, ptr %392, align 8, !tbaa !32
  %394 = load ptr, ptr %6, align 8, !tbaa !5
  %395 = call i64 @pgno2bytes(ptr noundef %394, i64 noundef 3) #10
  %396 = load i32, ptr getelementptr inbounds (%struct.libmdbx_globals, ptr @globals, i32 0, i32 1), align 8, !tbaa !39
  %397 = zext i32 %396 to i64
  call void @osal_flush_incoherent_mmap(ptr noundef %393, i64 noundef %395, i64 noundef %397)
  br label %398

398:                                              ; preds = %389, %322
  br label %399

399:                                              ; preds = %398
  %400 = load i8, ptr getelementptr inbounds (%struct.libmdbx_globals, ptr @globals, i32 0, i32 4), align 1, !tbaa !23
  %401 = zext i8 %400 to i32
  %402 = and i32 %401, 1
  %403 = icmp ne i32 %402, 0
  %404 = xor i1 %403, true
  %405 = xor i1 %404, true
  %406 = zext i1 %405 to i32
  %407 = sext i32 %406 to i64
  %408 = call i64 @llvm.expect.i64(i64 %407, i64 1)
  %409 = icmp ne i64 %408, 0
  br i1 %409, label %410, label %452

410:                                              ; preds = %399
  br label %411

411:                                              ; preds = %410
  %412 = load ptr, ptr %6, align 8, !tbaa !5
  %413 = getelementptr inbounds %struct.MDBX_env, ptr %412, i32 0, i32 39
  %414 = load ptr, ptr %413, align 8, !tbaa !40
  %415 = icmp ne ptr %414, null
  br i1 %415, label %422, label %416

416:                                              ; preds = %411
  %417 = load ptr, ptr %6, align 8, !tbaa !5
  %418 = getelementptr inbounds %struct.MDBX_env, ptr %417, i32 0, i32 1
  %419 = load i32, ptr %418, align 4, !tbaa !34
  %420 = and i32 %419, 536870912
  %421 = icmp eq i32 %420, 0
  br i1 %421, label %438, label %422

422:                                              ; preds = %416, %411
  %423 = load ptr, ptr %6, align 8, !tbaa !5
  %424 = getelementptr inbounds %struct.MDBX_env, ptr %423, i32 0, i32 16
  %425 = load i8, ptr %424, align 1, !tbaa !41
  %426 = sext i8 %425 to i32
  %427 = load i64, ptr %7, align 8, !tbaa !9
  %428 = trunc i64 %427 to i32
  %429 = icmp eq i32 %426, %428
  br i1 %429, label %430, label %436

430:                                              ; preds = %422
  %431 = load ptr, ptr %6, align 8, !tbaa !5
  %432 = getelementptr inbounds %struct.MDBX_env, ptr %431, i32 0, i32 1
  %433 = load i32, ptr %432, align 4, !tbaa !34
  %434 = and i32 %433, 4325376
  %435 = icmp eq i32 %434, 4194304
  br label %436

436:                                              ; preds = %430, %422
  %437 = phi i1 [ false, %422 ], [ %435, %430 ]
  br label %438

438:                                              ; preds = %436, %416
  %439 = phi i1 [ true, %416 ], [ %437, %436 ]
  %440 = xor i1 %439, true
  %441 = xor i1 %440, true
  %442 = xor i1 %441, true
  %443 = zext i1 %442 to i32
  %444 = sext i32 %443 to i64
  %445 = call i64 @llvm.expect.i64(i64 %444, i64 0)
  %446 = icmp ne i64 %445, 0
  br i1 %446, label %447, label %449

447:                                              ; preds = %438
  %448 = load ptr, ptr %6, align 8, !tbaa !5
  call void @mdbx_assert_fail(ptr noundef %448, ptr noundef @.str.17, ptr noundef @__func__.meta_override, i32 noundef 435) #12
  unreachable

449:                                              ; preds = %438
  br label %450

450:                                              ; preds = %449
  br label %451

451:                                              ; preds = %450
  br label %452

452:                                              ; preds = %451, %399
  br label %453

453:                                              ; preds = %452
  br label %454

454:                                              ; preds = %453
  %455 = load i32, ptr %14, align 4, !tbaa !33
  store i32 %455, ptr %5, align 4
  store i32 1, ptr %12, align 4
  br label %456

456:                                              ; preds = %454, %320, %287, %262
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #9
  br label %457

457:                                              ; preds = %456, %214, %109
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #9
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #9
  %458 = load i32, ptr %5, align 4
  ret i32 %458
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @meta_set_txnid(ptr noundef, ptr noundef, i64 noundef) #7

declare zeroext i1 @coherency_check_meta(ptr noundef, ptr noundef, i1 noundef zeroext) #5

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare hidden i64 @constmeta_txnid(ptr noundef) #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @meta_sign_as_steady(ptr noundef) #7

; Function Attrs: cold nounwind optsize uwtable
declare dso_local i32 @meta_validate(ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef) #8

; Function Attrs: nounwind willreturn memory(read)
declare i32 @memcmp(ptr noundef, ptr noundef, i64 noundef) #6

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @osal_compiler_barrier() #7

declare i32 @osal_pwrite(i32 noundef, ptr noundef, i64 noundef, i64 noundef) #5

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 = { inlinehint nounwind willreturn memory(read) 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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { "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(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 #7 = { 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 #8 = { 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 #9 = { nounwind }
attributes #10 = { nounwind willreturn memory(read) }
attributes #11 = { cold }
attributes #12 = { 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, !6, i64 184}
!12 = !{!"MDBX_env", !7, i64 0, !13, i64 4, !13, i64 8, !14, i64 16, !13, i64 56, !13, i64 60, !14, i64 64, !6, i64 104, !15, i64 112, !15, i64 114, !15, i64 116, !15, i64 118, !15, i64 120, !15, i64 122, !7, i64 124, !7, i64 128, !7, i64 129, !15, i64 130, !13, i64 132, !13, i64 136, !13, i64 140, !13, i64 144, !16, i64 152, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !13, i64 224, !13, i64 228, !13, i64 232, !6, i64 240, !6, i64 248, !10, i64 256, !17, i64 264, !20, i64 320, !18, i64 360, !6, i64 368, !6, i64 376, !6, i64 384, !21, i64 392, !7, i64 400, !13, i64 440, !13, i64 444, !6, i64 448, !22, i64 456, !7, i64 496, !7, i64 536}
!13 = !{!"int", !7, i64 0}
!14 = !{!"osal_mmap", !7, i64 0, !13, i64 8, !10, i64 16, !10, i64 24, !10, i64 32}
!15 = !{!"short", !7, i64 0}
!16 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!17 = !{!"", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !10, i64 16, !7, i64 24, !7, i64 25, !7, i64 26, !7, i64 27, !13, i64 28, !13, i64 32, !18, i64 36, !18, i64 37, !18, i64 38, !19, i64 40, !7, i64 48}
!18 = !{!"_Bool", !7, i64 0}
!19 = !{!"", !15, i64 0, !15, i64 2, !15, i64 4, !15, i64 6}
!20 = !{!"", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32}
!21 = !{!"", !10, i64 0}
!22 = !{!"osal_ioring", !13, i64 0, !13, i64 4, !13, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!23 = !{!24, !7, i64 25}
!24 = !{!"libmdbx_globals", !7, i64 0, !13, i64 16, !13, i64 20, !7, i64 24, !7, i64 25, !7, i64 26, !18, i64 27, !13, i64 28, !7, i64 32, !7, i64 40, !10, i64 80, !6, i64 88}
!25 = !{!24, !7, i64 26}
!26 = !{!27, !15, i64 16}
!27 = !{!"meta", !7, i64 0, !7, i64 8, !15, i64 16, !7, i64 18, !7, i64 19, !28, i64 20, !7, i64 40, !29, i64 136, !7, i64 168, !7, i64 176, !7, i64 184, !7, i64 192, !7, i64 208}
!28 = !{!"geo", !15, i64 0, !15, i64 2, !13, i64 4, !13, i64 8, !7, i64 12, !7, i64 16}
!29 = !{!"MDBX_canary", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24}
!30 = !{!27, !7, i64 18}
!31 = !{!27, !7, i64 19}
!32 = !{!7, !7, i64 0}
!33 = !{!13, !13, i64 0}
!34 = !{!12, !13, i64 4}
!35 = !{!12, !6, i64 104}
!36 = !{!12, !13, i64 8}
!37 = !{!12, !13, i64 60}
!38 = !{!12, !13, i64 24}
!39 = !{!24, !13, i64 16}
!40 = !{!12, !6, i64 384}
!41 = !{!12, !7, i64 129}


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

@globals = external local_unnamed_addr global %struct.libmdbx_globals, align 8
@.str.12 = external hidden unnamed_addr constant [38 x i8], align 1
@__func__.meta_override = external hidden unnamed_addr constant [14 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [86 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [149 x i8], align 1

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

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare hidden ptr @page_meta(ptr noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare hidden ptr @pgno2page(ptr noundef, i64 noundef) local_unnamed_addr #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) #2

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

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

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @osal_flush_incoherent_mmap(ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #5

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare hidden i64 @pgno2bytes(ptr noundef, i64 noundef) local_unnamed_addr #1

declare { i64, i64 } @osal_guid(ptr noundef) local_unnamed_addr #3

; Function Attrs: cold nounwind optsize uwtable
declare hidden ptr @meta_model(ptr noundef, ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #6

; Function Attrs: cold nounwind optsize uwtable
define dso_local i32 @meta_override(ptr noundef %0, i64 noundef %1, i64 noundef %2, ptr noundef %3) local_unnamed_addr #6 {
  %5 = getelementptr inbounds i8, ptr %0, i64 184
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  %7 = icmp eq i64 %1, 0
  %8 = icmp ne ptr %3, null
  %or.cond = and i1 %7, %8
  br i1 %or.cond, label %12, label %9

9:                                                ; preds = %4
  %10 = tail call ptr @pgno2page(ptr noundef nonnull %0, i64 noundef 0) #8
  %11 = tail call ptr @page_meta(ptr noundef %10) #8
  br label %12

12:                                               ; preds = %4, %9
  %13 = phi ptr [ %11, %9 ], [ %3, %4 ]
  %14 = getelementptr inbounds i8, ptr %13, i64 208
  %15 = tail call ptr @meta_model(ptr noundef nonnull %0, ptr noundef %6, i64 noundef %1, ptr noundef nonnull %14) #9
  %16 = tail call ptr @page_meta(ptr noundef %6) #8
  tail call void @meta_set_txnid(ptr noundef nonnull %0, ptr noundef %16, i64 noundef %2)
  %.not = icmp eq i64 %2, 0
  br i1 %.not, label %.thread, label %17

17:                                               ; preds = %12
  %18 = load i8, ptr getelementptr inbounds (i8, ptr @globals, i64 25), align 1, !tbaa !21
  %19 = and i8 %18, 1
  %.not110 = icmp eq i8 %19, 0
  br i1 %.not110, label %23, label %20, !prof !23

20:                                               ; preds = %17
  %21 = tail call zeroext i1 @coherency_check_meta(ptr noundef nonnull %0, ptr noundef %16, i1 noundef zeroext true) #10
  br i1 %21, label %23, label %22, !prof !24

22:                                               ; preds = %20
  tail call void @mdbx_assert_fail(ptr noundef nonnull %0, ptr noundef nonnull @.str.12, ptr noundef nonnull @__func__.meta_override, i32 noundef 357) #11
  unreachable

23:                                               ; preds = %17, %20
  br i1 %8, label %24, label %72

.thread:                                          ; preds = %12
  br i1 %8, label %.thread124, label %72

24:                                               ; preds = %23
  %25 = tail call zeroext i1 @coherency_check_meta(ptr noundef nonnull %0, ptr noundef nonnull %3, i1 noundef zeroext false) #10
  br i1 %25, label %.thread124, label %26, !prof !24

26:                                               ; preds = %24
  %27 = load i8, ptr getelementptr inbounds (i8, ptr @globals, i64 26), align 2, !tbaa !25
  %.not121 = icmp eq i8 %27, 0
  br i1 %.not121, label %.critedge, label %28, !prof !24

28:                                               ; preds = %26
  %29 = tail call i64 @constmeta_txnid(ptr noundef nonnull %3) #8
  tail call void (i32, ptr, i32, ptr, ...) @debug_log(i32 noundef 1, ptr noundef nonnull @__func__.meta_override, i32 noundef 362, ptr noundef nonnull @.str.13, i64 noundef %1, ptr noundef nonnull @.str.14, i64 noundef %29) #10
  br label %.critedge

.thread124:                                       ; preds = %.thread, %24
  %30 = load i8, ptr getelementptr inbounds (i8, ptr @globals, i64 25), align 1, !tbaa !21
  %31 = and i8 %30, 64
  %.not111 = icmp eq i8 %31, 0
  br i1 %.not111, label %34, label %32

32:                                               ; preds = %.thread124
  %33 = load i64, ptr %3, align 4
  store i64 %33, ptr %16, align 4
  br label %34

34:                                               ; preds = %32, %.thread124
  %35 = getelementptr inbounds i8, ptr %3, i64 16
  %36 = load i16, ptr %35, align 4, !tbaa !26
  %37 = getelementptr inbounds i8, ptr %16, i64 16
  store i16 %36, ptr %37, align 4, !tbaa !26
  %38 = getelementptr inbounds i8, ptr %3, i64 18
  %39 = load i8, ptr %38, align 2, !tbaa !30
  %40 = getelementptr inbounds i8, ptr %16, i64 18
  store i8 %39, ptr %40, align 2, !tbaa !30
  %41 = getelementptr inbounds i8, ptr %3, i64 19
  %42 = load i8, ptr %41, align 1, !tbaa !31
  %43 = getelementptr inbounds i8, ptr %16, i64 19
  store i8 %42, ptr %43, align 1, !tbaa !31
  %44 = getelementptr inbounds i8, ptr %16, i64 20
  %45 = getelementptr inbounds i8, ptr %3, i64 20
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(20) %44, ptr noundef nonnull align 4 dereferenceable(20) %45, i64 20, i1 false)
  %46 = getelementptr inbounds i8, ptr %16, i64 40
  %47 = getelementptr inbounds i8, ptr %3, i64 40
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(96) %46, ptr noundef nonnull align 4 dereferenceable(96) %47, i64 96, i1 false)
  %48 = getelementptr inbounds i8, ptr %16, i64 136
  %49 = getelementptr inbounds i8, ptr %3, i64 136
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(32) %48, ptr noundef nonnull align 4 dereferenceable(32) %49, i64 32, i1 false)
  %50 = getelementptr inbounds i8, ptr %16, i64 184
  %51 = getelementptr inbounds i8, ptr %3, i64 184
  %52 = load i64, ptr %51, align 4
  store i64 %52, ptr %50, align 4
  br i1 %.not, label %72, label %53

53:                                               ; preds = %34
  %54 = getelementptr inbounds i8, ptr %16, i64 80
  %55 = load i64, ptr %54, align 4, !tbaa !32
  %.not112 = icmp eq i64 %55, 0
  br i1 %.not112, label %56, label %59

56:                                               ; preds = %53
  %57 = getelementptr inbounds i8, ptr %16, i64 48
  %58 = load i32, ptr %57, align 4, !tbaa !32
  %.not113 = icmp eq i32 %58, -1
  br i1 %.not113, label %59, label %65

59:                                               ; preds = %56, %53
  %60 = getelementptr inbounds i8, ptr %16, i64 128
  %61 = load i64, ptr %60, align 4, !tbaa !32
  %.not114 = icmp eq i64 %61, 0
  br i1 %.not114, label %62, label %67

62:                                               ; preds = %59
  %63 = getelementptr inbounds i8, ptr %16, i64 96
  %64 = load i32, ptr %63, align 4, !tbaa !32
  %.not115 = icmp eq i32 %64, -1
  br i1 %.not115, label %67, label %65

65:                                               ; preds = %62, %56
  %66 = load i64, ptr %3, align 4
  store i64 %66, ptr %16, align 4
  br label %67

67:                                               ; preds = %65, %62, %59
  %68 = tail call zeroext i1 @coherency_check_meta(ptr noundef nonnull %0, ptr noundef nonnull %16, i1 noundef zeroext false) #10
  br i1 %68, label %72, label %69, !prof !24

69:                                               ; preds = %67
  %70 = load i8, ptr getelementptr inbounds (i8, ptr @globals, i64 26), align 2, !tbaa !25
  %.not120 = icmp eq i8 %70, 0
  br i1 %.not120, label %.critedge, label %71, !prof !24

71:                                               ; preds = %69
  tail call void (i32, ptr, i32, ptr, ...) @debug_log(i32 noundef 1, ptr noundef nonnull @__func__.meta_override, i32 noundef 381, ptr noundef nonnull @.str.13, i64 noundef %1, ptr noundef nonnull @.str.15, i64 noundef %2) #10
  br label %.critedge

72:                                               ; preds = %.thread, %34, %67, %23
  br i1 %7, label %73, label %84

73:                                               ; preds = %72
  %74 = getelementptr inbounds i8, ptr %16, i64 208
  %75 = load i64, ptr %74, align 4, !tbaa !32
  %76 = getelementptr inbounds i8, ptr %16, i64 216
  %77 = load i64, ptr %76, align 4, !tbaa !32
  %78 = or i64 %77, %75
  %79 = icmp eq i64 %78, 0
  br i1 %79, label %80, label %84

80:                                               ; preds = %73
  %81 = tail call { i64, i64 } @osal_guid(ptr noundef nonnull %0) #10
  %82 = extractvalue { i64, i64 } %81, 0
  %83 = extractvalue { i64, i64 } %81, 1
  store i64 %82, ptr %74, align 4
  store i64 %83, ptr %76, align 4
  br label %84

84:                                               ; preds = %80, %73, %72
  tail call void @meta_sign_as_steady(ptr noundef %16)
  %85 = trunc i64 %1 to i32
  %86 = tail call i32 @meta_validate(ptr noundef nonnull %0, ptr noundef %16, ptr noundef %6, i32 noundef %85, ptr noundef null)
  %87 = add i32 %86, -1
  %88 = icmp ult i32 %87, -2
  br i1 %88, label %.critedge, label %89, !prof !23

89:                                               ; preds = %84
  br i1 %8, label %90, label %96

90:                                               ; preds = %89
  %bcmp = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(224) %16, ptr noundef nonnull dereferenceable(224) %3, i64 224)
  %91 = icmp eq i32 %bcmp, 0
  br i1 %91, label %92, label %96

92:                                               ; preds = %90
  %93 = load i8, ptr getelementptr inbounds (i8, ptr @globals, i64 26), align 2, !tbaa !25
  %94 = icmp ugt i8 %93, 2
  br i1 %94, label %95, label %.critedge, !prof !23

95:                                               ; preds = %92
  tail call void (i32, ptr, i32, ptr, ...) @debug_log(i32 noundef 3, ptr noundef nonnull @__func__.meta_override, i32 noundef 400, ptr noundef nonnull @.str.16, i64 noundef %1, i64 noundef %2) #10
  br label %.critedge

96:                                               ; preds = %90, %89
  %97 = getelementptr inbounds i8, ptr %0, i64 4
  %98 = load i32, ptr %97, align 4, !tbaa !33
  %99 = and i32 %98, 524288
  %.not116 = icmp eq i32 %99, 0
  %100 = getelementptr inbounds i8, ptr %0, i64 104
  %101 = load ptr, ptr %100, align 8, !tbaa !34
  br i1 %.not116, label %124, label %102

102:                                              ; preds = %96
  %103 = getelementptr inbounds i8, ptr %101, i64 128
  %104 = load volatile i64, ptr %103, align 64, !tbaa !32
  %105 = add i64 %104, 1
  store volatile i64 %105, ptr %103, align 64, !tbaa !32
  %106 = getelementptr inbounds i8, ptr %0, i64 16
  %107 = getelementptr inbounds i8, ptr %16, i64 36
  %108 = load i32, ptr %107, align 4, !tbaa !32
  %109 = zext i32 %108 to i64
  %110 = tail call i64 @pgno_align2os_bytes(ptr noundef nonnull %0, i64 noundef %109) #8
  %111 = tail call i32 @osal_msync(ptr noundef nonnull %106, i64 noundef 0, i64 noundef %110, i32 noundef 10) #10
  %.not117 = icmp eq i32 %111, 0
  br i1 %.not117, label %112, label %.critedge, !prof !24

112:                                              ; preds = %102
  %113 = tail call ptr @pgno2page(ptr noundef nonnull %0, i64 noundef %1) #8
  %114 = getelementptr inbounds i8, ptr %0, i64 8
  %115 = load i32, ptr %114, align 8, !tbaa !35
  %116 = zext i32 %115 to i64
  tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %113, ptr align 1 %6, i64 %116, i1 false)
  tail call void @osal_compiler_barrier()
  %117 = load ptr, ptr %100, align 8, !tbaa !34
  %118 = getelementptr inbounds i8, ptr %117, i64 128
  %119 = load volatile i64, ptr %118, align 64, !tbaa !32
  %120 = add i64 %119, 1
  store volatile i64 %120, ptr %118, align 64, !tbaa !32
  %121 = add i64 %1, 1
  %122 = tail call i64 @pgno_align2os_bytes(ptr noundef nonnull %0, i64 noundef %121) #8
  %123 = tail call i32 @osal_msync(ptr noundef nonnull %106, i64 noundef 0, i64 noundef %122, i32 noundef 10) #10
  br label %154

124:                                              ; preds = %96
  %125 = getelementptr inbounds i8, ptr %101, i64 120
  %126 = load volatile i64, ptr %125, align 8, !tbaa !32
  %127 = add i64 %126, 1
  store volatile i64 %127, ptr %125, align 8, !tbaa !32
  %128 = getelementptr inbounds i8, ptr %0, i64 60
  %129 = load i32, ptr %128, align 4, !tbaa !36
  %130 = getelementptr inbounds i8, ptr %0, i64 8
  %131 = load i32, ptr %130, align 8, !tbaa !35
  %132 = zext i32 %131 to i64
  %133 = tail call i64 @pgno2bytes(ptr noundef nonnull %0, i64 noundef %1) #8
  %134 = tail call i32 @osal_pwrite(i32 noundef %129, ptr noundef %6, i64 noundef %132, i64 noundef %133) #10
  %135 = icmp eq i32 %134, 0
  br i1 %135, label %136, label %148

136:                                              ; preds = %124
  %137 = load i32, ptr %128, align 4, !tbaa !36
  %138 = getelementptr inbounds i8, ptr %0, i64 24
  %139 = load i32, ptr %138, align 8, !tbaa !37
  %140 = icmp eq i32 %137, %139
  br i1 %140, label %141, label %148

141:                                              ; preds = %136
  %142 = load ptr, ptr %100, align 8, !tbaa !34
  %143 = getelementptr inbounds i8, ptr %142, i64 136
  %144 = load volatile i64, ptr %143, align 8, !tbaa !32
  %145 = add i64 %144, 1
  store volatile i64 %145, ptr %143, align 8, !tbaa !32
  %146 = load i32, ptr %138, align 8, !tbaa !37
  %147 = tail call i32 @osal_fsync(i32 noundef %146, i32 noundef 10) #10
  br label %148

148:                                              ; preds = %141, %136, %124
  %.0 = phi i32 [ %147, %141 ], [ 0, %136 ], [ %134, %124 ]
  %149 = getelementptr inbounds i8, ptr %0, i64 16
  %150 = load ptr, ptr %149, align 8, !tbaa !32
  %151 = tail call i64 @pgno2bytes(ptr noundef nonnull %0, i64 noundef 3) #8
  %152 = load i32, ptr getelementptr inbounds (i8, ptr @globals, i64 16), align 8, !tbaa !38
  %153 = zext i32 %152 to i64
  tail call void @osal_flush_incoherent_mmap(ptr noundef %150, i64 noundef %151, i64 noundef %153)
  br label %154

154:                                              ; preds = %112, %148
  %.1 = phi i32 [ %123, %112 ], [ %.0, %148 ]
  %155 = load i8, ptr getelementptr inbounds (i8, ptr @globals, i64 25), align 1, !tbaa !21
  %156 = and i8 %155, 1
  %.not118 = icmp eq i8 %156, 0
  br i1 %.not118, label %.critedge, label %157, !prof !23

157:                                              ; preds = %154
  %158 = getelementptr inbounds i8, ptr %0, i64 384
  %159 = load ptr, ptr %158, align 8, !tbaa !39
  %.not119 = icmp eq ptr %159, null
  br i1 %.not119, label %160, label %164

160:                                              ; preds = %157
  %161 = load i32, ptr %97, align 4, !tbaa !33
  %162 = and i32 %161, 536870912
  %163 = icmp eq i32 %162, 0
  br i1 %163, label %.critedge, label %164

164:                                              ; preds = %160, %157
  %165 = getelementptr inbounds i8, ptr %0, i64 129
  %166 = load i8, ptr %165, align 1, !tbaa !40
  %167 = sext i8 %166 to i32
  %168 = icmp eq i32 %167, %85
  br i1 %168, label %169, label %.critedge123

169:                                              ; preds = %164
  %170 = load i32, ptr %97, align 4, !tbaa !33
  %171 = and i32 %170, 4325376
  %.not125 = icmp eq i32 %171, 4194304
  br i1 %.not125, label %.critedge, label %.critedge123, !prof !24

.critedge123:                                     ; preds = %164, %169
  tail call void @mdbx_assert_fail(ptr noundef nonnull %0, ptr noundef nonnull @.str.17, ptr noundef nonnull @__func__.meta_override, i32 noundef 435) #11
  unreachable

.critedge:                                        ; preds = %84, %95, %92, %102, %160, %169, %154, %69, %71, %26, %28
  %.1103 = phi i32 [ -30779, %28 ], [ -30779, %26 ], [ -30779, %71 ], [ -30779, %69 ], [ -30779, %84 ], [ 0, %95 ], [ 0, %92 ], [ %111, %102 ], [ %.1, %160 ], [ %.1, %169 ], [ %.1, %154 ]
  ret i32 %.1103
}

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @meta_set_txnid(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #5

declare zeroext i1 @coherency_check_meta(ptr noundef, ptr noundef, i1 noundef zeroext) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare hidden i64 @constmeta_txnid(ptr noundef) local_unnamed_addr #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @meta_sign_as_steady(ptr noundef) local_unnamed_addr #5

; Function Attrs: cold nounwind optsize uwtable
declare dso_local i32 @meta_validate(ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #6

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @osal_compiler_barrier() local_unnamed_addr #5

declare i32 @osal_pwrite(i32 noundef, ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #3

; Function Attrs: nofree nounwind willreturn memory(argmem: read)
declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #7

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 = { inlinehint mustprogress nofree nounwind willreturn memory(read) 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 = { mustprogress nocallback nofree 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 = { 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 #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 = { 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 #7 = { nofree nounwind willreturn memory(argmem: read) }
attributes #8 = { nounwind willreturn memory(read) }
attributes #9 = { cold }
attributes #10 = { nounwind }
attributes #11 = { 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 = !{!6, !12, i64 184}
!6 = !{!"MDBX_env", !7, i64 0, !9, i64 4, !9, i64 8, !10, i64 16, !9, i64 56, !9, i64 60, !10, i64 64, !12, i64 104, !13, i64 112, !13, i64 114, !13, i64 116, !13, i64 118, !13, i64 120, !13, i64 122, !7, i64 124, !7, i64 128, !7, i64 129, !13, i64 130, !9, i64 132, !9, i64 136, !9, i64 140, !9, i64 144, !14, 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, !15, i64 264, !18, i64 320, !16, i64 360, !12, i64 368, !12, i64 376, !12, i64 384, !19, i64 392, !7, i64 400, !9, i64 440, !9, i64 444, !12, i64 448, !20, i64 456, !7, i64 496, !7, i64 536}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!"int", !7, i64 0}
!10 = !{!"osal_mmap", !7, i64 0, !9, i64 8, !11, i64 16, !11, i64 24, !11, i64 32}
!11 = !{!"long", !7, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!"short", !7, i64 0}
!14 = !{!"", !12, i64 0, !12, i64 8, !12, i64 16, !12, i64 24}
!15 = !{!"", !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, !16, i64 36, !16, i64 37, !16, i64 38, !17, i64 40, !7, i64 48}
!16 = !{!"_Bool", !7, i64 0}
!17 = !{!"", !13, i64 0, !13, i64 2, !13, i64 4, !13, i64 6}
!18 = !{!"", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32}
!19 = !{!"", !11, i64 0}
!20 = !{!"osal_ioring", !9, i64 0, !9, i64 4, !9, i64 8, !12, i64 16, !12, i64 24, !12, i64 32}
!21 = !{!22, !7, i64 25}
!22 = !{!"libmdbx_globals", !7, i64 0, !9, i64 16, !9, i64 20, !7, i64 24, !7, i64 25, !7, i64 26, !16, i64 27, !9, i64 28, !7, i64 32, !7, i64 40, !11, i64 80, !12, i64 88}
!23 = !{!"branch_weights", !"expected", i32 1, i32 2000}
!24 = !{!"branch_weights", !"expected", i32 2000, i32 1}
!25 = !{!22, !7, i64 26}
!26 = !{!27, !13, i64 16}
!27 = !{!"meta", !7, i64 0, !7, i64 8, !13, i64 16, !7, i64 18, !7, i64 19, !28, i64 20, !7, i64 40, !29, i64 136, !7, i64 168, !7, i64 176, !7, i64 184, !7, i64 192, !7, i64 208}
!28 = !{!"geo", !13, i64 0, !13, i64 2, !9, i64 4, !9, i64 8, !7, i64 12, !7, i64 16}
!29 = !{!"MDBX_canary", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24}
!30 = !{!27, !7, i64 18}
!31 = !{!27, !7, i64 19}
!32 = !{!7, !7, i64 0}
!33 = !{!6, !9, i64 4}
!34 = !{!6, !12, i64 104}
!35 = !{!6, !9, i64 8}
!36 = !{!6, !9, i64 60}
!37 = !{!6, !9, i64 24}
!38 = !{!22, !9, i64 16}
!39 = !{!6, !12, i64 384}
!40 = !{!6, !7, i64 129}


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