; LLVM IR from ibr-ds/STANlite :: Enclave/sqlite (btree)

; 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.Sqlite3Config = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.sqlite3_mem_methods, %struct.sqlite3_mutex_methods, %struct.sqlite3_pcache_methods2, ptr, i32, i32, i32, i64, i64, ptr, i32, i32, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, i32, i32 }
%struct.sqlite3_mem_methods = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.sqlite3_mutex_methods = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.sqlite3_pcache_methods2 = type { i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.Btree = type { ptr, ptr, i8, i8, i8, i8, i32, i32, i32, ptr, ptr, %struct.BtLock }
%struct.BtLock = type { ptr, i32, i8, ptr }
%struct.sqlite3_vfs = type { i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.BtShared = type { ptr, ptr, ptr, ptr, i8, i8, i8, i8, i8, i8, i16, i16, i16, i16, i16, i32, i32, i32, i32, ptr, ptr, ptr, ptr, i32, ptr, ptr, ptr, ptr }
%struct.sqlite3 = type { ptr, ptr, ptr, ptr, ptr, i32, i32, i64, i64, i32, i32, i32, i32, i16, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i32, i32, i32, i32, [12 x i32], i32, %struct.sqlite3InitInfo, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, %union.anon, %struct.Lookaside, ptr, ptr, ptr, ptr, i32, i32, %struct.Hash, ptr, ptr, ptr, %struct.Hash, %struct.Hash, %struct.BusyHandler, [2 x %struct.Db], ptr, i32, i32, i32, i64, i64, ptr }
%struct.sqlite3InitInfo = type { i32, i8, i8, i8, i8 }
%union.anon = type { double }
%struct.Lookaside = type { i32, i16, i8, i32, i32, [3 x i32], ptr, ptr, ptr }
%struct.Hash = type { i32, i32, ptr, ptr }
%struct.BusyHandler = type { ptr, ptr, i32 }
%struct.Db = type { ptr, ptr, i8, i8, ptr }
%struct.sqlite3_file = type { ptr }

@sqlite3Config = external global %struct.Sqlite3Config, align 8
@.str = external hidden unnamed_addr constant [9 x i8], align 1
@sqlite3SharedCacheList = external hidden global ptr, align 8

declare void @sqlite3_free(ptr noundef) #0

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @sqlite3BtreeOpen(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, i32 noundef %4, i32 noundef %5) #2 {
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca i8, align 1
  %19 = alloca [100 x i8], align 16
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca i32, align 4
  %28 = alloca ptr, align 8
  %29 = alloca ptr, align 8
  %30 = alloca i32, align 4
  %31 = alloca ptr, align 8
  %32 = alloca ptr, align 8
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store ptr %2, ptr %10, align 8, !tbaa !5
  store ptr %3, ptr %11, align 8, !tbaa !5
  store i32 %4, ptr %12, align 4, !tbaa !9
  store i32 %5, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  store ptr null, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  store ptr null, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  store i32 0, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 100, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %33 = load ptr, ptr %9, align 8, !tbaa !5
  %34 = icmp eq ptr %33, null
  br i1 %34, label %41, label %35

35:                                               ; preds = %6
  %36 = load ptr, ptr %9, align 8, !tbaa !5
  %37 = getelementptr inbounds i8, ptr %36, i64 0
  %38 = load i8, ptr %37, align 1, !tbaa !11
  %39 = sext i8 %38 to i32
  %40 = icmp eq i32 %39, 0
  br label %41

41:                                               ; preds = %35, %6
  %42 = phi i1 [ true, %6 ], [ %40, %35 ]
  %43 = zext i1 %42 to i32
  store i32 %43, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  %44 = load ptr, ptr %9, align 8, !tbaa !5
  %45 = icmp ne ptr %44, null
  br i1 %45, label %46, label %50

46:                                               ; preds = %41
  %47 = load ptr, ptr %9, align 8, !tbaa !5
  %48 = call i32 @strcmp(ptr noundef %47, ptr noundef @.str) #6
  %49 = icmp eq i32 %48, 0
  br i1 %49, label %61, label %50

50:                                               ; preds = %46, %41
  %51 = load i32, ptr %20, align 4, !tbaa !9
  %52 = icmp ne i32 %51, 0
  br i1 %52, label %53, label %57

53:                                               ; preds = %50
  %54 = load ptr, ptr %10, align 8, !tbaa !5
  %55 = call i32 @sqlite3TempInMemory(ptr noundef %54)
  %56 = icmp ne i32 %55, 0
  br i1 %56, label %61, label %57

57:                                               ; preds = %53, %50
  %58 = load i32, ptr %13, align 4, !tbaa !9
  %59 = and i32 %58, 128
  %60 = icmp ne i32 %59, 0
  br label %61

61:                                               ; preds = %57, %53, %46
  %62 = phi i1 [ true, %53 ], [ true, %46 ], [ %60, %57 ]
  %63 = zext i1 %62 to i32
  store i32 %63, ptr %21, align 4, !tbaa !9
  %64 = load i32, ptr %21, align 4, !tbaa !9
  %65 = icmp ne i32 %64, 0
  br i1 %65, label %66, label %69

66:                                               ; preds = %61
  %67 = load i32, ptr %12, align 4, !tbaa !9
  %68 = or i32 %67, 2
  store i32 %68, ptr %12, align 4, !tbaa !9
  br label %69

69:                                               ; preds = %66, %61
  %70 = load i32, ptr %13, align 4, !tbaa !9
  %71 = and i32 %70, 256
  %72 = icmp ne i32 %71, 0
  br i1 %72, label %73, label %83

73:                                               ; preds = %69
  %74 = load i32, ptr %21, align 4, !tbaa !9
  %75 = icmp ne i32 %74, 0
  br i1 %75, label %79, label %76

76:                                               ; preds = %73
  %77 = load i32, ptr %20, align 4, !tbaa !9
  %78 = icmp ne i32 %77, 0
  br i1 %78, label %79, label %83

79:                                               ; preds = %76, %73
  %80 = load i32, ptr %13, align 4, !tbaa !9
  %81 = and i32 %80, -257
  %82 = or i32 %81, 512
  store i32 %82, ptr %13, align 4, !tbaa !9
  br label %83

83:                                               ; preds = %79, %76, %69
  %84 = call ptr @sqlite3MallocZero(i64 noundef 72)
  store ptr %84, ptr %15, align 8, !tbaa !5
  %85 = load ptr, ptr %15, align 8, !tbaa !5
  %86 = icmp ne ptr %85, null
  br i1 %86, label %88, label %87

87:                                               ; preds = %83
  store i32 7, ptr %7, align 4
  store i32 1, ptr %22, align 4
  br label %594

88:                                               ; preds = %83
  %89 = load ptr, ptr %15, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.Btree, ptr %89, i32 0, i32 2
  store i8 0, ptr %90, align 8, !tbaa !12
  %91 = load ptr, ptr %10, align 8, !tbaa !5
  %92 = load ptr, ptr %15, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.Btree, ptr %92, i32 0, i32 0
  store ptr %91, ptr %93, align 8, !tbaa !15
  %94 = load ptr, ptr %15, align 8, !tbaa !5
  %95 = load ptr, ptr %15, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.Btree, ptr %95, i32 0, i32 11
  %97 = getelementptr inbounds %struct.BtLock, ptr %96, i32 0, i32 0
  store ptr %94, ptr %97, align 8, !tbaa !16
  %98 = load ptr, ptr %15, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.Btree, ptr %98, i32 0, i32 11
  %100 = getelementptr inbounds %struct.BtLock, ptr %99, i32 0, i32 1
  store i32 1, ptr %100, align 8, !tbaa !17
  %101 = load i32, ptr %20, align 4, !tbaa !9
  %102 = icmp eq i32 %101, 0
  br i1 %102, label %103, label %243

103:                                              ; preds = %88
  %104 = load i32, ptr %21, align 4, !tbaa !9
  %105 = icmp eq i32 %104, 0
  br i1 %105, label %110, label %106

106:                                              ; preds = %103
  %107 = load i32, ptr %13, align 4, !tbaa !9
  %108 = and i32 %107, 64
  %109 = icmp ne i32 %108, 0
  br i1 %109, label %110, label %243

110:                                              ; preds = %106, %103
  %111 = load i32, ptr %13, align 4, !tbaa !9
  %112 = and i32 %111, 131072
  %113 = icmp ne i32 %112, 0
  br i1 %113, label %114, label %242

114:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #5
  %115 = load ptr, ptr %9, align 8, !tbaa !5
  %116 = call i32 @sqlite3Strlen30(ptr noundef %115)
  %117 = add nsw i32 %116, 1
  store i32 %117, ptr %23, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  %118 = load ptr, ptr %8, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.sqlite3_vfs, ptr %118, i32 0, i32 2
  %120 = load i32, ptr %119, align 8, !tbaa !18
  %121 = add nsw i32 %120, 1
  store i32 %121, ptr %24, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #5
  %122 = load i32, ptr %24, align 4, !tbaa !9
  %123 = load i32, ptr %23, align 4, !tbaa !9
  %124 = icmp sgt i32 %122, %123
  br i1 %124, label %125, label %127

125:                                              ; preds = %114
  %126 = load i32, ptr %24, align 4, !tbaa !9
  br label %129

127:                                              ; preds = %114
  %128 = load i32, ptr %23, align 4, !tbaa !9
  br label %129

129:                                              ; preds = %127, %125
  %130 = phi i32 [ %126, %125 ], [ %128, %127 ]
  %131 = sext i32 %130 to i64
  %132 = call ptr @sqlite3Malloc(i64 noundef %131)
  store ptr %132, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #5
  %133 = load ptr, ptr %15, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.Btree, ptr %133, i32 0, i32 3
  store i8 1, ptr %134, align 1, !tbaa !20
  %135 = load ptr, ptr %25, align 8, !tbaa !5
  %136 = icmp ne ptr %135, null
  br i1 %136, label %139, label %137

137:                                              ; preds = %129
  %138 = load ptr, ptr %15, align 8, !tbaa !5
  call void @sqlite3_free(ptr noundef %138)
  store i32 7, ptr %7, align 4
  store i32 1, ptr %22, align 4
  br label %239

139:                                              ; preds = %129
  %140 = load i32, ptr %21, align 4, !tbaa !9
  %141 = icmp ne i32 %140, 0
  br i1 %141, label %142, label %147

142:                                              ; preds = %139
  %143 = load ptr, ptr %25, align 8, !tbaa !5
  %144 = load ptr, ptr %9, align 8, !tbaa !5
  %145 = load i32, ptr %23, align 4, !tbaa !9
  %146 = sext i32 %145 to i64
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %143, ptr align 1 %144, i64 %146, i1 false)
  br label %160

147:                                              ; preds = %139
  %148 = load ptr, ptr %8, align 8, !tbaa !5
  %149 = load ptr, ptr %9, align 8, !tbaa !5
  %150 = load i32, ptr %24, align 4, !tbaa !9
  %151 = load ptr, ptr %25, align 8, !tbaa !5
  %152 = call i32 @sqlite3OsFullPathname(ptr noundef %148, ptr noundef %149, i32 noundef %150, ptr noundef %151)
  store i32 %152, ptr %17, align 4, !tbaa !9
  %153 = load i32, ptr %17, align 4, !tbaa !9
  %154 = icmp ne i32 %153, 0
  br i1 %154, label %155, label %159

155:                                              ; preds = %147
  %156 = load ptr, ptr %25, align 8, !tbaa !5
  call void @sqlite3_free(ptr noundef %156)
  %157 = load ptr, ptr %15, align 8, !tbaa !5
  call void @sqlite3_free(ptr noundef %157)
  %158 = load i32, ptr %17, align 4, !tbaa !9
  store i32 %158, ptr %7, align 4
  store i32 1, ptr %22, align 4
  br label %239

159:                                              ; preds = %147
  br label %160

160:                                              ; preds = %159, %142
  %161 = call ptr @sqlite3MutexAlloc(i32 noundef 4)
  store ptr %161, ptr %16, align 8, !tbaa !5
  %162 = load ptr, ptr %16, align 8, !tbaa !5
  call void @sqlite3_mutex_enter(ptr noundef %162)
  %163 = call ptr @sqlite3MutexAlloc(i32 noundef 2)
  store ptr %163, ptr %26, align 8, !tbaa !5
  %164 = load ptr, ptr %26, align 8, !tbaa !5
  call void @sqlite3_mutex_enter(ptr noundef %164)
  %165 = load ptr, ptr @sqlite3SharedCacheList, align 8, !tbaa !5
  store ptr %165, ptr %14, align 8, !tbaa !5
  br label %166

166:                                              ; preds = %232, %160
  %167 = load ptr, ptr %14, align 8, !tbaa !5
  %168 = icmp ne ptr %167, null
  br i1 %168, label %169, label %236

169:                                              ; preds = %166
  %170 = load ptr, ptr %25, align 8, !tbaa !5
  %171 = load ptr, ptr %14, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.BtShared, ptr %171, i32 0, i32 0
  %173 = load ptr, ptr %172, align 8, !tbaa !21
  %174 = call ptr @sqlite3PagerFilename(ptr noundef %173, i32 noundef 0)
  %175 = call i32 @strcmp(ptr noundef %170, ptr noundef %174) #6
  %176 = icmp eq i32 0, %175
  br i1 %176, label %177, label %231

177:                                              ; preds = %169
  %178 = load ptr, ptr %14, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.BtShared, ptr %178, i32 0, i32 0
  %180 = load ptr, ptr %179, align 8, !tbaa !21
  %181 = call ptr @sqlite3PagerVfs(ptr noundef %180)
  %182 = load ptr, ptr %8, align 8, !tbaa !5
  %183 = icmp eq ptr %181, %182
  br i1 %183, label %184, label %231

184:                                              ; preds = %177
  call void @llvm.lifetime.start.p0(i64 4, ptr %27) #5
  %185 = load ptr, ptr %10, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.sqlite3, ptr %185, i32 0, i32 5
  %187 = load i32, ptr %186, align 8, !tbaa !24
  %188 = sub nsw i32 %187, 1
  store i32 %188, ptr %27, align 4, !tbaa !9
  br label %189

189:                                              ; preds = %218, %184
  %190 = load i32, ptr %27, align 4, !tbaa !9
  %191 = icmp sge i32 %190, 0
  br i1 %191, label %192, label %221

192:                                              ; preds = %189
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #5
  %193 = load ptr, ptr %10, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.sqlite3, ptr %193, i32 0, i32 4
  %195 = load ptr, ptr %194, align 8, !tbaa !31
  %196 = load i32, ptr %27, align 4, !tbaa !9
  %197 = sext i32 %196 to i64
  %198 = getelementptr inbounds %struct.Db, ptr %195, i64 %197
  %199 = getelementptr inbounds %struct.Db, ptr %198, i32 0, i32 1
  %200 = load ptr, ptr %199, align 8, !tbaa !32
  store ptr %200, ptr %28, align 8, !tbaa !5
  %201 = load ptr, ptr %28, align 8, !tbaa !5
  %202 = icmp ne ptr %201, null
  br i1 %202, label %203, label %214

203:                                              ; preds = %192
  %204 = load ptr, ptr %28, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.Btree, ptr %204, i32 0, i32 1
  %206 = load ptr, ptr %205, align 8, !tbaa !34
  %207 = load ptr, ptr %14, align 8, !tbaa !5
  %208 = icmp eq ptr %206, %207
  br i1 %208, label %209, label %214

209:                                              ; preds = %203
  %210 = load ptr, ptr %26, align 8, !tbaa !5
  call void @sqlite3_mutex_leave(ptr noundef %210)
  %211 = load ptr, ptr %16, align 8, !tbaa !5
  call void @sqlite3_mutex_leave(ptr noundef %211)
  %212 = load ptr, ptr %25, align 8, !tbaa !5
  call void @sqlite3_free(ptr noundef %212)
  %213 = load ptr, ptr %15, align 8, !tbaa !5
  call void @sqlite3_free(ptr noundef %213)
  store i32 19, ptr %7, align 4
  store i32 1, ptr %22, align 4
  br label %215

214:                                              ; preds = %203, %192
  store i32 0, ptr %22, align 4
  br label %215

215:                                              ; preds = %214, %209
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #5
  %216 = load i32, ptr %22, align 4
  switch i32 %216, label %229 [
    i32 0, label %217
  ]

217:                                              ; preds = %215
  br label %218

218:                                              ; preds = %217
  %219 = load i32, ptr %27, align 4, !tbaa !9
  %220 = add nsw i32 %219, -1
  store i32 %220, ptr %27, align 4, !tbaa !9
  br label %189, !llvm.loop !35

221:                                              ; preds = %189
  %222 = load ptr, ptr %14, align 8, !tbaa !5
  %223 = load ptr, ptr %15, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct.Btree, ptr %223, i32 0, i32 1
  store ptr %222, ptr %224, align 8, !tbaa !34
  %225 = load ptr, ptr %14, align 8, !tbaa !5
  %226 = getelementptr inbounds %struct.BtShared, ptr %225, i32 0, i32 23
  %227 = load i32, ptr %226, align 8, !tbaa !37
  %228 = add nsw i32 %227, 1
  store i32 %228, ptr %226, align 8, !tbaa !37
  store i32 2, ptr %22, align 4
  br label %229

229:                                              ; preds = %221, %215
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #5
  %230 = load i32, ptr %22, align 4
  switch i32 %230, label %239 [
    i32 2, label %236
  ]

231:                                              ; preds = %177, %169
  br label %232

232:                                              ; preds = %231
  %233 = load ptr, ptr %14, align 8, !tbaa !5
  %234 = getelementptr inbounds %struct.BtShared, ptr %233, i32 0, i32 24
  %235 = load ptr, ptr %234, align 8, !tbaa !38
  store ptr %235, ptr %14, align 8, !tbaa !5
  br label %166, !llvm.loop !39

236:                                              ; preds = %229, %166
  %237 = load ptr, ptr %26, align 8, !tbaa !5
  call void @sqlite3_mutex_leave(ptr noundef %237)
  %238 = load ptr, ptr %25, align 8, !tbaa !5
  call void @sqlite3_free(ptr noundef %238)
  store i32 0, ptr %22, align 4
  br label %239

239:                                              ; preds = %236, %229, %155, %137
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #5
  %240 = load i32, ptr %22, align 4
  switch i32 %240, label %594 [
    i32 0, label %241
  ]

241:                                              ; preds = %239
  br label %242

242:                                              ; preds = %241, %110
  br label %243

243:                                              ; preds = %242, %106, %88
  %244 = load ptr, ptr %14, align 8, !tbaa !5
  %245 = icmp eq ptr %244, null
  br i1 %245, label %246, label %430

246:                                              ; preds = %243
  %247 = call ptr @sqlite3MallocZero(i64 noundef 136)
  store ptr %247, ptr %14, align 8, !tbaa !5
  %248 = load ptr, ptr %14, align 8, !tbaa !5
  %249 = icmp eq ptr %248, null
  br i1 %249, label %250, label %251

250:                                              ; preds = %246
  store i32 7, ptr %17, align 4, !tbaa !9
  br label %543

251:                                              ; preds = %246
  %252 = load ptr, ptr %8, align 8, !tbaa !5
  %253 = load ptr, ptr %14, align 8, !tbaa !5
  %254 = getelementptr inbounds %struct.BtShared, ptr %253, i32 0, i32 0
  %255 = load ptr, ptr %9, align 8, !tbaa !5
  %256 = load i32, ptr %12, align 4, !tbaa !9
  %257 = load i32, ptr %13, align 4, !tbaa !9
  %258 = call i32 @sqlite3PagerOpen(ptr noundef %252, ptr noundef %254, ptr noundef %255, i32 noundef 136, i32 noundef %256, i32 noundef %257, ptr noundef @pageReinit)
  store i32 %258, ptr %17, align 4, !tbaa !9
  %259 = load i32, ptr %17, align 4, !tbaa !9
  %260 = icmp eq i32 %259, 0
  br i1 %260, label %261, label %273

261:                                              ; preds = %251
  %262 = load ptr, ptr %14, align 8, !tbaa !5
  %263 = getelementptr inbounds %struct.BtShared, ptr %262, i32 0, i32 0
  %264 = load ptr, ptr %263, align 8, !tbaa !21
  %265 = load ptr, ptr %10, align 8, !tbaa !5
  %266 = getelementptr inbounds %struct.sqlite3, ptr %265, i32 0, i32 8
  %267 = load i64, ptr %266, align 8, !tbaa !40
  call void @sqlite3PagerSetMmapLimit(ptr noundef %264, i64 noundef %267)
  %268 = load ptr, ptr %14, align 8, !tbaa !5
  %269 = getelementptr inbounds %struct.BtShared, ptr %268, i32 0, i32 0
  %270 = load ptr, ptr %269, align 8, !tbaa !21
  %271 = getelementptr inbounds [100 x i8], ptr %19, i64 0, i64 0
  %272 = call i32 @sqlite3PagerReadFileheader(ptr noundef %270, i32 noundef 100, ptr noundef %271)
  store i32 %272, ptr %17, align 4, !tbaa !9
  br label %273

273:                                              ; preds = %261, %251
  %274 = load i32, ptr %17, align 4, !tbaa !9
  %275 = icmp ne i32 %274, 0
  br i1 %275, label %276, label %277

276:                                              ; preds = %273
  br label %543

277:                                              ; preds = %273
  %278 = load i32, ptr %12, align 4, !tbaa !9
  %279 = trunc i32 %278 to i8
  %280 = load ptr, ptr %14, align 8, !tbaa !5
  %281 = getelementptr inbounds %struct.BtShared, ptr %280, i32 0, i32 4
  store i8 %279, ptr %281, align 8, !tbaa !41
  %282 = load ptr, ptr %10, align 8, !tbaa !5
  %283 = load ptr, ptr %14, align 8, !tbaa !5
  %284 = getelementptr inbounds %struct.BtShared, ptr %283, i32 0, i32 1
  store ptr %282, ptr %284, align 8, !tbaa !42
  %285 = load ptr, ptr %14, align 8, !tbaa !5
  %286 = getelementptr inbounds %struct.BtShared, ptr %285, i32 0, i32 0
  %287 = load ptr, ptr %286, align 8, !tbaa !21
  %288 = load ptr, ptr %14, align 8, !tbaa !5
  call void @sqlite3PagerSetBusyhandler(ptr noundef %287, ptr noundef @btreeInvokeBusyHandler, ptr noundef %288)
  %289 = load ptr, ptr %14, align 8, !tbaa !5
  %290 = load ptr, ptr %15, align 8, !tbaa !5
  %291 = getelementptr inbounds %struct.Btree, ptr %290, i32 0, i32 1
  store ptr %289, ptr %291, align 8, !tbaa !34
  %292 = load ptr, ptr %14, align 8, !tbaa !5
  %293 = getelementptr inbounds %struct.BtShared, ptr %292, i32 0, i32 2
  store ptr null, ptr %293, align 8, !tbaa !43
  %294 = load ptr, ptr %14, align 8, !tbaa !5
  %295 = getelementptr inbounds %struct.BtShared, ptr %294, i32 0, i32 3
  store ptr null, ptr %295, align 8, !tbaa !44
  %296 = load ptr, ptr %14, align 8, !tbaa !5
  %297 = getelementptr inbounds %struct.BtShared, ptr %296, i32 0, i32 0
  %298 = load ptr, ptr %297, align 8, !tbaa !21
  %299 = call zeroext i8 @sqlite3PagerIsreadonly(ptr noundef %298)
  %300 = icmp ne i8 %299, 0
  br i1 %300, label %301, label %308

301:                                              ; preds = %277
  %302 = load ptr, ptr %14, align 8, !tbaa !5
  %303 = getelementptr inbounds %struct.BtShared, ptr %302, i32 0, i32 10
  %304 = load i16, ptr %303, align 2, !tbaa !45
  %305 = zext i16 %304 to i32
  %306 = or i32 %305, 1
  %307 = trunc i32 %306 to i16
  store i16 %307, ptr %303, align 2, !tbaa !45
  br label %308

308:                                              ; preds = %301, %277
  %309 = getelementptr inbounds [100 x i8], ptr %19, i64 0, i64 16
  %310 = load i8, ptr %309, align 16, !tbaa !11
  %311 = zext i8 %310 to i32
  %312 = shl i32 %311, 8
  %313 = getelementptr inbounds [100 x i8], ptr %19, i64 0, i64 17
  %314 = load i8, ptr %313, align 1, !tbaa !11
  %315 = zext i8 %314 to i32
  %316 = shl i32 %315, 16
  %317 = or i32 %312, %316
  %318 = load ptr, ptr %14, align 8, !tbaa !5
  %319 = getelementptr inbounds %struct.BtShared, ptr %318, i32 0, i32 15
  store i32 %317, ptr %319, align 8, !tbaa !46
  %320 = load ptr, ptr %14, align 8, !tbaa !5
  %321 = getelementptr inbounds %struct.BtShared, ptr %320, i32 0, i32 15
  %322 = load i32, ptr %321, align 8, !tbaa !46
  %323 = icmp ult i32 %322, 512
  br i1 %323, label %339, label %324

324:                                              ; preds = %308
  %325 = load ptr, ptr %14, align 8, !tbaa !5
  %326 = getelementptr inbounds %struct.BtShared, ptr %325, i32 0, i32 15
  %327 = load i32, ptr %326, align 8, !tbaa !46
  %328 = icmp ugt i32 %327, 65536
  br i1 %328, label %339, label %329

329:                                              ; preds = %324
  %330 = load ptr, ptr %14, align 8, !tbaa !5
  %331 = getelementptr inbounds %struct.BtShared, ptr %330, i32 0, i32 15
  %332 = load i32, ptr %331, align 8, !tbaa !46
  %333 = sub i32 %332, 1
  %334 = load ptr, ptr %14, align 8, !tbaa !5
  %335 = getelementptr inbounds %struct.BtShared, ptr %334, i32 0, i32 15
  %336 = load i32, ptr %335, align 8, !tbaa !46
  %337 = and i32 %333, %336
  %338 = icmp ne i32 %337, 0
  br i1 %338, label %339, label %353

339:                                              ; preds = %329, %324, %308
  %340 = load ptr, ptr %14, align 8, !tbaa !5
  %341 = getelementptr inbounds %struct.BtShared, ptr %340, i32 0, i32 15
  store i32 0, ptr %341, align 8, !tbaa !46
  %342 = load ptr, ptr %9, align 8, !tbaa !5
  %343 = icmp ne ptr %342, null
  br i1 %343, label %344, label %352

344:                                              ; preds = %339
  %345 = load i32, ptr %21, align 4, !tbaa !9
  %346 = icmp ne i32 %345, 0
  br i1 %346, label %352, label %347

347:                                              ; preds = %344
  %348 = load ptr, ptr %14, align 8, !tbaa !5
  %349 = getelementptr inbounds %struct.BtShared, ptr %348, i32 0, i32 5
  store i8 0, ptr %349, align 1, !tbaa !47
  %350 = load ptr, ptr %14, align 8, !tbaa !5
  %351 = getelementptr inbounds %struct.BtShared, ptr %350, i32 0, i32 6
  store i8 0, ptr %351, align 2, !tbaa !48
  br label %352

352:                                              ; preds = %347, %344, %339
  store i8 0, ptr %18, align 1, !tbaa !11
  br label %378

353:                                              ; preds = %329
  %354 = getelementptr inbounds [100 x i8], ptr %19, i64 0, i64 20
  %355 = load i8, ptr %354, align 4, !tbaa !11
  store i8 %355, ptr %18, align 1, !tbaa !11
  %356 = load ptr, ptr %14, align 8, !tbaa !5
  %357 = getelementptr inbounds %struct.BtShared, ptr %356, i32 0, i32 10
  %358 = load i16, ptr %357, align 2, !tbaa !45
  %359 = zext i16 %358 to i32
  %360 = or i32 %359, 2
  %361 = trunc i32 %360 to i16
  store i16 %361, ptr %357, align 2, !tbaa !45
  %362 = getelementptr inbounds [100 x i8], ptr %19, i64 0, i64 52
  %363 = call i32 @sqlite3Get4byte(ptr noundef %362)
  %364 = icmp ne i32 %363, 0
  %365 = zext i1 %364 to i64
  %366 = select i1 %364, i32 1, i32 0
  %367 = trunc i32 %366 to i8
  %368 = load ptr, ptr %14, align 8, !tbaa !5
  %369 = getelementptr inbounds %struct.BtShared, ptr %368, i32 0, i32 5
  store i8 %367, ptr %369, align 1, !tbaa !47
  %370 = getelementptr inbounds [100 x i8], ptr %19, i64 0, i64 64
  %371 = call i32 @sqlite3Get4byte(ptr noundef %370)
  %372 = icmp ne i32 %371, 0
  %373 = zext i1 %372 to i64
  %374 = select i1 %372, i32 1, i32 0
  %375 = trunc i32 %374 to i8
  %376 = load ptr, ptr %14, align 8, !tbaa !5
  %377 = getelementptr inbounds %struct.BtShared, ptr %376, i32 0, i32 6
  store i8 %375, ptr %377, align 2, !tbaa !48
  br label %378

378:                                              ; preds = %353, %352
  %379 = load ptr, ptr %14, align 8, !tbaa !5
  %380 = getelementptr inbounds %struct.BtShared, ptr %379, i32 0, i32 0
  %381 = load ptr, ptr %380, align 8, !tbaa !21
  %382 = load ptr, ptr %14, align 8, !tbaa !5
  %383 = getelementptr inbounds %struct.BtShared, ptr %382, i32 0, i32 15
  %384 = load i8, ptr %18, align 1, !tbaa !11
  %385 = zext i8 %384 to i32
  %386 = call i32 @sqlite3PagerSetPagesize(ptr noundef %381, ptr noundef %383, i32 noundef %385)
  store i32 %386, ptr %17, align 4, !tbaa !9
  %387 = load i32, ptr %17, align 4, !tbaa !9
  %388 = icmp ne i32 %387, 0
  br i1 %388, label %389, label %390

389:                                              ; preds = %378
  br label %543

390:                                              ; preds = %378
  %391 = load ptr, ptr %14, align 8, !tbaa !5
  %392 = getelementptr inbounds %struct.BtShared, ptr %391, i32 0, i32 15
  %393 = load i32, ptr %392, align 8, !tbaa !46
  %394 = load i8, ptr %18, align 1, !tbaa !11
  %395 = zext i8 %394 to i32
  %396 = sub i32 %393, %395
  %397 = load ptr, ptr %14, align 8, !tbaa !5
  %398 = getelementptr inbounds %struct.BtShared, ptr %397, i32 0, i32 16
  store i32 %396, ptr %398, align 4, !tbaa !49
  %399 = load ptr, ptr %14, align 8, !tbaa !5
  %400 = getelementptr inbounds %struct.BtShared, ptr %399, i32 0, i32 23
  store i32 1, ptr %400, align 8, !tbaa !37
  %401 = load ptr, ptr %15, align 8, !tbaa !5
  %402 = getelementptr inbounds %struct.Btree, ptr %401, i32 0, i32 3
  %403 = load i8, ptr %402, align 1, !tbaa !20
  %404 = icmp ne i8 %403, 0
  br i1 %404, label %405, label %429

405:                                              ; preds = %390
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #5
  %406 = call ptr @sqlite3MutexAlloc(i32 noundef 2)
  store ptr %406, ptr %29, align 8, !tbaa !5
  %407 = load i32, ptr getelementptr inbounds (%struct.Sqlite3Config, ptr @sqlite3Config, i32 0, i32 1), align 4, !tbaa !50
  %408 = icmp ne i32 %407, 0
  br i1 %408, label %409, label %419

409:                                              ; preds = %405
  %410 = call ptr @sqlite3MutexAlloc(i32 noundef 0)
  %411 = load ptr, ptr %14, align 8, !tbaa !5
  %412 = getelementptr inbounds %struct.BtShared, ptr %411, i32 0, i32 21
  store ptr %410, ptr %412, align 8, !tbaa !55
  %413 = load ptr, ptr %14, align 8, !tbaa !5
  %414 = getelementptr inbounds %struct.BtShared, ptr %413, i32 0, i32 21
  %415 = load ptr, ptr %414, align 8, !tbaa !55
  %416 = icmp eq ptr %415, null
  br i1 %416, label %417, label %418

417:                                              ; preds = %409
  store i32 7, ptr %17, align 4, !tbaa !9
  store i32 8, ptr %22, align 4
  br label %426

418:                                              ; preds = %409
  br label %419

419:                                              ; preds = %418, %405
  %420 = load ptr, ptr %29, align 8, !tbaa !5
  call void @sqlite3_mutex_enter(ptr noundef %420)
  %421 = load ptr, ptr @sqlite3SharedCacheList, align 8, !tbaa !5
  %422 = load ptr, ptr %14, align 8, !tbaa !5
  %423 = getelementptr inbounds %struct.BtShared, ptr %422, i32 0, i32 24
  store ptr %421, ptr %423, align 8, !tbaa !38
  %424 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %424, ptr @sqlite3SharedCacheList, align 8, !tbaa !5
  %425 = load ptr, ptr %29, align 8, !tbaa !5
  call void @sqlite3_mutex_leave(ptr noundef %425)
  store i32 0, ptr %22, align 4
  br label %426

426:                                              ; preds = %419, %417
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #5
  %427 = load i32, ptr %22, align 4
  switch i32 %427, label %594 [
    i32 0, label %428
    i32 8, label %543
  ]

428:                                              ; preds = %426
  br label %429

429:                                              ; preds = %428, %390
  br label %430

430:                                              ; preds = %429, %243
  %431 = load ptr, ptr %15, align 8, !tbaa !5
  %432 = getelementptr inbounds %struct.Btree, ptr %431, i32 0, i32 3
  %433 = load i8, ptr %432, align 1, !tbaa !20
  %434 = icmp ne i8 %433, 0
  br i1 %434, label %435, label %540

435:                                              ; preds = %430
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #5
  store i32 0, ptr %30, align 4, !tbaa !9
  br label %436

436:                                              ; preds = %536, %435
  %437 = load i32, ptr %30, align 4, !tbaa !9
  %438 = load ptr, ptr %10, align 8, !tbaa !5
  %439 = getelementptr inbounds %struct.sqlite3, ptr %438, i32 0, i32 5
  %440 = load i32, ptr %439, align 8, !tbaa !24
  %441 = icmp slt i32 %437, %440
  br i1 %441, label %442, label %539

442:                                              ; preds = %436
  %443 = load ptr, ptr %10, align 8, !tbaa !5
  %444 = getelementptr inbounds %struct.sqlite3, ptr %443, i32 0, i32 4
  %445 = load ptr, ptr %444, align 8, !tbaa !31
  %446 = load i32, ptr %30, align 4, !tbaa !9
  %447 = sext i32 %446 to i64
  %448 = getelementptr inbounds %struct.Db, ptr %445, i64 %447
  %449 = getelementptr inbounds %struct.Db, ptr %448, i32 0, i32 1
  %450 = load ptr, ptr %449, align 8, !tbaa !32
  store ptr %450, ptr %31, align 8, !tbaa !5
  %451 = icmp ne ptr %450, null
  br i1 %451, label %452, label %535

452:                                              ; preds = %442
  %453 = load ptr, ptr %31, align 8, !tbaa !5
  %454 = getelementptr inbounds %struct.Btree, ptr %453, i32 0, i32 3
  %455 = load i8, ptr %454, align 1, !tbaa !20
  %456 = zext i8 %455 to i32
  %457 = icmp ne i32 %456, 0
  br i1 %457, label %458, label %535

458:                                              ; preds = %452
  br label %459

459:                                              ; preds = %464, %458
  %460 = load ptr, ptr %31, align 8, !tbaa !5
  %461 = getelementptr inbounds %struct.Btree, ptr %460, i32 0, i32 10
  %462 = load ptr, ptr %461, align 8, !tbaa !56
  %463 = icmp ne ptr %462, null
  br i1 %463, label %464, label %468

464:                                              ; preds = %459
  %465 = load ptr, ptr %31, align 8, !tbaa !5
  %466 = getelementptr inbounds %struct.Btree, ptr %465, i32 0, i32 10
  %467 = load ptr, ptr %466, align 8, !tbaa !56
  store ptr %467, ptr %31, align 8, !tbaa !5
  br label %459, !llvm.loop !57

468:                                              ; preds = %459
  %469 = load ptr, ptr %15, align 8, !tbaa !5
  %470 = getelementptr inbounds %struct.Btree, ptr %469, i32 0, i32 1
  %471 = load ptr, ptr %470, align 8, !tbaa !34
  %472 = ptrtoint ptr %471 to i64
  %473 = load ptr, ptr %31, align 8, !tbaa !5
  %474 = getelementptr inbounds %struct.Btree, ptr %473, i32 0, i32 1
  %475 = load ptr, ptr %474, align 8, !tbaa !34
  %476 = ptrtoint ptr %475 to i64
  %477 = icmp ult i64 %472, %476
  br i1 %477, label %478, label %487

478:                                              ; preds = %468
  %479 = load ptr, ptr %31, align 8, !tbaa !5
  %480 = load ptr, ptr %15, align 8, !tbaa !5
  %481 = getelementptr inbounds %struct.Btree, ptr %480, i32 0, i32 9
  store ptr %479, ptr %481, align 8, !tbaa !58
  %482 = load ptr, ptr %15, align 8, !tbaa !5
  %483 = getelementptr inbounds %struct.Btree, ptr %482, i32 0, i32 10
  store ptr null, ptr %483, align 8, !tbaa !56
  %484 = load ptr, ptr %15, align 8, !tbaa !5
  %485 = load ptr, ptr %31, align 8, !tbaa !5
  %486 = getelementptr inbounds %struct.Btree, ptr %485, i32 0, i32 10
  store ptr %484, ptr %486, align 8, !tbaa !56
  br label %534

487:                                              ; preds = %468
  br label %488

488:                                              ; preds = %507, %487
  %489 = load ptr, ptr %31, align 8, !tbaa !5
  %490 = getelementptr inbounds %struct.Btree, ptr %489, i32 0, i32 9
  %491 = load ptr, ptr %490, align 8, !tbaa !58
  %492 = icmp ne ptr %491, null
  br i1 %492, label %493, label %505

493:                                              ; preds = %488
  %494 = load ptr, ptr %31, align 8, !tbaa !5
  %495 = getelementptr inbounds %struct.Btree, ptr %494, i32 0, i32 9
  %496 = load ptr, ptr %495, align 8, !tbaa !58
  %497 = getelementptr inbounds %struct.Btree, ptr %496, i32 0, i32 1
  %498 = load ptr, ptr %497, align 8, !tbaa !34
  %499 = ptrtoint ptr %498 to i64
  %500 = load ptr, ptr %15, align 8, !tbaa !5
  %501 = getelementptr inbounds %struct.Btree, ptr %500, i32 0, i32 1
  %502 = load ptr, ptr %501, align 8, !tbaa !34
  %503 = ptrtoint ptr %502 to i64
  %504 = icmp ult i64 %499, %503
  br label %505

505:                                              ; preds = %493, %488
  %506 = phi i1 [ false, %488 ], [ %504, %493 ]
  br i1 %506, label %507, label %511

507:                                              ; preds = %505
  %508 = load ptr, ptr %31, align 8, !tbaa !5
  %509 = getelementptr inbounds %struct.Btree, ptr %508, i32 0, i32 9
  %510 = load ptr, ptr %509, align 8, !tbaa !58
  store ptr %510, ptr %31, align 8, !tbaa !5
  br label %488, !llvm.loop !59

511:                                              ; preds = %505
  %512 = load ptr, ptr %31, align 8, !tbaa !5
  %513 = getelementptr inbounds %struct.Btree, ptr %512, i32 0, i32 9
  %514 = load ptr, ptr %513, align 8, !tbaa !58
  %515 = load ptr, ptr %15, align 8, !tbaa !5
  %516 = getelementptr inbounds %struct.Btree, ptr %515, i32 0, i32 9
  store ptr %514, ptr %516, align 8, !tbaa !58
  %517 = load ptr, ptr %31, align 8, !tbaa !5
  %518 = load ptr, ptr %15, align 8, !tbaa !5
  %519 = getelementptr inbounds %struct.Btree, ptr %518, i32 0, i32 10
  store ptr %517, ptr %519, align 8, !tbaa !56
  %520 = load ptr, ptr %15, align 8, !tbaa !5
  %521 = getelementptr inbounds %struct.Btree, ptr %520, i32 0, i32 9
  %522 = load ptr, ptr %521, align 8, !tbaa !58
  %523 = icmp ne ptr %522, null
  br i1 %523, label %524, label %530

524:                                              ; preds = %511
  %525 = load ptr, ptr %15, align 8, !tbaa !5
  %526 = load ptr, ptr %15, align 8, !tbaa !5
  %527 = getelementptr inbounds %struct.Btree, ptr %526, i32 0, i32 9
  %528 = load ptr, ptr %527, align 8, !tbaa !58
  %529 = getelementptr inbounds %struct.Btree, ptr %528, i32 0, i32 10
  store ptr %525, ptr %529, align 8, !tbaa !56
  br label %530

530:                                              ; preds = %524, %511
  %531 = load ptr, ptr %15, align 8, !tbaa !5
  %532 = load ptr, ptr %31, align 8, !tbaa !5
  %533 = getelementptr inbounds %struct.Btree, ptr %532, i32 0, i32 9
  store ptr %531, ptr %533, align 8, !tbaa !58
  br label %534

534:                                              ; preds = %530, %478
  br label %539

535:                                              ; preds = %452, %442
  br label %536

536:                                              ; preds = %535
  %537 = load i32, ptr %30, align 4, !tbaa !9
  %538 = add nsw i32 %537, 1
  store i32 %538, ptr %30, align 4, !tbaa !9
  br label %436, !llvm.loop !60

539:                                              ; preds = %534, %436
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #5
  br label %540

540:                                              ; preds = %539, %430
  %541 = load ptr, ptr %15, align 8, !tbaa !5
  %542 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %541, ptr %542, align 8, !tbaa !5
  br label %543

543:                                              ; preds = %540, %426, %389, %276, %250
  %544 = load i32, ptr %17, align 4, !tbaa !9
  %545 = icmp ne i32 %544, 0
  br i1 %545, label %546, label %563

546:                                              ; preds = %543
  %547 = load ptr, ptr %14, align 8, !tbaa !5
  %548 = icmp ne ptr %547, null
  br i1 %548, label %549, label %559

549:                                              ; preds = %546
  %550 = load ptr, ptr %14, align 8, !tbaa !5
  %551 = getelementptr inbounds %struct.BtShared, ptr %550, i32 0, i32 0
  %552 = load ptr, ptr %551, align 8, !tbaa !21
  %553 = icmp ne ptr %552, null
  br i1 %553, label %554, label %559

554:                                              ; preds = %549
  %555 = load ptr, ptr %14, align 8, !tbaa !5
  %556 = getelementptr inbounds %struct.BtShared, ptr %555, i32 0, i32 0
  %557 = load ptr, ptr %556, align 8, !tbaa !21
  %558 = call i32 @sqlite3PagerClose(ptr noundef %557, ptr noundef null)
  br label %559

559:                                              ; preds = %554, %549, %546
  %560 = load ptr, ptr %14, align 8, !tbaa !5
  call void @sqlite3_free(ptr noundef %560)
  %561 = load ptr, ptr %15, align 8, !tbaa !5
  call void @sqlite3_free(ptr noundef %561)
  %562 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr null, ptr %562, align 8, !tbaa !5
  br label %587

563:                                              ; preds = %543
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #5
  %564 = load ptr, ptr %15, align 8, !tbaa !5
  %565 = call ptr @sqlite3BtreeSchema(ptr noundef %564, i32 noundef 0, ptr noundef null)
  %566 = icmp eq ptr %565, null
  br i1 %566, label %567, label %573

567:                                              ; preds = %563
  %568 = load ptr, ptr %15, align 8, !tbaa !5
  %569 = getelementptr inbounds %struct.Btree, ptr %568, i32 0, i32 1
  %570 = load ptr, ptr %569, align 8, !tbaa !34
  %571 = getelementptr inbounds %struct.BtShared, ptr %570, i32 0, i32 0
  %572 = load ptr, ptr %571, align 8, !tbaa !21
  call void @sqlite3PagerSetCachesize(ptr noundef %572, i32 noundef -2000)
  br label %573

573:                                              ; preds = %567, %563
  %574 = load ptr, ptr %14, align 8, !tbaa !5
  %575 = getelementptr inbounds %struct.BtShared, ptr %574, i32 0, i32 0
  %576 = load ptr, ptr %575, align 8, !tbaa !21
  %577 = call ptr @sqlite3PagerFile(ptr noundef %576)
  store ptr %577, ptr %32, align 8, !tbaa !5
  %578 = load ptr, ptr %32, align 8, !tbaa !5
  %579 = getelementptr inbounds %struct.sqlite3_file, ptr %578, i32 0, i32 0
  %580 = load ptr, ptr %579, align 8, !tbaa !61
  %581 = icmp ne ptr %580, null
  br i1 %581, label %582, label %586

582:                                              ; preds = %573
  %583 = load ptr, ptr %32, align 8, !tbaa !5
  %584 = load ptr, ptr %14, align 8, !tbaa !5
  %585 = getelementptr inbounds %struct.BtShared, ptr %584, i32 0, i32 1
  call void @sqlite3OsFileControlHint(ptr noundef %583, i32 noundef 30, ptr noundef %585)
  br label %586

586:                                              ; preds = %582, %573
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #5
  br label %587

587:                                              ; preds = %586, %559
  %588 = load ptr, ptr %16, align 8, !tbaa !5
  %589 = icmp ne ptr %588, null
  br i1 %589, label %590, label %592

590:                                              ; preds = %587
  %591 = load ptr, ptr %16, align 8, !tbaa !5
  call void @sqlite3_mutex_leave(ptr noundef %591)
  br label %592

592:                                              ; preds = %590, %587
  %593 = load i32, ptr %17, align 4, !tbaa !9
  store i32 %593, ptr %7, align 4
  store i32 1, ptr %22, align 4
  br label %594

594:                                              ; preds = %592, %426, %239, %87
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 100, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  %595 = load i32, ptr %7, align 4
  ret i32 %595
}

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #3

