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

; 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.Token = type { ptr, i32 }
%struct.SelectDest = type { i8, ptr, i32, i32, i32, ptr }
%struct.Expr = type { i8, i8, i32, %union.anon, ptr, ptr, %union.anon.0, i32, i32, i16, i16, i16, i8, ptr, ptr }
%union.anon = type { ptr }
%union.anon.0 = type { ptr }
%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.Select = type { ptr, i8, i16, i32, i32, i32, [2 x i32], ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.ExprList = type { i32, ptr }
%struct.ExprList_item = type { ptr, ptr, ptr, i8, i8, %union.anon.1 }
%union.anon.1 = type { i32 }
%struct.KeyInfo = type { i32, i8, i16, i16, ptr, ptr, [1 x ptr] }

@sqlite3IntTokens = external constant [0 x %struct.Token], align 8
@.str.11 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local signext i8 @sqlite3ExprAffinity(ptr noundef) #0

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @sqlite3ExprCollSeq(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local ptr @sqlite3BinaryCompareCollSeq(ptr noundef, ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @sqlite3ExprVectorSize(ptr noundef) #0

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

; Function Attrs: nounwind uwtable
declare dso_local void @sqlite3ExprDelete(ptr noundef, ptr noundef) #0

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @sqlite3ExprIsConstant(ptr noundef) #0

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

declare ptr @sqlite3GetVdbe(ptr noundef) #2

declare i32 @sqlite3VdbeAddOp0(ptr noundef, i32 noundef) #2

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

declare i32 @sqlite3VdbeAddOp4(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef) #2

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

declare i32 @sqlite3VdbeAddOp3(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #2

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

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

40:                                               ; preds = %4
  store i32 0, ptr %5, align 4
  store i32 1, ptr %13, align 4
  br label %437

41:                                               ; preds = %4
  %42 = load ptr, ptr %6, align 8, !tbaa !5
  call void @sqlite3ExprCachePush(ptr noundef %42)
  %43 = load ptr, ptr %7, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.Expr, ptr %43, i32 0, i32 2
  %45 = load i32, ptr %44, align 4, !tbaa !11
  %46 = and i32 %45, 32
  %47 = icmp ne i32 %46, 0
  br i1 %47, label %51, label %48

48:                                               ; preds = %41
  %49 = load ptr, ptr %12, align 8, !tbaa !5
  %50 = call i32 @sqlite3VdbeAddOp0(ptr noundef %49, i32 noundef 20)
  store i32 %50, ptr %10, align 4, !tbaa !9
  br label %51

51:                                               ; preds = %48, %41
  %52 = load ptr, ptr %6, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.Parse, ptr %52, i32 0, i32 52
  %54 = load i8, ptr %53, align 1, !tbaa !14
  %55 = zext i8 %54 to i32
  %56 = icmp eq i32 %55, 2
  br i1 %56, label %57, label %82

57:                                               ; preds = %51
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  %58 = load ptr, ptr %6, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.Parse, ptr %58, i32 0, i32 0
  %60 = load ptr, ptr %59, align 8, !tbaa !17
  %61 = load i32, ptr %10, align 4, !tbaa !9
  %62 = icmp sge i32 %61, 0
  %63 = zext i1 %62 to i64
  %64 = select i1 %62, ptr @.str.12, ptr @.str.13
  %65 = load ptr, ptr %7, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.Expr, ptr %65, i32 0, i32 0
  %67 = load i8, ptr %66, align 8, !tbaa !18
  %68 = zext i8 %67 to i32
  %69 = icmp eq i32 %68, 33
  %70 = zext i1 %69 to i64
  %71 = select i1 %69, ptr @.str.14, ptr @.str.15
  %72 = load ptr, ptr %6, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.Parse, ptr %72, i32 0, i32 57
  %74 = load i32, ptr %73, align 4, !tbaa !19
  %75 = call ptr (ptr, ptr, ...) @sqlite3MPrintf(ptr noundef %60, ptr noundef @.str.11, ptr noundef %64, ptr noundef %71, i32 noundef %74)
  store ptr %75, ptr %14, align 8, !tbaa !5
  %76 = load ptr, ptr %12, align 8, !tbaa !5
  %77 = load ptr, ptr %6, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.Parse, ptr %77, i32 0, i32 56
  %79 = load i32, ptr %78, align 8, !tbaa !20
  %80 = load ptr, ptr %14, align 8, !tbaa !5
  %81 = call i32 @sqlite3VdbeAddOp4(ptr noundef %76, i32 noundef 163, i32 noundef %79, i32 noundef 0, i32 noundef 0, ptr noundef %80, i32 noundef -1)
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  br label %82

82:                                               ; preds = %57, %51
  %83 = load ptr, ptr %7, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.Expr, ptr %83, i32 0, i32 0
  %85 = load i8, ptr %84, align 8, !tbaa !18
  %86 = zext i8 %85 to i32
  switch i32 %86, label %336 [
    i32 33, label %87
    i32 20, label %335
    i32 119, label %335
  ]

87:                                               ; preds = %82
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  %88 = load ptr, ptr %7, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.Expr, ptr %88, i32 0, i32 4
  %90 = load ptr, ptr %89, align 8, !tbaa !21
  store ptr %90, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  store ptr null, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #3
  %91 = load ptr, ptr %16, align 8, !tbaa !5
  %92 = call i32 @sqlite3ExprVectorSize(ptr noundef %91)
  store i32 %92, ptr %18, align 4, !tbaa !9
  %93 = load ptr, ptr %6, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.Parse, ptr %93, i32 0, i32 17
  %95 = load i32, ptr %94, align 4, !tbaa !22
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr %94, align 4, !tbaa !22
  %97 = load ptr, ptr %7, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.Expr, ptr %97, i32 0, i32 8
  store i32 %95, ptr %98, align 4, !tbaa !23
  %99 = load ptr, ptr %12, align 8, !tbaa !5
  %100 = load ptr, ptr %7, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.Expr, ptr %100, i32 0, i32 8
  %102 = load i32, ptr %101, align 4, !tbaa !23
  %103 = load i32, ptr %9, align 4, !tbaa !9
  %104 = icmp ne i32 %103, 0
  br i1 %104, label %105, label %106

105:                                              ; preds = %87
  br label %108

106:                                              ; preds = %87
  %107 = load i32, ptr %18, align 4, !tbaa !9
  br label %108

108:                                              ; preds = %106, %105
  %109 = phi i32 [ 0, %105 ], [ %107, %106 ]
  %110 = call i32 @sqlite3VdbeAddOp2(ptr noundef %99, i32 noundef 108, i32 noundef %102, i32 noundef %109)
  store i32 %110, ptr %15, align 4, !tbaa !9
  %111 = load i32, ptr %9, align 4, !tbaa !9
  %112 = icmp ne i32 %111, 0
  br i1 %112, label %113, label %114

113:                                              ; preds = %108
  br label %120

114:                                              ; preds = %108
  %115 = load ptr, ptr %6, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.Parse, ptr %115, i32 0, i32 0
  %117 = load ptr, ptr %116, align 8, !tbaa !17
  %118 = load i32, ptr %18, align 4, !tbaa !9
  %119 = call ptr @sqlite3KeyInfoAlloc(ptr noundef %117, i32 noundef %118, i32 noundef 1)
  br label %120

120:                                              ; preds = %114, %113
  %121 = phi ptr [ null, %113 ], [ %119, %114 ]
  store ptr %121, ptr %17, align 8, !tbaa !5
  %122 = load ptr, ptr %7, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.Expr, ptr %122, i32 0, i32 2
  %124 = load i32, ptr %123, align 4, !tbaa !11
  %125 = and i32 %124, 2048
  %126 = icmp ne i32 %125, 0
  br i1 %126, label %127, label %201

127:                                              ; preds = %120
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  %128 = load ptr, ptr %7, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.Expr, ptr %128, i32 0, i32 6
  %130 = load ptr, ptr %129, align 8, !tbaa !24
  store ptr %130, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #3
  %131 = load ptr, ptr %19, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.Select, ptr %131, i32 0, i32 0
  %133 = load ptr, ptr %132, align 8, !tbaa !25
  store ptr %133, ptr %20, align 8, !tbaa !5
  %134 = load ptr, ptr %20, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.ExprList, ptr %134, i32 0, i32 0
  %136 = load i32, ptr %135, align 8, !tbaa !27
  %137 = load i32, ptr %18, align 4, !tbaa !9
  %138 = icmp eq i32 %136, %137
  br i1 %138, label %139, label %197

139:                                              ; preds = %127
  call void @llvm.lifetime.start.p0(i64 40, ptr %21) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #3
  %140 = load ptr, ptr %7, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.Expr, ptr %140, i32 0, i32 8
  %142 = load i32, ptr %141, align 4, !tbaa !23
  call void @sqlite3SelectDestInit(ptr noundef %21, i32 noundef 11, i32 noundef %142)
  %143 = load ptr, ptr %6, align 8, !tbaa !5
  %144 = load ptr, ptr %7, align 8, !tbaa !5
  %145 = call ptr @exprINAffinity(ptr noundef %143, ptr noundef %144)
  %146 = getelementptr inbounds %struct.SelectDest, ptr %21, i32 0, i32 1
  store ptr %145, ptr %146, align 8, !tbaa !29
  %147 = load ptr, ptr %19, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.Select, ptr %147, i32 0, i32 4
  store i32 0, ptr %148, align 8, !tbaa !31
  %149 = load ptr, ptr %6, align 8, !tbaa !5
  %150 = load ptr, ptr %19, align 8, !tbaa !5
  %151 = call i32 @sqlite3Select(ptr noundef %149, ptr noundef %150, ptr noundef %21)
  %152 = icmp ne i32 %151, 0
  br i1 %152, label %153, label %160

153:                                              ; preds = %139
  %154 = load ptr, ptr %6, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.Parse, ptr %154, i32 0, i32 0
  %156 = load ptr, ptr %155, align 8, !tbaa !17
  %157 = getelementptr inbounds %struct.SelectDest, ptr %21, i32 0, i32 1
  %158 = load ptr, ptr %157, align 8, !tbaa !29
  call void @sqlite3DbFree(ptr noundef %156, ptr noundef %158)
  %159 = load ptr, ptr %17, align 8, !tbaa !5
  call void @sqlite3KeyInfoUnref(ptr noundef %159)
  store i32 0, ptr %5, align 4
  store i32 1, ptr %13, align 4
  br label %194

160:                                              ; preds = %139
  %161 = load ptr, ptr %6, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.Parse, ptr %161, i32 0, i32 0
  %163 = load ptr, ptr %162, align 8, !tbaa !17
  %164 = getelementptr inbounds %struct.SelectDest, ptr %21, i32 0, i32 1
  %165 = load ptr, ptr %164, align 8, !tbaa !29
  call void @sqlite3DbFree(ptr noundef %163, ptr noundef %165)
  store i32 0, ptr %22, align 4, !tbaa !9
  br label %166

166:                                              ; preds = %190, %160
  %167 = load i32, ptr %22, align 4, !tbaa !9
  %168 = load i32, ptr %18, align 4, !tbaa !9
  %169 = icmp slt i32 %167, %168
  br i1 %169, label %170, label %193

170:                                              ; preds = %166
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #3
  %171 = load ptr, ptr %16, align 8, !tbaa !5
  %172 = load i32, ptr %22, align 4, !tbaa !9
  %173 = call ptr @sqlite3VectorFieldSubexpr(ptr noundef %171, i32 noundef %172)
  store ptr %173, ptr %23, align 8, !tbaa !5
  %174 = load ptr, ptr %6, align 8, !tbaa !5
  %175 = load ptr, ptr %23, align 8, !tbaa !5
  %176 = load ptr, ptr %20, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.ExprList, ptr %176, i32 0, i32 1
  %178 = load ptr, ptr %177, align 8, !tbaa !32
  %179 = load i32, ptr %22, align 4, !tbaa !9
  %180 = sext i32 %179 to i64
  %181 = getelementptr inbounds %struct.ExprList_item, ptr %178, i64 %180
  %182 = getelementptr inbounds %struct.ExprList_item, ptr %181, i32 0, i32 0
  %183 = load ptr, ptr %182, align 8, !tbaa !33
  %184 = call ptr @sqlite3BinaryCompareCollSeq(ptr noundef %174, ptr noundef %175, ptr noundef %183)
  %185 = load ptr, ptr %17, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.KeyInfo, ptr %185, i32 0, i32 6
  %187 = load i32, ptr %22, align 4, !tbaa !9
  %188 = sext i32 %187 to i64
  %189 = getelementptr inbounds [1 x ptr], ptr %186, i64 0, i64 %188
  store ptr %184, ptr %189, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #3
  br label %190

190:                                              ; preds = %170
  %191 = load i32, ptr %22, align 4, !tbaa !9
  %192 = add nsw i32 %191, 1
  store i32 %192, ptr %22, align 4, !tbaa !9
  br label %166, !llvm.loop !35

193:                                              ; preds = %166
  store i32 0, ptr %13, align 4
  br label %194

194:                                              ; preds = %193, %153
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr %21) #3
  %195 = load i32, ptr %13, align 4
  switch i32 %195, label %198 [
    i32 0, label %196
  ]

196:                                              ; preds = %194
  br label %197

197:                                              ; preds = %196, %127
  store i32 0, ptr %13, align 4
  br label %198

198:                                              ; preds = %197, %194
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  %199 = load i32, ptr %13, align 4
  switch i32 %199, label %333 [
    i32 0, label %200
  ]

200:                                              ; preds = %198
  br label %325

201:                                              ; preds = %120
  %202 = load ptr, ptr %7, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct.Expr, ptr %202, i32 0, i32 6
  %204 = load ptr, ptr %203, align 8, !tbaa !24
  %205 = icmp ne ptr %204, null
  br i1 %205, label %206, label %324

206:                                              ; preds = %201
  call void @llvm.lifetime.start.p0(i64 1, ptr %24) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %25) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #3
  %207 = load ptr, ptr %7, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct.Expr, ptr %207, i32 0, i32 6
  %209 = load ptr, ptr %208, align 8, !tbaa !24
  store ptr %209, ptr %26, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %30) #3
  %210 = load ptr, ptr %16, align 8, !tbaa !5
  %211 = call signext i8 @sqlite3ExprAffinity(ptr noundef %210)
  store i8 %211, ptr %24, align 1, !tbaa !24
  %212 = load i8, ptr %24, align 1, !tbaa !24
  %213 = icmp ne i8 %212, 0
  br i1 %213, label %215, label %214

214:                                              ; preds = %206
  store i8 65, ptr %24, align 1, !tbaa !24
  br label %215

215:                                              ; preds = %214, %206
  %216 = load ptr, ptr %17, align 8, !tbaa !5
  %217 = icmp ne ptr %216, null
  br i1 %217, label %218, label %227

218:                                              ; preds = %215
  %219 = load ptr, ptr %6, align 8, !tbaa !5
  %220 = load ptr, ptr %7, align 8, !tbaa !5
  %221 = getelementptr inbounds %struct.Expr, ptr %220, i32 0, i32 4
  %222 = load ptr, ptr %221, align 8, !tbaa !21
  %223 = call ptr @sqlite3ExprCollSeq(ptr noundef %219, ptr noundef %222)
  %224 = load ptr, ptr %17, align 8, !tbaa !5
  %225 = getelementptr inbounds %struct.KeyInfo, ptr %224, i32 0, i32 6
  %226 = getelementptr inbounds [1 x ptr], ptr %225, i64 0, i64 0
  store ptr %223, ptr %226, align 8, !tbaa !5
  br label %227

227:                                              ; preds = %218, %215
  %228 = load ptr, ptr %6, align 8, !tbaa !5
  %229 = call i32 @sqlite3GetTempReg(ptr noundef %228)
  store i32 %229, ptr %28, align 4, !tbaa !9
  %230 = load ptr, ptr %6, align 8, !tbaa !5
  %231 = call i32 @sqlite3GetTempReg(ptr noundef %230)
  store i32 %231, ptr %29, align 4, !tbaa !9
  %232 = load i32, ptr %9, align 4, !tbaa !9
  %233 = icmp ne i32 %232, 0
  br i1 %233, label %234, label %238

234:                                              ; preds = %227
  %235 = load ptr, ptr %12, align 8, !tbaa !5
  %236 = load i32, ptr %29, align 4, !tbaa !9
  %237 = call i32 @sqlite3VdbeAddOp2(ptr noundef %235, i32 noundef 80, i32 noundef 0, i32 noundef %236)
  br label %238

238:                                              ; preds = %234, %227
  %239 = load ptr, ptr %26, align 8, !tbaa !5
  %240 = getelementptr inbounds %struct.ExprList, ptr %239, i32 0, i32 0
  %241 = load i32, ptr %240, align 8, !tbaa !27
  store i32 %241, ptr %25, align 4, !tbaa !9
  %242 = load ptr, ptr %26, align 8, !tbaa !5
  %243 = getelementptr inbounds %struct.ExprList, ptr %242, i32 0, i32 1
  %244 = load ptr, ptr %243, align 8, !tbaa !32
  store ptr %244, ptr %27, align 8, !tbaa !5
  br label %245

245:                                              ; preds = %314, %238
  %246 = load i32, ptr %25, align 4, !tbaa !9
  %247 = icmp sgt i32 %246, 0
  br i1 %247, label %248, label %319

248:                                              ; preds = %245
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #3
  %249 = load ptr, ptr %27, align 8, !tbaa !5
  %250 = getelementptr inbounds %struct.ExprList_item, ptr %249, i32 0, i32 0
  %251 = load ptr, ptr %250, align 8, !tbaa !33
  store ptr %251, ptr %31, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #3
  %252 = load i32, ptr %10, align 4, !tbaa !9
  %253 = icmp sge i32 %252, 0
  br i1 %253, label %254, label %262

254:                                              ; preds = %248
  %255 = load ptr, ptr %31, align 8, !tbaa !5
  %256 = call i32 @sqlite3ExprIsConstant(ptr noundef %255)
  %257 = icmp ne i32 %256, 0
  br i1 %257, label %262, label %258

258:                                              ; preds = %254
  %259 = load ptr, ptr %12, align 8, !tbaa !5
  %260 = load i32, ptr %10, align 4, !tbaa !9
  %261 = call i32 @sqlite3VdbeChangeToNoop(ptr noundef %259, i32 noundef %260)
  store i32 -1, ptr %10, align 4, !tbaa !9
  br label %262

262:                                              ; preds = %258, %254, %248
  %263 = load i32, ptr %9, align 4, !tbaa !9
  %264 = icmp ne i32 %263, 0
  br i1 %264, label %265, label %277

265:                                              ; preds = %262
  %266 = load ptr, ptr %31, align 8, !tbaa !5
  %267 = call i32 @sqlite3ExprIsInteger(ptr noundef %266, ptr noundef %32)
  %268 = icmp ne i32 %267, 0
  br i1 %268, label %269, label %277

269:                                              ; preds = %265
  %270 = load ptr, ptr %12, align 8, !tbaa !5
  %271 = load ptr, ptr %7, align 8, !tbaa !5
  %272 = getelementptr inbounds %struct.Expr, ptr %271, i32 0, i32 8
  %273 = load i32, ptr %272, align 4, !tbaa !23
  %274 = load i32, ptr %29, align 4, !tbaa !9
  %275 = load i32, ptr %32, align 4, !tbaa !9
  %276 = call i32 @sqlite3VdbeAddOp3(ptr noundef %270, i32 noundef 117, i32 noundef %273, i32 noundef %274, i32 noundef %275)
  br label %313

277:                                              ; preds = %265, %262
  %278 = load ptr, ptr %6, align 8, !tbaa !5
  %279 = load ptr, ptr %31, align 8, !tbaa !5
  %280 = load i32, ptr %28, align 4, !tbaa !9
  %281 = call i32 @sqlite3ExprCodeTarget(ptr noundef %278, ptr noundef %279, i32 noundef %280)
  store i32 %281, ptr %30, align 4, !tbaa !9
  %282 = load i32, ptr %9, align 4, !tbaa !9
  %283 = icmp ne i32 %282, 0
  br i1 %283, label %284, label %298

284:                                              ; preds = %277
  %285 = load ptr, ptr %12, align 8, !tbaa !5
  %286 = load i32, ptr %30, align 4, !tbaa !9
  %287 = load ptr, ptr %12, align 8, !tbaa !5
  %288 = call i32 @sqlite3VdbeCurrentAddr(ptr noundef %287)
  %289 = add nsw i32 %288, 2
  %290 = call i32 @sqlite3VdbeAddOp2(ptr noundef %285, i32 noundef 17, i32 noundef %286, i32 noundef %289)
  %291 = load ptr, ptr %12, align 8, !tbaa !5
  %292 = load ptr, ptr %7, align 8, !tbaa !5
  %293 = getelementptr inbounds %struct.Expr, ptr %292, i32 0, i32 8
  %294 = load i32, ptr %293, align 4, !tbaa !23
  %295 = load i32, ptr %29, align 4, !tbaa !9
  %296 = load i32, ptr %30, align 4, !tbaa !9
  %297 = call i32 @sqlite3VdbeAddOp3(ptr noundef %291, i32 noundef 116, i32 noundef %294, i32 noundef %295, i32 noundef %296)
  br label %312

298:                                              ; preds = %277
  %299 = load ptr, ptr %12, align 8, !tbaa !5
  %300 = load i32, ptr %30, align 4, !tbaa !9
  %301 = load i32, ptr %29, align 4, !tbaa !9
  %302 = call i32 @sqlite3VdbeAddOp4(ptr noundef %299, i32 noundef 100, i32 noundef %300, i32 noundef 1, i32 noundef %301, ptr noundef %24, i32 noundef 1)
  %303 = load ptr, ptr %6, align 8, !tbaa !5
  %304 = load i32, ptr %30, align 4, !tbaa !9
  call void @sqlite3ExprCacheAffinityChange(ptr noundef %303, i32 noundef %304, i32 noundef 1)
  %305 = load ptr, ptr %12, align 8, !tbaa !5
  %306 = load ptr, ptr %7, align 8, !tbaa !5
  %307 = getelementptr inbounds %struct.Expr, ptr %306, i32 0, i32 8
  %308 = load i32, ptr %307, align 4, !tbaa !23
  %309 = load i32, ptr %29, align 4, !tbaa !9
  %310 = load i32, ptr %30, align 4, !tbaa !9
  %311 = call i32 @sqlite3VdbeAddOp4Int(ptr noundef %305, i32 noundef 126, i32 noundef %308, i32 noundef %309, i32 noundef %310, i32 noundef 1)
  br label %312

312:                                              ; preds = %298, %284
  br label %313

313:                                              ; preds = %312, %269
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #3
  br label %314

314:                                              ; preds = %313
  %315 = load i32, ptr %25, align 4, !tbaa !9
  %316 = add nsw i32 %315, -1
  store i32 %316, ptr %25, align 4, !tbaa !9
  %317 = load ptr, ptr %27, align 8, !tbaa !5
  %318 = getelementptr inbounds %struct.ExprList_item, ptr %317, i32 1
  store ptr %318, ptr %27, align 8, !tbaa !5
  br label %245, !llvm.loop !37

319:                                              ; preds = %245
  %320 = load ptr, ptr %6, align 8, !tbaa !5
  %321 = load i32, ptr %28, align 4, !tbaa !9
  call void @sqlite3ReleaseTempReg(ptr noundef %320, i32 noundef %321)
  %322 = load ptr, ptr %6, align 8, !tbaa !5
  %323 = load i32, ptr %29, align 4, !tbaa !9
  call void @sqlite3ReleaseTempReg(ptr noundef %322, i32 noundef %323)
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %25) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %24) #3
  br label %324

