; 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.anon = type { i8, i8 }
%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.inner_cursor = type { %struct.MDBX_cursor, %struct.tree }
%struct.tree = type { i16, i16, i32, i32, i32, i32, i32, i64, i64, i64 }
%struct.MDBX_stat = type { i32, i32, i64, i64, i64, i64, i64 }
%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 }

@globals = external global %struct.libmdbx_globals, align 8
@.str.14 = external hidden unnamed_addr constant [25 x i8], align 1
@__func__.mdbx_cursor_count_ex = external hidden unnamed_addr constant [21 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [21 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: 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: noreturn
declare void @mdbx_assert_fail(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #3

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

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare hidden zeroext i8 @node_flags(ptr noalias noundef) #4

; Function Attrs: nounwind uwtable
define dso_local i32 @mdbx_cursor_count_ex(ptr noundef %0, ptr noundef %1, ptr noundef %2, i64 noundef %3) #5 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i64, align 8
  %13 = alloca i64, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store i64 %3, ptr %9, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #7
  %17 = load ptr, ptr %6, align 8, !tbaa !5
  %18 = call i32 @cursor_check_ro(ptr noundef %17)
  store i32 %18, ptr %10, align 4, !tbaa !11
  %19 = load i32, ptr %10, align 4, !tbaa !11
  %20 = icmp ne i32 %19, 0
  %21 = xor i1 %20, true
  %22 = xor i1 %21, true
  %23 = zext i1 %22 to i32
  %24 = sext i32 %23 to i64
  %25 = call i64 @llvm.expect.i64(i64 %24, i64 0)
  %26 = icmp ne i64 %25, 0
  br i1 %26, label %27, label %30

27:                                               ; preds = %4
  %28 = load i32, ptr %10, align 4, !tbaa !11
  %29 = call i32 @log_if_error(i32 noundef %28, ptr noundef @__func__.mdbx_cursor_count_ex, i32 noundef 358)
  store i32 %29, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %251

30:                                               ; preds = %4
  %31 = load ptr, ptr %8, align 8, !tbaa !5
  %32 = icmp ne ptr %31, null
  br i1 %32, label %33, label %52

33:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #7
  store i64 40, ptr %12, align 8, !tbaa !9
  %34 = load i64, ptr %9, align 8, !tbaa !9
  %35 = icmp ne i64 %34, 48
  %36 = xor i1 %35, true
  %37 = xor i1 %36, true
  %38 = zext i1 %37 to i32
  %39 = sext i32 %38 to i64
  %40 = call i64 @llvm.expect.i64(i64 %39, i64 0)
  %41 = icmp ne i64 %40, 0
  br i1 %41, label %42, label %47

42:                                               ; preds = %33
  %43 = load i64, ptr %9, align 8, !tbaa !9
  %44 = icmp ne i64 %43, 40
  br i1 %44, label %45, label %47

45:                                               ; preds = %42
  %46 = call i32 @log_if_error(i32 noundef 22, ptr noundef @__func__.mdbx_cursor_count_ex, i32 noundef 363)
  store i32 %46, ptr %5, align 4
  store i32 1, ptr %11, align 4
  br label %49

47:                                               ; preds = %42, %33
  %48 = load ptr, ptr %8, align 8, !tbaa !5
  call void @llvm.memset.p0.i64(ptr align 8 %48, i8 0, i64 48, i1 false)
  store i32 0, ptr %11, align 4
  br label %49

49:                                               ; preds = %47, %45
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #7
  %50 = load i32, ptr %11, align 4
  switch i32 %50, label %251 [
    i32 0, label %51
  ]

51:                                               ; preds = %49
  br label %52

52:                                               ; preds = %51, %30
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #7
  store i64 0, ptr %13, align 8, !tbaa !9
  %53 = load ptr, ptr %6, align 8, !tbaa !5
  %54 = call zeroext i1 @is_filled(ptr noundef %53) #8
  br i1 %54, label %55, label %238

55:                                               ; preds = %52
  store i64 1, ptr %13, align 8, !tbaa !9
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  %57 = call zeroext i1 @inner_hollow(ptr noundef %56) #8
  br i1 %57, label %237, label %58

58:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %59 = load ptr, ptr %6, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.MDBX_cursor, ptr %59, i32 0, i32 9
  %61 = load ptr, ptr %6, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.MDBX_cursor, ptr %61, i32 0, i32 1
  %63 = getelementptr inbounds %struct.anon, ptr %62, i32 0, i32 1
  %64 = load i8, ptr %63, align 1, !tbaa !13
  %65 = sext i8 %64 to i64
  %66 = getelementptr inbounds [32 x ptr], ptr %60, i64 0, i64 %65
  %67 = load ptr, ptr %66, align 8, !tbaa !5
  store ptr %67, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #7
  %68 = load ptr, ptr %14, align 8, !tbaa !5
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.MDBX_cursor, ptr %69, i32 0, i32 10
  %71 = load ptr, ptr %6, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.MDBX_cursor, ptr %71, i32 0, i32 1
  %73 = getelementptr inbounds %struct.anon, ptr %72, i32 0, i32 1
  %74 = load i8, ptr %73, align 1, !tbaa !13
  %75 = sext i8 %74 to i64
  %76 = getelementptr inbounds [32 x i16], ptr %70, i64 0, i64 %75
  %77 = load i16, ptr %76, align 2, !tbaa !14
  %78 = zext i16 %77 to i64
  %79 = call ptr @page_node(ptr noundef %68, i64 noundef %78) #8
  store ptr %79, ptr %15, align 8, !tbaa !5
  br label %80

80:                                               ; preds = %58
  %81 = load i8, ptr getelementptr inbounds (%struct.libmdbx_globals, ptr @globals, i32 0, i32 4), align 1, !tbaa !16
  %82 = zext i8 %81 to i32
  %83 = and i32 %82, 1
  %84 = icmp ne i32 %83, 0
  %85 = xor i1 %84, true
  %86 = xor i1 %85, true
  %87 = zext i1 %86 to i32
  %88 = sext i32 %87 to i64
  %89 = call i64 @llvm.expect.i64(i64 %88, i64 1)
  %90 = icmp ne i64 %89, 0
  br i1 %90, label %91, label %114

91:                                               ; preds = %80
  br label %92

92:                                               ; preds = %91
  %93 = load ptr, ptr %15, align 8, !tbaa !5
  %94 = call zeroext i8 @node_flags(ptr noundef %93) #8
  %95 = zext i8 %94 to i32
  %96 = and i32 %95, 4
  %97 = icmp ne i32 %96, 0
  %98 = xor i1 %97, true
  %99 = xor i1 %98, true
  %100 = xor i1 %99, true
  %101 = zext i1 %100 to i32
  %102 = sext i32 %101 to i64
  %103 = call i64 @llvm.expect.i64(i64 %102, i64 0)
  %104 = icmp ne i64 %103, 0
  br i1 %104, label %105, label %111

105:                                              ; preds = %92
  %106 = load ptr, ptr %6, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.MDBX_cursor, ptr %106, i32 0, i32 5
  %108 = load ptr, ptr %107, align 8, !tbaa !19
  %109 = getelementptr inbounds %struct.MDBX_txn, ptr %108, i32 0, i32 9
  %110 = load ptr, ptr %109, align 8, !tbaa !21
  call void @mdbx_assert_fail(ptr noundef %110, ptr noundef @.str.14, ptr noundef @__func__.mdbx_cursor_count_ex, i32 noundef 373) #9
  unreachable

111:                                              ; preds = %92
  br label %112

112:                                              ; preds = %111
  br label %113

113:                                              ; preds = %112
  br label %114

114:                                              ; preds = %113, %80
  br label %115

115:                                              ; preds = %114
  br label %116

116:                                              ; preds = %115
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %117 = load ptr, ptr %6, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.MDBX_cursor, ptr %117, i32 0, i32 8
  %119 = load ptr, ptr %118, align 8, !tbaa !25
  %120 = getelementptr inbounds %struct.inner_cursor, ptr %119, i32 0, i32 1
  store ptr %120, ptr %16, align 8, !tbaa !5
  %121 = load ptr, ptr %16, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.tree, ptr %121, i32 0, i32 8
  %123 = load i64, ptr %122, align 4, !tbaa !26
  %124 = icmp ugt i64 %123, 9223372036854775807
  %125 = xor i1 %124, true
  %126 = xor i1 %125, true
  %127 = zext i1 %126 to i32
  %128 = sext i32 %127 to i64
  %129 = call i64 @llvm.expect.i64(i64 %128, i64 0)
  %130 = icmp ne i64 %129, 0
  br i1 %130, label %131, label %132

131:                                              ; preds = %116
  br label %136

132:                                              ; preds = %116
  %133 = load ptr, ptr %16, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.tree, ptr %133, i32 0, i32 8
  %135 = load i64, ptr %134, align 4, !tbaa !26
  br label %136

136:                                              ; preds = %132, %131
  %137 = phi i64 [ 9223372036854775807, %131 ], [ %135, %132 ]
  store i64 %137, ptr %13, align 8, !tbaa !9
  %138 = load ptr, ptr %8, align 8, !tbaa !5
  %139 = icmp ne ptr %138, null
  br i1 %139, label %140, label %236

140:                                              ; preds = %136
  %141 = load ptr, ptr %15, align 8, !tbaa !5
  %142 = call i64 @node_ds(ptr noundef %141) #8
  %143 = trunc i64 %142 to i32
  %144 = load ptr, ptr %8, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.MDBX_stat, ptr %144, i32 0, i32 0
  store i32 %143, ptr %145, align 8, !tbaa !28
  %146 = load ptr, ptr %15, align 8, !tbaa !5
  %147 = call zeroext i8 @node_flags(ptr noundef %146) #8
  %148 = zext i8 %147 to i32
  %149 = and i32 %148, 2
  %150 = icmp ne i32 %149, 0
  br i1 %150, label %151, label %173

151:                                              ; preds = %140
  %152 = load ptr, ptr %6, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.MDBX_cursor, ptr %152, i32 0, i32 5
  %154 = load ptr, ptr %153, align 8, !tbaa !19
  %155 = getelementptr inbounds %struct.MDBX_txn, ptr %154, i32 0, i32 9
  %156 = load ptr, ptr %155, align 8, !tbaa !21
  %157 = getelementptr inbounds %struct.MDBX_env, ptr %156, i32 0, i32 2
  %158 = load i32, ptr %157, align 8, !tbaa !30
  %159 = load ptr, ptr %8, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.MDBX_stat, ptr %159, i32 0, i32 0
  store i32 %158, ptr %160, align 8, !tbaa !28
  %161 = load ptr, ptr %16, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.tree, ptr %161, i32 0, i32 1
  %163 = load i16, ptr %162, align 2, !tbaa !39
  %164 = zext i16 %163 to i32
  %165 = load ptr, ptr %8, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.MDBX_stat, ptr %165, i32 0, i32 1
  store i32 %164, ptr %166, align 4, !tbaa !40
  %167 = load ptr, ptr %16, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.tree, ptr %167, i32 0, i32 4
  %169 = load i32, ptr %168, align 4, !tbaa !41
  %170 = zext i32 %169 to i64
  %171 = load ptr, ptr %8, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.MDBX_stat, ptr %171, i32 0, i32 2
  store i64 %170, ptr %172, align 8, !tbaa !42
  br label %173

173:                                              ; preds = %151, %140
  br label %174

174:                                              ; preds = %173
  %175 = load i8, ptr getelementptr inbounds (%struct.libmdbx_globals, ptr @globals, i32 0, i32 4), align 1, !tbaa !16
  %176 = zext i8 %175 to i32
  %177 = and i32 %176, 1
  %178 = icmp ne i32 %177, 0
  %179 = xor i1 %178, true
  %180 = xor i1 %179, true
  %181 = zext i1 %180 to i32
  %182 = sext i32 %181 to i64
  %183 = call i64 @llvm.expect.i64(i64 %182, i64 1)
  %184 = icmp ne i64 %183, 0
  br i1 %184, label %185, label %207

185:                                              ; preds = %174
  br label %186

186:                                              ; preds = %185
  %187 = load ptr, ptr %16, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.tree, ptr %187, i32 0, i32 6
  %189 = load i32, ptr %188, align 4, !tbaa !43
  %190 = icmp eq i32 %189, 0
  %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 %204

198:                                              ; preds = %186
  %199 = load ptr, ptr %6, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.MDBX_cursor, ptr %199, i32 0, i32 5
  %201 = load ptr, ptr %200, align 8, !tbaa !19
  %202 = getelementptr inbounds %struct.MDBX_txn, ptr %201, i32 0, i32 9
  %203 = load ptr, ptr %202, align 8, !tbaa !21
  call void @mdbx_assert_fail(ptr noundef %203, ptr noundef @.str.15, ptr noundef @__func__.mdbx_cursor_count_ex, i32 noundef 383) #9
  unreachable

204:                                              ; preds = %186
  br label %205

205:                                              ; preds = %204
  br label %206

206:                                              ; preds = %205
  br label %207

207:                                              ; preds = %206, %174
  br label %208

208:                                              ; preds = %207
  br label %209

209:                                              ; preds = %208
  %210 = load ptr, ptr %16, align 8, !tbaa !5
  %211 = getelementptr inbounds %struct.tree, ptr %210, i32 0, i32 5
  %212 = load i32, ptr %211, align 4, !tbaa !44
  %213 = zext i32 %212 to i64
  %214 = load ptr, ptr %8, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.MDBX_stat, ptr %214, i32 0, i32 3
  store i64 %213, ptr %215, align 8, !tbaa !45
  %216 = load ptr, ptr %16, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct.tree, ptr %216, i32 0, i32 8
  %218 = load i64, ptr %217, align 4, !tbaa !26
  %219 = load ptr, ptr %8, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.MDBX_stat, ptr %219, i32 0, i32 5
  store i64 %218, ptr %220, align 8, !tbaa !46
  %221 = load i64, ptr %9, align 8, !tbaa !9
  %222 = icmp uge i64 %221, 48
  %223 = xor i1 %222, true
  %224 = xor i1 %223, true
  %225 = zext i1 %224 to i32
  %226 = sext i32 %225 to i64
  %227 = call i64 @llvm.expect.i64(i64 %226, i64 1)
  %228 = icmp ne i64 %227, 0
  br i1 %228, label %229, label %235

229:                                              ; preds = %209
  %230 = load ptr, ptr %16, align 8, !tbaa !5
  %231 = getelementptr inbounds %struct.tree, ptr %230, i32 0, i32 9
  %232 = load i64, ptr %231, align 4, !tbaa !47
  %233 = load ptr, ptr %8, align 8, !tbaa !5
  %234 = getelementptr inbounds %struct.MDBX_stat, ptr %233, i32 0, i32 6
  store i64 %232, ptr %234, align 8, !tbaa !48
  br label %235

235:                                              ; preds = %229, %209
  br label %236

236:                                              ; preds = %235, %136
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %237

237:                                              ; preds = %236, %55
  br label %238

238:                                              ; preds = %237, %52
  %239 = load ptr, ptr %7, align 8, !tbaa !5
  %240 = icmp ne ptr %239, null
  %241 = xor i1 %240, true
  %242 = xor i1 %241, true
  %243 = zext i1 %242 to i32
  %244 = sext i32 %243 to i64
  %245 = call i64 @llvm.expect.i64(i64 %244, i64 1)
  %246 = icmp ne i64 %245, 0
  br i1 %246, label %247, label %250

247:                                              ; preds = %238
  %248 = load i64, ptr %13, align 8, !tbaa !9
  %249 = load ptr, ptr %7, align 8, !tbaa !5
  store i64 %248, ptr %249, align 8, !tbaa !9
  br label %250

250:                                              ; preds = %247, %238
  store i32 0, ptr %5, align 4
  store i32 1, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #7
  br label %251

251:                                              ; preds = %250, %49, %27
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #7
  %252 = load i32, ptr %5, align 4
  ret i32 %252
}

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare hidden zeroext i1 @is_filled(ptr noundef) #4

; Function Attrs: inlinehint nounwind willreturn memory(read) uwtable
declare hidden zeroext i1 @inner_hollow(ptr noundef) #4

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

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 = { 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 = { 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 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }
attributes #9 = { 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, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = !{!15, !15, i64 0}
!15 = !{!"short", !7, i64 0}
!16 = !{!17, !7, i64 25}
!17 = !{!"libmdbx_globals", !7, i64 0, !12, i64 16, !12, i64 20, !7, i64 24, !7, i64 25, !7, i64 26, !18, i64 27, !12, i64 28, !7, i64 32, !7, i64 40, !10, i64 80, !6, i64 88}
!18 = !{!"_Bool", !7, i64 0}
!19 = !{!20, !6, i64 16}
!20 = !{!"MDBX_cursor", !12, 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}
!21 = !{!22, !6, i64 80}
!22 = !{!"MDBX_txn", !12, i64 0, !12, i64 4, !10, i64 8, !10, i64 16, !6, i64 24, !6, i64 32, !23, i64 40, !10, i64 64, !10, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !24, i64 128, !6, i64 160, !7, i64 168}
!23 = !{!"geo", !15, i64 0, !15, i64 2, !12, i64 4, !12, i64 8, !7, i64 12, !7, i64 16}
!24 = !{!"MDBX_canary", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24}
!25 = !{!20, !6, i64 40}
!26 = !{!27, !10, i64 32}
!27 = !{!"tree", !15, i64 0, !15, i64 2, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !10, i64 24, !10, i64 32, !10, i64 40}
!28 = !{!29, !12, i64 0}
!29 = !{!"MDBX_stat", !12, i64 0, !12, i64 4, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40}
!30 = !{!31, !12, i64 8}
!31 = !{!"MDBX_env", !7, i64 0, !12, i64 4, !12, i64 8, !32, i64 16, !12, i64 56, !12, i64 60, !32, 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, !12, i64 132, !12, i64 136, !12, i64 140, !12, i64 144, !33, i64 152, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !12, i64 224, !12, i64 228, !12, i64 232, !6, i64 240, !6, i64 248, !10, i64 256, !34, i64 264, !36, i64 320, !18, i64 360, !6, i64 368, !6, i64 376, !6, i64 384, !37, i64 392, !7, i64 400, !12, i64 440, !12, i64 444, !6, i64 448, !38, i64 456, !7, i64 496, !7, i64 536}
!32 = !{!"osal_mmap", !7, i64 0, !12, i64 8, !10, i64 16, !10, i64 24, !10, i64 32}
!33 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!34 = !{!"", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !10, i64 16, !7, i64 24, !7, i64 25, !7, i64 26, !7, i64 27, !12, i64 28, !12, i64 32, !18, i64 36, !18, i64 37, !18, i64 38, !35, i64 40, !7, i64 48}
!35 = !{!"", !15, i64 0, !15, i64 2, !15, i64 4, !15, i64 6}
!36 = !{!"", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32}
!37 = !{!"", !10, i64 0}
!38 = !{!"osal_ioring", !12, i64 0, !12, i64 4, !12, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!39 = !{!27, !15, i64 2}
!40 = !{!29, !12, i64 4}
!41 = !{!27, !12, i64 12}
!42 = !{!29, !10, i64 8}
!43 = !{!27, !12, i64 20}
!44 = !{!27, !12, i64 16}
!45 = !{!29, !10, i64 16}
!46 = !{!29, !10, i64 32}
!47 = !{!27, !10, i64 40}
!48 = !{!29, !10, i64 40}


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

@globals = external local_unnamed_addr global %struct.libmdbx_globals, align 8
@.str.14 = external hidden unnamed_addr constant [25 x i8], align 1
@__func__.mdbx_cursor_count_ex = external hidden unnamed_addr constant [21 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [21 x i8], align 1

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

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

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

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare hidden zeroext i8 @node_flags(ptr noalias noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local i32 @mdbx_cursor_count_ex(ptr noundef %0, ptr noundef writeonly %1, ptr noundef writeonly %2, i64 noundef %3) local_unnamed_addr #3 {
  %5 = tail call i32 @cursor_check_ro(ptr noundef %0)
  %.not = icmp eq i32 %5, 0
  br i1 %.not, label %8, label %6, !prof !5

6:                                                ; preds = %4
  %7 = tail call i32 @log_if_error(i32 noundef %5, ptr noundef nonnull @__func__.mdbx_cursor_count_ex, i32 noundef 358)
  br label %85

8:                                                ; preds = %4
  %.not50 = icmp eq ptr %2, null
  br i1 %.not50, label %12, label %9

9:                                                ; preds = %8
  switch i64 %3, label %10 [
    i64 48, label %.thread
    i64 40, label %.thread
  ], !prof !6

.thread:                                          ; preds = %9, %9
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(48) %2, i8 0, i64 48, i1 false)
  br label %12

10:                                               ; preds = %9
  %11 = tail call i32 @log_if_error(i32 noundef 22, ptr noundef nonnull @__func__.mdbx_cursor_count_ex, i32 noundef 363)
  br label %85

12:                                               ; preds = %.thread, %8
  %13 = tail call zeroext i1 @is_filled(ptr noundef %0) #6
  br i1 %13, label %14, label %83

14:                                               ; preds = %12
  %15 = tail call zeroext i1 @inner_hollow(ptr noundef %0) #6
  br i1 %15, label %83, label %16

16:                                               ; preds = %14
  %17 = getelementptr inbounds i8, ptr %0, i64 48
  %18 = getelementptr inbounds i8, ptr %0, i64 5
  %19 = load i8, ptr %18, align 1, !tbaa !7
  %20 = sext i8 %19 to i64
  %21 = getelementptr inbounds [32 x ptr], ptr %17, i64 0, i64 %20
  %22 = load ptr, ptr %21, align 8, !tbaa !10
  %23 = getelementptr inbounds i8, ptr %0, i64 304
  %24 = getelementptr inbounds [32 x i16], ptr %23, i64 0, i64 %20
  %25 = load i16, ptr %24, align 2, !tbaa !12
  %26 = zext i16 %25 to i64
  %27 = tail call ptr @page_node(ptr noundef %22, i64 noundef %26) #6
  %28 = load i8, ptr getelementptr inbounds (i8, ptr @globals, i64 25), align 1, !tbaa !14
  %29 = and i8 %28, 1
  %.not53 = icmp eq i8 %29, 0
  br i1 %.not53, label %38, label %30, !prof !19

30:                                               ; preds = %16
  %31 = tail call zeroext i8 @node_flags(ptr noundef %27) #6
  %32 = and i8 %31, 4
  %.not54 = icmp eq i8 %32, 0
  br i1 %.not54, label %33, label %38, !prof !19

33:                                               ; preds = %30
  %34 = getelementptr inbounds i8, ptr %0, i64 16
  %35 = load ptr, ptr %34, align 8, !tbaa !20
  %36 = getelementptr inbounds i8, ptr %35, i64 80
  %37 = load ptr, ptr %36, align 8, !tbaa !22
  tail call void @mdbx_assert_fail(ptr noundef %37, ptr noundef nonnull @.str.14, ptr noundef nonnull @__func__.mdbx_cursor_count_ex, i32 noundef 373) #7
  unreachable

38:                                               ; preds = %30, %16
  %39 = getelementptr inbounds i8, ptr %0, i64 40
  %40 = load ptr, ptr %39, align 8, !tbaa !26
  %41 = getelementptr inbounds i8, ptr %40, i64 416
  %42 = load i64, ptr %41, align 4, !tbaa !27
  %spec.select = tail call i64 @llvm.umin.i64(i64 %42, i64 9223372036854775807)
  br i1 %.not50, label %83, label %43

43:                                               ; preds = %38
  %44 = tail call i64 @node_ds(ptr noundef %27) #6
  %45 = trunc i64 %44 to i32
  store i32 %45, ptr %2, align 8, !tbaa !29
  %46 = tail call zeroext i8 @node_flags(ptr noundef %27) #6
  %47 = and i8 %46, 2
  %.not55 = icmp eq i8 %47, 0
  br i1 %.not55, label %63, label %48

48:                                               ; preds = %43
  %49 = getelementptr inbounds i8, ptr %0, i64 16
  %50 = load ptr, ptr %49, align 8, !tbaa !20
  %51 = getelementptr inbounds i8, ptr %50, i64 80
  %52 = load ptr, ptr %51, align 8, !tbaa !22
  %53 = getelementptr inbounds i8, ptr %52, i64 8
  %54 = load i32, ptr %53, align 8, !tbaa !31
  store i32 %54, ptr %2, align 8, !tbaa !29
  %55 = getelementptr inbounds i8, ptr %40, i64 386
  %56 = load i16, ptr %55, align 2, !tbaa !40
  %57 = zext i16 %56 to i32
  %58 = getelementptr inbounds i8, ptr %2, i64 4
  store i32 %57, ptr %58, align 4, !tbaa !41
  %59 = getelementptr inbounds i8, ptr %40, i64 396
  %60 = load i32, ptr %59, align 4, !tbaa !42
  %61 = zext i32 %60 to i64
  %62 = getelementptr inbounds i8, ptr %2, i64 8
  store i64 %61, ptr %62, align 8, !tbaa !43
  br label %63

63:                                               ; preds = %43, %48
  br i1 %.not53, label %72, label %64, !prof !19

64:                                               ; preds = %63
  %65 = getelementptr inbounds i8, ptr %40, i64 404
  %66 = load i32, ptr %65, align 4, !tbaa !44
  %.not57 = icmp eq i32 %66, 0
  br i1 %.not57, label %72, label %67, !prof !5

67:                                               ; preds = %64
  %68 = getelementptr inbounds i8, ptr %0, i64 16
  %69 = load ptr, ptr %68, align 8, !tbaa !20
  %70 = getelementptr inbounds i8, ptr %69, i64 80
  %71 = load ptr, ptr %70, align 8, !tbaa !22
  tail call void @mdbx_assert_fail(ptr noundef %71, ptr noundef nonnull @.str.15, ptr noundef nonnull @__func__.mdbx_cursor_count_ex, i32 noundef 383) #7
  unreachable

72:                                               ; preds = %64, %63
  %73 = getelementptr inbounds i8, ptr %40, i64 400
  %74 = load i32, ptr %73, align 4, !tbaa !45
  %75 = zext i32 %74 to i64
  %76 = getelementptr inbounds i8, ptr %2, i64 16
  store i64 %75, ptr %76, align 8, !tbaa !46
  %77 = getelementptr inbounds i8, ptr %2, i64 32
  store i64 %42, ptr %77, align 8, !tbaa !47
  %78 = icmp ugt i64 %3, 47
  br i1 %78, label %79, label %83, !prof !5

79:                                               ; preds = %72
  %80 = getelementptr inbounds i8, ptr %40, i64 424
  %81 = load i64, ptr %80, align 4, !tbaa !48
  %82 = getelementptr inbounds i8, ptr %2, i64 40
  store i64 %81, ptr %82, align 8, !tbaa !49
  br label %83

83:                                               ; preds = %38, %79, %72, %14, %12
  %.043 = phi i64 [ 1, %14 ], [ 0, %12 ], [ %spec.select, %72 ], [ %spec.select, %79 ], [ %spec.select, %38 ]
  %.not58 = icmp eq ptr %1, null
  br i1 %.not58, label %85, label %84, !prof !19

84:                                               ; preds = %83
  store i64 %.043, ptr %1, align 8, !tbaa !50
  br label %85

85:                                               ; preds = %10, %83, %84, %6
  %.1 = phi i32 [ %7, %6 ], [ %11, %10 ], [ 0, %84 ], [ 0, %83 ]
  ret i32 %.1
}

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

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umin.i64(i64, i64) #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 = { 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 = { 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 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind willreturn memory(read) }
attributes #7 = { 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 2000, i32 1}
!6 = !{!"branch_weights", i32 1, i32 4000, i32 1}
!7 = !{!8, !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"short", !8, i64 0}
!14 = !{!15, !8, i64 25}
!15 = !{!"libmdbx_globals", !8, i64 0, !16, i64 16, !16, i64 20, !8, i64 24, !8, i64 25, !8, i64 26, !17, i64 27, !16, i64 28, !8, i64 32, !8, i64 40, !18, i64 80, !11, i64 88}
!16 = !{!"int", !8, i64 0}
!17 = !{!"_Bool", !8, i64 0}
!18 = !{!"long", !8, i64 0}
!19 = !{!"branch_weights", !"expected", i32 1, i32 2000}
!20 = !{!21, !11, i64 16}
!21 = !{!"MDBX_cursor", !16, i64 0, !8, i64 4, !8, i64 6, !8, i64 7, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !8, i64 48, !8, i64 304, !11, i64 368, !11, i64 376}
!22 = !{!23, !11, i64 80}
!23 = !{!"MDBX_txn", !16, i64 0, !16, i64 4, !18, i64 8, !18, i64 16, !11, i64 24, !11, i64 32, !24, i64 40, !18, i64 64, !18, 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, !8, i64 168}
!24 = !{!"geo", !13, i64 0, !13, i64 2, !16, i64 4, !16, i64 8, !8, i64 12, !8, i64 16}
!25 = !{!"MDBX_canary", !18, i64 0, !18, i64 8, !18, i64 16, !18, i64 24}
!26 = !{!21, !11, i64 40}
!27 = !{!28, !18, i64 32}
!28 = !{!"tree", !13, i64 0, !13, i64 2, !16, i64 4, !16, i64 8, !16, i64 12, !16, i64 16, !16, i64 20, !18, i64 24, !18, i64 32, !18, i64 40}
!29 = !{!30, !16, i64 0}
!30 = !{!"MDBX_stat", !16, i64 0, !16, i64 4, !18, i64 8, !18, i64 16, !18, i64 24, !18, i64 32, !18, i64 40}
!31 = !{!32, !16, i64 8}
!32 = !{!"MDBX_env", !8, i64 0, !16, i64 4, !16, i64 8, !33, i64 16, !16, i64 56, !16, i64 60, !33, i64 64, !11, i64 104, !13, i64 112, !13, i64 114, !13, i64 116, !13, i64 118, !13, i64 120, !13, i64 122, !8, i64 124, !8, i64 128, !8, i64 129, !13, i64 130, !16, i64 132, !16, i64 136, !16, i64 140, !16, i64 144, !34, i64 152, !11, i64 184, !11, i64 192, !11, i64 200, !11, i64 208, !11, i64 216, !16, i64 224, !16, i64 228, !16, i64 232, !11, i64 240, !11, i64 248, !18, i64 256, !35, i64 264, !37, i64 320, !17, i64 360, !11, i64 368, !11, i64 376, !11, i64 384, !38, i64 392, !8, i64 400, !16, i64 440, !16, i64 444, !11, i64 448, !39, i64 456, !8, i64 496, !8, i64 536}
!33 = !{!"osal_mmap", !8, i64 0, !16, i64 8, !18, i64 16, !18, i64 24, !18, i64 32}
!34 = !{!"", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24}
!35 = !{!"", !16, i64 0, !16, i64 4, !16, i64 8, !16, i64 12, !18, i64 16, !8, i64 24, !8, i64 25, !8, i64 26, !8, i64 27, !16, i64 28, !16, i64 32, !17, i64 36, !17, i64 37, !17, i64 38, !36, i64 40, !8, i64 48}
!36 = !{!"", !13, i64 0, !13, i64 2, !13, i64 4, !13, i64 6}
!37 = !{!"", !18, i64 0, !18, i64 8, !18, i64 16, !18, i64 24, !18, i64 32}
!38 = !{!"", !18, i64 0}
!39 = !{!"osal_ioring", !16, i64 0, !16, i64 4, !16, i64 8, !11, i64 16, !11, i64 24, !11, i64 32}
!40 = !{!28, !13, i64 2}
!41 = !{!30, !16, i64 4}
!42 = !{!28, !16, i64 12}
!43 = !{!30, !18, i64 8}
!44 = !{!28, !16, i64 20}
!45 = !{!28, !16, i64 16}
!46 = !{!30, !18, i64 16}
!47 = !{!30, !18, i64 32}
!48 = !{!28, !18, i64 40}
!49 = !{!30, !18, i64 40}
!50 = !{!18, !18, i64 0}


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