declare i32 @sqlite3TempInMemory(ptr noundef) #0

declare ptr @sqlite3MallocZero(i64 noundef) #0

declare i32 @sqlite3Strlen30(ptr noundef) #0

declare ptr @sqlite3Malloc(i64 noundef) #0

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #4

declare i32 @sqlite3OsFullPathname(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #0

declare ptr @sqlite3MutexAlloc(i32 noundef) #0

declare void @sqlite3_mutex_enter(ptr noundef) #0

declare ptr @sqlite3PagerFilename(ptr noundef, i32 noundef) #0

declare ptr @sqlite3PagerVfs(ptr noundef) #0

declare void @sqlite3_mutex_leave(ptr noundef) #0

declare i32 @sqlite3PagerOpen(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef) #0

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

declare void @sqlite3PagerSetMmapLimit(ptr noundef, i64 noundef) #0

declare i32 @sqlite3PagerReadFileheader(ptr noundef, i32 noundef, ptr noundef) #0

declare void @sqlite3PagerSetBusyhandler(ptr noundef, ptr noundef, ptr noundef) #0

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

declare zeroext i8 @sqlite3PagerIsreadonly(ptr noundef) #0

declare i32 @sqlite3Get4byte(ptr noundef) #0

declare i32 @sqlite3PagerSetPagesize(ptr noundef, ptr noundef, i32 noundef) #0

declare i32 @sqlite3PagerClose(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local ptr @sqlite3BtreeSchema(ptr noundef, i32 noundef, ptr noundef) #2

declare void @sqlite3PagerSetCachesize(ptr noundef, i32 noundef) #0

declare ptr @sqlite3PagerFile(ptr noundef) #0

declare void @sqlite3OsFileControlHint(ptr noundef, i32 noundef, ptr noundef) #0

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind willreturn memory(read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nounwind }
attributes #6 = { nounwind willreturn memory(read) }

!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 = !{!7, !7, i64 0}
!12 = !{!13, !7, i64 16}
!13 = !{!"Btree", !6, i64 0, !6, i64 8, !7, i64 16, !7, i64 17, !7, i64 18, !7, i64 19, !10, i64 20, !10, i64 24, !10, i64 28, !6, i64 32, !6, i64 40, !14, i64 48}
!14 = !{!"BtLock", !6, i64 0, !10, i64 8, !7, i64 12, !6, i64 16}
!15 = !{!13, !6, i64 0}
!16 = !{!13, !6, i64 48}
!17 = !{!13, !10, i64 56}
!18 = !{!19, !10, i64 8}
!19 = !{!"sqlite3_vfs", !10, i64 0, !10, i64 4, !10, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160}
!20 = !{!13, !7, i64 17}
!21 = !{!22, !6, i64 0}
!22 = !{!"BtShared", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !7, i64 32, !7, i64 33, !7, i64 34, !7, i64 35, !7, i64 36, !7, i64 37, !23, i64 38, !23, i64 40, !23, i64 42, !23, i64 44, !23, i64 46, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !10, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128}
!23 = !{!"short", !7, i64 0}
!24 = !{!25, !10, i64 40}
!25 = !{!"sqlite3", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !10, i64 40, !10, i64 44, !26, i64 48, !26, i64 56, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !23, i64 80, !7, i64 82, !7, i64 83, !7, i64 84, !7, i64 85, !7, i64 86, !7, i64 87, !7, i64 88, !7, i64 89, !7, i64 90, !7, i64 91, !7, i64 92, !7, i64 93, !7, i64 94, !10, i64 96, !10, i64 100, !10, i64 104, !10, i64 108, !7, i64 112, !10, i64 160, !27, i64 164, !10, i64 172, !10, i64 176, !10, i64 180, !10, i64 184, !10, i64 188, !10, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !6, i64 272, !6, i64 280, !6, i64 288, !6, i64 296, !6, i64 304, !6, i64 312, !6, i64 320, !6, i64 328, !7, i64 336, !28, i64 344, !6, i64 400, !6, i64 408, !6, i64 416, !6, i64 424, !10, i64 432, !10, i64 436, !29, i64 440, !6, i64 464, !6, i64 472, !6, i64 480, !29, i64 488, !29, i64 512, !30, i64 536, !7, i64 560, !6, i64 624, !10, i64 632, !10, i64 636, !10, i64 640, !26, i64 648, !26, i64 656, !6, i64 664}
!26 = !{!"long long", !7, i64 0}
!27 = !{!"sqlite3InitInfo", !10, i64 0, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7}
!28 = !{!"Lookaside", !10, i64 0, !23, i64 4, !7, i64 6, !10, i64 8, !10, i64 12, !7, i64 16, !6, i64 32, !6, i64 40, !6, i64 48}
!29 = !{!"Hash", !10, i64 0, !10, i64 4, !6, i64 8, !6, i64 16}
!30 = !{!"BusyHandler", !6, i64 0, !6, i64 8, !10, i64 16}
!31 = !{!25, !6, i64 32}
!32 = !{!33, !6, i64 8}
!33 = !{!"Db", !6, i64 0, !6, i64 8, !7, i64 16, !7, i64 17, !6, i64 24}
!34 = !{!13, !6, i64 8}
!35 = distinct !{!35, !36}
!36 = !{!"llvm.loop.mustprogress"}
!37 = !{!22, !10, i64 96}
!38 = !{!22, !6, i64 104}
!39 = distinct !{!39, !36}
!40 = !{!25, !26, i64 56}
!41 = !{!22, !7, i64 32}
!42 = !{!22, !6, i64 8}
!43 = !{!22, !6, i64 16}
!44 = !{!22, !6, i64 24}
!45 = !{!22, !23, i64 38}
!46 = !{!22, !10, i64 48}
!47 = !{!22, !7, i64 33}
!48 = !{!22, !7, i64 34}
!49 = !{!22, !10, i64 52}
!50 = !{!51, !10, i64 4}
!51 = !{!"Sqlite3Config", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !52, i64 40, !53, i64 104, !54, i64 176, !6, i64 280, !10, i64 288, !10, i64 292, !10, i64 296, !26, i64 304, !26, i64 312, !6, i64 320, !10, i64 328, !10, i64 332, !6, i64 336, !10, i64 344, !10, i64 348, !10, i64 352, !10, i64 356, !10, i64 360, !10, i64 364, !10, i64 368, !10, i64 372, !10, i64 376, !10, i64 380, !10, i64 384, !6, i64 392, !6, i64 400, !6, i64 408, !6, i64 416, !10, i64 424, !10, i64 428}
!52 = !{!"sqlite3_mem_methods", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56}
!53 = !{!"sqlite3_mutex_methods", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64}
!54 = !{!"sqlite3_pcache_methods2", !10, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96}
!55 = !{!22, !6, i64 80}
!56 = !{!13, !6, i64 40}
!57 = distinct !{!57, !36}
!58 = !{!13, !6, i64 32}
!59 = distinct !{!59, !36}
!60 = distinct !{!60, !36}
!61 = !{!62, !6, i64 0}
!62 = !{!"sqlite3_file", !6, i64 0}


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

%struct.Sqlite3Config = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.sqlite3_mem_methods, %struct.sqlite3_mutex_methods, %struct.sqlite3_pcache_methods2, ptr, i32, i32, i32, i64, i64, ptr, i32, i32, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, i32, i32 }
%struct.sqlite3_mem_methods = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.sqlite3_mutex_methods = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.sqlite3_pcache_methods2 = type { i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.Db = type { ptr, ptr, i8, i8, ptr }

@sqlite3Config = external local_unnamed_addr global %struct.Sqlite3Config, align 8
@.str = external hidden unnamed_addr constant [9 x i8], align 1
@sqlite3SharedCacheList = external hidden local_unnamed_addr global ptr, align 8

declare void @sqlite3_free(ptr 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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @sqlite3BtreeOpen(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr nocapture noundef writeonly %3, i32 noundef %4, i32 noundef %5) local_unnamed_addr #2 {
  %7 = alloca [100 x i8], align 16
  call void @llvm.lifetime.start.p0(i64 100, ptr nonnull %7) #7
  %8 = icmp eq ptr %1, null
  br i1 %8, label %.thread256, label %9

9:                                                ; preds = %6
  %10 = load i8, ptr %1, align 1, !tbaa !5
  %11 = icmp eq i8 %10, 0
  %12 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %1, ptr noundef nonnull dereferenceable(1) @.str) #8
  %13 = icmp eq i32 %12, 0
  br i1 %13, label %.thread257, label %14

14:                                               ; preds = %9
  br i1 %11, label %.thread256, label %17

.thread256:                                       ; preds = %6, %14
  %15 = tail call i32 @sqlite3TempInMemory(ptr noundef %2) #7
  %.not221 = icmp eq i32 %15, 0
  br i1 %.not221, label %17, label %.thread257

.thread257:                                       ; preds = %.thread256, %9
  %.ph = phi i1 [ %11, %9 ], [ true, %.thread256 ]
  %16 = or i32 %4, 2
  br label %22

17:                                               ; preds = %14, %.thread256
  %18 = phi i1 [ true, %.thread256 ], [ false, %14 ]
  %19 = and i32 %5, 128
  %20 = icmp ne i32 %19, 0
  %21 = lshr exact i32 %19, 6
  %spec.select301 = or i32 %21, %4
  br label %22

22:                                               ; preds = %17, %.thread257
  %23 = phi i1 [ true, %.thread257 ], [ %20, %17 ]
  %24 = phi i1 [ %.ph, %.thread257 ], [ %18, %17 ]
  %25 = phi i32 [ %16, %.thread257 ], [ %spec.select301, %17 ]
  %26 = and i32 %5, 256
  %.not222 = icmp ne i32 %26, 0
  %or.cond = select i1 %23, i1 true, i1 %24
  %or.cond249 = select i1 %.not222, i1 %or.cond, i1 false
  %27 = and i32 %5, -769
  %28 = or disjoint i32 %27, 512
  %.0182 = select i1 %or.cond249, i32 %28, i32 %5
  %29 = tail call ptr @sqlite3MallocZero(i64 noundef 72) #7
  %.not223 = icmp eq ptr %29, null
  br i1 %.not223, label %.thread260, label %30

30:                                               ; preds = %22
  %31 = getelementptr inbounds i8, ptr %29, i64 16
  store i8 0, ptr %31, align 8, !tbaa !8
  store ptr %2, ptr %29, align 8, !tbaa !13
  %32 = getelementptr inbounds i8, ptr %29, i64 48
  store ptr %29, ptr %32, align 8, !tbaa !14
  %33 = getelementptr inbounds i8, ptr %29, i64 56
  store i32 1, ptr %33, align 8, !tbaa !15
  br i1 %24, label %.thread267, label %34

34:                                               ; preds = %30
  %35 = and i32 %.0182, 64
  %.not224 = icmp eq i32 %35, 0
  %or.cond250 = select i1 %23, i1 %.not224, i1 false
  %36 = and i32 %.0182, 131072
  %.not225 = icmp eq i32 %36, 0
  %or.cond251 = select i1 %or.cond250, i1 true, i1 %.not225
  br i1 %or.cond251, label %.thread267, label %37

37:                                               ; preds = %34
  %38 = tail call i32 @sqlite3Strlen30(ptr noundef %1) #7
  %39 = add nsw i32 %38, 1
  %40 = getelementptr inbounds i8, ptr %0, i64 8
  %41 = load i32, ptr %40, align 8, !tbaa !16
  %42 = add nsw i32 %41, 1
  %43 = tail call i32 @llvm.smax.i32(i32 %42, i32 %39)
  %44 = sext i32 %43 to i64
  %45 = tail call ptr @sqlite3Malloc(i64 noundef %44) #7
  %46 = getelementptr inbounds i8, ptr %29, i64 17
  store i8 1, ptr %46, align 1, !tbaa !18
  %.not226 = icmp eq ptr %45, null
  br i1 %.not226, label %47, label %48

47:                                               ; preds = %37
  tail call void @sqlite3_free(ptr noundef nonnull %29) #7
  br label %.thread260

48:                                               ; preds = %37
  br i1 %23, label %49, label %51

49:                                               ; preds = %48
  %50 = sext i32 %39 to i64
  tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %45, ptr align 1 %1, i64 %50, i1 false)
  br label %54

51:                                               ; preds = %48
  %52 = tail call i32 @sqlite3OsFullPathname(ptr noundef nonnull %0, ptr noundef %1, i32 noundef %42, ptr noundef nonnull %45) #7
  %.not227 = icmp eq i32 %52, 0
  br i1 %.not227, label %54, label %53

53:                                               ; preds = %51
  tail call void @sqlite3_free(ptr noundef nonnull %45) #7
  tail call void @sqlite3_free(ptr noundef nonnull %29) #7
  br label %.thread260

54:                                               ; preds = %51, %49
  %55 = tail call ptr @sqlite3MutexAlloc(i32 noundef 4) #7
  tail call void @sqlite3_mutex_enter(ptr noundef %55) #7
  %56 = tail call ptr @sqlite3MutexAlloc(i32 noundef 2) #7
  tail call void @sqlite3_mutex_enter(ptr noundef %56) #7
  %.0184313 = load ptr, ptr @sqlite3SharedCacheList, align 8, !tbaa !19
  %.not228314 = icmp eq ptr %.0184313, null
  br i1 %.not228314, label %.loopexit304, label %.lr.ph

.lr.ph:                                           ; preds = %54, %86
  %.0184315 = phi ptr [ %.0184, %86 ], [ %.0184313, %54 ]
  %57 = load ptr, ptr %.0184315, align 8, !tbaa !20
  %58 = tail call ptr @sqlite3PagerFilename(ptr noundef %57, i32 noundef 0) #7
  %59 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %45, ptr noundef nonnull dereferenceable(1) %58) #8
  %60 = icmp eq i32 %59, 0
  br i1 %60, label %61, label %86

