; LLVM IR from erthink/libmdbx :: src (api-cursor)

; 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.16 }
%struct.anon.16 = 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_cursor = type { i32, %union.anon, i8, i8, ptr, ptr, ptr, ptr, ptr, [32 x ptr], [32 x i16], ptr, ptr }
%union.anon = type { i16 }
%struct.MDBX_txn = type { i32, i32, i64, i64, ptr, ptr, %struct.geo, i64, i64, ptr, ptr, ptr, ptr, ptr, ptr, %struct.MDBX_canary, ptr, %union.anon.2 }
%struct.geo = type { i16, i16, i32, i32, %union.anon.0, %union.anon.1 }
%union.anon.0 = type { i32 }
%union.anon.1 = type { i32 }
%struct.MDBX_canary = type { i64, i64, i64, i64 }
%union.anon.2 = type { %struct.anon.4 }
%struct.anon.4 = type { %struct.troika, ptr, %struct.anon.5, i8, i32, i32, i64, ptr, ptr, ptr, i64, %union.anon.6 }
%struct.troika = type { i8, i8, i8, i8, i32, [3 x i64] }
%struct.anon.5 = type { %struct.MDBX_rkl, i64, %struct.MDBX_rkl }
%struct.MDBX_rkl = type { i64, i64, i32, i32, ptr, [12 x i64] }
%union.anon.6 = type { %struct.anon.7 }
%struct.anon.7 = type { i64, 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.9, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, ptr, ptr, i64, %struct.anon.10, %struct.anon.14, i8, ptr, ptr, ptr, %struct.anon.15, %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.8, i32, i64, i64, i64 }
%union.anon.8 = type { ptr }
%union.mdbx_atomic_uint32_t = type { i32 }
%struct.anon.9 = type { ptr, ptr, ptr, ptr }
%struct.anon.10 = type { i32, i32, i32, i32, i64, i8, i8, i8, i8, i32, i32, i8, i8, i8, %struct.anon.11, %union.anon.12 }
%struct.anon.11 = type { i16, i16, i16, i16 }
%union.anon.12 = type { i32 }
%struct.anon.14 = type { i64, i64, i64, i64, i64 }
%struct.anon.15 = type { i64 }
%struct.osal_ioring = type { i32, i32, i32, ptr, ptr, ptr }
%union.mdbx_atomic_uint64_t = type { i64 }
%struct.kvx = type { %struct.clc2, %struct.iovec }
%struct.clc2 = type { %struct.clc, %struct.clc }
%struct.clc = type { ptr, i64, i64 }
%struct.iovec = type { ptr, i64 }

