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

; 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.Parse = type { ptr, ptr, ptr, i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, %struct.Token, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i8, i8, i8, [10 x %struct.yColCache], [8 x i32], %struct.Token, %struct.Token, i16, i8, i8, i8, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, %struct.Token, ptr, ptr, ptr, ptr, ptr }
%struct.yColCache = type { i32, i16, i8, i32, i32, i32 }
%struct.Token = type { ptr, i32 }
%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.AutoincInfo = type { ptr, ptr, i32, i32 }
%struct.Table = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, i16, i16, i16, i16, i8, i32, i32, ptr, ptr, ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [27 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1

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

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

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

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

29:                                               ; preds = %3
  %30 = load ptr, ptr %13, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.sqlite3, ptr %30, i32 0, i32 57
  store volatile i32 0, ptr %31, align 8, !tbaa !22
  br label %32

32:                                               ; preds = %29, %3
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.Parse, ptr %33, i32 0, i32 3
  store i32 0, ptr %34, align 8, !tbaa !23
  %35 = load ptr, ptr %6, align 8, !tbaa !5
  %36 = load ptr, ptr %5, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.Parse, ptr %36, i32 0, i32 60
  store ptr %35, ptr %37, align 8, !tbaa !24
  %38 = call ptr @sqlite3ParserAlloc(ptr noundef @sqlite3Malloc)
  store ptr %38, ptr %9, align 8, !tbaa !5
  %39 = load ptr, ptr %9, align 8, !tbaa !5
  %40 = icmp eq ptr %39, null
  br i1 %40, label %41, label %43

41:                                               ; preds = %32
  %42 = load ptr, ptr %13, align 8, !tbaa !5
  call void @sqlite3OomFault(ptr noundef %42)
  store i32 7, ptr %4, align 4
  store i32 1, ptr %15, align 4
  br label %297

43:                                               ; preds = %32
  br label %44

44:                                               ; preds = %137, %43
  br label %45

45:                                               ; preds = %44
  %46 = load ptr, ptr %6, align 8, !tbaa !5
  %47 = getelementptr inbounds i8, ptr %46, i64 0
  %48 = load i8, ptr %47, align 1, !tbaa !22
  %49 = sext i8 %48 to i32
  %50 = icmp ne i32 %49, 0
  br i1 %50, label %51, label %63

51:                                               ; preds = %45
  %52 = load ptr, ptr %6, align 8, !tbaa !5
  %53 = call i32 @sqlite3GetToken(ptr noundef %52, ptr noundef %11)
  store i32 %53, ptr %10, align 4, !tbaa !9
  %54 = load i32, ptr %10, align 4, !tbaa !9
  %55 = load i32, ptr %14, align 4, !tbaa !9
  %56 = sub nsw i32 %55, %54
  store i32 %56, ptr %14, align 4, !tbaa !9
  %57 = load i32, ptr %14, align 4, !tbaa !9
  %58 = icmp slt i32 %57, 0
  br i1 %58, label %59, label %62

59:                                               ; preds = %51
  %60 = load ptr, ptr %5, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.Parse, ptr %60, i32 0, i32 3
  store i32 18, ptr %61, align 8, !tbaa !23
  br label %138

62:                                               ; preds = %51
  br label %79

63:                                               ; preds = %45
  %64 = load i32, ptr %12, align 4, !tbaa !9
  %65 = icmp eq i32 %64, 1
  br i1 %65, label %66, label %67

66:                                               ; preds = %63
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %73

67:                                               ; preds = %63
  %68 = load i32, ptr %12, align 4, !tbaa !9
  %69 = icmp eq i32 %68, 0
  br i1 %69, label %70, label %71

70:                                               ; preds = %67
  br label %138

71:                                               ; preds = %67
  store i32 1, ptr %11, align 4, !tbaa !9
  br label %72

72:                                               ; preds = %71
  br label %73

73:                                               ; preds = %72, %66
  %74 = load i32, ptr %10, align 4, !tbaa !9
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = sext i32 %74 to i64
  %77 = sub i64 0, %76
  %78 = getelementptr inbounds i8, ptr %75, i64 %77
  store ptr %78, ptr %6, align 8, !tbaa !5
  br label %79

79:                                               ; preds = %73, %62
  %80 = load i32, ptr %11, align 4, !tbaa !9
  %81 = icmp sge i32 %80, 162
  br i1 %81, label %82, label %102

82:                                               ; preds = %79
  %83 = load ptr, ptr %13, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.sqlite3, ptr %83, i32 0, i32 57
  %85 = load volatile i32, ptr %84, align 8, !tbaa !22
  %86 = icmp ne i32 %85, 0
  br i1 %86, label %87, label %90

87:                                               ; preds = %82
  %88 = load ptr, ptr %5, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.Parse, ptr %88, i32 0, i32 3
  store i32 9, ptr %89, align 8, !tbaa !23
  br label %138

90:                                               ; preds = %82
  %91 = load i32, ptr %11, align 4, !tbaa !9
  %92 = icmp eq i32 %91, 163
  br i1 %92, label %93, label %97

93:                                               ; preds = %90
  %94 = load ptr, ptr %5, align 8, !tbaa !5
  %95 = load i32, ptr %10, align 4, !tbaa !9
  %96 = load ptr, ptr %6, align 8, !tbaa !5
  call void (ptr, ptr, ...) @sqlite3ErrorMsg(ptr noundef %94, ptr noundef @.str, i32 noundef %95, ptr noundef %96)
  br label %138

97:                                               ; preds = %90
  %98 = load i32, ptr %10, align 4, !tbaa !9
  %99 = load ptr, ptr %6, align 8, !tbaa !5
  %100 = sext i32 %98 to i64
  %101 = getelementptr inbounds i8, ptr %99, i64 %100
  store ptr %101, ptr %6, align 8, !tbaa !5
  br label %137

102:                                              ; preds = %79
  %103 = load ptr, ptr %6, align 8, !tbaa !5
  %104 = load ptr, ptr %5, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.Parse, ptr %104, i32 0, i32 49
  %106 = getelementptr inbounds %struct.Token, ptr %105, i32 0, i32 0
  store ptr %103, ptr %106, align 8, !tbaa !25
  %107 = load i32, ptr %10, align 4, !tbaa !9
  %108 = load ptr, ptr %5, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.Parse, ptr %108, i32 0, i32 49
  %110 = getelementptr inbounds %struct.Token, ptr %109, i32 0, i32 1
  store i32 %107, ptr %110, align 8, !tbaa !26
  %111 = load ptr, ptr %9, align 8, !tbaa !5
  %112 = load i32, ptr %11, align 4, !tbaa !9
  %113 = load ptr, ptr %5, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.Parse, ptr %113, i32 0, i32 49
  %115 = load ptr, ptr %5, align 8, !tbaa !5
  %116 = getelementptr inbounds { ptr, i32 }, ptr %114, i32 0, i32 0
  %117 = load ptr, ptr %116, align 8
  %118 = getelementptr inbounds { ptr, i32 }, ptr %114, i32 0, i32 1
  %119 = load i32, ptr %118, align 8
  call void @sqlite3Parser(ptr noundef %111, i32 noundef %112, ptr %117, i32 %119, ptr noundef %115)
  %120 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %120, ptr %12, align 4, !tbaa !9
  %121 = load i32, ptr %10, align 4, !tbaa !9
  %122 = load ptr, ptr %6, align 8, !tbaa !5
  %123 = sext i32 %121 to i64
  %124 = getelementptr inbounds i8, ptr %122, i64 %123
  store ptr %124, ptr %6, align 8, !tbaa !5
  %125 = load ptr, ptr %5, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.Parse, ptr %125, i32 0, i32 3
  %127 = load i32, ptr %126, align 8, !tbaa !23
  %128 = icmp ne i32 %127, 0
  br i1 %128, label %135, label %129

129:                                              ; preds = %102
  %130 = load ptr, ptr %13, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.sqlite3, ptr %130, i32 0, i32 17
  %132 = load i8, ptr %131, align 1, !tbaa !27
  %133 = zext i8 %132 to i32
  %134 = icmp ne i32 %133, 0
  br i1 %134, label %135, label %136

135:                                              ; preds = %129, %102
  br label %138

136:                                              ; preds = %129
  br label %137

137:                                              ; preds = %136, %97
  br label %44

138:                                              ; preds = %135, %93, %87, %70, %59
  %139 = load ptr, ptr %6, align 8, !tbaa !5
  %140 = load ptr, ptr %5, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.Parse, ptr %140, i32 0, i32 60
  store ptr %139, ptr %141, align 8, !tbaa !24
  %142 = load ptr, ptr %9, align 8, !tbaa !5
  call void @sqlite3ParserFree(ptr noundef %142, ptr noundef @sqlite3_free)
  %143 = load ptr, ptr %13, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.sqlite3, ptr %143, i32 0, i32 17
  %145 = load i8, ptr %144, align 1, !tbaa !27
  %146 = icmp ne i8 %145, 0
  br i1 %146, label %147, label %150

147:                                              ; preds = %138
  %148 = load ptr, ptr %5, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.Parse, ptr %148, i32 0, i32 3
  store i32 7, ptr %149, align 8, !tbaa !23
  br label %150

150:                                              ; preds = %147, %138
  %151 = load ptr, ptr %5, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.Parse, ptr %151, i32 0, i32 3
  %153 = load i32, ptr %152, align 8, !tbaa !23
  %154 = icmp ne i32 %153, 0
  br i1 %154, label %155, label %174

155:                                              ; preds = %150
  %156 = load ptr, ptr %5, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.Parse, ptr %156, i32 0, i32 3
  %158 = load i32, ptr %157, align 8, !tbaa !23
  %159 = icmp ne i32 %158, 101
  br i1 %159, label %160, label %174

160:                                              ; preds = %155
  %161 = load ptr, ptr %5, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.Parse, ptr %161, i32 0, i32 1
  %163 = load ptr, ptr %162, align 8, !tbaa !28
  %164 = icmp eq ptr %163, null
  br i1 %164, label %165, label %174

165:                                              ; preds = %160
  %166 = load ptr, ptr %13, align 8, !tbaa !5
  %167 = load ptr, ptr %5, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.Parse, ptr %167, i32 0, i32 3
  %169 = load i32, ptr %168, align 8, !tbaa !23
  %170 = call ptr @sqlite3ErrStr(i32 noundef %169)
  %171 = call ptr (ptr, ptr, ...) @sqlite3MPrintf(ptr noundef %166, ptr noundef @.str.1, ptr noundef %170)
  %172 = load ptr, ptr %5, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.Parse, ptr %172, i32 0, i32 1
  store ptr %171, ptr %173, align 8, !tbaa !28
  br label %174

174:                                              ; preds = %165, %160, %155, %150
  %175 = load ptr, ptr %5, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.Parse, ptr %175, i32 0, i32 1
  %177 = load ptr, ptr %176, align 8, !tbaa !28
  %178 = icmp ne ptr %177, null
  br i1 %178, label %179, label %193

179:                                              ; preds = %174
  %180 = load ptr, ptr %5, align 8, !tbaa !5
  %181 = getelementptr inbounds %struct.Parse, ptr %180, i32 0, i32 1
  %182 = load ptr, ptr %181, align 8, !tbaa !28
  %183 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %182, ptr %183, align 8, !tbaa !5
  %184 = load ptr, ptr %5, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.Parse, ptr %184, i32 0, i32 3
  %186 = load i32, ptr %185, align 8, !tbaa !23
  %187 = load ptr, ptr %7, align 8, !tbaa !5
  %188 = load ptr, ptr %187, align 8, !tbaa !5
  call void (i32, ptr, ...) @sqlite3_log(i32 noundef %186, ptr noundef @.str.1, ptr noundef %188)
  %189 = load ptr, ptr %5, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.Parse, ptr %189, i32 0, i32 1
  store ptr null, ptr %190, align 8, !tbaa !28
  %191 = load i32, ptr %8, align 4, !tbaa !9
  %192 = add nsw i32 %191, 1
  store i32 %192, ptr %8, align 4, !tbaa !9
  br label %193

193:                                              ; preds = %179, %174
  %194 = load ptr, ptr %5, align 8, !tbaa !5
  %195 = getelementptr inbounds %struct.Parse, ptr %194, i32 0, i32 2
  %196 = load ptr, ptr %195, align 8, !tbaa !29
  %197 = icmp ne ptr %196, null
  br i1 %197, label %198, label %215

198:                                              ; preds = %193
  %199 = load ptr, ptr %5, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.Parse, ptr %199, i32 0, i32 16
  %201 = load i32, ptr %200, align 8, !tbaa !30
  %202 = icmp sgt i32 %201, 0
  br i1 %202, label %203, label %215

203:                                              ; preds = %198
  %204 = load ptr, ptr %5, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.Parse, ptr %204, i32 0, i32 6
  %206 = load i8, ptr %205, align 2, !tbaa !31
  %207 = zext i8 %206 to i32
  %208 = icmp eq i32 %207, 0
  br i1 %208, label %209, label %215

209:                                              ; preds = %203
  %210 = load ptr, ptr %5, align 8, !tbaa !5
  %211 = getelementptr inbounds %struct.Parse, ptr %210, i32 0, i32 2
  %212 = load ptr, ptr %211, align 8, !tbaa !29
  call void @sqlite3VdbeDelete(ptr noundef %212)
  %213 = load ptr, ptr %5, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct.Parse, ptr %213, i32 0, i32 2
  store ptr null, ptr %214, align 8, !tbaa !29
  br label %215

215:                                              ; preds = %209, %203, %198, %193
  %216 = load ptr, ptr %5, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct.Parse, ptr %216, i32 0, i32 6
  %218 = load i8, ptr %217, align 2, !tbaa !31
  %219 = zext i8 %218 to i32
  %220 = icmp eq i32 %219, 0
  br i1 %220, label %221, label %230

221:                                              ; preds = %215
  %222 = load ptr, ptr %13, align 8, !tbaa !5
  %223 = load ptr, ptr %5, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct.Parse, ptr %223, i32 0, i32 35
  %225 = load ptr, ptr %224, align 8, !tbaa !32
  call void @sqlite3DbFree(ptr noundef %222, ptr noundef %225)
  %226 = load ptr, ptr %5, align 8, !tbaa !5
  %227 = getelementptr inbounds %struct.Parse, ptr %226, i32 0, i32 35
  store ptr null, ptr %227, align 8, !tbaa !32
  %228 = load ptr, ptr %5, align 8, !tbaa !5
  %229 = getelementptr inbounds %struct.Parse, ptr %228, i32 0, i32 34
  store i32 0, ptr %229, align 4, !tbaa !33
  br label %230

230:                                              ; preds = %221, %215
  %231 = load ptr, ptr %5, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct.Parse, ptr %231, i32 0, i32 65
  %233 = load ptr, ptr %232, align 8, !tbaa !34
  call void @sqlite3_free(ptr noundef %233)
  %234 = load ptr, ptr %5, align 8, !tbaa !5
  %235 = getelementptr inbounds %struct.Parse, ptr %234, i32 0, i32 53
  %236 = load i8, ptr %235, align 4, !tbaa !35
  %237 = icmp ne i8 %236, 0
  br i1 %237, label %243, label %238

238:                                              ; preds = %230
  %239 = load ptr, ptr %13, align 8, !tbaa !5
  %240 = load ptr, ptr %5, align 8, !tbaa !5
  %241 = getelementptr inbounds %struct.Parse, ptr %240, i32 0, i32 61
  %242 = load ptr, ptr %241, align 8, !tbaa !36
  call void @sqlite3DeleteTable(ptr noundef %239, ptr noundef %242)
  br label %243

243:                                              ; preds = %238, %230
  %244 = load ptr, ptr %5, align 8, !tbaa !5
  %245 = getelementptr inbounds %struct.Parse, ptr %244, i32 0, i32 69
  %246 = load ptr, ptr %245, align 8, !tbaa !37
  %247 = icmp ne ptr %246, null
  br i1 %247, label %248, label %253

248:                                              ; preds = %243
  %249 = load ptr, ptr %13, align 8, !tbaa !5
  %250 = load ptr, ptr %5, align 8, !tbaa !5
  %251 = getelementptr inbounds %struct.Parse, ptr %250, i32 0, i32 69
  %252 = load ptr, ptr %251, align 8, !tbaa !37
  call void @sqlite3WithDelete(ptr noundef %249, ptr noundef %252)
  br label %253

253:                                              ; preds = %248, %243
  %254 = load ptr, ptr %13, align 8, !tbaa !5
  %255 = load ptr, ptr %5, align 8, !tbaa !5
  %256 = getelementptr inbounds %struct.Parse, ptr %255, i32 0, i32 62
  %257 = load ptr, ptr %256, align 8, !tbaa !38
  call void @sqlite3DeleteTrigger(ptr noundef %254, ptr noundef %257)
  %258 = load ptr, ptr %13, align 8, !tbaa !5
  %259 = load ptr, ptr %5, align 8, !tbaa !5
  %260 = getelementptr inbounds %struct.Parse, ptr %259, i32 0, i32 58
  %261 = load ptr, ptr %260, align 8, !tbaa !39
  call void @sqlite3DbFree(ptr noundef %258, ptr noundef %261)
  br label %262

262:                                              ; preds = %267, %253
  %263 = load ptr, ptr %5, align 8, !tbaa !5
  %264 = getelementptr inbounds %struct.Parse, ptr %263, i32 0, i32 36
  %265 = load ptr, ptr %264, align 8, !tbaa !40
  %266 = icmp ne ptr %265, null
  br i1 %266, label %267, label %278

267:                                              ; preds = %262
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  %268 = load ptr, ptr %5, align 8, !tbaa !5
  %269 = getelementptr inbounds %struct.Parse, ptr %268, i32 0, i32 36
  %270 = load ptr, ptr %269, align 8, !tbaa !40
  store ptr %270, ptr %16, align 8, !tbaa !5
  %271 = load ptr, ptr %16, align 8, !tbaa !5
  %272 = getelementptr inbounds %struct.AutoincInfo, ptr %271, i32 0, i32 0
  %273 = load ptr, ptr %272, align 8, !tbaa !41
  %274 = load ptr, ptr %5, align 8, !tbaa !5
  %275 = getelementptr inbounds %struct.Parse, ptr %274, i32 0, i32 36
  store ptr %273, ptr %275, align 8, !tbaa !40
  %276 = load ptr, ptr %13, align 8, !tbaa !5
  %277 = load ptr, ptr %16, align 8, !tbaa !5
  call void @sqlite3DbFree(ptr noundef %276, ptr noundef %277)
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  br label %262, !llvm.loop !43

278:                                              ; preds = %262
  br label %279

279:                                              ; preds = %284, %278
  %280 = load ptr, ptr %5, align 8, !tbaa !5
  %281 = getelementptr inbounds %struct.Parse, ptr %280, i32 0, i32 66
  %282 = load ptr, ptr %281, align 8, !tbaa !45
  %283 = icmp ne ptr %282, null
  br i1 %283, label %284, label %295

284:                                              ; preds = %279
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  %285 = load ptr, ptr %5, align 8, !tbaa !5
  %286 = getelementptr inbounds %struct.Parse, ptr %285, i32 0, i32 66
  %287 = load ptr, ptr %286, align 8, !tbaa !45
  store ptr %287, ptr %17, align 8, !tbaa !5
  %288 = load ptr, ptr %17, align 8, !tbaa !5
  %289 = getelementptr inbounds %struct.Table, ptr %288, i32 0, i32 21
  %290 = load ptr, ptr %289, align 8, !tbaa !46
  %291 = load ptr, ptr %5, align 8, !tbaa !5
  %292 = getelementptr inbounds %struct.Parse, ptr %291, i32 0, i32 66
  store ptr %290, ptr %292, align 8, !tbaa !45
  %293 = load ptr, ptr %13, align 8, !tbaa !5
  %294 = load ptr, ptr %17, align 8, !tbaa !5
  call void @sqlite3DeleteTable(ptr noundef %293, ptr noundef %294)
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  br label %279, !llvm.loop !48

295:                                              ; preds = %279
  %296 = load i32, ptr %8, align 4, !tbaa !9
  store i32 %296, ptr %4, align 4
  store i32 1, ptr %15, align 4
  br label %297

297:                                              ; preds = %295, %41
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  %298 = load i32, ptr %4, align 4
  ret i32 %298
}