61:                                               ; preds = %.lr.ph
  %62 = load ptr, ptr %.0184315, align 8, !tbaa !20
  %63 = tail call ptr @sqlite3PagerVfs(ptr noundef %62) #7
  %64 = icmp eq ptr %63, %0
  br i1 %64, label %65, label %86

65:                                               ; preds = %61
  %66 = getelementptr inbounds i8, ptr %2, i64 40
  %67 = load i32, ptr %66, align 8, !tbaa !23
  %68 = icmp slt i32 %67, 1
  br i1 %68, label %.thread258, label %.lr.ph318

.lr.ph318:                                        ; preds = %65
  %69 = getelementptr inbounds i8, ptr %2, i64 32
  %70 = load ptr, ptr %69, align 8, !tbaa !30
  %71 = zext nneg i32 %67 to i64
  br label %72

72:                                               ; preds = %.lr.ph318, %79
  %indvars.iv = phi i64 [ %71, %.lr.ph318 ], [ %indvars.iv.next, %79 ]
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %73 = getelementptr inbounds %struct.Db, ptr %70, i64 %indvars.iv.next, i32 1
  %74 = load ptr, ptr %73, align 8, !tbaa !31
  %.not229 = icmp eq ptr %74, null
  br i1 %.not229, label %79, label %75