324:                                              ; preds = %319, %201
  br label %325

325:                                              ; preds = %324, %200
  %326 = load ptr, ptr %17, align 8, !tbaa !5
  %327 = icmp ne ptr %326, null
  br i1 %327, label %328, label %332

328:                                              ; preds = %325
  %329 = load ptr, ptr %12, align 8, !tbaa !5
  %330 = load i32, ptr %15, align 4, !tbaa !9
  %331 = load ptr, ptr %17, align 8, !tbaa !5
  call void @sqlite3VdbeChangeP4(ptr noundef %329, i32 noundef %330, ptr noundef %331, i32 noundef -5)
  br label %332

332:                                              ; preds = %328, %325
  store i32 2, ptr %13, align 4
  br label %333

333:                                              ; preds = %332, %198
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  %334 = load i32, ptr %13, align 4
  switch i32 %334, label %437 [
    i32 2, label %419
  ]

335:                                              ; preds = %82, %82
  br label %336

336:                                              ; preds = %335, %82
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #3
  call void @llvm.lifetime.start.p0(i64 40, ptr %34) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %35) #3
  %337 = load ptr, ptr %7, align 8, !tbaa !5
  %338 = getelementptr inbounds %struct.Expr, ptr %337, i32 0, i32 6
  %339 = load ptr, ptr %338, align 8, !tbaa !24
  store ptr %339, ptr %33, align 8, !tbaa !5
  %340 = load ptr, ptr %7, align 8, !tbaa !5
  %341 = getelementptr inbounds %struct.Expr, ptr %340, i32 0, i32 0
  %342 = load i8, ptr %341, align 8, !tbaa !18
  %343 = zext i8 %342 to i32
  %344 = icmp eq i32 %343, 119
  br i1 %344, label %345, label %351