@globals = external global %struct.libmdbx_globals, align 8
@.str.2 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [89 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [12 x i8], align 1
@__func__.mdbx_cursor_close2 = external hidden unnamed_addr constant [19 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

; Function Attrs: inlinehint nounwind uwtable
declare hidden void @cursor_reset(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: inlinehint nounwind uwtable
declare hidden i32 @log_if_error(i32 noundef, ptr noundef, i32 noundef) #2

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @mdbx_cursor_close2(ptr noundef %0) #6 {
  %2 = alloca i32, align 4
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  %9 = load ptr, ptr %3, align 8, !tbaa !5
  %10 = icmp ne ptr %9, null
  %11 = xor i1 %10, true
  %12 = xor i1 %11, true
  %13 = xor i1 %12, true
  %14 = zext i1 %13 to i32
  %15 = sext i32 %14 to i64
  %16 = call i64 @llvm.expect.i64(i64 %15, i64 0)
  %17 = icmp ne i64 %16, 0
  br i1 %17, label %18, label %20

18:                                               ; preds = %1
  %19 = call i32 @log_if_error(i32 noundef 22, ptr noundef @__func__.mdbx_cursor_close2, i32 noundef 157)
  store i32 %19, ptr %2, align 4
  br label %286

20:                                               ; preds = %1
  %21 = load ptr, ptr %3, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.MDBX_cursor, ptr %21, i32 0, i32 0
  %23 = load i32, ptr %22, align 8, !tbaa !9
  %24 = icmp eq i32 %23, 672636999
  br i1 %24, label %25, label %50

25:                                               ; preds = %20
  %26 = load ptr, ptr %3, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.MDBX_cursor, ptr %26, i32 0, i32 5
  %28 = load ptr, ptr %27, align 8, !tbaa !12
  %29 = icmp ne ptr %28, null
  br i1 %29, label %35, label %30

30:                                               ; preds = %25
  %31 = load ptr, ptr %3, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.MDBX_cursor, ptr %31, i32 0, i32 12
  %33 = load ptr, ptr %32, align 8, !tbaa !13
  %34 = icmp ne ptr %33, null
  br label %35

35:                                               ; preds = %30, %25
  %36 = phi i1 [ true, %25 ], [ %34, %30 ]
  %37 = xor i1 %36, true
  %38 = xor i1 %37, true
  %39 = zext i1 %38 to i32
  %40 = sext i32 %39 to i64
  %41 = call i64 @llvm.expect.i64(i64 %40, i64 0)
  %42 = icmp ne i64 %41, 0
  br i1 %42, label %43, label %45

43:                                               ; preds = %35
  %44 = call i32 @log_if_error(i32 noundef -30795, ptr noundef @__func__.mdbx_cursor_close2, i32 noundef 161)
  store i32 %44, ptr %2, align 4
  br label %286

45:                                               ; preds = %35
  %46 = load ptr, ptr %3, align 8, !tbaa !5
  call void @cursor_drown(ptr noundef %46)
  %47 = load ptr, ptr %3, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.MDBX_cursor, ptr %47, i32 0, i32 0
  store i32 0, ptr %48, align 8, !tbaa !9
  %49 = load ptr, ptr %3, align 8, !tbaa !5
  call void @free(ptr noundef %49) #8
  store i32 0, ptr %2, align 4
  br label %286

50:                                               ; preds = %20
  %51 = load ptr, ptr %3, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.MDBX_cursor, ptr %51, i32 0, i32 0
  %53 = load i32, ptr %52, align 8, !tbaa !9
  %54 = icmp ne i32 %53, 2114311601
  %55 = xor i1 %54, true
  %56 = xor i1 %55, true
  %57 = zext i1 %56 to i32
  %58 = sext i32 %57 to i64
  %59 = call i64 @llvm.expect.i64(i64 %58, i64 0)
  %60 = icmp ne i64 %59, 0
  br i1 %60, label %61, label %63

61:                                               ; preds = %50
  %62 = call i32 @log_if_error(i32 noundef -30420, ptr noundef @__func__.mdbx_cursor_close2, i32 noundef 169)
  store i32 %62, ptr %2, align 4
  br label %286

63:                                               ; preds = %50
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #8
  %64 = load ptr, ptr %3, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.MDBX_cursor, ptr %64, i32 0, i32 5
  %66 = load ptr, ptr %65, align 8, !tbaa !12
  store ptr %66, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  %67 = load ptr, ptr %4, align 8, !tbaa !5
  %68 = call i32 @check_txn(ptr noundef %67, i32 noundef 1)
  store i32 %68, ptr %5, align 4, !tbaa !14
  %69 = load i32, ptr %5, align 4, !tbaa !14
  %70 = icmp ne i32 %69, 0
  %71 = xor i1 %70, true
  %72 = xor i1 %71, true
  %73 = zext i1 %72 to i32
  %74 = sext i32 %73 to i64
  %75 = call i64 @llvm.expect.i64(i64 %74, i64 0)
  %76 = icmp ne i64 %75, 0
  br i1 %76, label %77, label %80

77:                                               ; preds = %63
  %78 = load i32, ptr %5, align 4, !tbaa !14
  %79 = call i32 @log_if_error(i32 noundef %78, ptr noundef @__func__.mdbx_cursor_close2, i32 noundef 174)
  store i32 %79, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %285

80:                                               ; preds = %63
  %81 = load ptr, ptr %3, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.MDBX_cursor, ptr %81, i32 0, i32 12
  %83 = load ptr, ptr %82, align 8, !tbaa !13
  %84 = icmp ne ptr %83, null
  br i1 %84, label %85, label %89

85:                                               ; preds = %80
  %86 = load ptr, ptr %3, align 8, !tbaa !5
  call void @cursor_reset(ptr noundef %86)
  %87 = load ptr, ptr %3, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.MDBX_cursor, ptr %87, i32 0, i32 0
  store i32 283285415, ptr %88, align 8, !tbaa !9
  store i32 0, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %285

89:                                               ; preds = %80
  %90 = load ptr, ptr %3, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.MDBX_cursor, ptr %90, i32 0, i32 11
  %92 = load ptr, ptr %91, align 8, !tbaa !15
  %93 = load ptr, ptr %3, align 8, !tbaa !5
  %94 = icmp ne ptr %92, %93
  br i1 %94, label %95, label %280

95:                                               ; preds = %89
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #8
  %96 = load ptr, ptr %3, align 8, !tbaa !5
  %97 = call i64 @cursor_dbi(ptr noundef %96) #9
  store i64 %97, ptr %7, align 8, !tbaa !16
  br label %98

98:                                               ; preds = %95
  %99 = load i8, ptr getelementptr inbounds (%struct.libmdbx_globals, ptr @globals, i32 0, i32 4), align 1, !tbaa !18
  %100 = zext i8 %99 to i32
  %101 = and i32 %100, 1
  %102 = icmp ne i32 %101, 0
  %103 = xor i1 %102, true
  %104 = xor i1 %103, true
  %105 = zext i1 %104 to i32
  %106 = sext i32 %105 to i64
  %107 = call i64 @llvm.expect.i64(i64 %106, i64 1)
  %108 = icmp ne i64 %107, 0
  br i1 %108, label %109, label %134

109:                                              ; preds = %98
  br label %110

110:                                              ; preds = %109
  %111 = load i64, ptr %7, align 8, !tbaa !16
  %112 = load ptr, ptr %3, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.MDBX_cursor, ptr %112, i32 0, i32 5
  %114 = load ptr, ptr %113, align 8, !tbaa !12
  %115 = getelementptr inbounds %struct.MDBX_txn, ptr %114, i32 0, i32 2
  %116 = load i64, ptr %115, align 8, !tbaa !21
  %117 = icmp ult i64 %111, %116
  %118 = xor i1 %117, true
  %119 = xor i1 %118, true
  %120 = xor i1 %119, true
  %121 = zext i1 %120 to i32
  %122 = sext i32 %121 to i64
  %123 = call i64 @llvm.expect.i64(i64 %122, i64 0)
  %124 = icmp ne i64 %123, 0
  br i1 %124, label %125, label %131

125:                                              ; preds = %110
  %126 = load ptr, ptr %3, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.MDBX_cursor, ptr %126, i32 0, i32 5
  %128 = load ptr, ptr %127, align 8, !tbaa !12
  %129 = getelementptr inbounds %struct.MDBX_txn, ptr %128, i32 0, i32 9
  %130 = load ptr, ptr %129, align 8, !tbaa !26
  call void @mdbx_assert_fail(ptr noundef %130, ptr noundef @.str.2, ptr noundef @__func__.mdbx_cursor_close2, i32 noundef 185) #10
  unreachable

131:                                              ; preds = %110
  br label %132

132:                                              ; preds = %131
  br label %133

133:                                              ; preds = %132
  br label %134

134:                                              ; preds = %133, %98
  br label %135

135:                                              ; preds = %134
  br label %136

136:                                              ; preds = %135
  br label %137

137:                                              ; preds = %136
  %138 = load i8, ptr getelementptr inbounds (%struct.libmdbx_globals, ptr @globals, i32 0, i32 4), align 1, !tbaa !18
  %139 = zext i8 %138 to i32
  %140 = and i32 %139, 1
  %141 = icmp ne i32 %140, 0
  %142 = xor i1 %141, true
  %143 = xor i1 %142, true
  %144 = zext i1 %143 to i32
  %145 = sext i32 %144 to i64
  %146 = call i64 @llvm.expect.i64(i64 %145, i64 1)
  %147 = icmp ne i64 %146, 0
  br i1 %147, label %148, label %180

148:                                              ; preds = %137
  br label %149

149:                                              ; preds = %148
  %150 = load ptr, ptr %3, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.MDBX_cursor, ptr %150, i32 0, i32 5
  %152 = load ptr, ptr %151, align 8, !tbaa !12
  %153 = getelementptr inbounds %struct.MDBX_txn, ptr %152, i32 0, i32 9
  %154 = load ptr, ptr %153, align 8, !tbaa !26
  %155 = getelementptr inbounds %struct.MDBX_env, ptr %154, i32 0, i32 25
  %156 = load ptr, ptr %155, align 8, !tbaa !27
  %157 = load i64, ptr %7, align 8, !tbaa !16
  %158 = getelementptr inbounds %struct.kvx, ptr %156, i64 %157
  %159 = getelementptr inbounds %struct.kvx, ptr %158, i32 0, i32 0
  %160 = load ptr, ptr %3, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.MDBX_cursor, ptr %160, i32 0, i32 7
  %162 = load ptr, ptr %161, align 8, !tbaa !36
  %163 = icmp eq ptr %159, %162
  %164 = xor i1 %163, true
  %165 = xor i1 %164, true
  %166 = xor i1 %165, true
  %167 = zext i1 %166 to i32
  %168 = sext i32 %167 to i64
  %169 = call i64 @llvm.expect.i64(i64 %168, i64 0)
  %170 = icmp ne i64 %169, 0
  br i1 %170, label %171, label %177

171:                                              ; preds = %149
  %172 = load ptr, ptr %3, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.MDBX_cursor, ptr %172, i32 0, i32 5
  %174 = load ptr, ptr %173, align 8, !tbaa !12
  %175 = getelementptr inbounds %struct.MDBX_txn, ptr %174, i32 0, i32 9
  %176 = load ptr, ptr %175, align 8, !tbaa !26
  call void @mdbx_assert_fail(ptr noundef %176, ptr noundef @.str.3, ptr noundef @__func__.mdbx_cursor_close2, i32 noundef 186) #10
  unreachable

177:                                              ; preds = %149
  br label %178

178:                                              ; preds = %177
  br label %179

179:                                              ; preds = %178
  br label %180

180:                                              ; preds = %179, %137
  br label %181

181:                                              ; preds = %180
  br label %182

182:                                              ; preds = %181
  %183 = load i64, ptr %7, align 8, !tbaa !16
  %184 = load ptr, ptr %4, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.MDBX_txn, ptr %184, i32 0, i32 2
  %186 = load i64, ptr %185, align 8, !tbaa !21
  %187 = icmp ult i64 %183, %186
  %188 = xor i1 %187, true
  %189 = xor i1 %188, true
  %190 = zext i1 %189 to i32
  %191 = sext i32 %190 to i64
  %192 = call i64 @llvm.expect.i64(i64 %191, i64 1)
  %193 = icmp ne i64 %192, 0
  br i1 %193, label %194, label %276

194:                                              ; preds = %182
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #8
  %195 = load ptr, ptr %4, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct.MDBX_txn, ptr %195, i32 0, i32 14
  %197 = load ptr, ptr %196, align 8, !tbaa !37
  %198 = load i64, ptr %7, align 8, !tbaa !16
  %199 = getelementptr inbounds ptr, ptr %197, i64 %198
  store ptr %199, ptr %8, align 8, !tbaa !5
  br label %200

200:                                              ; preds = %233, %194
  %201 = load ptr, ptr %8, align 8, !tbaa !5
  %202 = load ptr, ptr %201, align 8, !tbaa !5
  %203 = load ptr, ptr %3, align 8, !tbaa !5
  %204 = icmp ne ptr %202, %203
  br i1 %204, label %205, label %237

205:                                              ; preds = %200
  br label %206

206:                                              ; preds = %205
  %207 = load ptr, ptr %8, align 8, !tbaa !5
  %208 = load ptr, ptr %207, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.MDBX_cursor, ptr %208, i32 0, i32 0
  %210 = load i32, ptr %209, align 8, !tbaa !9
  %211 = icmp eq i32 %210, 2114311601
  br i1 %211, label %218, label %212

212:                                              ; preds = %206
  %213 = load ptr, ptr %8, align 8, !tbaa !5
  %214 = load ptr, ptr %213, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.MDBX_cursor, ptr %214, i32 0, i32 0
  %216 = load i32, ptr %215, align 8, !tbaa !9
  %217 = icmp eq i32 %216, 283285415
  br label %218

218:                                              ; preds = %212, %206
  %219 = phi i1 [ true, %206 ], [ %217, %212 ]
  %220 = xor i1 %219, true
  %221 = xor i1 %220, true
  %222 = xor i1 %221, true
  %223 = zext i1 %222 to i32
  %224 = sext i32 %223 to i64
  %225 = call i64 @llvm.expect.i64(i64 %224, i64 0)
  %226 = icmp ne i64 %225, 0
  br i1 %226, label %227, label %231

227:                                              ; preds = %218
  %228 = load ptr, ptr %4, align 8, !tbaa !5
  %229 = getelementptr inbounds %struct.MDBX_txn, ptr %228, i32 0, i32 9
  %230 = load ptr, ptr %229, align 8, !tbaa !26
  call void @mdbx_assert_fail(ptr noundef %230, ptr noundef @.str.4, ptr noundef @__func__.mdbx_cursor_close2, i32 noundef 190) #10
  unreachable

231:                                              ; preds = %218
  br label %232

232:                                              ; preds = %231
  br label %233

233:                                              ; preds = %232
  %234 = load ptr, ptr %8, align 8, !tbaa !5
  %235 = load ptr, ptr %234, align 8, !tbaa !5
  %236 = getelementptr inbounds %struct.MDBX_cursor, ptr %235, i32 0, i32 11
  store ptr %236, ptr %8, align 8, !tbaa !5
  br label %200, !llvm.loop !38

237:                                              ; preds = %200
  br label %238

238:                                              ; preds = %237
  %239 = load i8, ptr getelementptr inbounds (%struct.libmdbx_globals, ptr @globals, i32 0, i32 4), align 1, !tbaa !18
  %240 = zext i8 %239 to i32
  %241 = and i32 %240, 1
  %242 = icmp ne i32 %241, 0
  %243 = xor i1 %242, true
  %244 = xor i1 %243, true
  %245 = zext i1 %244 to i32
  %246 = sext i32 %245 to i64
  %247 = call i64 @llvm.expect.i64(i64 %246, i64 1)
  %248 = icmp ne i64 %247, 0
  br i1 %248, label %249, label %269

249:                                              ; preds = %238
  br label %250

250:                                              ; preds = %249
  %251 = load ptr, ptr %8, align 8, !tbaa !5
  %252 = load ptr, ptr %251, align 8, !tbaa !5
  %253 = load ptr, ptr %3, align 8, !tbaa !5
  %254 = icmp eq ptr %252, %253
  %255 = xor i1 %254, true
  %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 %266

262:                                              ; preds = %250
  %263 = load ptr, ptr %4, align 8, !tbaa !5
  %264 = getelementptr inbounds %struct.MDBX_txn, ptr %263, i32 0, i32 9
  %265 = load ptr, ptr %264, align 8, !tbaa !26
  call void @mdbx_assert_fail(ptr noundef %265, ptr noundef @.str.5, ptr noundef @__func__.mdbx_cursor_close2, i32 noundef 193) #10
  unreachable

266:                                              ; preds = %250
  br label %267

267:                                              ; preds = %266
  br label %268

268:                                              ; preds = %267
  br label %269

269:                                              ; preds = %268, %238
  br label %270

270:                                              ; preds = %269
  br label %271

271:                                              ; preds = %270
  %272 = load ptr, ptr %3, align 8, !tbaa !5
  %273 = getelementptr inbounds %struct.MDBX_cursor, ptr %272, i32 0, i32 11
  %274 = load ptr, ptr %273, align 8, !tbaa !15
  %275 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %274, ptr %275, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #8
  br label %276

276:                                              ; preds = %271, %182
  %277 = load ptr, ptr %3, align 8, !tbaa !5
  %278 = load ptr, ptr %3, align 8, !tbaa !5
  %279 = getelementptr inbounds %struct.MDBX_cursor, ptr %278, i32 0, i32 11
  store ptr %277, ptr %279, align 8, !tbaa !15
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #8
  br label %280

280:                                              ; preds = %276, %89
  %281 = load ptr, ptr %3, align 8, !tbaa !5
  call void @cursor_drown(ptr noundef %281)
  %282 = load ptr, ptr %3, align 8, !tbaa !5
  %283 = getelementptr inbounds %struct.MDBX_cursor, ptr %282, i32 0, i32 0
  store i32 0, ptr %283, align 8, !tbaa !9
  %284 = load ptr, ptr %3, align 8, !tbaa !5
  call void @free(ptr noundef %284) #8
  store i32 0, ptr %2, align 4
  store i32 1, ptr %6, align 4
  br label %285

285:                                              ; preds = %280, %85, %77
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #8
  br label %286

286:                                              ; preds = %285, %61, %45, %43, %18
  %287 = load i32, ptr %2, align 4
  ret i32 %287
}

; Function Attrs: nounwind
declare void @free(ptr noundef) #7

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


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.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.16 }
%struct.anon.16 = 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.kvx = type { %struct.clc2, %struct.iovec }
%struct.clc2 = type { %struct.clc, %struct.clc }
%struct.clc = type { ptr, i64, i64 }
%struct.iovec = type { ptr, i64 }

@globals = external local_unnamed_addr global %struct.libmdbx_globals, align 8
@.str.2 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [39 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [89 x i8], align 1
@__func__.mdbx_cursor_close2 = external hidden unnamed_addr constant [19 x i8], align 1

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @mdbx_cursor_close2(ptr noundef %0) local_unnamed_addr #4 {
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %2, label %4, !prof !5

2:                                                ; preds = %1
  %3 = tail call i32 @log_if_error(i32 noundef 22, ptr noundef nonnull @__func__.mdbx_cursor_close2, i32 noundef 157)
  br label %66

4:                                                ; preds = %1
  %5 = load i32, ptr %0, align 8, !tbaa !6
  switch i32 %5, label %14 [
    i32 672636999, label %6
    i32 2114311601, label %16
  ], !prof !12

6:                                                ; preds = %4
  %7 = getelementptr inbounds i8, ptr %0, i64 16
  %8 = load ptr, ptr %7, align 8, !tbaa !13
  %.not64 = icmp eq ptr %8, null
  br i1 %.not64, label %9, label %.critedge, !prof !14

9:                                                ; preds = %6
  %10 = getelementptr inbounds i8, ptr %0, i64 376
  %11 = load ptr, ptr %10, align 8, !tbaa !15
  %.not65 = icmp eq ptr %11, null
  br i1 %.not65, label %13, label %.critedge, !prof !14

.critedge:                                        ; preds = %6, %9
  %12 = tail call i32 @log_if_error(i32 noundef -30795, ptr noundef nonnull @__func__.mdbx_cursor_close2, i32 noundef 161)
  br label %66

13:                                               ; preds = %9
  tail call void @cursor_drown(ptr noundef nonnull %0)
  tail call void @free(ptr noundef nonnull %0) #6
  br label %66

14:                                               ; preds = %4
  %15 = tail call i32 @log_if_error(i32 noundef -30420, ptr noundef nonnull @__func__.mdbx_cursor_close2, i32 noundef 169)
  br label %66

16:                                               ; preds = %4
  %17 = getelementptr inbounds i8, ptr %0, i64 16
  %18 = load ptr, ptr %17, align 8, !tbaa !13
  %19 = tail call i32 @check_txn(ptr noundef %18, i32 noundef 1)
  %.not54 = icmp eq i32 %19, 0
  br i1 %.not54, label %22, label %20, !prof !14

20:                                               ; preds = %16
  %21 = tail call i32 @log_if_error(i32 noundef %19, ptr noundef nonnull @__func__.mdbx_cursor_close2, i32 noundef 174)
  br label %66

22:                                               ; preds = %16
  %23 = getelementptr inbounds i8, ptr %0, i64 376
  %24 = load ptr, ptr %23, align 8, !tbaa !15
  %.not55 = icmp eq ptr %24, null
  br i1 %.not55, label %26, label %25

25:                                               ; preds = %22
  tail call void @cursor_reset(ptr noundef nonnull %0)
  store i32 283285415, ptr %0, align 8, !tbaa !6
  br label %66

26:                                               ; preds = %22
  %27 = getelementptr inbounds i8, ptr %0, i64 368
  %28 = load ptr, ptr %27, align 8, !tbaa !16
  %.not56 = icmp eq ptr %28, %0
  br i1 %.not56, label %65, label %29

29:                                               ; preds = %26
  %30 = tail call i64 @cursor_dbi(ptr noundef nonnull %0) #7
  %31 = load i8, ptr getelementptr inbounds (i8, ptr @globals, i64 25), align 1, !tbaa !17
  %32 = and i8 %31, 1
  %.not57 = icmp eq i8 %32, 0
  br i1 %.not57, label %.thread, label %33, !prof !5

33:                                               ; preds = %29
  %34 = load ptr, ptr %17, align 8, !tbaa !13
  %35 = getelementptr inbounds i8, ptr %34, i64 8
  %36 = load i64, ptr %35, align 8, !tbaa !21
  %.not58 = icmp ult i64 %30, %36
  %37 = getelementptr inbounds i8, ptr %34, i64 80
  %38 = load ptr, ptr %37, align 8, !tbaa !26
  br i1 %.not58, label %40, label %39, !prof !14

39:                                               ; preds = %33
  tail call void @mdbx_assert_fail(ptr noundef %38, ptr noundef nonnull @.str.2, ptr noundef nonnull @__func__.mdbx_cursor_close2, i32 noundef 185) #8
  unreachable

40:                                               ; preds = %33
  %41 = getelementptr inbounds i8, ptr %38, i64 200
  %42 = load ptr, ptr %41, align 8, !tbaa !27
  %43 = getelementptr inbounds %struct.kvx, ptr %42, i64 %30
  %44 = getelementptr inbounds i8, ptr %0, i64 32
  %45 = load ptr, ptr %44, align 8, !tbaa !36
  %.not60 = icmp eq ptr %43, %45
  br i1 %.not60, label %.thread, label %46, !prof !14

46:                                               ; preds = %40
  tail call void @mdbx_assert_fail(ptr noundef nonnull %38, ptr noundef nonnull @.str.3, ptr noundef nonnull @__func__.mdbx_cursor_close2, i32 noundef 186) #8
  unreachable

.thread:                                          ; preds = %29, %40
  %47 = getelementptr inbounds i8, ptr %18, i64 8
  %48 = load i64, ptr %47, align 8, !tbaa !21
  %49 = icmp ult i64 %30, %48
  br i1 %49, label %50, label %64, !prof !14

50:                                               ; preds = %.thread
  %51 = getelementptr inbounds i8, ptr %18, i64 120
  %52 = load ptr, ptr %51, align 8, !tbaa !37
  %53 = getelementptr inbounds ptr, ptr %52, i64 %30
  %54 = load ptr, ptr %53, align 8, !tbaa !38
  %.not6167 = icmp eq ptr %54, %0
  br i1 %.not6167, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %50, %60
  %55 = phi ptr [ %62, %60 ], [ %54, %50 ]
  %56 = load i32, ptr %55, align 8, !tbaa !6
  switch i32 %56, label %57 [
    i32 2114311601, label %60
    i32 283285415, label %60
  ]

57:                                               ; preds = %.lr.ph
  %58 = getelementptr inbounds i8, ptr %18, i64 80
  %59 = load ptr, ptr %58, align 8, !tbaa !26
  tail call void @mdbx_assert_fail(ptr noundef %59, ptr noundef nonnull @.str.4, ptr noundef nonnull @__func__.mdbx_cursor_close2, i32 noundef 190) #8
  unreachable

60:                                               ; preds = %.lr.ph, %.lr.ph
  %61 = getelementptr inbounds i8, ptr %55, i64 368
  %62 = load ptr, ptr %61, align 8, !tbaa !38
  %.not61 = icmp eq ptr %62, %0
  br i1 %.not61, label %._crit_edge.loopexit, label %.lr.ph, !llvm.loop !39

._crit_edge.loopexit:                             ; preds = %60
  %63 = getelementptr inbounds i8, ptr %55, i64 368
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %50
  %.0.lcssa = phi ptr [ %53, %50 ], [ %63, %._crit_edge.loopexit ]
  store ptr %28, ptr %.0.lcssa, align 8, !tbaa !38
  br label %64

64:                                               ; preds = %._crit_edge, %.thread
  store ptr %0, ptr %27, align 8, !tbaa !16
  br label %65

65:                                               ; preds = %64, %26
  tail call void @cursor_drown(ptr noundef nonnull %0)
  tail call void @free(ptr noundef nonnull %0) #6
  br label %66

66:                                               ; preds = %20, %25, %65, %14, %13, %.critedge, %2
  %.1 = phi i32 [ %3, %2 ], [ %12, %.critedge ], [ 0, %13 ], [ %15, %14 ], [ %21, %20 ], [ 0, %25 ], [ 0, %65 ]
  ret i32 %.1
}

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #5

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


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