75:                                               ; preds = %72
  %76 = getelementptr inbounds i8, ptr %74, i64 8
  %77 = load ptr, ptr %76, align 8, !tbaa !33
  %78 = icmp eq ptr %77, %.0184315
  br i1 %78, label %85, label %79

79:                                               ; preds = %75, %72
  %80 = icmp ult i64 %indvars.iv, 2
  br i1 %80, label %.thread258, label %72, !llvm.loop !34

.thread258:                                       ; preds = %79, %65
  %81 = getelementptr inbounds i8, ptr %29, i64 8
  store ptr %.0184315, ptr %81, align 8, !tbaa !33
  %82 = getelementptr inbounds i8, ptr %.0184315, i64 96
  %83 = load i32, ptr %82, align 8, !tbaa !36
  %84 = add nsw i32 %83, 1
  store i32 %84, ptr %82, align 8, !tbaa !36
  br label %.loopexit304

85:                                               ; preds = %75
  tail call void @sqlite3_mutex_leave(ptr noundef %56) #7
  tail call void @sqlite3_mutex_leave(ptr noundef %55) #7
  tail call void @sqlite3_free(ptr noundef nonnull %45) #7
  tail call void @sqlite3_free(ptr noundef nonnull %29) #7
  br label %.thread260

86:                                               ; preds = %.lr.ph, %61
  %87 = getelementptr inbounds i8, ptr %.0184315, i64 104
  %.0184 = load ptr, ptr %87, align 8, !tbaa !19
  %.not228 = icmp eq ptr %.0184, null
  br i1 %.not228, label %.loopexit304, label %.lr.ph, !llvm.loop !37