345:                                              ; preds = %336
  %346 = load ptr, ptr %33, align 8, !tbaa !5
  %347 = getelementptr inbounds %struct.Select, ptr %346, i32 0, i32 0
  %348 = load ptr, ptr %347, align 8, !tbaa !25
  %349 = getelementptr inbounds %struct.ExprList, ptr %348, i32 0, i32 0
  %350 = load i32, ptr %349, align 8, !tbaa !27
  br label %352

351:                                              ; preds = %336
  br label %352

352:                                              ; preds = %351, %345
  %353 = phi i32 [ %350, %345 ], [ 1, %351 ]
  store i32 %353, ptr %35, align 4, !tbaa !9
  %354 = load ptr, ptr %6, align 8, !tbaa !5
  %355 = getelementptr inbounds %struct.Parse, ptr %354, i32 0, i32 18
  %356 = load i32, ptr %355, align 8, !tbaa !38
  %357 = add nsw i32 %356, 1
  call void @sqlite3SelectDestInit(ptr noundef %34, i32 noundef 0, i32 noundef %357)
  %358 = load i32, ptr %35, align 4, !tbaa !9
  %359 = load ptr, ptr %6, align 8, !tbaa !5
  %360 = getelementptr inbounds %struct.Parse, ptr %359, i32 0, i32 18
  %361 = load i32, ptr %360, align 8, !tbaa !38
  %362 = add nsw i32 %361, %358
  store i32 %362, ptr %360, align 8, !tbaa !38
  %363 = load ptr, ptr %7, align 8, !tbaa !5
  %364 = getelementptr inbounds %struct.Expr, ptr %363, i32 0, i32 0
  %365 = load i8, ptr %364, align 8, !tbaa !18
  %366 = zext i8 %365 to i32
  %367 = icmp eq i32 %366, 119
  br i1 %367, label %368, label %384