declare ptr @sqlite3ParserAlloc(ptr noundef) #2

declare ptr @sqlite3Malloc(i64 noundef) #2

declare void @sqlite3OomFault(ptr noundef) #2

declare void @sqlite3ErrorMsg(ptr noundef, ptr noundef, ...) #2

declare void @sqlite3Parser(ptr noundef, i32 noundef, ptr, i32, ptr noundef) #2

declare void @sqlite3ParserFree(ptr noundef, ptr noundef) #2

declare void @sqlite3_free(ptr noundef) #2

declare ptr @sqlite3MPrintf(ptr noundef, ptr noundef, ...) #2

declare ptr @sqlite3ErrStr(i32 noundef) #2

declare void @sqlite3_log(i32 noundef, ptr noundef, ...) #2

declare void @sqlite3VdbeDelete(ptr noundef) #2

declare void @sqlite3DbFree(ptr noundef, ptr noundef) #2

declare void @sqlite3DeleteTable(ptr noundef, ptr noundef) #2

declare void @sqlite3WithDelete(ptr noundef, ptr noundef) #2

declare void @sqlite3DeleteTrigger(ptr noundef, ptr noundef) #2

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 = { "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 }

!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 0}
!12 = !{!"Parse", !6, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !7, i64 28, !7, i64 29, !7, i64 30, !7, i64 31, !7, i64 32, !7, i64 33, !7, i64 34, !7, i64 35, !7, i64 36, !7, i64 37, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !10, i64 80, !10, i64 84, !6, i64 88, !6, i64 96, !13, i64 104, !10, i64 120, !10, i64 124, !10, i64 128, !10, i64 132, !10, i64 136, !10, i64 140, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !10, i64 176, !10, i64 180, !10, i64 184, !10, i64 188, !7, i64 192, !7, i64 193, !7, i64 194, !7, i64 196, !7, i64 396, !13, i64 432, !13, i64 448, !14, i64 464, !7, i64 466, !7, i64 467, !7, i64 468, !10, i64 472, !10, i64 476, !10, i64 480, !10, i64 484, !6, i64 488, !6, i64 496, !6, i64 504, !6, i64 512, !6, i64 520, !6, i64 528, !13, i64 536, !6, i64 552, !6, i64 560, !6, i64 568, !6, i64 576, !6, i64 584}
!13 = !{!"Token", !6, i64 0, !10, i64 8}
!14 = !{!"short", !7, i64 0}
!15 = !{!16, !10, i64 172}
!16 = !{!"sqlite3", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !10, i64 40, !10, i64 44, !17, i64 48, !17, i64 56, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !14, 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, !18, 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, !19, i64 344, !6, i64 400, !6, i64 408, !6, i64 416, !6, i64 424, !10, i64 432, !10, i64 436, !20, i64 440, !6, i64 464, !6, i64 472, !6, i64 480, !20, i64 488, !20, i64 512, !21, i64 536, !7, i64 560, !6, i64 624, !10, i64 632, !10, i64 636, !10, i64 640, !17, i64 648, !17, i64 656, !6, i64 664}
!17 = !{!"long long", !7, i64 0}
!18 = !{!"sqlite3InitInfo", !10, i64 0, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7}
!19 = !{!"Lookaside", !10, i64 0, !14, i64 4, !7, i64 6, !10, i64 8, !10, i64 12, !7, i64 16, !6, i64 32, !6, i64 40, !6, i64 48}
!20 = !{!"Hash", !10, i64 0, !10, i64 4, !6, i64 8, !6, i64 16}
!21 = !{!"BusyHandler", !6, i64 0, !6, i64 8, !10, i64 16}
!22 = !{!7, !7, i64 0}
!23 = !{!12, !10, i64 24}
!24 = !{!12, !6, i64 504}
!25 = !{!12, !6, i64 448}
!26 = !{!12, !10, i64 456}
!27 = !{!16, !7, i64 85}
!28 = !{!12, !6, i64 8}
!29 = !{!12, !6, i64 16}
!30 = !{!12, !10, i64 48}
!31 = !{!12, !7, i64 30}
!32 = !{!12, !6, i64 144}
!33 = !{!12, !10, i64 140}
!34 = !{!12, !6, i64 552}
!35 = !{!12, !7, i64 468}
!36 = !{!12, !6, i64 512}
!37 = !{!12, !6, i64 584}
!38 = !{!12, !6, i64 520}
!39 = !{!12, !6, i64 488}
!40 = !{!12, !6, i64 152}
!41 = !{!42, !6, i64 0}
!42 = !{!"AutoincInfo", !6, i64 0, !6, i64 8, !10, i64 16, !10, i64 20}
!43 = distinct !{!43, !44}
!44 = !{!"llvm.loop.mustprogress"}
!45 = !{!12, !6, i64 560}
!46 = !{!47, !6, i64 120}
!47 = !{!"Table", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !10, i64 56, !10, i64 60, !10, i64 64, !14, i64 68, !14, i64 70, !14, i64 72, !14, i64 74, !7, i64 76, !10, i64 80, !10, i64 84, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120}
!48 = distinct !{!48, !44}


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