.loopexit304:                                     ; preds = %86, %54, %.thread258
  %.0184312 = phi ptr [ %.0184315, %.thread258 ], [ null, %54 ], [ null, %86 ]
  tail call void @sqlite3_mutex_leave(ptr noundef %56) #7
  tail call void @sqlite3_free(ptr noundef nonnull %45) #7
  %88 = icmp eq ptr %.0184312, null
  br i1 %88, label %.thread267, label %166

.thread267:                                       ; preds = %34, %30, %.loopexit304
  %.1190273 = phi ptr [ %55, %.loopexit304 ], [ null, %30 ], [ null, %34 ]
  %89 = tail call ptr @sqlite3MallocZero(i64 noundef 136) #7
  %90 = icmp eq ptr %89, null
  br i1 %90, label %203, label %91

91:                                               ; preds = %.thread267
  %92 = tail call i32 @sqlite3PagerOpen(ptr noundef %0, ptr noundef nonnull %89, ptr noundef %1, i32 noundef 136, i32 noundef %25, i32 noundef %.0182, ptr noundef nonnull @pageReinit) #7
  %93 = icmp eq i32 %92, 0
  br i1 %93, label %94, label %.thread274

94:                                               ; preds = %91
  %95 = load ptr, ptr %89, align 8, !tbaa !20
  %96 = getelementptr inbounds i8, ptr %2, i64 56
  %97 = load i64, ptr %96, align 8, !tbaa !38
  tail call void @sqlite3PagerSetMmapLimit(ptr noundef %95, i64 noundef %97) #7
  %98 = load ptr, ptr %89, align 8, !tbaa !20
  %99 = call i32 @sqlite3PagerReadFileheader(ptr noundef %98, i32 noundef 100, ptr noundef nonnull %7) #7
  %.not230 = icmp eq i32 %99, 0
  br i1 %.not230, label %100, label %.thread274

