; LLVM IR from WayneLin92/SSeqCpp :: thirdparty/sqlite3 (sqlite3)

; 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, i8, i8, i8, i8, i8, i8, 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, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, i64, ptr, i32, ptr, i32, 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.sqlite3 = type { ptr, ptr, ptr, ptr, ptr, i32, i32, i64, i64, i64, i32, i32, i32, i32, i32, i32, i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i32, i64, i64, [12 x i32], i32, %struct.sqlite3InitInfo, i32, i32, i32, i32, i32, i32, ptr, %union.anon, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, %union.anon.0, %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, i32, i64, i64, ptr }
%struct.sqlite3InitInfo = type { i32, i8, i8, i8, ptr }
%union.anon = type { ptr }
%union.anon.0 = type { double }
%struct.Lookaside = type { i32, i16, i16, i8, i32, [3 x i32], ptr, ptr, ptr, ptr, ptr, 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.LookasideSlot = type { ptr }
%struct.Schema = type { i32, i32, %struct.Hash, %struct.Hash, %struct.Hash, %struct.Hash, ptr, i8, i8, i16, i32 }
%struct.HashElem = type { ptr, ptr, ptr, ptr }
%struct.Vdbe = type { ptr, ptr, ptr, ptr, i16, i32, i32, i32, i32, i32, i64, i32, i64, i64, i64, i64, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, ptr, ptr, ptr, i64, i16, i8, i8, i8, i8, i8, i32, i32, [9 x i32], ptr, ptr, ptr, ptr, i32, i32, ptr, ptr }

@sqlite3Config = external hidden global %struct.Sqlite3Config, align 8

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

; Function Attrs: nounwind uwtable
declare dso_local void @sqlite3_mutex_enter(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @sqlite3_mutex_leave(ptr noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local i32 @sqlite3_db_status(ptr noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3, i32 noundef %4) #1 {
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca ptr, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  store i32 %4, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #2
  store i32 0, ptr %11, align 4, !tbaa !9
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.sqlite3, ptr %27, i32 0, i32 3
  %29 = load ptr, ptr %28, align 8, !tbaa !11
  call void @sqlite3_mutex_enter(ptr noundef %29)
  %30 = load i32, ptr %7, align 4, !tbaa !9
  switch i32 %30, label %404 [
    i32 0, label %31
    i32 4, label %108
    i32 5, label %108
    i32 6, label %108
    i32 11, label %130
    i32 1, label %130
    i32 2, label %174
    i32 3, label %315
    i32 12, label %350
    i32 7, label %351
    i32 8, label %351
    i32 9, label %351
    i32 10, label %389
  ]

31:                                               ; preds = %5
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  %33 = load ptr, ptr %9, align 8, !tbaa !5
  %34 = call i32 @sqlite3LookasideUsed(ptr noundef %32, ptr noundef %33)
  %35 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 %34, ptr %35, align 4, !tbaa !9
  %36 = load i32, ptr %10, align 4, !tbaa !9
  %37 = icmp ne i32 %36, 0
  br i1 %37, label %38, label %107

38:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #2
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.sqlite3, ptr %39, i32 0, i32 65
  %41 = getelementptr inbounds %struct.Lookaside, ptr %40, i32 0, i32 7
  %42 = load ptr, ptr %41, align 8, !tbaa !19
  store ptr %42, ptr %12, align 8, !tbaa !5
  %43 = load ptr, ptr %12, align 8, !tbaa !5
  %44 = icmp ne ptr %43, null
  br i1 %44, label %45, label %72

45:                                               ; preds = %38
  br label %46

46:                                               ; preds = %51, %45
  %47 = load ptr, ptr %12, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.LookasideSlot, ptr %47, i32 0, i32 0
  %49 = load ptr, ptr %48, align 8, !tbaa !20
  %50 = icmp ne ptr %49, null
  br i1 %50, label %51, label %55

51:                                               ; preds = %46
  %52 = load ptr, ptr %12, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.LookasideSlot, ptr %52, i32 0, i32 0
  %54 = load ptr, ptr %53, align 8, !tbaa !20
  store ptr %54, ptr %12, align 8, !tbaa !5
  br label %46, !llvm.loop !22

55:                                               ; preds = %46
  %56 = load ptr, ptr %6, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.sqlite3, ptr %56, i32 0, i32 65
  %58 = getelementptr inbounds %struct.Lookaside, ptr %57, i32 0, i32 6
  %59 = load ptr, ptr %58, align 8, !tbaa !24
  %60 = load ptr, ptr %12, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.LookasideSlot, ptr %60, i32 0, i32 0
  store ptr %59, ptr %61, align 8, !tbaa !20
  %62 = load ptr, ptr %6, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.sqlite3, ptr %62, i32 0, i32 65
  %64 = getelementptr inbounds %struct.Lookaside, ptr %63, i32 0, i32 7
  %65 = load ptr, ptr %64, align 8, !tbaa !19
  %66 = load ptr, ptr %6, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.sqlite3, ptr %66, i32 0, i32 65
  %68 = getelementptr inbounds %struct.Lookaside, ptr %67, i32 0, i32 6
  store ptr %65, ptr %68, align 8, !tbaa !24
  %69 = load ptr, ptr %6, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.sqlite3, ptr %69, i32 0, i32 65
  %71 = getelementptr inbounds %struct.Lookaside, ptr %70, i32 0, i32 7
  store ptr null, ptr %71, align 8, !tbaa !19
  br label %72

72:                                               ; preds = %55, %38
  %73 = load ptr, ptr %6, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.sqlite3, ptr %73, i32 0, i32 65
  %75 = getelementptr inbounds %struct.Lookaside, ptr %74, i32 0, i32 9
  %76 = load ptr, ptr %75, align 8, !tbaa !25
  store ptr %76, ptr %12, align 8, !tbaa !5
  %77 = load ptr, ptr %12, align 8, !tbaa !5
  %78 = icmp ne ptr %77, null
  br i1 %78, label %79, label %106

79:                                               ; preds = %72
  br label %80

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

85:                                               ; preds = %80
  %86 = load ptr, ptr %12, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.LookasideSlot, ptr %86, i32 0, i32 0
  %88 = load ptr, ptr %87, align 8, !tbaa !20
  store ptr %88, ptr %12, align 8, !tbaa !5
  br label %80, !llvm.loop !26

89:                                               ; preds = %80
  %90 = load ptr, ptr %6, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.sqlite3, ptr %90, i32 0, i32 65
  %92 = getelementptr inbounds %struct.Lookaside, ptr %91, i32 0, i32 8
  %93 = load ptr, ptr %92, align 8, !tbaa !27
  %94 = load ptr, ptr %12, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.LookasideSlot, ptr %94, i32 0, i32 0
  store ptr %93, ptr %95, align 8, !tbaa !20
  %96 = load ptr, ptr %6, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.sqlite3, ptr %96, i32 0, i32 65
  %98 = getelementptr inbounds %struct.Lookaside, ptr %97, i32 0, i32 9
  %99 = load ptr, ptr %98, align 8, !tbaa !25
  %100 = load ptr, ptr %6, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.sqlite3, ptr %100, i32 0, i32 65
  %102 = getelementptr inbounds %struct.Lookaside, ptr %101, i32 0, i32 8
  store ptr %99, ptr %102, align 8, !tbaa !27
  %103 = load ptr, ptr %6, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.sqlite3, ptr %103, i32 0, i32 65
  %105 = getelementptr inbounds %struct.Lookaside, ptr %104, i32 0, i32 9
  store ptr null, ptr %105, align 8, !tbaa !25
  br label %106

106:                                              ; preds = %89, %72
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #2
  br label %107

107:                                              ; preds = %106, %31
  br label %405

108:                                              ; preds = %5, %5, %5
  %109 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 0, ptr %109, align 4, !tbaa !9
  %110 = load ptr, ptr %6, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.sqlite3, ptr %110, i32 0, i32 65
  %112 = getelementptr inbounds %struct.Lookaside, ptr %111, i32 0, i32 5
  %113 = load i32, ptr %7, align 4, !tbaa !9
  %114 = sub nsw i32 %113, 4
  %115 = sext i32 %114 to i64
  %116 = getelementptr inbounds [3 x i32], ptr %112, i64 0, i64 %115
  %117 = load i32, ptr %116, align 4, !tbaa !9
  %118 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 %117, ptr %118, align 4, !tbaa !9
  %119 = load i32, ptr %10, align 4, !tbaa !9
  %120 = icmp ne i32 %119, 0
  br i1 %120, label %121, label %129

121:                                              ; preds = %108
  %122 = load ptr, ptr %6, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.sqlite3, ptr %122, i32 0, i32 65
  %124 = getelementptr inbounds %struct.Lookaside, ptr %123, i32 0, i32 5
  %125 = load i32, ptr %7, align 4, !tbaa !9
  %126 = sub nsw i32 %125, 4
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds [3 x i32], ptr %124, i64 0, i64 %127
  store i32 0, ptr %128, align 4, !tbaa !9
  br label %129

129:                                              ; preds = %121, %108
  br label %405

130:                                              ; preds = %5, %5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #2
  store i32 0, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #2
  %131 = load ptr, ptr %6, align 8, !tbaa !5
  call void @sqlite3BtreeEnterAll(ptr noundef %131)
  store i32 0, ptr %14, align 4, !tbaa !9
  br label %132

132:                                              ; preds = %166, %130
  %133 = load i32, ptr %14, align 4, !tbaa !9
  %134 = load ptr, ptr %6, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.sqlite3, ptr %134, i32 0, i32 5
  %136 = load i32, ptr %135, align 8, !tbaa !28
  %137 = icmp slt i32 %133, %136
  br i1 %137, label %138, label %169

138:                                              ; preds = %132
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #2
  %139 = load ptr, ptr %6, align 8, !tbaa !5
  %140 = getelementptr inbounds %struct.sqlite3, ptr %139, i32 0, i32 4
  %141 = load ptr, ptr %140, align 8, !tbaa !29
  %142 = load i32, ptr %14, align 4, !tbaa !9
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds %struct.Db, ptr %141, i64 %143
  %145 = getelementptr inbounds %struct.Db, ptr %144, i32 0, i32 1
  %146 = load ptr, ptr %145, align 8, !tbaa !30
  store ptr %146, ptr %15, align 8, !tbaa !5
  %147 = load ptr, ptr %15, align 8, !tbaa !5
  %148 = icmp ne ptr %147, null
  br i1 %148, label %149, label %165

149:                                              ; preds = %138
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #2
  %150 = load ptr, ptr %15, align 8, !tbaa !5
  %151 = call ptr @sqlite3BtreePager(ptr noundef %150)
  store ptr %151, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #2
  %152 = load ptr, ptr %16, align 8, !tbaa !5
  %153 = call i32 @sqlite3PagerMemUsed(ptr noundef %152)
  store i32 %153, ptr %17, align 4, !tbaa !9
  %154 = load i32, ptr %7, align 4, !tbaa !9
  %155 = icmp eq i32 %154, 11
  br i1 %155, label %156, label %161

156:                                              ; preds = %149
  %157 = load i32, ptr %17, align 4, !tbaa !9
  %158 = load ptr, ptr %15, align 8, !tbaa !5
  %159 = call i32 @sqlite3BtreeConnectionCount(ptr noundef %158)
  %160 = sdiv i32 %157, %159
  store i32 %160, ptr %17, align 4, !tbaa !9
  br label %161

161:                                              ; preds = %156, %149
  %162 = load i32, ptr %17, align 4, !tbaa !9
  %163 = load i32, ptr %13, align 4, !tbaa !9
  %164 = add nsw i32 %163, %162
  store i32 %164, ptr %13, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #2
  br label %165

165:                                              ; preds = %161, %138
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #2
  br label %166

166:                                              ; preds = %165
  %167 = load i32, ptr %14, align 4, !tbaa !9
  %168 = add nsw i32 %167, 1
  store i32 %168, ptr %14, align 4, !tbaa !9
  br label %132, !llvm.loop !32

169:                                              ; preds = %132
  %170 = load ptr, ptr %6, align 8, !tbaa !5
  call void @sqlite3BtreeLeaveAll(ptr noundef %170)
  %171 = load i32, ptr %13, align 4, !tbaa !9
  %172 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 %171, ptr %172, align 4, !tbaa !9
  %173 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 0, ptr %173, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #2
  br label %405

174:                                              ; preds = %5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #2
  store i32 0, ptr %19, align 4, !tbaa !9
  %175 = load ptr, ptr %6, align 8, !tbaa !5
  call void @sqlite3BtreeEnterAll(ptr noundef %175)
  %176 = load ptr, ptr %6, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.sqlite3, ptr %176, i32 0, i32 87
  store ptr %19, ptr %177, align 8, !tbaa !33
  %178 = load ptr, ptr %6, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.sqlite3, ptr %178, i32 0, i32 65
  %180 = getelementptr inbounds %struct.Lookaside, ptr %179, i32 0, i32 11
  %181 = load ptr, ptr %180, align 8, !tbaa !34
  %182 = load ptr, ptr %6, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.sqlite3, ptr %182, i32 0, i32 65
  %184 = getelementptr inbounds %struct.Lookaside, ptr %183, i32 0, i32 12
  store ptr %181, ptr %184, align 8, !tbaa !35
  store i32 0, ptr %18, align 4, !tbaa !9
  br label %185

185:                                              ; preds = %298, %174
  %186 = load i32, ptr %18, align 4, !tbaa !9
  %187 = load ptr, ptr %6, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.sqlite3, ptr %187, i32 0, i32 5
  %189 = load i32, ptr %188, align 8, !tbaa !28
  %190 = icmp slt i32 %186, %189
  br i1 %190, label %191, label %301

191:                                              ; preds = %185
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #2
  %192 = load ptr, ptr %6, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.sqlite3, ptr %192, i32 0, i32 4
  %194 = load ptr, ptr %193, align 8, !tbaa !29
  %195 = load i32, ptr %18, align 4, !tbaa !9
  %196 = sext i32 %195 to i64
  %197 = getelementptr inbounds %struct.Db, ptr %194, i64 %196
  %198 = getelementptr inbounds %struct.Db, ptr %197, i32 0, i32 4
  %199 = load ptr, ptr %198, align 8, !tbaa !36
  store ptr %199, ptr %20, align 8, !tbaa !5
  %200 = load ptr, ptr %20, align 8, !tbaa !5
  %201 = icmp ne ptr %200, null
  br i1 %201, label %202, label %297

202:                                              ; preds = %191
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #2
  %203 = load ptr, ptr getelementptr inbounds (%struct.sqlite3_mem_methods, ptr getelementptr inbounds (%struct.Sqlite3Config, ptr @sqlite3Config, i32 0, i32 12), i32 0, i32 4), align 8, !tbaa !37
  %204 = call i32 %203(i32 noundef 32)
  %205 = load ptr, ptr %20, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct.Schema, ptr %205, i32 0, i32 2
  %207 = getelementptr inbounds %struct.Hash, ptr %206, i32 0, i32 1
  %208 = load i32, ptr %207, align 4, !tbaa !42
  %209 = load ptr, ptr %20, align 8, !tbaa !5
  %210 = getelementptr inbounds %struct.Schema, ptr %209, i32 0, i32 4
  %211 = getelementptr inbounds %struct.Hash, ptr %210, i32 0, i32 1
  %212 = load i32, ptr %211, align 4, !tbaa !44
  %213 = add i32 %208, %212
  %214 = load ptr, ptr %20, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.Schema, ptr %214, i32 0, i32 3
  %216 = getelementptr inbounds %struct.Hash, ptr %215, i32 0, i32 1
  %217 = load i32, ptr %216, align 4, !tbaa !45
  %218 = add i32 %213, %217
  %219 = load ptr, ptr %20, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.Schema, ptr %219, i32 0, i32 5
  %221 = getelementptr inbounds %struct.Hash, ptr %220, i32 0, i32 1
  %222 = load i32, ptr %221, align 4, !tbaa !46
  %223 = add i32 %218, %222
  %224 = mul i32 %204, %223
  %225 = load i32, ptr %19, align 4, !tbaa !9
  %226 = add i32 %225, %224
  store i32 %226, ptr %19, align 4, !tbaa !9
  %227 = load ptr, ptr %20, align 8, !tbaa !5
  %228 = getelementptr inbounds %struct.Schema, ptr %227, i32 0, i32 2
  %229 = getelementptr inbounds %struct.Hash, ptr %228, i32 0, i32 3
  %230 = load ptr, ptr %229, align 8, !tbaa !47
  %231 = call i64 @sqlite3_msize(ptr noundef %230)
  %232 = load i32, ptr %19, align 4, !tbaa !9
  %233 = sext i32 %232 to i64
  %234 = add i64 %233, %231
  %235 = trunc i64 %234 to i32
  store i32 %235, ptr %19, align 4, !tbaa !9
  %236 = load ptr, ptr %20, align 8, !tbaa !5
  %237 = getelementptr inbounds %struct.Schema, ptr %236, i32 0, i32 4
  %238 = getelementptr inbounds %struct.Hash, ptr %237, i32 0, i32 3
  %239 = load ptr, ptr %238, align 8, !tbaa !48
  %240 = call i64 @sqlite3_msize(ptr noundef %239)
  %241 = load i32, ptr %19, align 4, !tbaa !9
  %242 = sext i32 %241 to i64
  %243 = add i64 %242, %240
  %244 = trunc i64 %243 to i32
  store i32 %244, ptr %19, align 4, !tbaa !9
  %245 = load ptr, ptr %20, align 8, !tbaa !5
  %246 = getelementptr inbounds %struct.Schema, ptr %245, i32 0, i32 3
  %247 = getelementptr inbounds %struct.Hash, ptr %246, i32 0, i32 3
  %248 = load ptr, ptr %247, align 8, !tbaa !49
  %249 = call i64 @sqlite3_msize(ptr noundef %248)
  %250 = load i32, ptr %19, align 4, !tbaa !9
  %251 = sext i32 %250 to i64
  %252 = add i64 %251, %249
  %253 = trunc i64 %252 to i32
  store i32 %253, ptr %19, align 4, !tbaa !9
  %254 = load ptr, ptr %20, align 8, !tbaa !5
  %255 = getelementptr inbounds %struct.Schema, ptr %254, i32 0, i32 5
  %256 = getelementptr inbounds %struct.Hash, ptr %255, i32 0, i32 3
  %257 = load ptr, ptr %256, align 8, !tbaa !50
  %258 = call i64 @sqlite3_msize(ptr noundef %257)
  %259 = load i32, ptr %19, align 4, !tbaa !9
  %260 = sext i32 %259 to i64
  %261 = add i64 %260, %258
  %262 = trunc i64 %261 to i32
  store i32 %262, ptr %19, align 4, !tbaa !9
  %263 = load ptr, ptr %20, align 8, !tbaa !5
  %264 = getelementptr inbounds %struct.Schema, ptr %263, i32 0, i32 4
  %265 = getelementptr inbounds %struct.Hash, ptr %264, i32 0, i32 2
  %266 = load ptr, ptr %265, align 8, !tbaa !51
  store ptr %266, ptr %21, align 8, !tbaa !5
  br label %267

267:                                              ; preds = %275, %202
  %268 = load ptr, ptr %21, align 8, !tbaa !5
  %269 = icmp ne ptr %268, null
  br i1 %269, label %270, label %279

270:                                              ; preds = %267
  %271 = load ptr, ptr %6, align 8, !tbaa !5
  %272 = load ptr, ptr %21, align 8, !tbaa !5
  %273 = getelementptr inbounds %struct.HashElem, ptr %272, i32 0, i32 2
  %274 = load ptr, ptr %273, align 8, !tbaa !52
  call void @sqlite3DeleteTrigger(ptr noundef %271, ptr noundef %274)
  br label %275

275:                                              ; preds = %270
  %276 = load ptr, ptr %21, align 8, !tbaa !5
  %277 = getelementptr inbounds %struct.HashElem, ptr %276, i32 0, i32 0
  %278 = load ptr, ptr %277, align 8, !tbaa !54
  store ptr %278, ptr %21, align 8, !tbaa !5
  br label %267, !llvm.loop !55

279:                                              ; preds = %267
  %280 = load ptr, ptr %20, align 8, !tbaa !5
  %281 = getelementptr inbounds %struct.Schema, ptr %280, i32 0, i32 2
  %282 = getelementptr inbounds %struct.Hash, ptr %281, i32 0, i32 2
  %283 = load ptr, ptr %282, align 8, !tbaa !56
  store ptr %283, ptr %21, align 8, !tbaa !5
  br label %284

284:                                              ; preds = %292, %279
  %285 = load ptr, ptr %21, align 8, !tbaa !5
  %286 = icmp ne ptr %285, null
  br i1 %286, label %287, label %296

287:                                              ; preds = %284
  %288 = load ptr, ptr %6, align 8, !tbaa !5
  %289 = load ptr, ptr %21, align 8, !tbaa !5
  %290 = getelementptr inbounds %struct.HashElem, ptr %289, i32 0, i32 2
  %291 = load ptr, ptr %290, align 8, !tbaa !52
  call void @sqlite3DeleteTable(ptr noundef %288, ptr noundef %291)
  br label %292

292:                                              ; preds = %287
  %293 = load ptr, ptr %21, align 8, !tbaa !5
  %294 = getelementptr inbounds %struct.HashElem, ptr %293, i32 0, i32 0
  %295 = load ptr, ptr %294, align 8, !tbaa !54
  store ptr %295, ptr %21, align 8, !tbaa !5
  br label %284, !llvm.loop !57

296:                                              ; preds = %284
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #2
  br label %297

297:                                              ; preds = %296, %191
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #2
  br label %298

298:                                              ; preds = %297
  %299 = load i32, ptr %18, align 4, !tbaa !9
  %300 = add nsw i32 %299, 1
  store i32 %300, ptr %18, align 4, !tbaa !9
  br label %185, !llvm.loop !58

301:                                              ; preds = %185
  %302 = load ptr, ptr %6, align 8, !tbaa !5
  %303 = getelementptr inbounds %struct.sqlite3, ptr %302, i32 0, i32 87
  store ptr null, ptr %303, align 8, !tbaa !33
  %304 = load ptr, ptr %6, align 8, !tbaa !5
  %305 = getelementptr inbounds %struct.sqlite3, ptr %304, i32 0, i32 65
  %306 = getelementptr inbounds %struct.Lookaside, ptr %305, i32 0, i32 13
  %307 = load ptr, ptr %306, align 8, !tbaa !59
  %308 = load ptr, ptr %6, align 8, !tbaa !5
  %309 = getelementptr inbounds %struct.sqlite3, ptr %308, i32 0, i32 65
  %310 = getelementptr inbounds %struct.Lookaside, ptr %309, i32 0, i32 12
  store ptr %307, ptr %310, align 8, !tbaa !35
  %311 = load ptr, ptr %6, align 8, !tbaa !5
  call void @sqlite3BtreeLeaveAll(ptr noundef %311)
  %312 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 0, ptr %312, align 4, !tbaa !9
  %313 = load i32, ptr %19, align 4, !tbaa !9
  %314 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 %313, ptr %314, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #2
  br label %405

315:                                              ; preds = %5
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %23) #2
  store i32 0, ptr %23, align 4, !tbaa !9
  %316 = load ptr, ptr %6, align 8, !tbaa !5
  %317 = getelementptr inbounds %struct.sqlite3, ptr %316, i32 0, i32 87
  store ptr %23, ptr %317, align 8, !tbaa !33
  %318 = load ptr, ptr %6, align 8, !tbaa !5
  %319 = getelementptr inbounds %struct.sqlite3, ptr %318, i32 0, i32 65
  %320 = getelementptr inbounds %struct.Lookaside, ptr %319, i32 0, i32 11
  %321 = load ptr, ptr %320, align 8, !tbaa !34
  %322 = load ptr, ptr %6, align 8, !tbaa !5
  %323 = getelementptr inbounds %struct.sqlite3, ptr %322, i32 0, i32 65
  %324 = getelementptr inbounds %struct.Lookaside, ptr %323, i32 0, i32 12
  store ptr %321, ptr %324, align 8, !tbaa !35
  %325 = load ptr, ptr %6, align 8, !tbaa !5
  %326 = getelementptr inbounds %struct.sqlite3, ptr %325, i32 0, i32 1
  %327 = load ptr, ptr %326, align 8, !tbaa !60
  store ptr %327, ptr %22, align 8, !tbaa !5
  br label %328

328:                                              ; preds = %333, %315
  %329 = load ptr, ptr %22, align 8, !tbaa !5
  %330 = icmp ne ptr %329, null
  br i1 %330, label %331, label %337

331:                                              ; preds = %328
  %332 = load ptr, ptr %22, align 8, !tbaa !5
  call void @sqlite3VdbeDelete(ptr noundef %332)
  br label %333

333:                                              ; preds = %331
  %334 = load ptr, ptr %22, align 8, !tbaa !5
  %335 = getelementptr inbounds %struct.Vdbe, ptr %334, i32 0, i32 2
  %336 = load ptr, ptr %335, align 8, !tbaa !61
  store ptr %336, ptr %22, align 8, !tbaa !5
  br label %328, !llvm.loop !63

337:                                              ; preds = %328
  %338 = load ptr, ptr %6, align 8, !tbaa !5
  %339 = getelementptr inbounds %struct.sqlite3, ptr %338, i32 0, i32 65
  %340 = getelementptr inbounds %struct.Lookaside, ptr %339, i32 0, i32 13
  %341 = load ptr, ptr %340, align 8, !tbaa !59
  %342 = load ptr, ptr %6, align 8, !tbaa !5
  %343 = getelementptr inbounds %struct.sqlite3, ptr %342, i32 0, i32 65
  %344 = getelementptr inbounds %struct.Lookaside, ptr %343, i32 0, i32 12
  store ptr %341, ptr %344, align 8, !tbaa !35
  %345 = load ptr, ptr %6, align 8, !tbaa !5
  %346 = getelementptr inbounds %struct.sqlite3, ptr %345, i32 0, i32 87
  store ptr null, ptr %346, align 8, !tbaa !33
  %347 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 0, ptr %347, align 4, !tbaa !9
  %348 = load i32, ptr %23, align 4, !tbaa !9
  %349 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 %348, ptr %349, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #2
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #2
  br label %405

350:                                              ; preds = %5
  store i32 10, ptr %7, align 4, !tbaa !9
  br label %351

351:                                              ; preds = %350, %5, %5, %5
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #2
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #2
  store i32 0, ptr %25, align 4, !tbaa !9
  store i32 0, ptr %24, align 4, !tbaa !9
  br label %352

352:                                              ; preds = %382, %351
  %353 = load i32, ptr %24, align 4, !tbaa !9
  %354 = load ptr, ptr %6, align 8, !tbaa !5
  %355 = getelementptr inbounds %struct.sqlite3, ptr %354, i32 0, i32 5
  %356 = load i32, ptr %355, align 8, !tbaa !28
  %357 = icmp slt i32 %353, %356
  br i1 %357, label %358, label %385

358:                                              ; preds = %352
  %359 = load ptr, ptr %6, align 8, !tbaa !5
  %360 = getelementptr inbounds %struct.sqlite3, ptr %359, i32 0, i32 4
  %361 = load ptr, ptr %360, align 8, !tbaa !29
  %362 = load i32, ptr %24, align 4, !tbaa !9
  %363 = sext i32 %362 to i64
  %364 = getelementptr inbounds %struct.Db, ptr %361, i64 %363
  %365 = getelementptr inbounds %struct.Db, ptr %364, i32 0, i32 1
  %366 = load ptr, ptr %365, align 8, !tbaa !30
  %367 = icmp ne ptr %366, null
  br i1 %367, label %368, label %381

368:                                              ; preds = %358
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #2
  %369 = load ptr, ptr %6, align 8, !tbaa !5
  %370 = getelementptr inbounds %struct.sqlite3, ptr %369, i32 0, i32 4
  %371 = load ptr, ptr %370, align 8, !tbaa !29
  %372 = load i32, ptr %24, align 4, !tbaa !9
  %373 = sext i32 %372 to i64
  %374 = getelementptr inbounds %struct.Db, ptr %371, i64 %373
  %375 = getelementptr inbounds %struct.Db, ptr %374, i32 0, i32 1
  %376 = load ptr, ptr %375, align 8, !tbaa !30
  %377 = call ptr @sqlite3BtreePager(ptr noundef %376)
  store ptr %377, ptr %26, align 8, !tbaa !5
  %378 = load ptr, ptr %26, align 8, !tbaa !5
  %379 = load i32, ptr %7, align 4, !tbaa !9
  %380 = load i32, ptr %10, align 4, !tbaa !9
  call void @sqlite3PagerCacheStat(ptr noundef %378, i32 noundef %379, i32 noundef %380, ptr noundef %25)
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #2
  br label %381

381:                                              ; preds = %368, %358
  br label %382

382:                                              ; preds = %381
  %383 = load i32, ptr %24, align 4, !tbaa !9
  %384 = add nsw i32 %383, 1
  store i32 %384, ptr %24, align 4, !tbaa !9
  br label %352, !llvm.loop !64

385:                                              ; preds = %352
  %386 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 0, ptr %386, align 4, !tbaa !9
  %387 = load i32, ptr %25, align 4, !tbaa !9
  %388 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 %387, ptr %388, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #2
  br label %405

389:                                              ; preds = %5
  %390 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 0, ptr %390, align 4, !tbaa !9
  %391 = load ptr, ptr %6, align 8, !tbaa !5
  %392 = getelementptr inbounds %struct.sqlite3, ptr %391, i32 0, i32 86
  %393 = load i64, ptr %392, align 8, !tbaa !65
  %394 = icmp sgt i64 %393, 0
  br i1 %394, label %400, label %395

395:                                              ; preds = %389
  %396 = load ptr, ptr %6, align 8, !tbaa !5
  %397 = getelementptr inbounds %struct.sqlite3, ptr %396, i32 0, i32 85
  %398 = load i64, ptr %397, align 8, !tbaa !66
  %399 = icmp sgt i64 %398, 0
  br label %400

400:                                              ; preds = %395, %389
  %401 = phi i1 [ true, %389 ], [ %399, %395 ]
  %402 = zext i1 %401 to i32
  %403 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 %402, ptr %403, align 4, !tbaa !9
  br label %405

404:                                              ; preds = %5
  store i32 1, ptr %11, align 4, !tbaa !9
  br label %405

405:                                              ; preds = %404, %400, %385, %337, %301, %169, %129, %107
  %406 = load ptr, ptr %6, align 8, !tbaa !5
  %407 = getelementptr inbounds %struct.sqlite3, ptr %406, i32 0, i32 3
  %408 = load ptr, ptr %407, align 8, !tbaa !11
  call void @sqlite3_mutex_leave(ptr noundef %408)
  %409 = load i32, ptr %11, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #2
  ret i32 %409
}

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

; Function Attrs: nounwind uwtable
declare hidden void @sqlite3BtreeEnterAll(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden ptr @sqlite3BtreePager(ptr noundef) #1

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

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

; Function Attrs: nounwind uwtable
declare hidden void @sqlite3BtreeLeaveAll(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i64 @sqlite3_msize(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @sqlite3DeleteTrigger(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @sqlite3DeleteTable(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare hidden void @sqlite3VdbeDelete(ptr noundef) #1

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !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 = !{!"sqlite3", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !10, i64 40, !10, i64 44, !13, i64 48, !13, i64 56, !13, i64 64, !10, i64 72, !10, i64 76, !10, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !10, i64 96, !7, i64 100, !7, i64 101, !7, i64 102, !7, i64 103, !7, i64 104, !7, i64 105, !7, i64 106, !7, i64 107, !7, i64 108, !7, i64 109, !7, i64 110, !7, i64 111, !7, i64 112, !7, i64 113, !10, i64 116, !13, i64 120, !13, i64 128, !7, i64 136, !10, i64 184, !14, i64 192, !10, i64 208, !10, i64 212, !10, i64 216, !10, i64 220, !10, i64 224, !10, i64 228, !6, i64 232, !7, 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, !6, i64 336, !6, i64 344, !6, i64 352, !6, i64 360, !6, i64 368, !6, i64 376, !6, i64 384, !6, i64 392, !7, i64 400, !15, i64 408, !6, i64 504, !6, i64 512, !6, i64 520, !6, i64 528, !10, i64 536, !10, i64 540, !17, i64 544, !6, i64 568, !6, i64 576, !6, i64 584, !17, i64 592, !17, i64 616, !18, i64 640, !7, i64 664, !6, i64 728, !10, i64 736, !10, i64 740, !10, i64 744, !10, i64 748, !13, i64 752, !13, i64 760, !6, i64 768}
!13 = !{!"long long", !7, i64 0}
!14 = !{!"sqlite3InitInfo", !10, i64 0, !7, i64 4, !7, i64 5, !10, i64 6, !10, i64 6, !10, i64 6, !6, i64 8}
!15 = !{!"Lookaside", !10, i64 0, !16, i64 4, !16, i64 6, !7, i64 8, !10, i64 12, !7, i64 16, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88}
!16 = !{!"short", !7, i64 0}
!17 = !{!"Hash", !10, i64 0, !10, i64 4, !6, i64 8, !6, i64 16}
!18 = !{!"BusyHandler", !6, i64 0, !6, i64 8, !10, i64 16}
!19 = !{!12, !6, i64 448}
!20 = !{!21, !6, i64 0}
!21 = !{!"LookasideSlot", !6, i64 0}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!12, !6, i64 440}
!25 = !{!12, !6, i64 464}
!26 = distinct !{!26, !23}
!27 = !{!12, !6, i64 456}
!28 = !{!12, !10, i64 40}
!29 = !{!12, !6, i64 32}
!30 = !{!31, !6, i64 8}
!31 = !{!"Db", !6, i64 0, !6, i64 8, !7, i64 16, !7, i64 17, !6, i64 24}
!32 = distinct !{!32, !23}
!33 = !{!12, !6, i64 768}
!34 = !{!12, !6, i64 480}
!35 = !{!12, !6, i64 488}
!36 = !{!31, !6, i64 24}
!37 = !{!38, !6, i64 64}
!38 = !{!"Sqlite3Config", !10, i64 0, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !7, i64 8, !7, i64 9, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !39, i64 32, !40, i64 96, !41, i64 168, !6, i64 272, !10, i64 280, !10, i64 284, !10, i64 288, !13, i64 296, !13, i64 304, !6, i64 312, !10, i64 320, !10, i64 324, !10, i64 328, !10, i64 332, !10, i64 336, !10, i64 340, !10, i64 344, !10, i64 348, !10, i64 352, !10, i64 356, !10, i64 360, !6, i64 368, !6, i64 376, !6, i64 384, !13, i64 392, !6, i64 400, !10, i64 408, !6, i64 416, !10, i64 424, !10, i64 428, !10, i64 432}
!39 = !{!"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}
!40 = !{!"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}
!41 = !{!"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}
!42 = !{!43, !10, i64 12}
!43 = !{!"Schema", !10, i64 0, !10, i64 4, !17, i64 8, !17, i64 32, !17, i64 56, !17, i64 80, !6, i64 104, !7, i64 112, !7, i64 113, !16, i64 114, !10, i64 116}
!44 = !{!43, !10, i64 60}
!45 = !{!43, !10, i64 36}
!46 = !{!43, !10, i64 84}
!47 = !{!43, !6, i64 24}
!48 = !{!43, !6, i64 72}
!49 = !{!43, !6, i64 48}
!50 = !{!43, !6, i64 96}
!51 = !{!43, !6, i64 64}
!52 = !{!53, !6, i64 16}
!53 = !{!"HashElem", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!54 = !{!53, !6, i64 0}
!55 = distinct !{!55, !23}
!56 = !{!43, !6, i64 16}
!57 = distinct !{!57, !23}
!58 = distinct !{!58, !23}
!59 = !{!12, !6, i64 496}
!60 = !{!12, !6, i64 8}
!61 = !{!62, !6, i64 16}
!62 = !{!"Vdbe", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !16, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !13, i64 56, !10, i64 64, !13, i64 72, !13, i64 80, !13, i64 88, !13, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !10, i64 144, !10, i64 148, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !13, i64 184, !16, i64 192, !7, i64 194, !7, i64 195, !7, i64 196, !7, i64 197, !10, i64 198, !10, i64 198, !10, i64 198, !10, i64 198, !10, i64 198, !10, i64 198, !10, i64 200, !10, i64 204, !7, i64 208, !6, i64 248, !6, i64 256, !6, i64 264, !6, i64 272, !10, i64 280, !10, i64 284, !6, i64 288, !6, i64 296}
!63 = distinct !{!63, !23}
!64 = distinct !{!64, !23}
!65 = !{!12, !13, i64 760}
!66 = !{!12, !13, i64 752}


; 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, i8, i8, i8, i8, i8, i8, 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, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, i64, ptr, i32, ptr, i32, 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 hidden local_unnamed_addr global %struct.Sqlite3Config, align 8

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

; Function Attrs: nounwind uwtable
declare dso_local void @sqlite3_mutex_enter(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local void @sqlite3_mutex_leave(ptr noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @sqlite3_db_status(ptr noundef %0, i32 noundef %1, ptr nocapture noundef writeonly %2, ptr noundef %3, i32 noundef %4) local_unnamed_addr #1 {
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = getelementptr inbounds i8, ptr %0, i64 24
  %10 = load ptr, ptr %9, align 8, !tbaa !5
  tail call void @sqlite3_mutex_enter(ptr noundef %10)
  switch i32 %1, label %171 [
    i32 0, label %11
    i32 4, label %27
    i32 5, label %27
    i32 6, label %27
    i32 11, label %34
    i32 1, label %34
    i32 2, label %66
    i32 3, label %132
    i32 12, label %142
    i32 7, label %143
    i32 8, label %143
    i32 9, label %143
    i32 10, label %160
  ]

11:                                               ; preds = %5
  %12 = tail call i32 @sqlite3LookasideUsed(ptr noundef nonnull %0, ptr noundef %3)
  store i32 %12, ptr %2, align 4, !tbaa !17
  %.not136 = icmp eq i32 %4, 0
  br i1 %.not136, label %171, label %13

13:                                               ; preds = %11
  %14 = getelementptr inbounds i8, ptr %0, i64 448
  %15 = load ptr, ptr %14, align 8, !tbaa !18
  %.not137 = icmp eq ptr %15, null
  br i1 %.not137, label %20, label %.preheader141

.preheader141:                                    ; preds = %13, %.preheader141
  %.0118 = phi ptr [ %16, %.preheader141 ], [ %15, %13 ]
  %16 = load ptr, ptr %.0118, align 8, !tbaa !19
  %.not138 = icmp eq ptr %16, null
  br i1 %.not138, label %17, label %.preheader141, !llvm.loop !21

17:                                               ; preds = %.preheader141
  %18 = getelementptr inbounds i8, ptr %0, i64 440
  %19 = load ptr, ptr %18, align 8, !tbaa !23
  store ptr %19, ptr %.0118, align 8, !tbaa !19
  store ptr %15, ptr %18, align 8, !tbaa !23
  store ptr null, ptr %14, align 8, !tbaa !18
  br label %20

20:                                               ; preds = %17, %13
  %21 = getelementptr inbounds i8, ptr %0, i64 464
  %22 = load ptr, ptr %21, align 8, !tbaa !24
  %.not139 = icmp eq ptr %22, null
  br i1 %.not139, label %171, label %.preheader

.preheader:                                       ; preds = %20, %.preheader
  %.1119 = phi ptr [ %23, %.preheader ], [ %22, %20 ]
  %23 = load ptr, ptr %.1119, align 8, !tbaa !19
  %.not140 = icmp eq ptr %23, null
  br i1 %.not140, label %24, label %.preheader, !llvm.loop !25

24:                                               ; preds = %.preheader
  %25 = getelementptr inbounds i8, ptr %0, i64 456
  %26 = load ptr, ptr %25, align 8, !tbaa !26
  store ptr %26, ptr %.1119, align 8, !tbaa !19
  store ptr %22, ptr %25, align 8, !tbaa !26
  store ptr null, ptr %21, align 8, !tbaa !24
  br label %171

27:                                               ; preds = %5, %5, %5
  store i32 0, ptr %2, align 4, !tbaa !17
  %28 = getelementptr inbounds i8, ptr %0, i64 424
  %29 = add nsw i32 %1, -4
  %30 = zext nneg i32 %29 to i64
  %31 = getelementptr inbounds [3 x i32], ptr %28, i64 0, i64 %30
  %32 = load i32, ptr %31, align 4, !tbaa !17
  store i32 %32, ptr %3, align 4, !tbaa !17
  %.not135 = icmp eq i32 %4, 0
  br i1 %.not135, label %171, label %33

33:                                               ; preds = %27
  store i32 0, ptr %31, align 4, !tbaa !17
  br label %171

34:                                               ; preds = %5, %5
  tail call void @sqlite3BtreeEnterAll(ptr noundef nonnull %0)
  %35 = getelementptr inbounds i8, ptr %0, i64 40
  %36 = load i32, ptr %35, align 8, !tbaa !27
  %37 = icmp sgt i32 %36, 0
  br i1 %37, label %.lr.ph167, label %._crit_edge168

.lr.ph167:                                        ; preds = %34
  %38 = getelementptr inbounds i8, ptr %0, i64 32
  %39 = icmp eq i32 %1, 11
  br i1 %39, label %.lr.ph167.split.us, label %.lr.ph167.split

.lr.ph167.split.us:                               ; preds = %.lr.ph167, %50
  %40 = phi i32 [ %51, %50 ], [ %36, %.lr.ph167 ]
  %indvars.iv177 = phi i64 [ %indvars.iv.next178, %50 ], [ 0, %.lr.ph167 ]
  %.0120165.us = phi i32 [ %.1121.us, %50 ], [ 0, %.lr.ph167 ]
  %41 = load ptr, ptr %38, align 8, !tbaa !28
  %42 = getelementptr inbounds %struct.Db, ptr %41, i64 %indvars.iv177, i32 1
  %43 = load ptr, ptr %42, align 8, !tbaa !29
  %.not134.us = icmp eq ptr %43, null
  br i1 %.not134.us, label %50, label %44

44:                                               ; preds = %.lr.ph167.split.us
  %45 = tail call ptr @sqlite3BtreePager(ptr noundef nonnull %43)
  %46 = tail call i32 @sqlite3PagerMemUsed(ptr noundef %45)
  %47 = tail call i32 @sqlite3BtreeConnectionCount(ptr noundef nonnull %43)
  %48 = sdiv i32 %46, %47
  %49 = add nsw i32 %48, %.0120165.us
  %.pre183 = load i32, ptr %35, align 8, !tbaa !27
  br label %50

50:                                               ; preds = %44, %.lr.ph167.split.us
  %51 = phi i32 [ %.pre183, %44 ], [ %40, %.lr.ph167.split.us ]
  %.1121.us = phi i32 [ %49, %44 ], [ %.0120165.us, %.lr.ph167.split.us ]
  %indvars.iv.next178 = add nuw nsw i64 %indvars.iv177, 1
  %52 = sext i32 %51 to i64
  %53 = icmp slt i64 %indvars.iv.next178, %52
  br i1 %53, label %.lr.ph167.split.us, label %._crit_edge168, !llvm.loop !31

.lr.ph167.split:                                  ; preds = %.lr.ph167, %62
  %54 = phi i32 [ %63, %62 ], [ %36, %.lr.ph167 ]
  %indvars.iv174 = phi i64 [ %indvars.iv.next175, %62 ], [ 0, %.lr.ph167 ]
  %.0120165 = phi i32 [ %.1121, %62 ], [ 0, %.lr.ph167 ]
  %55 = load ptr, ptr %38, align 8, !tbaa !28
  %56 = getelementptr inbounds %struct.Db, ptr %55, i64 %indvars.iv174, i32 1
  %57 = load ptr, ptr %56, align 8, !tbaa !29
  %.not134 = icmp eq ptr %57, null
  br i1 %.not134, label %62, label %58

58:                                               ; preds = %.lr.ph167.split
  %59 = tail call ptr @sqlite3BtreePager(ptr noundef nonnull %57)
  %60 = tail call i32 @sqlite3PagerMemUsed(ptr noundef %59)
  %61 = add nsw i32 %60, %.0120165
  %.pre182 = load i32, ptr %35, align 8, !tbaa !27
  br label %62

62:                                               ; preds = %58, %.lr.ph167.split
  %63 = phi i32 [ %.pre182, %58 ], [ %54, %.lr.ph167.split ]
  %.1121 = phi i32 [ %61, %58 ], [ %.0120165, %.lr.ph167.split ]
  %indvars.iv.next175 = add nuw nsw i64 %indvars.iv174, 1
  %64 = sext i32 %63 to i64
  %65 = icmp slt i64 %indvars.iv.next175, %64
  br i1 %65, label %.lr.ph167.split, label %._crit_edge168, !llvm.loop !31

._crit_edge168:                                   ; preds = %62, %50, %34
  %.0120.lcssa = phi i32 [ 0, %34 ], [ %.1121.us, %50 ], [ %.1121, %62 ]
  tail call void @sqlite3BtreeLeaveAll(ptr noundef nonnull %0)
  store i32 %.0120.lcssa, ptr %2, align 4, !tbaa !17
  store i32 0, ptr %3, align 4, !tbaa !17
  br label %171

66:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #2
  store i32 0, ptr %6, align 4, !tbaa !17
  tail call void @sqlite3BtreeEnterAll(ptr noundef nonnull %0)
  %67 = getelementptr inbounds i8, ptr %0, i64 768
  store ptr %6, ptr %67, align 8, !tbaa !32
  %68 = getelementptr inbounds i8, ptr %0, i64 480
  %69 = load ptr, ptr %68, align 8, !tbaa !33
  %70 = getelementptr inbounds i8, ptr %0, i64 488
  store ptr %69, ptr %70, align 8, !tbaa !34
  %71 = getelementptr inbounds i8, ptr %0, i64 40
  %72 = load i32, ptr %71, align 8, !tbaa !27
  %73 = icmp sgt i32 %72, 0
  br i1 %73, label %.lr.ph162, label %._crit_edge163

.lr.ph162:                                        ; preds = %66
  %74 = getelementptr inbounds i8, ptr %0, i64 32
  br label %75

75:                                               ; preds = %.lr.ph162, %.loopexit
  %indvars.iv171 = phi i64 [ 0, %.lr.ph162 ], [ %indvars.iv.next172, %.loopexit ]
  %76 = load ptr, ptr %74, align 8, !tbaa !28
  %77 = getelementptr inbounds %struct.Db, ptr %76, i64 %indvars.iv171, i32 4
  %78 = load ptr, ptr %77, align 8, !tbaa !35
  %.not131 = icmp eq ptr %78, null
  br i1 %.not131, label %.loopexit, label %79

79:                                               ; preds = %75
  %80 = load ptr, ptr getelementptr inbounds (i8, ptr @sqlite3Config, i64 64), align 8, !tbaa !36
  %81 = call i32 %80(i32 noundef 32) #2
  %82 = getelementptr inbounds i8, ptr %78, i64 12
  %83 = load i32, ptr %82, align 4, !tbaa !41
  %84 = getelementptr inbounds i8, ptr %78, i64 60
  %85 = load i32, ptr %84, align 4, !tbaa !43
  %86 = add i32 %85, %83
  %87 = getelementptr inbounds i8, ptr %78, i64 36
  %88 = load i32, ptr %87, align 4, !tbaa !44
  %89 = add i32 %86, %88
  %90 = getelementptr inbounds i8, ptr %78, i64 84
  %91 = load i32, ptr %90, align 4, !tbaa !45
  %92 = add i32 %89, %91
  %93 = mul i32 %92, %81
  %94 = load i32, ptr %6, align 4, !tbaa !17
  %95 = add i32 %93, %94
  store i32 %95, ptr %6, align 4, !tbaa !17
  %96 = getelementptr inbounds i8, ptr %78, i64 24
  %97 = load ptr, ptr %96, align 8, !tbaa !46
  %98 = call i64 @sqlite3_msize(ptr noundef %97)
  %99 = load i32, ptr %6, align 4, !tbaa !17
  %100 = trunc i64 %98 to i32
  %101 = add i32 %99, %100
  store i32 %101, ptr %6, align 4, !tbaa !17
  %102 = getelementptr inbounds i8, ptr %78, i64 72
  %103 = load ptr, ptr %102, align 8, !tbaa !47
  %104 = call i64 @sqlite3_msize(ptr noundef %103)
  %105 = load i32, ptr %6, align 4, !tbaa !17
  %106 = trunc i64 %104 to i32
  %107 = add i32 %105, %106
  store i32 %107, ptr %6, align 4, !tbaa !17
  %108 = getelementptr inbounds i8, ptr %78, i64 48
  %109 = load ptr, ptr %108, align 8, !tbaa !48
  %110 = call i64 @sqlite3_msize(ptr noundef %109)
  %111 = load i32, ptr %6, align 4, !tbaa !17
  %112 = trunc i64 %110 to i32
  %113 = add i32 %111, %112
  store i32 %113, ptr %6, align 4, !tbaa !17
  %114 = getelementptr inbounds i8, ptr %78, i64 96
  %115 = load ptr, ptr %114, align 8, !tbaa !49
  %116 = call i64 @sqlite3_msize(ptr noundef %115)
  %117 = load i32, ptr %6, align 4, !tbaa !17
  %118 = trunc i64 %116 to i32
  %119 = add i32 %117, %118
  store i32 %119, ptr %6, align 4, !tbaa !17
  %120 = getelementptr inbounds i8, ptr %78, i64 64
  %.0114149 = load ptr, ptr %120, align 8, !tbaa !50
  %.not132150 = icmp eq ptr %.0114149, null
  br i1 %.not132150, label %._crit_edge154, label %.lr.ph153

.lr.ph153:                                        ; preds = %79, %.lr.ph153
  %.0114151 = phi ptr [ %.0114, %.lr.ph153 ], [ %.0114149, %79 ]
  %121 = getelementptr inbounds i8, ptr %.0114151, i64 16
  %122 = load ptr, ptr %121, align 8, !tbaa !51
  call void @sqlite3DeleteTrigger(ptr noundef %0, ptr noundef %122)
  %.0114 = load ptr, ptr %.0114151, align 8, !tbaa !50
  %.not132 = icmp eq ptr %.0114, null
  br i1 %.not132, label %._crit_edge154, label %.lr.ph153, !llvm.loop !53

._crit_edge154:                                   ; preds = %.lr.ph153, %79
  %123 = getelementptr inbounds i8, ptr %78, i64 16
  %.1155 = load ptr, ptr %123, align 8, !tbaa !50
  %.not133156 = icmp eq ptr %.1155, null
  br i1 %.not133156, label %.loopexit, label %.lr.ph159

.lr.ph159:                                        ; preds = %._crit_edge154, %.lr.ph159
  %.1157 = phi ptr [ %.1, %.lr.ph159 ], [ %.1155, %._crit_edge154 ]
  %124 = getelementptr inbounds i8, ptr %.1157, i64 16
  %125 = load ptr, ptr %124, align 8, !tbaa !51
  call void @sqlite3DeleteTable(ptr noundef %0, ptr noundef %125)
  %.1 = load ptr, ptr %.1157, align 8, !tbaa !50
  %.not133 = icmp eq ptr %.1, null
  br i1 %.not133, label %.loopexit, label %.lr.ph159, !llvm.loop !54

.loopexit:                                        ; preds = %.lr.ph159, %._crit_edge154, %75
  %indvars.iv.next172 = add nuw nsw i64 %indvars.iv171, 1
  %126 = load i32, ptr %71, align 8, !tbaa !27
  %127 = sext i32 %126 to i64
  %128 = icmp slt i64 %indvars.iv.next172, %127
  br i1 %128, label %75, label %._crit_edge163, !llvm.loop !55

._crit_edge163:                                   ; preds = %.loopexit, %66
  store ptr null, ptr %67, align 8, !tbaa !32
  %129 = getelementptr inbounds i8, ptr %0, i64 496
  %130 = load ptr, ptr %129, align 8, !tbaa !56
  store ptr %130, ptr %70, align 8, !tbaa !34
  call void @sqlite3BtreeLeaveAll(ptr noundef nonnull %0)
  store i32 0, ptr %3, align 4, !tbaa !17
  %131 = load i32, ptr %6, align 4, !tbaa !17
  store i32 %131, ptr %2, align 4, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #2
  br label %171

132:                                              ; preds = %5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #2
  store i32 0, ptr %7, align 4, !tbaa !17
  %133 = getelementptr inbounds i8, ptr %0, i64 768
  store ptr %7, ptr %133, align 8, !tbaa !32
  %134 = getelementptr inbounds i8, ptr %0, i64 480
  %135 = load ptr, ptr %134, align 8, !tbaa !33
  %136 = getelementptr inbounds i8, ptr %0, i64 488
  store ptr %135, ptr %136, align 8, !tbaa !34
  %137 = getelementptr inbounds i8, ptr %0, i64 8
  %.0113143 = load ptr, ptr %137, align 8, !tbaa !50
  %.not130144 = icmp eq ptr %.0113143, null
  br i1 %.not130144, label %._crit_edge148, label %.lr.ph147

.lr.ph147:                                        ; preds = %132, %.lr.ph147
  %.0113145 = phi ptr [ %.0113, %.lr.ph147 ], [ %.0113143, %132 ]
  call void @sqlite3VdbeDelete(ptr noundef nonnull %.0113145)
  %138 = getelementptr inbounds i8, ptr %.0113145, i64 16
  %.0113 = load ptr, ptr %138, align 8, !tbaa !50
  %.not130 = icmp eq ptr %.0113, null
  br i1 %.not130, label %._crit_edge148.loopexit, label %.lr.ph147, !llvm.loop !57

._crit_edge148.loopexit:                          ; preds = %.lr.ph147
  %.pre181 = load i32, ptr %7, align 4, !tbaa !17
  br label %._crit_edge148

._crit_edge148:                                   ; preds = %._crit_edge148.loopexit, %132
  %139 = phi i32 [ %.pre181, %._crit_edge148.loopexit ], [ 0, %132 ]
  %140 = getelementptr inbounds i8, ptr %0, i64 496
  %141 = load ptr, ptr %140, align 8, !tbaa !56
  store ptr %141, ptr %136, align 8, !tbaa !34
  store ptr null, ptr %133, align 8, !tbaa !32
  store i32 0, ptr %3, align 4, !tbaa !17
  store i32 %139, ptr %2, align 4, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #2
  br label %171

142:                                              ; preds = %5
  br label %143

143:                                              ; preds = %142, %5, %5, %5
  %.0 = phi i32 [ %1, %5 ], [ %1, %5 ], [ %1, %5 ], [ 10, %142 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #2
  store i32 0, ptr %8, align 4, !tbaa !17
  %144 = getelementptr inbounds i8, ptr %0, i64 40
  %145 = load i32, ptr %144, align 8, !tbaa !27
  %146 = icmp sgt i32 %145, 0
  br i1 %146, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %143
  %147 = getelementptr inbounds i8, ptr %0, i64 32
  br label %148

148:                                              ; preds = %.lr.ph, %155
  %149 = phi i32 [ %145, %.lr.ph ], [ %156, %155 ]
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %155 ]
  %150 = load ptr, ptr %147, align 8, !tbaa !28
  %151 = getelementptr inbounds %struct.Db, ptr %150, i64 %indvars.iv, i32 1
  %152 = load ptr, ptr %151, align 8, !tbaa !29
  %.not = icmp eq ptr %152, null
  br i1 %.not, label %155, label %153

153:                                              ; preds = %148
  %154 = call ptr @sqlite3BtreePager(ptr noundef nonnull %152)
  call void @sqlite3PagerCacheStat(ptr noundef %154, i32 noundef %.0, i32 noundef %4, ptr noundef nonnull %8)
  %.pre = load i32, ptr %144, align 8, !tbaa !27
  br label %155

155:                                              ; preds = %148, %153
  %156 = phi i32 [ %149, %148 ], [ %.pre, %153 ]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %157 = sext i32 %156 to i64
  %158 = icmp slt i64 %indvars.iv.next, %157
  br i1 %158, label %148, label %._crit_edge.loopexit, !llvm.loop !58

._crit_edge.loopexit:                             ; preds = %155
  %.pre180 = load i32, ptr %8, align 4, !tbaa !17
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %143
  %159 = phi i32 [ %.pre180, %._crit_edge.loopexit ], [ 0, %143 ]
  store i32 0, ptr %3, align 4, !tbaa !17
  store i32 %159, ptr %2, align 4, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #2
  br label %171

160:                                              ; preds = %5
  store i32 0, ptr %3, align 4, !tbaa !17
  %161 = getelementptr inbounds i8, ptr %0, i64 760
  %162 = load i64, ptr %161, align 8, !tbaa !59
  %163 = icmp sgt i64 %162, 0
  br i1 %163, label %169, label %164

164:                                              ; preds = %160
  %165 = getelementptr inbounds i8, ptr %0, i64 752
  %166 = load i64, ptr %165, align 8, !tbaa !60
  %167 = icmp sgt i64 %166, 0
  %168 = zext i1 %167 to i32
  br label %169

169:                                              ; preds = %164, %160
  %170 = phi i32 [ 1, %160 ], [ %168, %164 ]
  store i32 %170, ptr %2, align 4, !tbaa !17
  br label %171

171:                                              ; preds = %5, %20, %24, %27, %33, %11, %169, %._crit_edge, %._crit_edge148, %._crit_edge163, %._crit_edge168
  %.0115 = phi i32 [ 0, %169 ], [ 0, %._crit_edge ], [ 0, %._crit_edge148 ], [ 0, %._crit_edge163 ], [ 0, %._crit_edge168 ], [ 0, %33 ], [ 0, %27 ], [ 0, %11 ], [ 0, %24 ], [ 0, %20 ], [ 1, %5 ]
  %172 = load ptr, ptr %9, align 8, !tbaa !5
  call void @sqlite3_mutex_leave(ptr noundef %172)
  ret i32 %.0115
}

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

; Function Attrs: nounwind uwtable
declare hidden void @sqlite3BtreeEnterAll(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden ptr @sqlite3BtreePager(ptr noundef) local_unnamed_addr #1

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

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

; Function Attrs: nounwind uwtable
declare hidden void @sqlite3BtreeLeaveAll(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local i64 @sqlite3_msize(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden void @sqlite3DeleteTrigger(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden void @sqlite3DeleteTable(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare hidden void @sqlite3VdbeDelete(ptr noundef) local_unnamed_addr #1

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 24}
!6 = !{!"sqlite3", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !10, i64 40, !10, i64 44, !11, i64 48, !11, i64 56, !11, i64 64, !10, i64 72, !10, i64 76, !10, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !10, i64 96, !8, i64 100, !8, i64 101, !8, i64 102, !8, i64 103, !8, i64 104, !8, i64 105, !8, i64 106, !8, i64 107, !8, i64 108, !8, i64 109, !8, i64 110, !8, i64 111, !8, i64 112, !8, i64 113, !10, i64 116, !11, i64 120, !11, i64 128, !8, i64 136, !10, i64 184, !12, i64 192, !10, i64 208, !10, i64 212, !10, i64 216, !10, i64 220, !10, i64 224, !10, i64 228, !7, i64 232, !8, i64 240, !7, i64 248, !7, i64 256, !7, i64 264, !7, i64 272, !7, i64 280, !7, i64 288, !7, i64 296, !7, i64 304, !7, i64 312, !7, i64 320, !7, i64 328, !7, i64 336, !7, i64 344, !7, i64 352, !7, i64 360, !7, i64 368, !7, i64 376, !7, i64 384, !7, i64 392, !8, i64 400, !13, i64 408, !7, i64 504, !7, i64 512, !7, i64 520, !7, i64 528, !10, i64 536, !10, i64 540, !15, i64 544, !7, i64 568, !7, i64 576, !7, i64 584, !15, i64 592, !15, i64 616, !16, i64 640, !8, i64 664, !7, i64 728, !10, i64 736, !10, i64 740, !10, i64 744, !10, i64 748, !11, i64 752, !11, i64 760, !7, i64 768}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"long long", !8, i64 0}
!12 = !{!"sqlite3InitInfo", !10, i64 0, !8, i64 4, !8, i64 5, !10, i64 6, !10, i64 6, !10, i64 6, !7, i64 8}
!13 = !{!"Lookaside", !10, i64 0, !14, i64 4, !14, i64 6, !8, i64 8, !10, i64 12, !8, i64 16, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88}
!14 = !{!"short", !8, i64 0}
!15 = !{!"Hash", !10, i64 0, !10, i64 4, !7, i64 8, !7, i64 16}
!16 = !{!"BusyHandler", !7, i64 0, !7, i64 8, !10, i64 16}
!17 = !{!10, !10, i64 0}
!18 = !{!6, !7, i64 448}
!19 = !{!20, !7, i64 0}
!20 = !{!"LookasideSlot", !7, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}
!23 = !{!6, !7, i64 440}
!24 = !{!6, !7, i64 464}
!25 = distinct !{!25, !22}
!26 = !{!6, !7, i64 456}
!27 = !{!6, !10, i64 40}
!28 = !{!6, !7, i64 32}
!29 = !{!30, !7, i64 8}
!30 = !{!"Db", !7, i64 0, !7, i64 8, !8, i64 16, !8, i64 17, !7, i64 24}
!31 = distinct !{!31, !22}
!32 = !{!6, !7, i64 768}
!33 = !{!6, !7, i64 480}
!34 = !{!6, !7, i64 488}
!35 = !{!30, !7, i64 24}
!36 = !{!37, !7, i64 64}
!37 = !{!"Sqlite3Config", !10, i64 0, !8, i64 4, !8, i64 5, !8, i64 6, !8, i64 7, !8, i64 8, !8, i64 9, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !38, i64 32, !39, i64 96, !40, i64 168, !7, i64 272, !10, i64 280, !10, i64 284, !10, i64 288, !11, i64 296, !11, i64 304, !7, i64 312, !10, i64 320, !10, i64 324, !10, i64 328, !10, i64 332, !10, i64 336, !10, i64 340, !10, i64 344, !10, i64 348, !10, i64 352, !10, i64 356, !10, i64 360, !7, i64 368, !7, i64 376, !7, i64 384, !11, i64 392, !7, i64 400, !10, i64 408, !7, i64 416, !10, i64 424, !10, i64 428, !10, i64 432}
!38 = !{!"sqlite3_mem_methods", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56}
!39 = !{!"sqlite3_mutex_methods", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64}
!40 = !{!"sqlite3_pcache_methods2", !10, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96}
!41 = !{!42, !10, i64 12}
!42 = !{!"Schema", !10, i64 0, !10, i64 4, !15, i64 8, !15, i64 32, !15, i64 56, !15, i64 80, !7, i64 104, !8, i64 112, !8, i64 113, !14, i64 114, !10, i64 116}
!43 = !{!42, !10, i64 60}
!44 = !{!42, !10, i64 36}
!45 = !{!42, !10, i64 84}
!46 = !{!42, !7, i64 24}
!47 = !{!42, !7, i64 72}
!48 = !{!42, !7, i64 48}
!49 = !{!42, !7, i64 96}
!50 = !{!7, !7, i64 0}
!51 = !{!52, !7, i64 16}
!52 = !{!"HashElem", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24}
!53 = distinct !{!53, !22}
!54 = distinct !{!54, !22}
!55 = distinct !{!55, !22}
!56 = !{!6, !7, i64 496}
!57 = distinct !{!57, !22}
!58 = distinct !{!58, !22}
!59 = !{!6, !11, i64 760}
!60 = !{!6, !11, i64 752}


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