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

; 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.0 }
%struct.anon.0 = 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.cursor_couple = type { %struct.MDBX_cursor, ptr, %struct.inner_cursor }
%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.inner_cursor = type { %struct.MDBX_cursor, %struct.tree }
%struct.tree = type { i16, i16, i32, i32, i32, i32, i32, i64, i64, i64 }
%struct.cursor_set_result = type { i32, i8 }
%struct.iovec = type { ptr, i64 }
%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.4 }
%struct.geo = type { i16, i16, i32, i32, %union.anon.2, %union.anon.3 }
%union.anon.2 = type { i32 }
%union.anon.3 = type { i32 }
%struct.MDBX_canary = type { i64, i64, i64, i64 }
%union.anon.4 = type { %struct.anon.6 }
%struct.anon.6 = type { %struct.troika, ptr, %struct.anon.7, i8, i32, i32, i64, ptr, ptr, ptr, i64, %union.anon.8 }
%struct.troika = type { i8, i8, i8, i8, i32, [3 x i64] }
%struct.anon.7 = type { %struct.MDBX_rkl, i64, %struct.MDBX_rkl }
%struct.MDBX_rkl = type { i64, i64, i32, i32, ptr, [12 x i64] }
%union.anon.8 = type { %struct.anon.9 }
%struct.anon.9 = type { i64, ptr }
%struct.anon = type { i8, i8 }