100:                                              ; preds = %94
  %101 = trunc i32 %25 to i8
  %102 = getelementptr inbounds i8, ptr %89, i64 32
  store i8 %101, ptr %102, align 8, !tbaa !39
  %103 = getelementptr inbounds i8, ptr %89, i64 8
  store ptr %2, ptr %103, align 8, !tbaa !40
  %104 = load ptr, ptr %89, align 8, !tbaa !20
  call void @sqlite3PagerSetBusyhandler(ptr noundef %104, ptr noundef nonnull @btreeInvokeBusyHandler, ptr noundef nonnull %89) #7
  %105 = getelementptr inbounds i8, ptr %29, i64 8
  store ptr %89, ptr %105, align 8, !tbaa !33
  %106 = getelementptr inbounds i8, ptr %89, i64 16
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %106, i8 0, i64 16, i1 false)
  %107 = load ptr, ptr %89, align 8, !tbaa !20
  %108 = call zeroext i8 @sqlite3PagerIsreadonly(ptr noundef %107) #7
  %.not231 = icmp eq i8 %108, 0
  br i1 %.not231, label %113, label %109

109:                                              ; preds = %100
  %110 = getelementptr inbounds i8, ptr %89, i64 38
  %111 = load i16, ptr %110, align 2, !tbaa !41
  %112 = or i16 %111, 1
  store i16 %112, ptr %110, align 2, !tbaa !41
  br label %113