368:                                              ; preds = %352
  %369 = getelementptr inbounds %struct.SelectDest, ptr %34, i32 0, i32 0
  store i8 10, ptr %369, align 8, !tbaa !39
  %370 = getelementptr inbounds %struct.SelectDest, ptr %34, i32 0, i32 2
  %371 = load i32, ptr %370, align 8, !tbaa !40
  %372 = getelementptr inbounds %struct.SelectDest, ptr %34, i32 0, i32 3
  store i32 %371, ptr %372, align 4, !tbaa !41
  %373 = load i32, ptr %35, align 4, !tbaa !9
  %374 = getelementptr inbounds %struct.SelectDest, ptr %34, i32 0, i32 4
  store i32 %373, ptr %374, align 8, !tbaa !42
  %375 = load ptr, ptr %12, align 8, !tbaa !5
  %376 = getelementptr inbounds %struct.SelectDest, ptr %34, i32 0, i32 2
  %377 = load i32, ptr %376, align 8, !tbaa !40
  %378 = getelementptr inbounds %struct.SelectDest, ptr %34, i32 0, i32 2
  %379 = load i32, ptr %378, align 8, !tbaa !40
  %380 = load i32, ptr %35, align 4, !tbaa !9
  %381 = add nsw i32 %379, %380
  %382 = sub nsw i32 %381, 1
  %383 = call i32 @sqlite3VdbeAddOp3(ptr noundef %375, i32 noundef 80, i32 noundef 0, i32 noundef %377, i32 noundef %382)
  br label %390

384:                                              ; preds = %352
  %385 = getelementptr inbounds %struct.SelectDest, ptr %34, i32 0, i32 0
  store i8 3, ptr %385, align 8, !tbaa !39
  %386 = load ptr, ptr %12, align 8, !tbaa !5
  %387 = getelementptr inbounds %struct.SelectDest, ptr %34, i32 0, i32 2
  %388 = load i32, ptr %387, align 8, !tbaa !40
  %389 = call i32 @sqlite3VdbeAddOp2(ptr noundef %386, i32 noundef 77, i32 noundef 0, i32 noundef %388)
  br label %390

390:                                              ; preds = %384, %368
  %391 = load ptr, ptr %6, align 8, !tbaa !5
  %392 = getelementptr inbounds %struct.Parse, ptr %391, i32 0, i32 0
  %393 = load ptr, ptr %392, align 8, !tbaa !17
  %394 = load ptr, ptr %33, align 8, !tbaa !5
  %395 = getelementptr inbounds %struct.Select, ptr %394, i32 0, i32 14
  %396 = load ptr, ptr %395, align 8, !tbaa !43
  call void @sqlite3ExprDelete(ptr noundef %393, ptr noundef %396)
  %397 = load ptr, ptr %6, align 8, !tbaa !5
  %398 = getelementptr inbounds %struct.Parse, ptr %397, i32 0, i32 0
  %399 = load ptr, ptr %398, align 8, !tbaa !17
  %400 = call ptr @sqlite3ExprAlloc(ptr noundef %399, i32 noundef 134, ptr noundef getelementptr inbounds ([0 x %struct.Token], ptr @sqlite3IntTokens, i64 0, i64 1), i32 noundef 0)
  %401 = load ptr, ptr %33, align 8, !tbaa !5
  %402 = getelementptr inbounds %struct.Select, ptr %401, i32 0, i32 14
  store ptr %400, ptr %402, align 8, !tbaa !43
  %403 = load ptr, ptr %33, align 8, !tbaa !5
  %404 = getelementptr inbounds %struct.Select, ptr %403, i32 0, i32 4
  store i32 0, ptr %404, align 8, !tbaa !31
  %405 = load ptr, ptr %33, align 8, !tbaa !5
  %406 = getelementptr inbounds %struct.Select, ptr %405, i32 0, i32 3
  %407 = load i32, ptr %406, align 4, !tbaa !44
  %408 = and i32 %407, -1025
  store i32 %408, ptr %406, align 4, !tbaa !44
  %409 = load ptr, ptr %6, align 8, !tbaa !5
  %410 = load ptr, ptr %33, align 8, !tbaa !5
  %411 = call i32 @sqlite3Select(ptr noundef %409, ptr noundef %410, ptr noundef %34)
  %412 = icmp ne i32 %411, 0
  br i1 %412, label %413, label %414