@globals = external global %struct.libmdbx_globals, align 8
@__func__.mdbx_put = external hidden unnamed_addr constant [9 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [67 x i8], align 1

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @log_if_error(i32 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

declare i32 @cursor_init(ptr noundef, ptr noundef, i64 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

declare i64 @cursor_seek(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #3

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

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

declare i32 @cursor_del(ptr noundef, i32 noundef) #3

; Function Attrs: nounwind uwtable
define dso_local i32 @mdbx_put(ptr noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3, i32 noundef %4) #5 {
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca %struct.cursor_couple, align 8
  %15 = alloca %struct.cursor_set_result, align 4
  %16 = alloca ptr, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store i32 %1, ptr %8, align 4, !tbaa !9
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store i32 %4, ptr %11, align 4, !tbaa !9
  %17 = load ptr, ptr %9, align 8, !tbaa !5
  %18 = icmp ne ptr %17, null
  br i1 %18, label %19, label %23

19:                                               ; preds = %5
  %20 = load ptr, ptr %10, align 8, !tbaa !5
  %21 = icmp ne ptr %20, null
  %22 = xor i1 %21, true
  br label %23

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

31:                                               ; preds = %23
  %32 = call i32 @log_if_error(i32 noundef 22, ptr noundef @__func__.mdbx_put, i32 noundef 252)
  store i32 %32, ptr %6, align 4
  br label %298

33:                                               ; preds = %23
  %34 = load i32, ptr %8, align 4, !tbaa !9
  %35 = icmp ule i32 %34, 0
  %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 %44

42:                                               ; preds = %33
  %43 = call i32 @log_if_error(i32 noundef -30780, ptr noundef @__func__.mdbx_put, i32 noundef 255)
  store i32 %43, ptr %6, align 4
  br label %298

44:                                               ; preds = %33
  %45 = load i32, ptr %11, align 4, !tbaa !9
  %46 = and i32 %45, -983281
  %47 = icmp ne i32 %46, 0
  %48 = xor i1 %47, true
  %49 = xor i1 %48, true
  %50 = zext i1 %49 to i32
  %51 = sext i32 %50 to i64
  %52 = call i64 @llvm.expect.i64(i64 %51, i64 0)
  %53 = icmp ne i64 %52, 0
  br i1 %53, label %54, label %56

54:                                               ; preds = %44
  %55 = call i32 @log_if_error(i32 noundef 22, ptr noundef @__func__.mdbx_put, i32 noundef 259)
  store i32 %55, ptr %6, align 4
  br label %298

56:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #7
  %57 = load ptr, ptr %7, align 8, !tbaa !5
  %58 = call i32 @check_txn_rw(ptr noundef %57, i32 noundef 51)
  store i32 %58, ptr %12, align 4, !tbaa !9
  %59 = load i32, ptr %12, align 4, !tbaa !9
  %60 = icmp ne i32 %59, 0
  %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 %70

67:                                               ; preds = %56
  %68 = load i32, ptr %12, align 4, !tbaa !9
  %69 = call i32 @log_if_error(i32 noundef %68, ptr noundef @__func__.mdbx_put, i32 noundef 263)
  store i32 %69, ptr %6, align 4
  store i32 1, ptr %13, align 4
  br label %297

70:                                               ; preds = %56
  call void @llvm.lifetime.start.p0(i64 824, ptr %14) #7
  %71 = getelementptr inbounds %struct.cursor_couple, ptr %14, i32 0, i32 0
  %72 = load ptr, ptr %7, align 8, !tbaa !5
  %73 = load i32, ptr %8, align 4, !tbaa !9
  %74 = zext i32 %73 to i64
  %75 = call i32 @cursor_init(ptr noundef %71, ptr noundef %72, i64 noundef %74)
  store i32 %75, ptr %12, align 4, !tbaa !9
  %76 = load i32, ptr %12, align 4, !tbaa !9
  %77 = icmp ne i32 %76, 0
  %78 = xor i1 %77, true
  %79 = xor i1 %78, true
  %80 = zext i1 %79 to i32
  %81 = sext i32 %80 to i64
  %82 = call i64 @llvm.expect.i64(i64 %81, i64 0)
  %83 = icmp ne i64 %82, 0
  br i1 %83, label %84, label %87

84:                                               ; preds = %70
  %85 = load i32, ptr %12, align 4, !tbaa !9
  %86 = call i32 @log_if_error(i32 noundef %85, ptr noundef @__func__.mdbx_put, i32 noundef 268)
  store i32 %86, ptr %6, align 4
  store i32 1, ptr %13, align 4
  br label %296

87:                                               ; preds = %70
  %88 = load i32, ptr %11, align 4, !tbaa !9
  %89 = and i32 %88, 524288
  %90 = icmp ne i32 %89, 0
  %91 = xor i1 %90, true
  %92 = xor i1 %91, true
  %93 = zext i1 %92 to i32
  %94 = sext i32 %93 to i64
  %95 = call i64 @llvm.expect.i64(i64 %94, i64 0)
  %96 = icmp ne i64 %95, 0
  br i1 %96, label %97, label %115

97:                                               ; preds = %87
  %98 = getelementptr inbounds %struct.cursor_couple, ptr %14, i32 0, i32 0
  %99 = load ptr, ptr %9, align 8, !tbaa !5
  %100 = load ptr, ptr %10, align 8, !tbaa !5
  %101 = load i32, ptr %11, align 4, !tbaa !9
  %102 = call i32 @cursor_check_multiple(ptr noundef %98, ptr noundef %99, ptr noundef %100, i32 noundef %101)
  store i32 %102, ptr %12, align 4, !tbaa !9
  %103 = load i32, ptr %12, align 4, !tbaa !9
  %104 = icmp ne i32 %103, 0
  %105 = xor i1 %104, true
  %106 = xor i1 %105, true
  %107 = zext i1 %106 to i32
  %108 = sext i32 %107 to i64
  %109 = call i64 @llvm.expect.i64(i64 %108, i64 0)
  %110 = icmp ne i64 %109, 0
  br i1 %110, label %111, label %114

111:                                              ; preds = %97
  %112 = load i32, ptr %12, align 4, !tbaa !9
  %113 = call i32 @log_if_error(i32 noundef %112, ptr noundef @__func__.mdbx_put, i32 noundef 273)
  store i32 %113, ptr %6, align 4
  store i32 1, ptr %13, align 4
  br label %296

114:                                              ; preds = %97
  br label %115

115:                                              ; preds = %114, %87
  %116 = load i32, ptr %11, align 4, !tbaa !9
  %117 = and i32 %116, 65536
  %118 = icmp ne i32 %117, 0
  br i1 %118, label %119, label %139

119:                                              ; preds = %115
  %120 = getelementptr inbounds %struct.cursor_couple, ptr %14, i32 0, i32 0
  %121 = getelementptr inbounds %struct.MDBX_cursor, ptr %120, i32 0, i32 6
  %122 = load ptr, ptr %121, align 8, !tbaa !11
  %123 = getelementptr inbounds %struct.tree, ptr %122, i32 0, i32 0
  %124 = load i16, ptr %123, align 4, !tbaa !18
  %125 = zext i16 %124 to i32
  %126 = and i32 %125, 116
  %127 = icmp ne i32 %126, 0
  %128 = xor i1 %127, true
  %129 = xor i1 %128, true
  %130 = zext i1 %129 to i32
  %131 = sext i32 %130 to i64
  %132 = call i64 @llvm.expect.i64(i64 %131, i64 0)
  %133 = icmp ne i64 %132, 0
  br i1 %133, label %134, label %136

134:                                              ; preds = %119
  %135 = call i32 @log_if_error(i32 noundef -30784, ptr noundef @__func__.mdbx_put, i32 noundef 278)
  store i32 %135, ptr %6, align 4
  store i32 1, ptr %13, align 4
  br label %296

136:                                              ; preds = %119
  %137 = load ptr, ptr %10, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.iovec, ptr %137, i32 0, i32 0
  store ptr null, ptr %138, align 8, !tbaa !19
  br label %139

139:                                              ; preds = %136, %115
  %140 = load ptr, ptr %7, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.MDBX_txn, ptr %140, i32 0, i32 14
  %142 = load ptr, ptr %141, align 8, !tbaa !21
  %143 = load i32, ptr %8, align 4, !tbaa !9
  %144 = zext i32 %143 to i64
  %145 = getelementptr inbounds ptr, ptr %142, i64 %144
  %146 = load ptr, ptr %145, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.cursor_couple, ptr %14, i32 0, i32 0
  %148 = getelementptr inbounds %struct.MDBX_cursor, ptr %147, i32 0, i32 11
  store ptr %146, ptr %148, align 8, !tbaa !25
  %149 = getelementptr inbounds %struct.cursor_couple, ptr %14, i32 0, i32 0
  %150 = load ptr, ptr %7, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.MDBX_txn, ptr %150, i32 0, i32 14
  %152 = load ptr, ptr %151, align 8, !tbaa !21
  %153 = load i32, ptr %8, align 4, !tbaa !9
  %154 = zext i32 %153 to i64
  %155 = getelementptr inbounds ptr, ptr %152, i64 %154
  store ptr %149, ptr %155, align 8, !tbaa !5
  %156 = load i32, ptr %11, align 4, !tbaa !9
  %157 = and i32 %156, 64
  %158 = icmp ne i32 %157, 0
  br i1 %158, label %159, label %269

159:                                              ; preds = %139
  %160 = getelementptr inbounds %struct.cursor_couple, ptr %14, i32 0, i32 0
  %161 = load ptr, ptr %9, align 8, !tbaa !5
  %162 = call i64 @cursor_seek(ptr noundef %160, ptr noundef %161, ptr noundef null, i32 noundef 15)
  store i64 %162, ptr %15, align 4
  %163 = getelementptr inbounds %struct.cursor_set_result, ptr %15, i32 0, i32 0
  %164 = load i32, ptr %163, align 4, !tbaa !26
  store i32 %164, ptr %12, align 4, !tbaa !9
  %165 = load i32, ptr %12, align 4, !tbaa !9
  %166 = icmp eq i32 %165, 0
  %167 = xor i1 %166, true
  %168 = xor i1 %167, true
  %169 = zext i1 %168 to i32
  %170 = sext i32 %169 to i64
  %171 = call i64 @llvm.expect.i64(i64 %170, i64 1)
  %172 = icmp ne i64 %171, 0
  br i1 %172, label %173, label %268

173:                                              ; preds = %159
  %174 = load ptr, ptr %7, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.MDBX_txn, ptr %174, i32 0, i32 10
  %176 = load ptr, ptr %175, align 8, !tbaa !29
  %177 = load i32, ptr %8, align 4, !tbaa !9
  %178 = zext i32 %177 to i64
  %179 = getelementptr inbounds %struct.tree, ptr %176, i64 %178
  %180 = getelementptr inbounds %struct.tree, ptr %179, i32 0, i32 0
  %181 = load i16, ptr %180, align 4, !tbaa !18
  %182 = zext i16 %181 to i32
  %183 = and i32 %182, 4
  %184 = icmp ne i32 %183, 0
  br i1 %184, label %185, label %268

185:                                              ; preds = %173
  %186 = load i32, ptr %11, align 4, !tbaa !9
  %187 = and i32 %186, 128
  %188 = icmp eq i32 %187, 0
  br i1 %188, label %189, label %268

189:                                              ; preds = %185
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #7
  %190 = getelementptr inbounds %struct.cursor_couple, ptr %14, i32 0, i32 0
  %191 = getelementptr inbounds %struct.MDBX_cursor, ptr %190, i32 0, i32 9
  %192 = getelementptr inbounds %struct.cursor_couple, ptr %14, i32 0, i32 0
  %193 = getelementptr inbounds %struct.MDBX_cursor, ptr %192, i32 0, i32 1
  %194 = getelementptr inbounds %struct.anon, ptr %193, i32 0, i32 1
  %195 = load i8, ptr %194, align 1, !tbaa !30
  %196 = sext i8 %195 to i64
  %197 = getelementptr inbounds [32 x ptr], ptr %191, i64 0, i64 %196
  %198 = load ptr, ptr %197, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.cursor_couple, ptr %14, i32 0, i32 0
  %200 = getelementptr inbounds %struct.MDBX_cursor, ptr %199, i32 0, i32 10
  %201 = getelementptr inbounds %struct.cursor_couple, ptr %14, i32 0, i32 0
  %202 = getelementptr inbounds %struct.MDBX_cursor, ptr %201, i32 0, i32 1
  %203 = getelementptr inbounds %struct.anon, ptr %202, i32 0, i32 1
  %204 = load i8, ptr %203, align 1, !tbaa !30
  %205 = sext i8 %204 to i64
  %206 = getelementptr inbounds [32 x i16], ptr %200, i64 0, i64 %205
  %207 = load i16, ptr %206, align 2, !tbaa !31
  %208 = zext i16 %207 to i64
  %209 = call ptr @page_node(ptr noundef %198, i64 noundef %208) #8
  store ptr %209, ptr %16, align 8, !tbaa !5
  %210 = load ptr, ptr %16, align 8, !tbaa !5
  %211 = call zeroext i8 @node_flags(ptr noundef %210) #8
  %212 = zext i8 %211 to i32
  %213 = and i32 %212, 4
  %214 = icmp ne i32 %213, 0
  br i1 %214, label %215, label %267

215:                                              ; preds = %189
  br label %216

216:                                              ; preds = %215
  %217 = load i8, ptr getelementptr inbounds (%struct.libmdbx_globals, ptr @globals, i32 0, i32 4), align 1, !tbaa !32
  %218 = zext i8 %217 to i32
  %219 = and i32 %218, 1
  %220 = icmp ne i32 %219, 0
  %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 1)
  %226 = icmp ne i64 %225, 0
  br i1 %226, label %227, label %255

227:                                              ; preds = %216
  br label %228

228:                                              ; preds = %227
  %229 = getelementptr inbounds %struct.cursor_couple, ptr %14, i32 0, i32 0
  %230 = call zeroext i1 @inner_pointed(ptr noundef %229) #8
  br i1 %230, label %231, label %239

231:                                              ; preds = %228
  %232 = getelementptr inbounds %struct.cursor_couple, ptr %14, i32 0, i32 0
  %233 = getelementptr inbounds %struct.MDBX_cursor, ptr %232, i32 0, i32 8
  %234 = load ptr, ptr %233, align 8, !tbaa !34
  %235 = getelementptr inbounds %struct.inner_cursor, ptr %234, i32 0, i32 1
  %236 = getelementptr inbounds %struct.tree, ptr %235, i32 0, i32 8
  %237 = load i64, ptr %236, align 8, !tbaa !35
  %238 = icmp ugt i64 %237, 1
  br label %239

239:                                              ; preds = %231, %228
  %240 = phi i1 [ false, %228 ], [ %238, %231 ]
  %241 = xor i1 %240, true
  %242 = xor i1 %241, true
  %243 = xor i1 %242, true
  %244 = zext i1 %243 to i32
  %245 = sext i32 %244 to i64
  %246 = call i64 @llvm.expect.i64(i64 %245, i64 0)
  %247 = icmp ne i64 %246, 0
  br i1 %247, label %248, label %252

248:                                              ; preds = %239
  %249 = load ptr, ptr %7, align 8, !tbaa !5
  %250 = getelementptr inbounds %struct.MDBX_txn, ptr %249, i32 0, i32 9
  %251 = load ptr, ptr %250, align 8, !tbaa !36
  call void @mdbx_assert_fail(ptr noundef %251, ptr noundef @.str.4, ptr noundef @__func__.mdbx_put, i32 noundef 292) #9
  unreachable

252:                                              ; preds = %239
  br label %253

253:                                              ; preds = %252
  br label %254

254:                                              ; preds = %253
  br label %255

255:                                              ; preds = %254, %216
  br label %256

256:                                              ; preds = %255
  br label %257

257:                                              ; preds = %256
  store i32 -30421, ptr %12, align 4, !tbaa !9
  %258 = load i32, ptr %11, align 4, !tbaa !9
  %259 = and i32 %258, 16
  %260 = icmp eq i32 %259, 0
  br i1 %260, label %261, label %266

261:                                              ; preds = %257
  %262 = load i32, ptr %11, align 4, !tbaa !9
  %263 = sub i32 %262, 64
  store i32 %263, ptr %11, align 4, !tbaa !9
  %264 = getelementptr inbounds %struct.cursor_couple, ptr %14, i32 0, i32 0
  %265 = call i32 @cursor_del(ptr noundef %264, i32 noundef 128)
  store i32 %265, ptr %12, align 4, !tbaa !9
  br label %266

266:                                              ; preds = %261, %257
  br label %267

267:                                              ; preds = %266, %189
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #7
  br label %268

268:                                              ; preds = %267, %185, %173, %159
  br label %269

269:                                              ; preds = %268, %139
  %270 = load i32, ptr %12, align 4, !tbaa !9
  %271 = icmp eq i32 %270, 0
  %272 = xor i1 %271, true
  %273 = xor i1 %272, true
  %274 = zext i1 %273 to i32
  %275 = sext i32 %274 to i64
  %276 = call i64 @llvm.expect.i64(i64 %275, i64 1)
  %277 = icmp ne i64 %276, 0
  br i1 %277, label %278, label %284

278:                                              ; preds = %269
  %279 = getelementptr inbounds %struct.cursor_couple, ptr %14, i32 0, i32 0
  %280 = load ptr, ptr %9, align 8, !tbaa !5
  %281 = load ptr, ptr %10, align 8, !tbaa !5
  %282 = load i32, ptr %11, align 4, !tbaa !9
  %283 = call i32 @cursor_put_checklen(ptr noundef %279, ptr noundef %280, ptr noundef %281, i32 noundef %282)
  store i32 %283, ptr %12, align 4, !tbaa !9
  br label %284

284:                                              ; preds = %278, %269
  %285 = getelementptr inbounds %struct.cursor_couple, ptr %14, i32 0, i32 0
  %286 = getelementptr inbounds %struct.MDBX_cursor, ptr %285, i32 0, i32 11
  %287 = load ptr, ptr %286, align 8, !tbaa !25
  %288 = load ptr, ptr %7, align 8, !tbaa !5
  %289 = getelementptr inbounds %struct.MDBX_txn, ptr %288, i32 0, i32 14
  %290 = load ptr, ptr %289, align 8, !tbaa !21
  %291 = load i32, ptr %8, align 4, !tbaa !9
  %292 = zext i32 %291 to i64
  %293 = getelementptr inbounds ptr, ptr %290, i64 %292
  store ptr %287, ptr %293, align 8, !tbaa !5
  %294 = load i32, ptr %12, align 4, !tbaa !9
  %295 = call i32 @log_if_error(i32 noundef %294, ptr noundef @__func__.mdbx_put, i32 noundef 306)
  store i32 %295, ptr %6, align 4
  store i32 1, ptr %13, align 4
  br label %296

296:                                              ; preds = %284, %134, %111, %84
  call void @llvm.lifetime.end.p0(i64 824, ptr %14) #7
  br label %297

297:                                              ; preds = %296, %67
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #7
  br label %298

298:                                              ; preds = %297, %54, %42, %31
  %299 = load i32, ptr %6, align 4
  ret i32 %299
}

declare i32 @cursor_check_multiple(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #3

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

declare i32 @cursor_put_checklen(ptr noundef, ptr noundef, ptr noundef, i32 noundef) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(none) }
attributes #1 = { 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 #2 = { nocallback nofree nosync 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 = { 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 = { 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 #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 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 24}
!12 = !{!"cursor_couple", !13, i64 0, !6, i64 384, !14, i64 392}
!13 = !{!"MDBX_cursor", !10, 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}
!14 = !{!"inner_cursor", !13, i64 0, !15, i64 384}
!15 = !{!"tree", !16, i64 0, !16, i64 2, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !17, i64 24, !17, i64 32, !17, i64 40}
!16 = !{!"short", !7, i64 0}
!17 = !{!"long", !7, i64 0}
!18 = !{!15, !16, i64 0}
!19 = !{!20, !6, i64 0}
!20 = !{!"iovec", !6, i64 0, !17, i64 8}
!21 = !{!22, !6, i64 120}
!22 = !{!"MDBX_txn", !10, i64 0, !10, 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, !24, i64 128, !6, i64 160, !7, i64 168}
!23 = !{!"geo", !16, i64 0, !16, i64 2, !10, i64 4, !10, i64 8, !7, i64 12, !7, i64 16}
!24 = !{!"MDBX_canary", !17, i64 0, !17, i64 8, !17, i64 16, !17, i64 24}
!25 = !{!12, !6, i64 368}
!26 = !{!27, !10, i64 0}
!27 = !{!"cursor_set_result", !10, i64 0, !28, i64 4}
!28 = !{!"_Bool", !7, i64 0}
!29 = !{!22, !6, i64 88}
!30 = !{!7, !7, i64 0}
!31 = !{!16, !16, i64 0}
!32 = !{!33, !7, i64 25}
!33 = !{!"libmdbx_globals", !7, i64 0, !10, i64 16, !10, i64 20, !7, i64 24, !7, i64 25, !7, i64 26, !28, i64 27, !10, i64 28, !7, i64 32, !7, i64 40, !17, i64 80, !6, i64 88}
!34 = !{!12, !6, i64 40}
!35 = !{!14, !17, i64 416}
!36 = !{!22, !6, i64 80}


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

@globals = external local_unnamed_addr global %struct.libmdbx_globals, align 8
@__func__.mdbx_put = external hidden unnamed_addr constant [9 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [67 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

declare i32 @cursor_init(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

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

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

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

declare i64 @cursor_seek(ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

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

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

declare i32 @cursor_del(ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local i32 @mdbx_put(ptr noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3, i32 noundef %4) local_unnamed_addr #4 {
  %6 = alloca %struct.cursor_couple, align 8
  %.not = icmp eq ptr %2, null
  %.not51 = icmp eq ptr %3, null
  %7 = or i1 %.not, %.not51
  br i1 %7, label %8, label %10, !prof !5

8:                                                ; preds = %5
  %9 = tail call i32 @log_if_error(i32 noundef 22, ptr noundef nonnull @__func__.mdbx_put, i32 noundef 252)
  br label %100

10:                                               ; preds = %5
  %11 = icmp eq i32 %1, 0
  br i1 %11, label %12, label %14, !prof !5

12:                                               ; preds = %10
  %13 = tail call i32 @log_if_error(i32 noundef -30780, ptr noundef nonnull @__func__.mdbx_put, i32 noundef 255)
  br label %100

14:                                               ; preds = %10
  %15 = and i32 %4, -983281
  %.not52 = icmp eq i32 %15, 0
  br i1 %.not52, label %18, label %16, !prof !6

16:                                               ; preds = %14
  %17 = tail call i32 @log_if_error(i32 noundef 22, ptr noundef nonnull @__func__.mdbx_put, i32 noundef 259)
  br label %100

18:                                               ; preds = %14
  %19 = tail call i32 @check_txn_rw(ptr noundef %0, i32 noundef 51)
  %.not53 = icmp eq i32 %19, 0
  br i1 %.not53, label %22, label %20, !prof !6

20:                                               ; preds = %18
  %21 = tail call i32 @log_if_error(i32 noundef %19, ptr noundef nonnull @__func__.mdbx_put, i32 noundef 263)
  br label %100

22:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 824, ptr nonnull %6) #6
  %23 = zext i32 %1 to i64
  %24 = call i32 @cursor_init(ptr noundef nonnull %6, ptr noundef %0, i64 noundef %23) #6
  %.not54 = icmp eq i32 %24, 0
  br i1 %.not54, label %27, label %25, !prof !6

25:                                               ; preds = %22
  %26 = call i32 @log_if_error(i32 noundef %24, ptr noundef nonnull @__func__.mdbx_put, i32 noundef 268)
  br label %99

27:                                               ; preds = %22
  %.not55 = icmp ult i32 %4, 524288
  br i1 %.not55, label %32, label %28, !prof !6

28:                                               ; preds = %27
  %29 = call i32 @cursor_check_multiple(ptr noundef nonnull %6, ptr noundef nonnull %2, ptr noundef nonnull %3, i32 noundef %4) #6
  %.not56 = icmp eq i32 %29, 0
  br i1 %.not56, label %32, label %30, !prof !6

30:                                               ; preds = %28
  %31 = call i32 @log_if_error(i32 noundef %29, ptr noundef nonnull @__func__.mdbx_put, i32 noundef 273)
  br label %99

32:                                               ; preds = %28, %27
  %33 = and i32 %4, 65536
  %.not57 = icmp eq i32 %33, 0
  br i1 %.not57, label %42, label %34

34:                                               ; preds = %32
  %35 = getelementptr inbounds i8, ptr %6, i64 24
  %36 = load ptr, ptr %35, align 8, !tbaa !7
  %37 = load i16, ptr %36, align 4, !tbaa !18
  %38 = and i16 %37, 116
  %.not58 = icmp eq i16 %38, 0
  br i1 %.not58, label %41, label %39, !prof !6

39:                                               ; preds = %34
  %40 = call i32 @log_if_error(i32 noundef -30784, ptr noundef nonnull @__func__.mdbx_put, i32 noundef 278)
  br label %99

41:                                               ; preds = %34
  store ptr null, ptr %3, align 8, !tbaa !19
  br label %42

42:                                               ; preds = %41, %32
  %43 = getelementptr inbounds i8, ptr %0, i64 120
  %44 = load ptr, ptr %43, align 8, !tbaa !21
  %45 = getelementptr inbounds ptr, ptr %44, i64 %23
  %46 = load ptr, ptr %45, align 8, !tbaa !25
  %47 = getelementptr inbounds i8, ptr %6, i64 368
  store ptr %46, ptr %47, align 8, !tbaa !26
  store ptr %6, ptr %45, align 8, !tbaa !25
  %48 = and i32 %4, 64
  %.not59 = icmp eq i32 %48, 0
  br i1 %.not59, label %.thread, label %49

49:                                               ; preds = %42
  %50 = call i64 @cursor_seek(ptr noundef nonnull %6, ptr noundef nonnull %2, ptr noundef null, i32 noundef 15) #6
  %.sroa.0.0.extract.trunc = trunc i64 %50 to i32
  %51 = icmp eq i32 %.sroa.0.0.extract.trunc, 0
  br i1 %51, label %52, label %.thread68, !prof !6

52:                                               ; preds = %49
  %53 = getelementptr inbounds i8, ptr %0, i64 88
  %54 = load ptr, ptr %53, align 8, !tbaa !27
  %55 = getelementptr inbounds %struct.tree, ptr %54, i64 %23
  %56 = load i16, ptr %55, align 4, !tbaa !18
  %57 = and i16 %56, 4
  %.not60 = icmp ne i16 %57, 0
  %58 = and i32 %4, 128
  %59 = icmp eq i32 %58, 0
  %or.cond = and i1 %59, %.not60
  br i1 %or.cond, label %60, label %.thread

60:                                               ; preds = %52
  %61 = getelementptr inbounds i8, ptr %6, i64 48
  %62 = getelementptr inbounds i8, ptr %6, i64 5
  %63 = load i8, ptr %62, align 1, !tbaa !28
  %64 = sext i8 %63 to i64
  %65 = getelementptr inbounds [32 x ptr], ptr %61, i64 0, i64 %64
  %66 = load ptr, ptr %65, align 8, !tbaa !25
  %67 = getelementptr inbounds i8, ptr %6, i64 304
  %68 = getelementptr inbounds [32 x i16], ptr %67, i64 0, i64 %64
  %69 = load i16, ptr %68, align 2, !tbaa !29
  %70 = zext i16 %69 to i64
  %71 = call ptr @page_node(ptr noundef %66, i64 noundef %70) #7
  %72 = call zeroext i8 @node_flags(ptr noundef %71) #7
  %73 = and i8 %72, 4
  %.not61 = icmp eq i8 %73, 0
  br i1 %.not61, label %.thread, label %74

74:                                               ; preds = %60
  %75 = load i8, ptr getelementptr inbounds (i8, ptr @globals, i64 25), align 1, !tbaa !30
  %76 = and i8 %75, 1
  %.not62 = icmp eq i8 %76, 0
  br i1 %.not62, label %87, label %77, !prof !5

77:                                               ; preds = %74
  %78 = call zeroext i1 @inner_pointed(ptr noundef nonnull %6) #7
  br i1 %78, label %79, label %.critedge, !prof !6

79:                                               ; preds = %77
  %80 = getelementptr inbounds i8, ptr %6, i64 40
  %81 = load ptr, ptr %80, align 8, !tbaa !33
  %82 = getelementptr inbounds i8, ptr %81, i64 416
  %83 = load i64, ptr %82, align 8, !tbaa !34
  %84 = icmp ult i64 %83, 2
  br i1 %84, label %.critedge, label %87, !prof !5

.critedge:                                        ; preds = %77, %79
  %85 = getelementptr inbounds i8, ptr %0, i64 80
  %86 = load ptr, ptr %85, align 8, !tbaa !35
  call void @mdbx_assert_fail(ptr noundef %86, ptr noundef nonnull @.str.4, ptr noundef nonnull @__func__.mdbx_put, i32 noundef 292) #8
  unreachable

87:                                               ; preds = %79, %74
  %88 = and i32 %4, 16
  %89 = icmp eq i32 %88, 0
  br i1 %89, label %90, label %.thread68

90:                                               ; preds = %87
  %91 = add nsw i32 %4, -64
  %92 = call i32 @cursor_del(ptr noundef nonnull %6, i32 noundef 128) #6
  %93 = icmp eq i32 %92, 0
  br i1 %93, label %.thread, label %.thread68, !prof !36

.thread:                                          ; preds = %60, %42, %52, %90
  %.14166 = phi i32 [ %91, %90 ], [ %4, %52 ], [ %4, %42 ], [ %4, %60 ]
  %94 = call i32 @cursor_put_checklen(ptr noundef nonnull %6, ptr noundef nonnull %2, ptr noundef nonnull %3, i32 noundef %.14166) #6
  br label %.thread68

.thread68:                                        ; preds = %87, %49, %.thread, %90
  %.3 = phi i32 [ %94, %.thread ], [ %92, %90 ], [ -30421, %87 ], [ %.sroa.0.0.extract.trunc, %49 ]
  %95 = load ptr, ptr %47, align 8, !tbaa !26
  %96 = load ptr, ptr %43, align 8, !tbaa !21
  %97 = getelementptr inbounds ptr, ptr %96, i64 %23
  store ptr %95, ptr %97, align 8, !tbaa !25
  %98 = call i32 @log_if_error(i32 noundef %.3, ptr noundef nonnull @__func__.mdbx_put, i32 noundef 306)
  br label %99

99:                                               ; preds = %.thread68, %39, %30, %25
  %.0 = phi i32 [ %26, %25 ], [ %31, %30 ], [ %40, %39 ], [ %98, %.thread68 ]
  call void @llvm.lifetime.end.p0(i64 824, ptr nonnull %6) #6
  br label %100

100:                                              ; preds = %20, %99, %16, %12, %8
  %.2 = phi i32 [ %9, %8 ], [ %13, %12 ], [ %17, %16 ], [ %21, %20 ], [ %.0, %99 ]
  ret i32 %.2
}

declare i32 @cursor_check_multiple(ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

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

declare i32 @cursor_put_checklen(ptr noundef, ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #2

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 #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 = { 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 }
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 = !{!"branch_weights", !"expected", i32 2000, i32 1}
!7 = !{!8, !13, i64 24}
!8 = !{!"cursor_couple", !9, i64 0, !13, i64 384, !14, i64 392}
!9 = !{!"MDBX_cursor", !10, i64 0, !11, i64 4, !11, i64 6, !11, i64 7, !13, i64 8, !13, i64 16, !13, i64 24, !13, i64 32, !13, i64 40, !11, i64 48, !11, i64 304, !13, i64 368, !13, i64 376}
!10 = !{!"int", !11, i64 0}
!11 = !{!"omnipotent char", !12, i64 0}
!12 = !{!"Simple C/C++ TBAA"}
!13 = !{!"any pointer", !11, i64 0}
!14 = !{!"inner_cursor", !9, i64 0, !15, i64 384}
!15 = !{!"tree", !16, i64 0, !16, i64 2, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !17, i64 24, !17, i64 32, !17, i64 40}
!16 = !{!"short", !11, i64 0}
!17 = !{!"long", !11, i64 0}
!18 = !{!15, !16, i64 0}
!19 = !{!20, !13, i64 0}
!20 = !{!"iovec", !13, i64 0, !17, i64 8}
!21 = !{!22, !13, i64 120}
!22 = !{!"MDBX_txn", !10, i64 0, !10, i64 4, !17, i64 8, !17, i64 16, !13, i64 24, !13, i64 32, !23, i64 40, !17, i64 64, !17, i64 72, !13, i64 80, !13, i64 88, !13, i64 96, !13, i64 104, !13, i64 112, !13, i64 120, !24, i64 128, !13, i64 160, !11, i64 168}
!23 = !{!"geo", !16, i64 0, !16, i64 2, !10, i64 4, !10, i64 8, !11, i64 12, !11, i64 16}
!24 = !{!"MDBX_canary", !17, i64 0, !17, i64 8, !17, i64 16, !17, i64 24}
!25 = !{!13, !13, i64 0}
!26 = !{!8, !13, i64 368}
!27 = !{!22, !13, i64 88}
!28 = !{!11, !11, i64 0}
!29 = !{!16, !16, i64 0}
!30 = !{!31, !11, i64 25}
!31 = !{!"libmdbx_globals", !11, i64 0, !10, i64 16, !10, i64 20, !11, i64 24, !11, i64 25, !11, i64 26, !32, i64 27, !10, i64 28, !11, i64 32, !11, i64 40, !17, i64 80, !13, i64 88}
!32 = !{!"_Bool", !11, i64 0}
!33 = !{!8, !13, i64 40}
!34 = !{!14, !17, i64 416}
!35 = !{!22, !13, i64 80}
!36 = !{!"branch_weights", !"expected", i32 -2147483648, i32 0}


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