113:                                              ; preds = %109, %100
  %114 = getelementptr inbounds i8, ptr %7, i64 16
  %115 = load i8, ptr %114, align 16, !tbaa !5
  %116 = zext i8 %115 to i32
  %117 = shl nuw nsw i32 %116, 8
  %118 = getelementptr inbounds i8, ptr %7, i64 17
  %119 = load i8, ptr %118, align 1, !tbaa !5
  %120 = zext i8 %119 to i32
  %121 = shl nuw nsw i32 %120, 16
  %122 = or disjoint i32 %121, %117
  %123 = getelementptr inbounds i8, ptr %89, i64 48
  store i32 %122, ptr %123, align 8, !tbaa !42
  %124 = add nsw i32 %122, -65537
  %or.cond254 = icmp ult i32 %124, -65025
  br i1 %or.cond254, label %128, label %125

125:                                              ; preds = %113
  %126 = add nuw nsw i32 %122, 131071
  %127 = and i32 %126, %122
  %.not232 = icmp eq i32 %127, 0
  br i1 %.not232, label %132, label %128

128:                                              ; preds = %125, %113
  store i32 0, ptr %123, align 8, !tbaa !42
  %or.cond5 = or i1 %8, %23
  br i1 %or.cond5, label %147, label %129

129:                                              ; preds = %128
  %130 = getelementptr inbounds i8, ptr %89, i64 33
  store i8 0, ptr %130, align 1, !tbaa !43
  %131 = getelementptr inbounds i8, ptr %89, i64 34
  store i8 0, ptr %131, align 2, !tbaa !44
  br label %147

132:                                              ; preds = %125
  %133 = getelementptr inbounds i8, ptr %7, i64 20
  %134 = load i8, ptr %133, align 4, !tbaa !5
  %135 = getelementptr inbounds i8, ptr %89, i64 38
  %136 = load i16, ptr %135, align 2, !tbaa !41
  %137 = or i16 %136, 2
  store i16 %137, ptr %135, align 2, !tbaa !41
  %138 = getelementptr inbounds i8, ptr %7, i64 52
  %139 = call i32 @sqlite3Get4byte(ptr noundef nonnull %138) #7
  %.not233 = icmp ne i32 %139, 0
  %140 = zext i1 %.not233 to i8
  %141 = getelementptr inbounds i8, ptr %89, i64 33
  store i8 %140, ptr %141, align 1, !tbaa !43
  %142 = getelementptr inbounds i8, ptr %7, i64 64
  %143 = call i32 @sqlite3Get4byte(ptr noundef nonnull %142) #7
  %.not234 = icmp ne i32 %143, 0
  %144 = zext i1 %.not234 to i8
  %145 = getelementptr inbounds i8, ptr %89, i64 34
  store i8 %144, ptr %145, align 2, !tbaa !44
  %146 = zext i8 %134 to i32
  br label %147

147:                                              ; preds = %128, %129, %132
  %.0198 = phi i32 [ %146, %132 ], [ 0, %129 ], [ 0, %128 ]
  %148 = load ptr, ptr %89, align 8, !tbaa !20
  %149 = call i32 @sqlite3PagerSetPagesize(ptr noundef %148, ptr noundef nonnull %123, i32 noundef %.0198) #7
  %.not235 = icmp eq i32 %149, 0
  br i1 %.not235, label %150, label %.thread274

150:                                              ; preds = %147
  %151 = load i32, ptr %123, align 8, !tbaa !42
  %152 = sub i32 %151, %.0198
  %153 = getelementptr inbounds i8, ptr %89, i64 52
  store i32 %152, ptr %153, align 4, !tbaa !45
  %154 = getelementptr inbounds i8, ptr %89, i64 96
  store i32 1, ptr %154, align 8, !tbaa !36
  %155 = getelementptr inbounds i8, ptr %29, i64 17
  %156 = load i8, ptr %155, align 1, !tbaa !18
  %.not236 = icmp eq i8 %156, 0
  br i1 %.not236, label %166, label %157

157:                                              ; preds = %150
  %158 = call ptr @sqlite3MutexAlloc(i32 noundef 2) #7
  %159 = load i32, ptr getelementptr inbounds (i8, ptr @sqlite3Config, i64 4), align 4, !tbaa !46
  %.not237 = icmp eq i32 %159, 0
  br i1 %.not237, label %.thread277, label %160

160:                                              ; preds = %157
  %161 = call ptr @sqlite3MutexAlloc(i32 noundef 0) #7
  %162 = getelementptr inbounds i8, ptr %89, i64 80
  store ptr %161, ptr %162, align 8, !tbaa !51
  %163 = icmp eq ptr %161, null
  br i1 %163, label %.thread274, label %.thread277

.thread277:                                       ; preds = %157, %160
  call void @sqlite3_mutex_enter(ptr noundef %158) #7
  %164 = load ptr, ptr @sqlite3SharedCacheList, align 8, !tbaa !19
  %165 = getelementptr inbounds i8, ptr %89, i64 104
  store ptr %164, ptr %165, align 8, !tbaa !52
  store ptr %89, ptr @sqlite3SharedCacheList, align 8, !tbaa !19
  call void @sqlite3_mutex_leave(ptr noundef %158) #7
  br label %166

166:                                              ; preds = %.thread277, %150, %.loopexit304
  %.1190271 = phi ptr [ %.1190273, %150 ], [ %55, %.loopexit304 ], [ %.1190273, %.thread277 ]
  %.3187 = phi ptr [ %89, %150 ], [ %.0184312, %.loopexit304 ], [ %89, %.thread277 ]
  %167 = getelementptr inbounds i8, ptr %29, i64 17
  %168 = load i8, ptr %167, align 1, !tbaa !18
  %.not238 = icmp eq i8 %168, 0
  br i1 %.not238, label %.loopexit, label %.preheader303

.preheader303:                                    ; preds = %166
  %169 = getelementptr inbounds i8, ptr %2, i64 40
  %170 = load i32, ptr %169, align 8, !tbaa !23
  %171 = icmp sgt i32 %170, 0
  br i1 %171, label %.lr.ph320, label %.loopexit

.lr.ph320:                                        ; preds = %.preheader303
  %172 = getelementptr inbounds i8, ptr %2, i64 32
  %173 = load ptr, ptr %172, align 8, !tbaa !30
  %wide.trip.count = zext nneg i32 %170 to i64
  br label %174

174:                                              ; preds = %.lr.ph320, %199
  %indvars.iv331 = phi i64 [ 0, %.lr.ph320 ], [ %indvars.iv.next332, %199 ]
  %175 = getelementptr inbounds %struct.Db, ptr %173, i64 %indvars.iv331, i32 1
  %176 = load ptr, ptr %175, align 8, !tbaa !31
  %.not239 = icmp eq ptr %176, null
  br i1 %.not239, label %199, label %177

177:                                              ; preds = %174
  %178 = getelementptr inbounds i8, ptr %176, i64 17
  %179 = load i8, ptr %178, align 1, !tbaa !18
  %.not240 = icmp eq i8 %179, 0
  br i1 %.not240, label %199, label %.preheader302

.preheader302:                                    ; preds = %177, %.preheader302
  %.0178 = phi ptr [ %181, %.preheader302 ], [ %176, %177 ]
  %180 = getelementptr inbounds i8, ptr %.0178, i64 40
  %181 = load ptr, ptr %180, align 8, !tbaa !53
  %.not241 = icmp eq ptr %181, null
  br i1 %.not241, label %182, label %.preheader302, !llvm.loop !54

182:                                              ; preds = %.preheader302
  %183 = getelementptr inbounds i8, ptr %.0178, i64 40
  %184 = getelementptr inbounds i8, ptr %29, i64 8
  %185 = load ptr, ptr %184, align 8, !tbaa !33
  %186 = getelementptr inbounds i8, ptr %.0178, i64 8
  %187 = load ptr, ptr %186, align 8, !tbaa !33
  %188 = icmp ult ptr %185, %187
  br i1 %188, label %.loopexit.sink.split, label %.preheader

.preheader:                                       ; preds = %182, %192
  %.1179 = phi ptr [ %190, %192 ], [ %.0178, %182 ]
  %189 = getelementptr inbounds i8, ptr %.1179, i64 32
  %190 = load ptr, ptr %189, align 8, !tbaa !55
  %.not242 = icmp eq ptr %190, null
  br i1 %.not242, label %.critedge.thread, label %192

.critedge.thread:                                 ; preds = %.preheader
  %191 = getelementptr inbounds i8, ptr %.1179, i64 32
  br label %.loopexit.sink.split

192:                                              ; preds = %.preheader
  %193 = getelementptr inbounds i8, ptr %190, i64 8
  %194 = load ptr, ptr %193, align 8, !tbaa !33
  %195 = icmp ult ptr %194, %185
  br i1 %195, label %.preheader, label %196, !llvm.loop !56

196:                                              ; preds = %192
  %197 = getelementptr inbounds i8, ptr %.1179, i64 32
  %198 = getelementptr inbounds i8, ptr %29, i64 32
  store ptr %190, ptr %198, align 8, !tbaa !55
  br label %.loopexit.sink.split

199:                                              ; preds = %174, %177
  %indvars.iv.next332 = add nuw nsw i64 %indvars.iv331, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next332, %wide.trip.count
  br i1 %exitcond.not, label %.loopexit, label %174, !llvm.loop !57

.thread274:                                       ; preds = %91, %160, %147, %94
  %.6197.ph.ph = phi i32 [ %99, %94 ], [ %149, %147 ], [ 7, %160 ], [ %92, %91 ]
  %200 = load ptr, ptr %89, align 8, !tbaa !20
  %.not247 = icmp eq ptr %200, null
  br i1 %.not247, label %203, label %201

201:                                              ; preds = %.thread274
  %202 = call i32 @sqlite3PagerClose(ptr noundef nonnull %200, ptr noundef null) #7
  br label %203