413:                                              ; preds = %390
  store i32 0, ptr %5, align 4
  store i32 1, ptr %13, align 4
  br label %417

414:                                              ; preds = %390
  %415 = getelementptr inbounds %struct.SelectDest, ptr %34, i32 0, i32 2
  %416 = load i32, ptr %415, align 8, !tbaa !40
  store i32 %416, ptr %11, align 4, !tbaa !9
  store i32 2, ptr %13, align 4
  br label %417

417:                                              ; preds = %414, %413
  call void @llvm.lifetime.end.p0(i64 4, ptr %35) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr %34) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #3
  %418 = load i32, ptr %13, align 4
  switch i32 %418, label %437 [
    i32 2, label %419
  ]

419:                                              ; preds = %417, %333
  %420 = load i32, ptr %8, align 4, !tbaa !9
  %421 = icmp ne i32 %420, 0
  br i1 %421, label %422, label %428

422:                                              ; preds = %419
  %423 = load ptr, ptr %12, align 8, !tbaa !5
  %424 = load ptr, ptr %7, align 8, !tbaa !5
  %425 = getelementptr inbounds %struct.Expr, ptr %424, i32 0, i32 8
  %426 = load i32, ptr %425, align 4, !tbaa !23
  %427 = load i32, ptr %8, align 4, !tbaa !9
  call void @sqlite3SetHasNullFlag(ptr noundef %423, i32 noundef %426, i32 noundef %427)
  br label %428

428:                                              ; preds = %422, %419
  %429 = load i32, ptr %10, align 4, !tbaa !9
  %430 = icmp sge i32 %429, 0
  br i1 %430, label %431, label %434

431:                                              ; preds = %428
  %432 = load ptr, ptr %12, align 8, !tbaa !5
  %433 = load i32, ptr %10, align 4, !tbaa !9
  call void @sqlite3VdbeJumpHere(ptr noundef %432, i32 noundef %433)
  br label %434

434:                                              ; preds = %431, %428
  %435 = load ptr, ptr %6, align 8, !tbaa !5
  call void @sqlite3ExprCachePop(ptr noundef %435)
  %436 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %436, ptr %5, align 4
  store i32 1, ptr %13, align 4
  br label %437

437:                                              ; preds = %434, %417, %333, %40
  call void @llvm.lifetime.end.p0(i64 8, 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
  %438 = load i32, ptr %5, align 4
  ret i32 %438
}

; Function Attrs: nounwind uwtable
declare dso_local void @sqlite3ExprCachePush(ptr noundef) #0

declare i32 @sqlite3VdbeAddOp2(ptr noundef, i32 noundef, i32 noundef, i32 noundef) #2

declare ptr @sqlite3KeyInfoAlloc(ptr noundef, i32 noundef, i32 noundef) #2

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

; Function Attrs: nounwind uwtable
declare hidden ptr @exprINAffinity(ptr noundef, ptr noundef) #0

declare i32 @sqlite3Select(ptr noundef, ptr noundef, ptr noundef) #2

declare void @sqlite3KeyInfoUnref(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @sqlite3GetTempReg(ptr noundef) #0

declare i32 @sqlite3VdbeChangeToNoop(ptr noundef, i32 noundef) #2

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

declare i32 @sqlite3VdbeCurrentAddr(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @sqlite3ExprCacheAffinityChange(ptr noundef, i32 noundef, i32 noundef) #0

declare i32 @sqlite3VdbeAddOp4Int(ptr noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef, i32 noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local void @sqlite3ReleaseTempReg(ptr noundef, i32 noundef) #0

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

; Function Attrs: nounwind uwtable
declare dso_local void @sqlite3ExprCachePop(ptr noundef) #0

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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, !10, i64 4}
!12 = !{!"Expr", !7, i64 0, !7, i64 1, !10, i64 4, !7, i64 8, !6, i64 16, !6, i64 24, !7, i64 32, !10, i64 40, !10, i64 44, !13, i64 48, !13, i64 50, !13, i64 52, !7, i64 54, !6, i64 56, !6, i64 64}
!13 = !{!"short", !7, i64 0}
!14 = !{!15, !7, i64 467}
!15 = !{!"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, !16, 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, !16, i64 432, !16, i64 448, !13, 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, !16, i64 536, !6, i64 552, !6, i64 560, !6, i64 568, !6, i64 576, !6, i64 584}
!16 = !{!"Token", !6, i64 0, !10, i64 8}
!17 = !{!15, !6, i64 0}
!18 = !{!12, !7, i64 0}
!19 = !{!15, !10, i64 484}
!20 = !{!15, !10, i64 480}
!21 = !{!12, !6, i64 16}
!22 = !{!15, !10, i64 52}
!23 = !{!12, !10, i64 44}
!24 = !{!7, !7, i64 0}
!25 = !{!26, !6, i64 0}
!26 = !{!"Select", !6, i64 0, !7, i64 8, !13, i64 10, !10, i64 12, !10, i64 16, !10, i64 20, !7, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104}
!27 = !{!28, !10, i64 0}
!28 = !{!"ExprList", !10, i64 0, !6, i64 8}
!29 = !{!30, !6, i64 8}
!30 = !{!"SelectDest", !7, i64 0, !6, i64 8, !10, i64 16, !10, i64 20, !10, i64 24, !6, i64 32}
!31 = !{!26, !10, i64 16}
!32 = !{!28, !6, i64 8}
!33 = !{!34, !6, i64 0}
!34 = !{!"ExprList_item", !6, i64 0, !6, i64 8, !6, i64 16, !7, i64 24, !10, i64 25, !10, i64 25, !10, i64 25, !7, i64 28}
!35 = distinct !{!35, !36}
!36 = !{!"llvm.loop.mustprogress"}
!37 = distinct !{!37, !36}
!38 = !{!15, !10, i64 56}
!39 = !{!30, !7, i64 0}
!40 = !{!30, !10, i64 16}
!41 = !{!30, !10, i64 20}
!42 = !{!30, !10, i64 24}
!43 = !{!26, !6, i64 88}
!44 = !{!26, !10, i64 12}


; 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.Token = type { ptr, i32 }
%struct.SelectDest = type { i8, ptr, i32, i32, i32, ptr }
%struct.ExprList_item = type { ptr, ptr, ptr, i8, i8, %union.anon.1 }
%union.anon.1 = type { i32 }

@sqlite3IntTokens = external constant [0 x %struct.Token], align 8
@.str.11 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [1 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [7 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local signext i8 @sqlite3ExprAffinity(ptr noundef) local_unnamed_addr #0

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local ptr @sqlite3ExprCollSeq(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local ptr @sqlite3BinaryCompareCollSeq(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @sqlite3ExprVectorSize(ptr noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
declare dso_local void @sqlite3ExprDelete(ptr noundef, ptr noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
declare dso_local i32 @sqlite3ExprIsConstant(ptr noundef) local_unnamed_addr #0

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

declare ptr @sqlite3GetVdbe(ptr noundef) local_unnamed_addr #2

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @sqlite3CodeSubselect(ptr noundef %0, ptr noundef %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #0 {
  %5 = alloca %struct.SelectDest, align 8
  %6 = alloca i8, align 1
  %7 = alloca i32, align 4
  %8 = alloca %struct.SelectDest, align 8
  %9 = tail call ptr @sqlite3GetVdbe(ptr noundef %0) #3
  %10 = icmp eq ptr %9, null
  br i1 %10, label %184, label %11

11:                                               ; preds = %4
  tail call void @sqlite3ExprCachePush(ptr noundef %0)
  %12 = getelementptr inbounds i8, ptr %1, i64 4
  %13 = load i32, ptr %12, align 4, !tbaa !5
  %14 = and i32 %13, 32
  %.not = icmp eq i32 %14, 0
  br i1 %.not, label %15, label %17

15:                                               ; preds = %11
  %16 = tail call i32 @sqlite3VdbeAddOp0(ptr noundef nonnull %9, i32 noundef 20) #3
  br label %17

17:                                               ; preds = %15, %11
  %.0141 = phi i32 [ -1, %11 ], [ %16, %15 ]
  %18 = getelementptr inbounds i8, ptr %0, i64 467
  %19 = load i8, ptr %18, align 1, !tbaa !12
  %20 = icmp eq i8 %19, 2
  br i1 %20, label %21, label %34

21:                                               ; preds = %17
  %22 = load ptr, ptr %0, align 8, !tbaa !15
  %23 = icmp sgt i32 %.0141, -1
  %24 = select i1 %23, ptr @.str.12, ptr @.str.13
  %25 = load i8, ptr %1, align 8, !tbaa !16
  %26 = icmp eq i8 %25, 33
  %27 = select i1 %26, ptr @.str.14, ptr @.str.15
  %28 = getelementptr inbounds i8, ptr %0, i64 484
  %29 = load i32, ptr %28, align 4, !tbaa !17
  %30 = tail call ptr (ptr, ptr, ...) @sqlite3MPrintf(ptr noundef %22, ptr noundef nonnull @.str.11, ptr noundef nonnull %24, ptr noundef nonnull %27, i32 noundef %29) #3
  %31 = getelementptr inbounds i8, ptr %0, i64 480
  %32 = load i32, ptr %31, align 8, !tbaa !18
  %33 = tail call i32 @sqlite3VdbeAddOp4(ptr noundef nonnull %9, i32 noundef 163, i32 noundef %32, i32 noundef 0, i32 noundef 0, ptr noundef %30, i32 noundef -1) #3
  br label %34

34:                                               ; preds = %21, %17
  %35 = load i8, ptr %1, align 8, !tbaa !16
  %cond4 = icmp eq i8 %35, 33
  br i1 %cond4, label %36, label %137

36:                                               ; preds = %34
  %37 = getelementptr inbounds i8, ptr %1, i64 16
  %38 = load ptr, ptr %37, align 8, !tbaa !19
  %39 = tail call i32 @sqlite3ExprVectorSize(ptr noundef %38)
  %40 = getelementptr inbounds i8, ptr %0, i64 52
  %41 = load i32, ptr %40, align 4, !tbaa !20
  %42 = add nsw i32 %41, 1
  store i32 %42, ptr %40, align 4, !tbaa !20
  %43 = getelementptr inbounds i8, ptr %1, i64 44
  store i32 %41, ptr %43, align 4, !tbaa !21
  %.not160 = icmp eq i32 %3, 0
  %44 = select i1 %.not160, i32 %39, i32 0
  %45 = tail call i32 @sqlite3VdbeAddOp2(ptr noundef nonnull %9, i32 noundef 108, i32 noundef %41, i32 noundef %44) #3
  br i1 %.not160, label %46, label %49

46:                                               ; preds = %36
  %47 = load ptr, ptr %0, align 8, !tbaa !15
  %48 = tail call ptr @sqlite3KeyInfoAlloc(ptr noundef %47, i32 noundef %39, i32 noundef 1) #3
  br label %49

49:                                               ; preds = %36, %46
  %50 = phi ptr [ %48, %46 ], [ null, %36 ]
  %51 = load i32, ptr %12, align 4, !tbaa !5
  %52 = and i32 %51, 2048
  %.not161 = icmp eq i32 %52, 0
  %53 = getelementptr inbounds i8, ptr %1, i64 32
  %54 = load ptr, ptr %53, align 8, !tbaa !22
  br i1 %.not161, label %79, label %55

55:                                               ; preds = %49
  %56 = load ptr, ptr %54, align 8, !tbaa !23
  %57 = load i32, ptr %56, align 8, !tbaa !25
  %58 = icmp eq i32 %57, %39
  br i1 %58, label %59, label %.critedge

59:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %5) #3
  %60 = load i32, ptr %43, align 4, !tbaa !21
  call void @sqlite3SelectDestInit(ptr noundef nonnull %5, i32 noundef 11, i32 noundef %60) #3
  %61 = call ptr @exprINAffinity(ptr noundef nonnull %0, ptr noundef nonnull %1)
  %62 = getelementptr inbounds i8, ptr %5, i64 8
  store ptr %61, ptr %62, align 8, !tbaa !27
  %63 = getelementptr inbounds i8, ptr %54, i64 16
  store i32 0, ptr %63, align 8, !tbaa !29
  %64 = call i32 @sqlite3Select(ptr noundef nonnull %0, ptr noundef nonnull %54, ptr noundef nonnull %5) #3
  %.not167 = icmp eq i32 %64, 0
  %65 = load ptr, ptr %0, align 8, !tbaa !15
  %66 = load ptr, ptr %62, align 8, !tbaa !27
  call void @sqlite3DbFree(ptr noundef %65, ptr noundef %66) #3
  br i1 %.not167, label %67, label %.thread

.thread:                                          ; preds = %59
  call void @sqlite3KeyInfoUnref(ptr noundef %50) #3
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #3
  br label %184

67:                                               ; preds = %59
  %68 = icmp sgt i32 %39, 0
  br i1 %68, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %67
  %69 = getelementptr inbounds i8, ptr %56, i64 8
  %70 = getelementptr inbounds i8, ptr %50, i64 32
  %wide.trip.count = zext nneg i32 %39 to i64
  br label %71

71:                                               ; preds = %.lr.ph, %71
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %71 ]
  %72 = trunc nuw nsw i64 %indvars.iv to i32
  %73 = call ptr @sqlite3VectorFieldSubexpr(ptr noundef %38, i32 noundef %72)
  %74 = load ptr, ptr %69, align 8, !tbaa !30
  %75 = getelementptr inbounds %struct.ExprList_item, ptr %74, i64 %indvars.iv
  %76 = load ptr, ptr %75, align 8, !tbaa !31
  %77 = call ptr @sqlite3BinaryCompareCollSeq(ptr noundef nonnull %0, ptr noundef %73, ptr noundef %76)
  %78 = getelementptr inbounds [1 x ptr], ptr %70, i64 0, i64 %indvars.iv
  store ptr %77, ptr %78, align 8, !tbaa !33
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %71, !llvm.loop !34

._crit_edge:                                      ; preds = %71, %67
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %5) #3
  br label %.critedge

79:                                               ; preds = %49
  %.not162 = icmp eq ptr %54, null
  br i1 %.not162, label %.critedge, label %80

80:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #3
  %81 = tail call signext i8 @sqlite3ExprAffinity(ptr noundef %38)
  %.not163 = icmp eq i8 %81, 0
  %spec.store.select = select i1 %.not163, i8 65, i8 %81
  store i8 %spec.store.select, ptr %6, align 1
  %.not164 = icmp eq ptr %50, null
  br i1 %.not164, label %86, label %82

82:                                               ; preds = %80
  %83 = load ptr, ptr %37, align 8, !tbaa !19
  %84 = tail call ptr @sqlite3ExprCollSeq(ptr noundef nonnull %0, ptr noundef %83)
  %85 = getelementptr inbounds i8, ptr %50, i64 32
  store ptr %84, ptr %85, align 8, !tbaa !33
  br label %86

86:                                               ; preds = %82, %80
  %87 = tail call i32 @sqlite3GetTempReg(ptr noundef nonnull %0)
  %88 = tail call i32 @sqlite3GetTempReg(ptr noundef nonnull %0)
  br i1 %.not160, label %89, label %.thread183

89:                                               ; preds = %86
  %90 = load i32, ptr %54, align 8, !tbaa !25
  %91 = icmp sgt i32 %90, 0
  br i1 %91, label %.lr.ph179.split.us.preheader, label %._crit_edge180

.thread183:                                       ; preds = %86
  %92 = tail call i32 @sqlite3VdbeAddOp2(ptr noundef nonnull %9, i32 noundef 80, i32 noundef 0, i32 noundef %88) #3
  %93 = load i32, ptr %54, align 8, !tbaa !25
  %94 = icmp sgt i32 %93, 0
  br i1 %94, label %.lr.ph179.split.preheader, label %._crit_edge180

.lr.ph179.split.preheader:                        ; preds = %.thread183
  %95 = getelementptr inbounds i8, ptr %54, i64 8
  %96 = load ptr, ptr %95, align 8, !tbaa !30
  br label %.lr.ph179.split

.lr.ph179.split.us.preheader:                     ; preds = %89
  %97 = getelementptr inbounds i8, ptr %54, i64 8
  %98 = load ptr, ptr %97, align 8, !tbaa !30
  br label %.lr.ph179.split.us

.lr.ph179.split.us:                               ; preds = %.lr.ph179.split.us.preheader, %105
  %.1142177.us = phi i32 [ %.2143.us, %105 ], [ %.0141, %.lr.ph179.split.us.preheader ]
  %.0154176.us = phi ptr [ %111, %105 ], [ %98, %.lr.ph179.split.us.preheader ]
  %.0155175.us = phi i32 [ %110, %105 ], [ %90, %.lr.ph179.split.us.preheader ]
  %99 = load ptr, ptr %.0154176.us, align 8, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #3
  %100 = icmp sgt i32 %.1142177.us, -1
  br i1 %100, label %101, label %105

101:                                              ; preds = %.lr.ph179.split.us
  %102 = call i32 @sqlite3ExprIsConstant(ptr noundef %99)
  %.not165.us = icmp eq i32 %102, 0
  br i1 %.not165.us, label %103, label %105

103:                                              ; preds = %101
  %104 = call i32 @sqlite3VdbeChangeToNoop(ptr noundef nonnull %9, i32 noundef %.1142177.us) #3
  br label %105

105:                                              ; preds = %103, %101, %.lr.ph179.split.us
  %.2143.us = phi i32 [ %.1142177.us, %101 ], [ -1, %103 ], [ %.1142177.us, %.lr.ph179.split.us ]
  %106 = call i32 @sqlite3ExprCodeTarget(ptr noundef %0, ptr noundef %99, i32 noundef %87)
  %107 = call i32 @sqlite3VdbeAddOp4(ptr noundef nonnull %9, i32 noundef 100, i32 noundef %106, i32 noundef 1, i32 noundef %88, ptr noundef nonnull %6, i32 noundef 1) #3
  call void @sqlite3ExprCacheAffinityChange(ptr noundef %0, i32 noundef %106, i32 noundef 1)
  %108 = load i32, ptr %43, align 4, !tbaa !21
  %109 = call i32 @sqlite3VdbeAddOp4Int(ptr noundef nonnull %9, i32 noundef 126, i32 noundef %108, i32 noundef %88, i32 noundef %106, i32 noundef 1) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #3
  %110 = add nsw i32 %.0155175.us, -1
  %111 = getelementptr inbounds i8, ptr %.0154176.us, i64 32
  %112 = icmp sgt i32 %.0155175.us, 1
  br i1 %112, label %.lr.ph179.split.us, label %._crit_edge180, !llvm.loop !36

.lr.ph179.split:                                  ; preds = %.lr.ph179.split.preheader, %132
  %.1142177 = phi i32 [ %.2143, %132 ], [ %.0141, %.lr.ph179.split.preheader ]
  %.0154176 = phi ptr [ %134, %132 ], [ %96, %.lr.ph179.split.preheader ]
  %.0155175 = phi i32 [ %133, %132 ], [ %93, %.lr.ph179.split.preheader ]
  %113 = load ptr, ptr %.0154176, align 8, !tbaa !31
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #3
  %114 = icmp sgt i32 %.1142177, -1
  br i1 %114, label %115, label %119

115:                                              ; preds = %.lr.ph179.split
  %116 = call i32 @sqlite3ExprIsConstant(ptr noundef %113)
  %.not165 = icmp eq i32 %116, 0
  br i1 %.not165, label %117, label %119

117:                                              ; preds = %115
  %118 = call i32 @sqlite3VdbeChangeToNoop(ptr noundef nonnull %9, i32 noundef %.1142177) #3
  br label %119

119:                                              ; preds = %117, %115, %.lr.ph179.split
  %.2143 = phi i32 [ %.1142177, %115 ], [ -1, %117 ], [ %.1142177, %.lr.ph179.split ]
  %120 = call i32 @sqlite3ExprIsInteger(ptr noundef %113, ptr noundef nonnull %7)
  %.not166 = icmp eq i32 %120, 0
  br i1 %.not166, label %125, label %121

121:                                              ; preds = %119
  %122 = load i32, ptr %43, align 4, !tbaa !21
  %123 = load i32, ptr %7, align 4, !tbaa !37
  %124 = call i32 @sqlite3VdbeAddOp3(ptr noundef nonnull %9, i32 noundef 117, i32 noundef %122, i32 noundef %88, i32 noundef %123) #3
  br label %132

125:                                              ; preds = %119
  %126 = call i32 @sqlite3ExprCodeTarget(ptr noundef %0, ptr noundef %113, i32 noundef %87)
  %127 = call i32 @sqlite3VdbeCurrentAddr(ptr noundef nonnull %9) #3
  %128 = add nsw i32 %127, 2
  %129 = call i32 @sqlite3VdbeAddOp2(ptr noundef nonnull %9, i32 noundef 17, i32 noundef %126, i32 noundef %128) #3
  %130 = load i32, ptr %43, align 4, !tbaa !21
  %131 = call i32 @sqlite3VdbeAddOp3(ptr noundef nonnull %9, i32 noundef 116, i32 noundef %130, i32 noundef %88, i32 noundef %126) #3
  br label %132

132:                                              ; preds = %125, %121
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #3
  %133 = add nsw i32 %.0155175, -1
  %134 = getelementptr inbounds i8, ptr %.0154176, i64 32
  %135 = icmp sgt i32 %.0155175, 1
  br i1 %135, label %.lr.ph179.split, label %._crit_edge180, !llvm.loop !36

._crit_edge180:                                   ; preds = %132, %105, %.thread183, %89
  %.1142.lcssa = phi i32 [ %.0141, %89 ], [ %.0141, %.thread183 ], [ %.2143.us, %105 ], [ %.2143, %132 ]
  call void @sqlite3ReleaseTempReg(ptr noundef %0, i32 noundef %87)
  call void @sqlite3ReleaseTempReg(ptr noundef %0, i32 noundef %88)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #3
  br label %.critedge

.critedge:                                        ; preds = %._crit_edge, %55, %79, %._crit_edge180
  %.3144 = phi i32 [ %.1142.lcssa, %._crit_edge180 ], [ %.0141, %79 ], [ %.0141, %._crit_edge ], [ %.0141, %55 ]
  %.not168 = icmp eq ptr %50, null
  br i1 %.not168, label %.thread171, label %136

136:                                              ; preds = %.critedge
  call void @sqlite3VdbeChangeP4(ptr noundef nonnull %9, i32 noundef %45, ptr noundef nonnull %50, i32 noundef -5) #3
  br label %.thread171

137:                                              ; preds = %34
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %8) #3
  %138 = getelementptr inbounds i8, ptr %1, i64 32
  %139 = load ptr, ptr %138, align 8, !tbaa !22
  %140 = icmp eq i8 %35, 119
  br i1 %140, label %141, label %144

141:                                              ; preds = %137
  %142 = load ptr, ptr %139, align 8, !tbaa !23
  %143 = load i32, ptr %142, align 8, !tbaa !25
  br label %144

144:                                              ; preds = %137, %141
  %145 = phi i32 [ %143, %141 ], [ 1, %137 ]
  %146 = getelementptr inbounds i8, ptr %0, i64 56
  %147 = load i32, ptr %146, align 8, !tbaa !38
  %148 = add nsw i32 %147, 1
  call void @sqlite3SelectDestInit(ptr noundef nonnull %8, i32 noundef 0, i32 noundef %148) #3
  %149 = load i32, ptr %146, align 8, !tbaa !38
  %150 = add nsw i32 %149, %145
  store i32 %150, ptr %146, align 8, !tbaa !38
  %151 = load i8, ptr %1, align 8, !tbaa !16
  %152 = icmp eq i8 %151, 119
  %153 = getelementptr inbounds i8, ptr %8, i64 16
  br i1 %152, label %154, label %161

154:                                              ; preds = %144
  store i8 10, ptr %8, align 8, !tbaa !39
  %155 = load i32, ptr %153, align 8, !tbaa !40
  %156 = getelementptr inbounds i8, ptr %8, i64 20
  store i32 %155, ptr %156, align 4, !tbaa !41
  %157 = getelementptr inbounds i8, ptr %8, i64 24
  store i32 %145, ptr %157, align 8, !tbaa !42
  %158 = add i32 %145, -1
  %159 = add i32 %158, %155
  %160 = call i32 @sqlite3VdbeAddOp3(ptr noundef nonnull %9, i32 noundef 80, i32 noundef 0, i32 noundef %155, i32 noundef %159) #3
  br label %164

161:                                              ; preds = %144
  store i8 3, ptr %8, align 8, !tbaa !39
  %162 = load i32, ptr %153, align 8, !tbaa !40
  %163 = call i32 @sqlite3VdbeAddOp2(ptr noundef nonnull %9, i32 noundef 77, i32 noundef 0, i32 noundef %162) #3
  br label %164

164:                                              ; preds = %161, %154
  %165 = load ptr, ptr %0, align 8, !tbaa !15
  %166 = getelementptr inbounds i8, ptr %139, i64 88
  %167 = load ptr, ptr %166, align 8, !tbaa !43
  call void @sqlite3ExprDelete(ptr noundef %165, ptr noundef %167)
  %168 = load ptr, ptr %0, align 8, !tbaa !15
  %169 = call ptr @sqlite3ExprAlloc(ptr noundef %168, i32 noundef 134, ptr noundef nonnull getelementptr inbounds (i8, ptr @sqlite3IntTokens, i64 16), i32 noundef 0)
  store ptr %169, ptr %166, align 8, !tbaa !43
  %170 = getelementptr inbounds i8, ptr %139, i64 16
  store i32 0, ptr %170, align 8, !tbaa !29
  %171 = getelementptr inbounds i8, ptr %139, i64 12
  %172 = load i32, ptr %171, align 4, !tbaa !44
  %173 = and i32 %172, -1025
  store i32 %173, ptr %171, align 4, !tbaa !44
  %174 = call i32 @sqlite3Select(ptr noundef nonnull %0, ptr noundef %139, ptr noundef nonnull %8) #3
  %.not159 = icmp eq i32 %174, 0
  %175 = getelementptr inbounds i8, ptr %8, i64 16
  %176 = load i32, ptr %175, align 8
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %8) #3
  br i1 %.not159, label %.thread171, label %184

.thread171:                                       ; preds = %.critedge, %136, %164
  %.1148 = phi i32 [ %176, %164 ], [ 0, %136 ], [ 0, %.critedge ]
  %.5146 = phi i32 [ %.0141, %164 ], [ %.3144, %136 ], [ %.3144, %.critedge ]
  %.not169 = icmp eq i32 %2, 0
  br i1 %.not169, label %180, label %177

177:                                              ; preds = %.thread171
  %178 = getelementptr inbounds i8, ptr %1, i64 44
  %179 = load i32, ptr %178, align 4, !tbaa !21
  call void @sqlite3SetHasNullFlag(ptr noundef nonnull %9, i32 noundef %179, i32 noundef %2)
  br label %180

180:                                              ; preds = %177, %.thread171
  %181 = icmp sgt i32 %.5146, -1
  br i1 %181, label %182, label %183

182:                                              ; preds = %180
  call void @sqlite3VdbeJumpHere(ptr noundef nonnull %9, i32 noundef %.5146) #3
  br label %183

183:                                              ; preds = %182, %180
  call void @sqlite3ExprCachePop(ptr noundef %0)
  br label %184

184:                                              ; preds = %.thread, %4, %164, %183
  %.6 = phi i32 [ %.1148, %183 ], [ 0, %164 ], [ 0, %4 ], [ 0, %.thread ]
  ret i32 %.6
}

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

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

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

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

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

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

declare void @sqlite3KeyInfoUnref(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local i32 @sqlite3GetTempReg(ptr noundef) local_unnamed_addr #0

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

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

declare i32 @sqlite3VdbeCurrentAddr(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local void @sqlite3ExprCacheAffinityChange(ptr noundef, i32 noundef, i32 noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
declare dso_local void @sqlite3ReleaseTempReg(ptr noundef, i32 noundef) local_unnamed_addr #0

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

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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, !9, i64 4}
!6 = !{!"Expr", !7, i64 0, !7, i64 1, !9, i64 4, !7, i64 8, !10, i64 16, !10, i64 24, !7, i64 32, !9, i64 40, !9, i64 44, !11, i64 48, !11, i64 50, !11, i64 52, !7, i64 54, !10, i64 56, !10, i64 64}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!"int", !7, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!"short", !7, i64 0}
!12 = !{!13, !7, i64 467}
!13 = !{!"Parse", !10, i64 0, !10, i64 8, !10, i64 16, !9, 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, !9, i64 40, !9, i64 44, !9, i64 48, !9, i64 52, !9, i64 56, !9, i64 60, !9, i64 64, !9, i64 68, !9, i64 72, !9, i64 76, !9, i64 80, !9, i64 84, !10, i64 88, !10, i64 96, !14, i64 104, !9, i64 120, !9, i64 124, !9, i64 128, !9, i64 132, !9, i64 136, !9, i64 140, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !9, i64 176, !9, i64 180, !9, i64 184, !9, i64 188, !7, i64 192, !7, i64 193, !7, i64 194, !7, i64 196, !7, i64 396, !14, i64 432, !14, i64 448, !11, i64 464, !7, i64 466, !7, i64 467, !7, i64 468, !9, i64 472, !9, i64 476, !9, i64 480, !9, i64 484, !10, i64 488, !10, i64 496, !10, i64 504, !10, i64 512, !10, i64 520, !10, i64 528, !14, i64 536, !10, i64 552, !10, i64 560, !10, i64 568, !10, i64 576, !10, i64 584}
!14 = !{!"Token", !10, i64 0, !9, i64 8}
!15 = !{!13, !10, i64 0}
!16 = !{!6, !7, i64 0}
!17 = !{!13, !9, i64 484}
!18 = !{!13, !9, i64 480}
!19 = !{!6, !10, i64 16}
!20 = !{!13, !9, i64 52}
!21 = !{!6, !9, i64 44}
!22 = !{!7, !7, i64 0}
!23 = !{!24, !10, i64 0}
!24 = !{!"Select", !10, i64 0, !7, i64 8, !11, i64 10, !9, i64 12, !9, i64 16, !9, i64 20, !7, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104}
!25 = !{!26, !9, i64 0}
!26 = !{!"ExprList", !9, i64 0, !10, i64 8}
!27 = !{!28, !10, i64 8}
!28 = !{!"SelectDest", !7, i64 0, !10, i64 8, !9, i64 16, !9, i64 20, !9, i64 24, !10, i64 32}
!29 = !{!24, !9, i64 16}
!30 = !{!26, !10, i64 8}
!31 = !{!32, !10, i64 0}
!32 = !{!"ExprList_item", !10, i64 0, !10, i64 8, !10, i64 16, !7, i64 24, !9, i64 25, !9, i64 25, !9, i64 25, !7, i64 28}
!33 = !{!10, !10, i64 0}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}
!36 = distinct !{!36, !35}
!37 = !{!9, !9, i64 0}
!38 = !{!13, !9, i64 56}
!39 = !{!28, !7, i64 0}
!40 = !{!28, !9, i64 16}
!41 = !{!28, !9, i64 20}
!42 = !{!28, !9, i64 24}
!43 = !{!24, !10, i64 88}
!44 = !{!24, !9, i64 12}


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