@.str = external hidden unnamed_addr constant [27 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [3 x i8], align 1

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

; 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
declare dso_local i32 @sqlite3GetToken(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 8) i32 @sqlite3RunParser(ptr noundef %0, ptr noundef %1, ptr nocapture noundef writeonly %2) local_unnamed_addr #1 {
  %4 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #3
  %5 = load ptr, ptr %0, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %5, i64 116
  %7 = load i32, ptr %6, align 4, !tbaa !13
  %8 = getelementptr inbounds i8, ptr %5, i64 172
  %9 = load i32, ptr %8, align 4, !tbaa !14
  %10 = icmp eq i32 %9, 0
  br i1 %10, label %11, label %13

11:                                               ; preds = %3
  %12 = getelementptr inbounds i8, ptr %5, i64 336
  store volatile i32 0, ptr %12, align 8, !tbaa !21
  br label %13

13:                                               ; preds = %11, %3
  %14 = getelementptr inbounds i8, ptr %0, i64 24
  store i32 0, ptr %14, align 8, !tbaa !22
  %15 = getelementptr inbounds i8, ptr %0, i64 504
  store ptr %1, ptr %15, align 8, !tbaa !23
  %16 = tail call ptr @sqlite3ParserAlloc(ptr noundef nonnull @sqlite3Malloc) #3
  %17 = icmp eq ptr %16, null
  br i1 %17, label %22, label %.preheader127

.preheader127:                                    ; preds = %13
  %18 = getelementptr inbounds i8, ptr %5, i64 336
  %19 = getelementptr inbounds i8, ptr %0, i64 448
  %20 = getelementptr inbounds i8, ptr %0, i64 456
  %21 = getelementptr inbounds i8, ptr %5, i64 85
  br label %.outer

.outer:                                           ; preds = %50, %.preheader127
  %.095.ph = phi i32 [ %.196120, %50 ], [ 0, %.preheader127 ]
  %.093.ph = phi i32 [ %51, %50 ], [ -1, %.preheader127 ]
  %.090.ph = phi i32 [ %.191122, %50 ], [ %7, %.preheader127 ]
  %.089.ph = phi ptr [ %48, %50 ], [ %1, %.preheader127 ]
  br label %23

22:                                               ; preds = %13
  tail call void @sqlite3OomFault(ptr noundef nonnull %5) #3
  br label %.loopexit

23:                                               ; preds = %.outer, %43
  %.095 = phi i32 [ %26, %43 ], [ %.095.ph, %.outer ]
  %.090 = phi i32 [ %27, %43 ], [ %.090.ph, %.outer ]
  %.089 = phi ptr [ %45, %43 ], [ %.089.ph, %.outer ]
  %24 = load i8, ptr %.089, align 1, !tbaa !21
  %.not = icmp eq i8 %24, 0
  br i1 %.not, label %30, label %25

25:                                               ; preds = %23
  %26 = call i32 @sqlite3GetToken(ptr noundef nonnull %.089, ptr noundef nonnull %4)
  %27 = sub nsw i32 %.090, %26
  %28 = icmp slt i32 %27, 0
  br i1 %28, label %29, label %35

29:                                               ; preds = %25
  store i32 18, ptr %14, align 8, !tbaa !22
  br label %.loopexit128

30:                                               ; preds = %23
  switch i32 %.093.ph, label %31 [
    i32 1, label %.thread
    i32 0, label %.loopexit128
  ]

31:                                               ; preds = %30
  br label %.thread

.thread:                                          ; preds = %31, %30
  %storemerge = phi i32 [ 1, %31 ], [ 0, %30 ]
  store i32 %storemerge, ptr %4, align 4, !tbaa !13
  %32 = sext i32 %.095 to i64
  %33 = sub nsw i64 0, %32
  %34 = getelementptr inbounds i8, ptr %.089, i64 %33
  br label %46

35:                                               ; preds = %25
  %.pr = load i32, ptr %4, align 4, !tbaa !13
  %36 = icmp sgt i32 %.pr, 161
  br i1 %36, label %37, label %._crit_edge

._crit_edge:                                      ; preds = %35
  %.pre = sext i32 %26 to i64
  br label %46

37:                                               ; preds = %35
  %38 = load volatile i32, ptr %18, align 8, !tbaa !21
  %.not106 = icmp eq i32 %38, 0
  br i1 %.not106, label %40, label %39

39:                                               ; preds = %37
  store i32 9, ptr %14, align 8, !tbaa !22
  br label %.loopexit128

40:                                               ; preds = %37
  %41 = icmp eq i32 %.pr, 163
  br i1 %41, label %42, label %43

42:                                               ; preds = %40
  call void (ptr, ptr, ...) @sqlite3ErrorMsg(ptr noundef nonnull %0, ptr noundef nonnull @.str, i32 noundef %26, ptr noundef nonnull %.089) #3
  br label %.loopexit128

43:                                               ; preds = %40
  %44 = sext i32 %26 to i64
  %45 = getelementptr inbounds i8, ptr %.089, i64 %44
  br label %23

46:                                               ; preds = %._crit_edge, %.thread
  %.pre-phi = phi i64 [ %.pre, %._crit_edge ], [ %32, %.thread ]
  %.1123 = phi ptr [ %.089, %._crit_edge ], [ %34, %.thread ]
  %.191122 = phi i32 [ %27, %._crit_edge ], [ %.090, %.thread ]
  %.196120 = phi i32 [ %26, %._crit_edge ], [ %.095, %.thread ]
  %47 = phi i32 [ %.pr, %._crit_edge ], [ %storemerge, %.thread ]
  store ptr %.1123, ptr %19, align 8, !tbaa !24
  store i32 %.196120, ptr %20, align 8, !tbaa !25
  call void @sqlite3Parser(ptr noundef nonnull %16, i32 noundef %47, ptr %.1123, i32 %.196120, ptr noundef nonnull %0) #3
  %48 = getelementptr inbounds i8, ptr %.1123, i64 %.pre-phi
  %49 = load i32, ptr %14, align 8, !tbaa !22
  %.not104 = icmp eq i32 %49, 0
  br i1 %.not104, label %50, label %.loopexit128

50:                                               ; preds = %46
  %51 = load i32, ptr %4, align 4, !tbaa !13
  %52 = load i8, ptr %21, align 1, !tbaa !26
  %.not105 = icmp eq i8 %52, 0
  br i1 %.not105, label %.outer, label %.loopexit128

.loopexit128:                                     ; preds = %30, %46, %50, %42, %39, %29
  %.3 = phi ptr [ %.089, %29 ], [ %.089, %39 ], [ %.089, %42 ], [ %.089, %30 ], [ %48, %50 ], [ %48, %46 ]
  store ptr %.3, ptr %15, align 8, !tbaa !23
  call void @sqlite3ParserFree(ptr noundef nonnull %16, ptr noundef nonnull @sqlite3_free) #3
  %53 = load i8, ptr %21, align 1, !tbaa !26
  %.not107 = icmp eq i8 %53, 0
  br i1 %.not107, label %54, label %.thread126

.thread126:                                       ; preds = %.loopexit128
  store i32 7, ptr %14, align 8, !tbaa !22
  br label %55

54:                                               ; preds = %.loopexit128
  %.pr125 = load i32, ptr %14, align 8, !tbaa !22
  switch i32 %.pr125, label %55 [
    i32 0, label %63
    i32 101, label %63
  ]

55:                                               ; preds = %.thread126, %54
  %56 = phi i32 [ 7, %.thread126 ], [ %.pr125, %54 ]
  %57 = getelementptr inbounds i8, ptr %0, i64 8
  %58 = load ptr, ptr %57, align 8, !tbaa !27
  %59 = icmp eq ptr %58, null
  br i1 %59, label %60, label %63

60:                                               ; preds = %55
  %61 = call ptr @sqlite3ErrStr(i32 noundef %56) #3
  %62 = call ptr (ptr, ptr, ...) @sqlite3MPrintf(ptr noundef nonnull %5, ptr noundef nonnull @.str.1, ptr noundef %61) #3
  store ptr %62, ptr %57, align 8, !tbaa !27
  br label %63

63:                                               ; preds = %54, %54, %60, %55
  %64 = getelementptr inbounds i8, ptr %0, i64 8
  %65 = load ptr, ptr %64, align 8, !tbaa !27
  %.not110 = icmp eq ptr %65, null
  br i1 %.not110, label %68, label %66

66:                                               ; preds = %63
  store ptr %65, ptr %2, align 8, !tbaa !28
  %67 = load i32, ptr %14, align 8, !tbaa !22
  call void (i32, ptr, ...) @sqlite3_log(i32 noundef %67, ptr noundef nonnull @.str.1, ptr noundef nonnull %65) #3
  store ptr null, ptr %64, align 8, !tbaa !27
  br label %68

68:                                               ; preds = %66, %63
  %.092 = phi i32 [ 1, %66 ], [ 0, %63 ]
  %69 = getelementptr inbounds i8, ptr %0, i64 16
  %70 = load ptr, ptr %69, align 8, !tbaa !29
  %.not111 = icmp eq ptr %70, null
  br i1 %.not111, label %80, label %71

71:                                               ; preds = %68
  %72 = getelementptr inbounds i8, ptr %0, i64 48
  %73 = load i32, ptr %72, align 8, !tbaa !30
  %74 = icmp sgt i32 %73, 0
  br i1 %74, label %75, label %80

75:                                               ; preds = %71
  %76 = getelementptr inbounds i8, ptr %0, i64 30
  %77 = load i8, ptr %76, align 2, !tbaa !31
  %78 = icmp eq i8 %77, 0
  br i1 %78, label %79, label %80

79:                                               ; preds = %75
  call void @sqlite3VdbeDelete(ptr noundef nonnull %70) #3
  store ptr null, ptr %69, align 8, !tbaa !29
  br label %80

80:                                               ; preds = %79, %75, %71, %68
  %81 = getelementptr inbounds i8, ptr %0, i64 30
  %82 = load i8, ptr %81, align 2, !tbaa !31
  %83 = icmp eq i8 %82, 0
  br i1 %83, label %84, label %88

84:                                               ; preds = %80
  %85 = getelementptr inbounds i8, ptr %0, i64 144
  %86 = load ptr, ptr %85, align 8, !tbaa !32
  call void @sqlite3DbFree(ptr noundef nonnull %5, ptr noundef %86) #3
  store ptr null, ptr %85, align 8, !tbaa !32
  %87 = getelementptr inbounds i8, ptr %0, i64 140
  store i32 0, ptr %87, align 4, !tbaa !33
  br label %88

88:                                               ; preds = %84, %80
  %89 = getelementptr inbounds i8, ptr %0, i64 552
  %90 = load ptr, ptr %89, align 8, !tbaa !34
  call void @sqlite3_free(ptr noundef %90) #3
  %91 = getelementptr inbounds i8, ptr %0, i64 468
  %92 = load i8, ptr %91, align 4, !tbaa !35
  %.not112 = icmp eq i8 %92, 0
  br i1 %.not112, label %93, label %96

93:                                               ; preds = %88
  %94 = getelementptr inbounds i8, ptr %0, i64 512
  %95 = load ptr, ptr %94, align 8, !tbaa !36
  call void @sqlite3DeleteTable(ptr noundef nonnull %5, ptr noundef %95) #3
  br label %96

96:                                               ; preds = %93, %88
  %97 = getelementptr inbounds i8, ptr %0, i64 584
  %98 = load ptr, ptr %97, align 8, !tbaa !37
  %.not113 = icmp eq ptr %98, null
  br i1 %.not113, label %100, label %99

99:                                               ; preds = %96
  call void @sqlite3WithDelete(ptr noundef nonnull %5, ptr noundef nonnull %98) #3
  br label %100

100:                                              ; preds = %99, %96
  %101 = getelementptr inbounds i8, ptr %0, i64 520
  %102 = load ptr, ptr %101, align 8, !tbaa !38
  call void @sqlite3DeleteTrigger(ptr noundef nonnull %5, ptr noundef %102) #3
  %103 = getelementptr inbounds i8, ptr %0, i64 488
  %104 = load ptr, ptr %103, align 8, !tbaa !39
  call void @sqlite3DbFree(ptr noundef nonnull %5, ptr noundef %104) #3
  %105 = getelementptr inbounds i8, ptr %0, i64 152
  %106 = load ptr, ptr %105, align 8, !tbaa !40
  %.not114134 = icmp eq ptr %106, null
  br i1 %.not114134, label %.preheader, label %.lr.ph

.preheader:                                       ; preds = %.lr.ph, %100
  %107 = getelementptr inbounds i8, ptr %0, i64 560
  %108 = load ptr, ptr %107, align 8, !tbaa !41
  %.not115135 = icmp eq ptr %108, null
  br i1 %.not115135, label %.loopexit, label %.lr.ph136

.lr.ph:                                           ; preds = %100, %.lr.ph
  %109 = phi ptr [ %111, %.lr.ph ], [ %106, %100 ]
  %110 = load ptr, ptr %109, align 8, !tbaa !42
  store ptr %110, ptr %105, align 8, !tbaa !40
  call void @sqlite3DbFree(ptr noundef %5, ptr noundef nonnull %109) #3
  %111 = load ptr, ptr %105, align 8, !tbaa !40
  %.not114 = icmp eq ptr %111, null
  br i1 %.not114, label %.preheader, label %.lr.ph, !llvm.loop !44

.lr.ph136:                                        ; preds = %.preheader, %.lr.ph136
  %112 = phi ptr [ %115, %.lr.ph136 ], [ %108, %.preheader ]
  %113 = getelementptr inbounds i8, ptr %112, i64 120
  %114 = load ptr, ptr %113, align 8, !tbaa !46
  store ptr %114, ptr %107, align 8, !tbaa !41
  call void @sqlite3DeleteTable(ptr noundef %5, ptr noundef nonnull %112) #3
  %115 = load ptr, ptr %107, align 8, !tbaa !41
  %.not115 = icmp eq ptr %115, null
  br i1 %.not115, label %.loopexit, label %.lr.ph136, !llvm.loop !48

.loopexit:                                        ; preds = %.lr.ph136, %.preheader, %22
  %.0 = phi i32 [ 7, %22 ], [ %.092, %.preheader ], [ %.092, %.lr.ph136 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #3
  ret i32 %.0
}

declare ptr @sqlite3ParserAlloc(ptr noundef) local_unnamed_addr #2

declare ptr @sqlite3Malloc(i64 noundef) #2

declare void @sqlite3OomFault(ptr noundef) local_unnamed_addr #2

declare void @sqlite3ErrorMsg(ptr noundef, ptr noundef, ...) local_unnamed_addr #2

declare void @sqlite3Parser(ptr noundef, i32 noundef, ptr, i32, ptr noundef) local_unnamed_addr #2

declare void @sqlite3ParserFree(ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @sqlite3_free(ptr noundef) #2

declare ptr @sqlite3MPrintf(ptr noundef, ptr noundef, ...) local_unnamed_addr #2

declare ptr @sqlite3ErrStr(i32 noundef) local_unnamed_addr #2

declare void @sqlite3_log(i32 noundef, ptr noundef, ...) local_unnamed_addr #2

declare void @sqlite3VdbeDelete(ptr noundef) local_unnamed_addr #2

declare void @sqlite3DbFree(ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @sqlite3DeleteTable(ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @sqlite3WithDelete(ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @sqlite3DeleteTrigger(ptr noundef, ptr noundef) local_unnamed_addr #2

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 = { "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 }

!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 0}
!6 = !{!"Parse", !7, i64 0, !7, i64 8, !7, i64 16, !10, i64 24, !8, i64 28, !8, i64 29, !8, i64 30, !8, i64 31, !8, i64 32, !8, i64 33, !8, i64 34, !8, i64 35, !8, i64 36, !8, i64 37, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !10, i64 80, !10, i64 84, !7, i64 88, !7, i64 96, !11, i64 104, !10, i64 120, !10, i64 124, !10, i64 128, !10, i64 132, !10, i64 136, !10, i64 140, !7, i64 144, !7, i64 152, !7, i64 160, !7, i64 168, !10, i64 176, !10, i64 180, !10, i64 184, !10, i64 188, !8, i64 192, !8, i64 193, !8, i64 194, !8, i64 196, !8, i64 396, !11, i64 432, !11, i64 448, !12, i64 464, !8, i64 466, !8, i64 467, !8, i64 468, !10, i64 472, !10, i64 476, !10, i64 480, !10, i64 484, !7, i64 488, !7, i64 496, !7, i64 504, !7, i64 512, !7, i64 520, !7, i64 528, !11, i64 536, !7, i64 552, !7, i64 560, !7, i64 568, !7, i64 576, !7, i64 584}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"int", !8, i64 0}
!11 = !{!"Token", !7, i64 0, !10, i64 8}
!12 = !{!"short", !8, i64 0}
!13 = !{!10, !10, i64 0}
!14 = !{!15, !10, i64 172}
!15 = !{!"sqlite3", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !10, i64 40, !10, i64 44, !16, i64 48, !16, i64 56, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !12, i64 80, !8, i64 82, !8, i64 83, !8, i64 84, !8, i64 85, !8, i64 86, !8, i64 87, !8, i64 88, !8, i64 89, !8, i64 90, !8, i64 91, !8, i64 92, !8, i64 93, !8, i64 94, !10, i64 96, !10, i64 100, !10, i64 104, !10, i64 108, !8, i64 112, !10, i64 160, !17, i64 164, !10, i64 172, !10, i64 176, !10, i64 180, !10, i64 184, !10, i64 188, !10, i64 192, !7, i64 200, !7, i64 208, !7, i64 216, !7, i64 224, !7, i64 232, !7, 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, !8, i64 336, !18, i64 344, !7, i64 400, !7, i64 408, !7, i64 416, !7, i64 424, !10, i64 432, !10, i64 436, !19, i64 440, !7, i64 464, !7, i64 472, !7, i64 480, !19, i64 488, !19, i64 512, !20, i64 536, !8, i64 560, !7, i64 624, !10, i64 632, !10, i64 636, !10, i64 640, !16, i64 648, !16, i64 656, !7, i64 664}
!16 = !{!"long long", !8, i64 0}
!17 = !{!"sqlite3InitInfo", !10, i64 0, !8, i64 4, !8, i64 5, !8, i64 6, !8, i64 7}
!18 = !{!"Lookaside", !10, i64 0, !12, i64 4, !8, i64 6, !10, i64 8, !10, i64 12, !8, i64 16, !7, i64 32, !7, i64 40, !7, i64 48}
!19 = !{!"Hash", !10, i64 0, !10, i64 4, !7, i64 8, !7, i64 16}
!20 = !{!"BusyHandler", !7, i64 0, !7, i64 8, !10, i64 16}
!21 = !{!8, !8, i64 0}
!22 = !{!6, !10, i64 24}
!23 = !{!6, !7, i64 504}
!24 = !{!6, !7, i64 448}
!25 = !{!6, !10, i64 456}
!26 = !{!15, !8, i64 85}
!27 = !{!6, !7, i64 8}
!28 = !{!7, !7, i64 0}
!29 = !{!6, !7, i64 16}
!30 = !{!6, !10, i64 48}
!31 = !{!6, !8, i64 30}
!32 = !{!6, !7, i64 144}
!33 = !{!6, !10, i64 140}
!34 = !{!6, !7, i64 552}
!35 = !{!6, !8, i64 468}
!36 = !{!6, !7, i64 512}
!37 = !{!6, !7, i64 584}
!38 = !{!6, !7, i64 520}
!39 = !{!6, !7, i64 488}
!40 = !{!6, !7, i64 152}
!41 = !{!6, !7, i64 560}
!42 = !{!43, !7, i64 0}
!43 = !{!"AutoincInfo", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 20}
!44 = distinct !{!44, !45}
!45 = !{!"llvm.loop.mustprogress"}
!46 = !{!47, !7, i64 120}
!47 = !{!"Table", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !10, i64 56, !10, i64 60, !10, i64 64, !12, i64 68, !12, i64 70, !12, i64 72, !12, i64 74, !8, i64 76, !10, i64 80, !10, i64 84, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !7, i64 120}
!48 = distinct !{!48, !45}


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