203:                                              ; preds = %.thread267, %201, %.thread274
  %.6197.ph298 = phi i32 [ %.6197.ph.ph, %201 ], [ %.6197.ph.ph, %.thread274 ], [ 7, %.thread267 ]
  call void @sqlite3_free(ptr noundef %89) #7
  call void @sqlite3_free(ptr noundef nonnull %29) #7
  store ptr null, ptr %3, align 8, !tbaa !19
  br label %218

.loopexit.sink.split:                             ; preds = %196, %.critedge.thread, %182
  %.sink346.sink = phi i64 [ 32, %182 ], [ 32, %.critedge.thread ], [ 40, %196 ]
  %.sink.sink = phi ptr [ %.0178, %182 ], [ null, %.critedge.thread ], [ %.1179, %196 ]
  %.sink344.sink = phi ptr [ %29, %182 ], [ %29, %.critedge.thread ], [ %190, %196 ]
  %.1179.lcssa343.sink.sink = phi ptr [ null, %182 ], [ %.1179, %.critedge.thread ], [ %29, %196 ]
  %.sink347 = phi ptr [ %183, %182 ], [ %191, %.critedge.thread ], [ %197, %196 ]
  %204 = getelementptr inbounds i8, ptr %29, i64 %.sink346.sink
  store ptr %.sink.sink, ptr %204, align 8, !tbaa !19
  %205 = getelementptr inbounds i8, ptr %.sink344.sink, i64 40
  store ptr %.1179.lcssa343.sink.sink, ptr %205, align 8, !tbaa !53
  store ptr %29, ptr %.sink347, align 8, !tbaa !19
  br label %.loopexit

.loopexit:                                        ; preds = %199, %.loopexit.sink.split, %.preheader303, %166
  store ptr %29, ptr %3, align 8, !tbaa !19
  %206 = call ptr @sqlite3BtreeSchema(ptr noundef nonnull %29, i32 noundef 0, ptr noundef null)
  %207 = icmp eq ptr %206, null
  br i1 %207, label %208, label %212

208:                                              ; preds = %.loopexit
  %209 = getelementptr inbounds i8, ptr %29, i64 8
  %210 = load ptr, ptr %209, align 8, !tbaa !33
  %211 = load ptr, ptr %210, align 8, !tbaa !20
  call void @sqlite3PagerSetCachesize(ptr noundef %211, i32 noundef -2000) #7
  br label %212

212:                                              ; preds = %208, %.loopexit
  %213 = load ptr, ptr %.3187, align 8, !tbaa !20
  %214 = call ptr @sqlite3PagerFile(ptr noundef %213) #7
  %215 = load ptr, ptr %214, align 8, !tbaa !58
  %.not245 = icmp eq ptr %215, null
  br i1 %.not245, label %218, label %216

216:                                              ; preds = %212
  %217 = getelementptr inbounds i8, ptr %.3187, i64 8
  call void @sqlite3OsFileControlHint(ptr noundef nonnull %214, i32 noundef 30, ptr noundef nonnull %217) #7
  br label %218

218:                                              ; preds = %212, %216, %203
  %.6197289 = phi i32 [ 0, %212 ], [ 0, %216 ], [ %.6197.ph298, %203 ]
  %.1190272287 = phi ptr [ %.1190271, %212 ], [ %.1190271, %216 ], [ %.1190273, %203 ]
  %.not248 = icmp eq ptr %.1190272287, null
  br i1 %.not248, label %.thread260, label %219

219:                                              ; preds = %218
  call void @sqlite3_mutex_leave(ptr noundef nonnull %.1190272287) #7
  br label %.thread260

.thread260:                                       ; preds = %47, %53, %85, %218, %219, %22
  %.6 = phi i32 [ 7, %22 ], [ %.6197289, %219 ], [ %.6197289, %218 ], [ 7, %47 ], [ %52, %53 ], [ 19, %85 ]
  call void @llvm.lifetime.end.p0(i64 100, ptr nonnull %7) #7
  ret i32 %.6
}

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #3

declare i32 @sqlite3TempInMemory(ptr noundef) local_unnamed_addr #0

declare ptr @sqlite3MallocZero(i64 noundef) local_unnamed_addr #0

declare i32 @sqlite3Strlen30(ptr noundef) local_unnamed_addr #0

declare ptr @sqlite3Malloc(i64 noundef) local_unnamed_addr #0

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

declare i32 @sqlite3OsFullPathname(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

declare ptr @sqlite3MutexAlloc(i32 noundef) local_unnamed_addr #0

declare void @sqlite3_mutex_enter(ptr noundef) local_unnamed_addr #0

declare ptr @sqlite3PagerFilename(ptr noundef, i32 noundef) local_unnamed_addr #0

declare ptr @sqlite3PagerVfs(ptr noundef) local_unnamed_addr #0

declare void @sqlite3_mutex_leave(ptr noundef) local_unnamed_addr #0

declare i32 @sqlite3PagerOpen(ptr noundef, ptr noundef, ptr noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

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

declare void @sqlite3PagerSetMmapLimit(ptr noundef, i64 noundef) local_unnamed_addr #0

declare i32 @sqlite3PagerReadFileheader(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

declare void @sqlite3PagerSetBusyhandler(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

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

declare zeroext i8 @sqlite3PagerIsreadonly(ptr noundef) local_unnamed_addr #0

declare i32 @sqlite3Get4byte(ptr noundef) local_unnamed_addr #0

declare i32 @sqlite3PagerSetPagesize(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

declare i32 @sqlite3PagerClose(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local ptr @sqlite3BtreeSchema(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

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

declare ptr @sqlite3PagerFile(ptr noundef) local_unnamed_addr #0

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #5

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

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }

!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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !6, i64 16}
!9 = !{!"Btree", !10, i64 0, !10, i64 8, !6, i64 16, !6, i64 17, !6, i64 18, !6, i64 19, !11, i64 20, !11, i64 24, !11, i64 28, !10, i64 32, !10, i64 40, !12, i64 48}
!10 = !{!"any pointer", !6, i64 0}
!11 = !{!"int", !6, i64 0}
!12 = !{!"BtLock", !10, i64 0, !11, i64 8, !6, i64 12, !10, i64 16}
!13 = !{!9, !10, i64 0}
!14 = !{!9, !10, i64 48}
!15 = !{!9, !11, i64 56}
!16 = !{!17, !11, i64 8}
!17 = !{!"sqlite3_vfs", !11, i64 0, !11, i64 4, !11, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160}
!18 = !{!9, !6, i64 17}
!19 = !{!10, !10, i64 0}
!20 = !{!21, !10, i64 0}
!21 = !{!"BtShared", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !6, i64 32, !6, i64 33, !6, i64 34, !6, i64 35, !6, i64 36, !6, i64 37, !22, i64 38, !22, i64 40, !22, i64 42, !22, i64 44, !22, i64 46, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !11, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128}
!22 = !{!"short", !6, i64 0}
!23 = !{!24, !11, i64 40}
!24 = !{!"sqlite3", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !11, i64 40, !11, i64 44, !25, i64 48, !25, i64 56, !11, i64 64, !11, i64 68, !11, i64 72, !11, i64 76, !22, i64 80, !6, i64 82, !6, i64 83, !6, i64 84, !6, i64 85, !6, i64 86, !6, i64 87, !6, i64 88, !6, i64 89, !6, i64 90, !6, i64 91, !6, i64 92, !6, i64 93, !6, i64 94, !11, i64 96, !11, i64 100, !11, i64 104, !11, i64 108, !6, i64 112, !11, i64 160, !26, i64 164, !11, i64 172, !11, i64 176, !11, i64 180, !11, i64 184, !11, i64 188, !11, i64 192, !10, i64 200, !10, i64 208, !10, i64 216, !10, i64 224, !10, i64 232, !10, i64 240, !10, i64 248, !10, i64 256, !10, i64 264, !10, i64 272, !10, i64 280, !10, i64 288, !10, i64 296, !10, i64 304, !10, i64 312, !10, i64 320, !10, i64 328, !6, i64 336, !27, i64 344, !10, i64 400, !10, i64 408, !10, i64 416, !10, i64 424, !11, i64 432, !11, i64 436, !28, i64 440, !10, i64 464, !10, i64 472, !10, i64 480, !28, i64 488, !28, i64 512, !29, i64 536, !6, i64 560, !10, i64 624, !11, i64 632, !11, i64 636, !11, i64 640, !25, i64 648, !25, i64 656, !10, i64 664}
!25 = !{!"long long", !6, i64 0}
!26 = !{!"sqlite3InitInfo", !11, i64 0, !6, i64 4, !6, i64 5, !6, i64 6, !6, i64 7}
!27 = !{!"Lookaside", !11, i64 0, !22, i64 4, !6, i64 6, !11, i64 8, !11, i64 12, !6, i64 16, !10, i64 32, !10, i64 40, !10, i64 48}
!28 = !{!"Hash", !11, i64 0, !11, i64 4, !10, i64 8, !10, i64 16}
!29 = !{!"BusyHandler", !10, i64 0, !10, i64 8, !11, i64 16}
!30 = !{!24, !10, i64 32}
!31 = !{!32, !10, i64 8}
!32 = !{!"Db", !10, i64 0, !10, i64 8, !6, i64 16, !6, i64 17, !10, i64 24}
!33 = !{!9, !10, i64 8}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}
!36 = !{!21, !11, i64 96}
!37 = distinct !{!37, !35}
!38 = !{!24, !25, i64 56}
!39 = !{!21, !6, i64 32}
!40 = !{!21, !10, i64 8}
!41 = !{!21, !22, i64 38}
!42 = !{!21, !11, i64 48}
!43 = !{!21, !6, i64 33}
!44 = !{!21, !6, i64 34}
!45 = !{!21, !11, i64 52}
!46 = !{!47, !11, i64 4}
!47 = !{!"Sqlite3Config", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !48, i64 40, !49, i64 104, !50, i64 176, !10, i64 280, !11, i64 288, !11, i64 292, !11, i64 296, !25, i64 304, !25, i64 312, !10, i64 320, !11, i64 328, !11, i64 332, !10, i64 336, !11, i64 344, !11, i64 348, !11, i64 352, !11, i64 356, !11, i64 360, !11, i64 364, !11, i64 368, !11, i64 372, !11, i64 376, !11, i64 380, !11, i64 384, !10, i64 392, !10, i64 400, !10, i64 408, !10, i64 416, !11, i64 424, !11, i64 428}
!48 = !{!"sqlite3_mem_methods", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56}
!49 = !{!"sqlite3_mutex_methods", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64}
!50 = !{!"sqlite3_pcache_methods2", !11, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96}
!51 = !{!21, !10, i64 80}
!52 = !{!21, !10, i64 104}
!53 = !{!9, !10, i64 40}
!54 = distinct !{!54, !35}
!55 = !{!9, !10, i64 32}
!56 = distinct !{!56, !35}
!57 = distinct !{!57, !35}
!58 = !{!59, !10, i64 0}
!59 = !{!"sqlite3_file", !10, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass