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

; 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.WhereInfo = type { ptr, ptr, ptr, ptr, i16, [2 x i32], i32, i32, i32, i16, i8, i8, i8, i8, i8, i8, i8, i32, ptr, i64, i16, %struct.WhereClause, %struct.WhereMaskSet, [1 x %struct.WhereLevel] }
%struct.WhereClause = type { ptr, ptr, i8, i32, i32, ptr, [8 x %struct.WhereTerm] }
%struct.WhereTerm = type { ptr, ptr, i16, i16, i16, i8, i8, i32, i32, i32, %union.anon, i64, i64 }
%union.anon = type { ptr }
%struct.WhereMaskSet = type { i32, [64 x i32] }
%struct.WhereLevel = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8, i8, i8, i8, i32, i32, %union.anon.0, ptr, i64 }
%union.anon.0 = type { %struct.anon }
%struct.anon = type { i32, 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.Token = type { ptr, i32 }
%struct.WhereLoop = type { i64, i64, i8, i8, i16, i16, i16, %union.anon.4, i32, i16, i16, i16, ptr, ptr, [3 x ptr] }
%union.anon.4 = type { %struct.anon.5 }
%struct.anon.5 = type { i16, i16, i16, ptr }
%struct.InLoop = type { i32, i32, i8 }
%struct.SrcList = type { i32, i32, [1 x %struct.SrcList_item] }
%struct.SrcList_item = type { ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, %struct.anon.2, i8, i32, ptr, ptr, i64, %union.anon.3, ptr }
%struct.anon.2 = type { i8, i8, [2 x i8] }
%union.anon.3 = type { ptr }
%struct.Index = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i16, i16, i16, i8, i8 }
%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 }
%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.1, %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.1 = 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.VdbeOp = type { i8, i8, i16, i32, i32, i32, %union.p4union }
%union.p4union = type { ptr }

; 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

declare void @sqlite3VdbeChangeP5(ptr noundef, i16 noundef zeroext) #1

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

declare i32 @sqlite3VdbeCurrentAddr(ptr noundef) #1

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

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

41:                                               ; preds = %262, %1
  %42 = load i32, ptr %5, align 4, !tbaa !22
  %43 = icmp sge i32 %42, 0
  br i1 %43, label %44, label %265

44:                                               ; preds = %41
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #3
  %45 = load ptr, ptr %2, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.WhereInfo, ptr %45, i32 0, i32 23
  %47 = load i32, ptr %5, align 4, !tbaa !22
  %48 = sext i32 %47 to i64
  %49 = getelementptr inbounds [1 x %struct.WhereLevel], ptr %46, i64 0, i64 %48
  store ptr %49, ptr %6, align 8, !tbaa !5
  %50 = load ptr, ptr %6, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.WhereLevel, ptr %50, i32 0, i32 18
  %52 = load ptr, ptr %51, align 8, !tbaa !23
  store ptr %52, ptr %7, align 8, !tbaa !5
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = load ptr, ptr %6, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.WhereLevel, ptr %54, i32 0, i32 6
  %56 = load i32, ptr %55, align 8, !tbaa !25
  call void @sqlite3VdbeResolveLabel(ptr noundef %53, i32 noundef %56)
  %57 = load ptr, ptr %6, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.WhereLevel, ptr %57, i32 0, i32 12
  %59 = load i8, ptr %58, align 1, !tbaa !26
  %60 = zext i8 %59 to i32
  %61 = icmp ne i32 %60, 162
  br i1 %61, label %62, label %84

62:                                               ; preds = %44
  %63 = load ptr, ptr %4, align 8, !tbaa !5
  %64 = load ptr, ptr %6, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.WhereLevel, ptr %64, i32 0, i32 12
  %66 = load i8, ptr %65, align 1, !tbaa !26
  %67 = zext i8 %66 to i32
  %68 = load ptr, ptr %6, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.WhereLevel, ptr %68, i32 0, i32 15
  %70 = load i32, ptr %69, align 8, !tbaa !27
  %71 = load ptr, ptr %6, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.WhereLevel, ptr %71, i32 0, i32 16
  %73 = load i32, ptr %72, align 4, !tbaa !28
  %74 = load ptr, ptr %6, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.WhereLevel, ptr %74, i32 0, i32 13
  %76 = load i8, ptr %75, align 2, !tbaa !29
  %77 = zext i8 %76 to i32
  %78 = call i32 @sqlite3VdbeAddOp3(ptr noundef %63, i32 noundef %67, i32 noundef %70, i32 noundef %73, i32 noundef %77)
  %79 = load ptr, ptr %4, align 8, !tbaa !5
  %80 = load ptr, ptr %6, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.WhereLevel, ptr %80, i32 0, i32 14
  %82 = load i8, ptr %81, align 1, !tbaa !30
  %83 = zext i8 %82 to i16
  call void @sqlite3VdbeChangeP5(ptr noundef %79, i16 noundef zeroext %83)
  br label %84

84:                                               ; preds = %62, %44
  %85 = load ptr, ptr %7, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.WhereLoop, ptr %85, i32 0, i32 8
  %87 = load i32, ptr %86, align 8, !tbaa !31
  %88 = and i32 %87, 2048
  %89 = icmp ne i32 %88, 0
  br i1 %89, label %90, label %152

90:                                               ; preds = %84
  %91 = load ptr, ptr %6, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.WhereLevel, ptr %91, i32 0, i32 17
  %93 = getelementptr inbounds %struct.anon, ptr %92, i32 0, i32 0
  %94 = load i32, ptr %93, align 8, !tbaa !33
  %95 = icmp sgt i32 %94, 0
  br i1 %95, label %96, label %152

96:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  %97 = load ptr, ptr %4, align 8, !tbaa !5
  %98 = load ptr, ptr %6, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.WhereLevel, ptr %98, i32 0, i32 4
  %100 = load i32, ptr %99, align 8, !tbaa !34
  call void @sqlite3VdbeResolveLabel(ptr noundef %97, i32 noundef %100)
  %101 = load ptr, ptr %6, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.WhereLevel, ptr %101, i32 0, i32 17
  %103 = getelementptr inbounds %struct.anon, ptr %102, i32 0, i32 0
  %104 = load i32, ptr %103, align 8, !tbaa !33
  store i32 %104, ptr %12, align 4, !tbaa !22
  %105 = load ptr, ptr %6, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.WhereLevel, ptr %105, i32 0, i32 17
  %107 = getelementptr inbounds %struct.anon, ptr %106, i32 0, i32 1
  %108 = load ptr, ptr %107, align 8, !tbaa !33
  %109 = load i32, ptr %12, align 4, !tbaa !22
  %110 = sub nsw i32 %109, 1
  %111 = sext i32 %110 to i64
  %112 = getelementptr inbounds %struct.InLoop, ptr %108, i64 %111
  store ptr %112, ptr %11, align 8, !tbaa !5
  br label %113

113:                                              ; preds = %146, %96
  %114 = load i32, ptr %12, align 4, !tbaa !22
  %115 = icmp sgt i32 %114, 0
  br i1 %115, label %116, label %151

116:                                              ; preds = %113
  %117 = load ptr, ptr %4, align 8, !tbaa !5
  %118 = load ptr, ptr %11, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.InLoop, ptr %118, i32 0, i32 1
  %120 = load i32, ptr %119, align 4, !tbaa !35
  %121 = add nsw i32 %120, 1
  call void @sqlite3VdbeJumpHere(ptr noundef %117, i32 noundef %121)
  %122 = load ptr, ptr %11, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.InLoop, ptr %122, i32 0, i32 2
  %124 = load i8, ptr %123, align 4, !tbaa !37
  %125 = zext i8 %124 to i32
  %126 = icmp ne i32 %125, 162
  br i1 %126, label %127, label %140

127:                                              ; preds = %116
  %128 = load ptr, ptr %4, align 8, !tbaa !5
  %129 = load ptr, ptr %11, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.InLoop, ptr %129, i32 0, i32 2
  %131 = load i8, ptr %130, align 4, !tbaa !37
  %132 = zext i8 %131 to i32
  %133 = load ptr, ptr %11, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.InLoop, ptr %133, i32 0, i32 0
  %135 = load i32, ptr %134, align 4, !tbaa !38
  %136 = load ptr, ptr %11, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.InLoop, ptr %136, i32 0, i32 1
  %138 = load i32, ptr %137, align 4, !tbaa !35
  %139 = call i32 @sqlite3VdbeAddOp2(ptr noundef %128, i32 noundef %132, i32 noundef %135, i32 noundef %138)
  br label %140

140:                                              ; preds = %127, %116
  %141 = load ptr, ptr %4, align 8, !tbaa !5
  %142 = load ptr, ptr %11, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.InLoop, ptr %142, i32 0, i32 1
  %144 = load i32, ptr %143, align 4, !tbaa !35
  %145 = sub nsw i32 %144, 1
  call void @sqlite3VdbeJumpHere(ptr noundef %141, i32 noundef %145)
  br label %146

146:                                              ; preds = %140
  %147 = load i32, ptr %12, align 4, !tbaa !22
  %148 = add nsw i32 %147, -1
  store i32 %148, ptr %12, align 4, !tbaa !22
  %149 = load ptr, ptr %11, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.InLoop, ptr %149, i32 -1
  store ptr %150, ptr %11, align 8, !tbaa !5
  br label %113, !llvm.loop !39

151:                                              ; preds = %113
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  br label %152

152:                                              ; preds = %151, %90, %84
  %153 = load ptr, ptr %4, align 8, !tbaa !5
  %154 = load ptr, ptr %6, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.WhereLevel, ptr %154, i32 0, i32 3
  %156 = load i32, ptr %155, align 4, !tbaa !41
  call void @sqlite3VdbeResolveLabel(ptr noundef %153, i32 noundef %156)
  %157 = load ptr, ptr %6, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.WhereLevel, ptr %157, i32 0, i32 5
  %159 = load i32, ptr %158, align 4, !tbaa !42
  %160 = icmp ne i32 %159, 0
  br i1 %160, label %161, label %176

161:                                              ; preds = %152
  %162 = load ptr, ptr %4, align 8, !tbaa !5
  %163 = load ptr, ptr %6, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.WhereLevel, ptr %163, i32 0, i32 5
  %165 = load i32, ptr %164, align 4, !tbaa !42
  %166 = call i32 @sqlite3VdbeGoto(ptr noundef %162, i32 noundef %165)
  %167 = load ptr, ptr %4, align 8, !tbaa !5
  %168 = load ptr, ptr %6, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.WhereLevel, ptr %168, i32 0, i32 5
  %170 = load i32, ptr %169, align 4, !tbaa !42
  call void @sqlite3VdbeJumpHere(ptr noundef %167, i32 noundef %170)
  %171 = load ptr, ptr %4, align 8, !tbaa !5
  %172 = load ptr, ptr %6, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.WhereLevel, ptr %172, i32 0, i32 5
  %174 = load i32, ptr %173, align 4, !tbaa !42
  %175 = sub nsw i32 %174, 2
  call void @sqlite3VdbeJumpHere(ptr noundef %171, i32 noundef %175)
  br label %176

176:                                              ; preds = %161, %152
  %177 = load ptr, ptr %6, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.WhereLevel, ptr %177, i32 0, i32 10
  %179 = load i32, ptr %178, align 8, !tbaa !43
  %180 = icmp ne i32 %179, 0
  br i1 %180, label %181, label %191

181:                                              ; preds = %176
  %182 = load ptr, ptr %4, align 8, !tbaa !5
  %183 = load ptr, ptr %6, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.WhereLevel, ptr %183, i32 0, i32 9
  %185 = load i32, ptr %184, align 4, !tbaa !44
  %186 = lshr i32 %185, 1
  %187 = load ptr, ptr %6, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.WhereLevel, ptr %187, i32 0, i32 10
  %189 = load i32, ptr %188, align 8, !tbaa !43
  %190 = call i32 @sqlite3VdbeAddOp2(ptr noundef %182, i32 noundef 69, i32 noundef %186, i32 noundef %189)
  br label %191

191:                                              ; preds = %181, %176
  %192 = load ptr, ptr %6, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.WhereLevel, ptr %192, i32 0, i32 0
  %194 = load i32, ptr %193, align 8, !tbaa !45
  %195 = icmp ne i32 %194, 0
  br i1 %195, label %196, label %261

196:                                              ; preds = %191
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #3
  %197 = load ptr, ptr %7, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct.WhereLoop, ptr %197, i32 0, i32 8
  %199 = load i32, ptr %198, align 8, !tbaa !31
  store i32 %199, ptr %13, align 4, !tbaa !22
  %200 = load ptr, ptr %4, align 8, !tbaa !5
  %201 = load ptr, ptr %6, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.WhereLevel, ptr %201, i32 0, i32 0
  %203 = load i32, ptr %202, align 8, !tbaa !45
  %204 = call i32 @sqlite3VdbeAddOp1(ptr noundef %200, i32 noundef 67, i32 noundef %203)
  store i32 %204, ptr %10, align 4, !tbaa !22
  %205 = load i32, ptr %13, align 4, !tbaa !22
  %206 = and i32 %205, 64
  %207 = icmp eq i32 %206, 0
  br i1 %207, label %208, label %218

208:                                              ; preds = %196
  %209 = load ptr, ptr %4, align 8, !tbaa !5
  %210 = load ptr, ptr %8, align 8, !tbaa !5
  %211 = getelementptr inbounds %struct.SrcList, ptr %210, i32 0, i32 2
  %212 = load i32, ptr %5, align 4, !tbaa !22
  %213 = sext i32 %212 to i64
  %214 = getelementptr inbounds [1 x %struct.SrcList_item], ptr %211, i64 0, i64 %213
  %215 = getelementptr inbounds %struct.SrcList_item, ptr %214, i32 0, i32 11
  %216 = load i32, ptr %215, align 4, !tbaa !46
  %217 = call i32 @sqlite3VdbeAddOp1(ptr noundef %209, i32 noundef 124, i32 noundef %216)
  br label %218

218:                                              ; preds = %208, %196
  %219 = load i32, ptr %13, align 4, !tbaa !22
  %220 = and i32 %219, 512
  %221 = icmp ne i32 %220, 0
  br i1 %221, label %231, label %222

222:                                              ; preds = %218
  %223 = load i32, ptr %13, align 4, !tbaa !22
  %224 = and i32 %223, 8192
  %225 = icmp ne i32 %224, 0
  br i1 %225, label %226, label %237

226:                                              ; preds = %222
  %227 = load ptr, ptr %6, align 8, !tbaa !5
  %228 = getelementptr inbounds %struct.WhereLevel, ptr %227, i32 0, i32 17
  %229 = load ptr, ptr %228, align 8, !tbaa !33
  %230 = icmp ne ptr %229, null
  br i1 %230, label %231, label %237

231:                                              ; preds = %226, %218
  %232 = load ptr, ptr %4, align 8, !tbaa !5
  %233 = load ptr, ptr %6, align 8, !tbaa !5
  %234 = getelementptr inbounds %struct.WhereLevel, ptr %233, i32 0, i32 2
  %235 = load i32, ptr %234, align 8, !tbaa !49
  %236 = call i32 @sqlite3VdbeAddOp1(ptr noundef %232, i32 noundef 124, i32 noundef %235)
  br label %237

237:                                              ; preds = %231, %226, %222
  %238 = load ptr, ptr %6, align 8, !tbaa !5
  %239 = getelementptr inbounds %struct.WhereLevel, ptr %238, i32 0, i32 12
  %240 = load i8, ptr %239, align 1, !tbaa !26
  %241 = zext i8 %240 to i32
  %242 = icmp eq i32 %241, 73
  br i1 %242, label %243, label %252

243:                                              ; preds = %237
  %244 = load ptr, ptr %4, align 8, !tbaa !5
  %245 = load ptr, ptr %6, align 8, !tbaa !5
  %246 = getelementptr inbounds %struct.WhereLevel, ptr %245, i32 0, i32 15
  %247 = load i32, ptr %246, align 8, !tbaa !27
  %248 = load ptr, ptr %6, align 8, !tbaa !5
  %249 = getelementptr inbounds %struct.WhereLevel, ptr %248, i32 0, i32 7
  %250 = load i32, ptr %249, align 4, !tbaa !50
  %251 = call i32 @sqlite3VdbeAddOp2(ptr noundef %244, i32 noundef 14, i32 noundef %247, i32 noundef %250)
  br label %258

252:                                              ; preds = %237
  %253 = load ptr, ptr %4, align 8, !tbaa !5
  %254 = load ptr, ptr %6, align 8, !tbaa !5
  %255 = getelementptr inbounds %struct.WhereLevel, ptr %254, i32 0, i32 7
  %256 = load i32, ptr %255, align 4, !tbaa !50
  %257 = call i32 @sqlite3VdbeGoto(ptr noundef %253, i32 noundef %256)
  br label %258

258:                                              ; preds = %252, %243
  %259 = load ptr, ptr %4, align 8, !tbaa !5
  %260 = load i32, ptr %10, align 4, !tbaa !22
  call void @sqlite3VdbeJumpHere(ptr noundef %259, i32 noundef %260)
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #3
  br label %261

261:                                              ; preds = %258, %191
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  br label %262

262:                                              ; preds = %261
  %263 = load i32, ptr %5, align 4, !tbaa !22
  %264 = add nsw i32 %263, -1
  store i32 %264, ptr %5, align 4, !tbaa !22
  br label %41, !llvm.loop !51

265:                                              ; preds = %41
  %266 = load ptr, ptr %4, align 8, !tbaa !5
  %267 = load ptr, ptr %2, align 8, !tbaa !5
  %268 = getelementptr inbounds %struct.WhereInfo, ptr %267, i32 0, i32 7
  %269 = load i32, ptr %268, align 8, !tbaa !52
  call void @sqlite3VdbeResolveLabel(ptr noundef %266, i32 noundef %269)
  store i32 0, ptr %5, align 4, !tbaa !22
  %270 = load ptr, ptr %2, align 8, !tbaa !5
  %271 = getelementptr inbounds %struct.WhereInfo, ptr %270, i32 0, i32 23
  %272 = getelementptr inbounds [1 x %struct.WhereLevel], ptr %271, i64 0, i64 0
  store ptr %272, ptr %6, align 8, !tbaa !5
  br label %273

273:                                              ; preds = %449, %265
  %274 = load i32, ptr %5, align 4, !tbaa !22
  %275 = load ptr, ptr %2, align 8, !tbaa !5
  %276 = getelementptr inbounds %struct.WhereInfo, ptr %275, i32 0, i32 10
  %277 = load i8, ptr %276, align 2, !tbaa !21
  %278 = zext i8 %277 to i32
  %279 = icmp slt i32 %274, %278
  br i1 %279, label %280, label %454

280:                                              ; preds = %273
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  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 8, ptr %18) #3
  %281 = load ptr, ptr %8, align 8, !tbaa !5
  %282 = getelementptr inbounds %struct.SrcList, ptr %281, i32 0, i32 2
  %283 = load ptr, ptr %6, align 8, !tbaa !5
  %284 = getelementptr inbounds %struct.WhereLevel, ptr %283, i32 0, i32 11
  %285 = load i8, ptr %284, align 4, !tbaa !53
  %286 = zext i8 %285 to i64
  %287 = getelementptr inbounds [1 x %struct.SrcList_item], ptr %282, i64 0, i64 %286
  store ptr %287, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  %288 = load ptr, ptr %18, align 8, !tbaa !5
  %289 = getelementptr inbounds %struct.SrcList_item, ptr %288, i32 0, i32 4
  %290 = load ptr, ptr %289, align 8, !tbaa !54
  store ptr %290, ptr %19, align 8, !tbaa !5
  %291 = load ptr, ptr %6, align 8, !tbaa !5
  %292 = getelementptr inbounds %struct.WhereLevel, ptr %291, i32 0, i32 18
  %293 = load ptr, ptr %292, align 8, !tbaa !23
  store ptr %293, ptr %7, align 8, !tbaa !5
  %294 = load ptr, ptr %18, align 8, !tbaa !5
  %295 = getelementptr inbounds %struct.SrcList_item, ptr %294, i32 0, i32 9
  %296 = getelementptr inbounds %struct.anon.2, ptr %295, i32 0, i32 1
  %297 = load i8, ptr %296, align 1
  %298 = lshr i8 %297, 4
  %299 = and i8 %298, 1
  %300 = zext i8 %299 to i32
  %301 = icmp ne i32 %300, 0
  br i1 %301, label %302, label %313

302:                                              ; preds = %280
  %303 = load ptr, ptr %3, align 8, !tbaa !5
  %304 = load ptr, ptr %6, align 8, !tbaa !5
  %305 = getelementptr inbounds %struct.WhereLevel, ptr %304, i32 0, i32 8
  %306 = load i32, ptr %305, align 8, !tbaa !55
  %307 = load ptr, ptr %6, align 8, !tbaa !5
  %308 = getelementptr inbounds %struct.WhereLevel, ptr %307, i32 0, i32 1
  %309 = load i32, ptr %308, align 4, !tbaa !56
  %310 = load ptr, ptr %18, align 8, !tbaa !5
  %311 = getelementptr inbounds %struct.SrcList_item, ptr %310, i32 0, i32 8
  %312 = load i32, ptr %311, align 8, !tbaa !57
  call void @translateColumnToCopy(ptr noundef %303, i32 noundef %306, i32 noundef %309, i32 noundef %312, i32 noundef 0)
  store i32 10, ptr %20, align 4
  br label %446

313:                                              ; preds = %280
  %314 = load ptr, ptr %7, align 8, !tbaa !5
  %315 = getelementptr inbounds %struct.WhereLoop, ptr %314, i32 0, i32 8
  %316 = load i32, ptr %315, align 8, !tbaa !31
  %317 = and i32 %316, 576
  %318 = icmp ne i32 %317, 0
  br i1 %318, label %319, label %324

319:                                              ; preds = %313
  %320 = load ptr, ptr %7, align 8, !tbaa !5
  %321 = getelementptr inbounds %struct.WhereLoop, ptr %320, i32 0, i32 7
  %322 = getelementptr inbounds %struct.anon.5, ptr %321, i32 0, i32 3
  %323 = load ptr, ptr %322, align 8, !tbaa !33
  store ptr %323, ptr %17, align 8, !tbaa !5
  br label %335

324:                                              ; preds = %313
  %325 = load ptr, ptr %7, align 8, !tbaa !5
  %326 = getelementptr inbounds %struct.WhereLoop, ptr %325, i32 0, i32 8
  %327 = load i32, ptr %326, align 8, !tbaa !31
  %328 = and i32 %327, 8192
  %329 = icmp ne i32 %328, 0
  br i1 %329, label %330, label %334

330:                                              ; preds = %324
  %331 = load ptr, ptr %6, align 8, !tbaa !5
  %332 = getelementptr inbounds %struct.WhereLevel, ptr %331, i32 0, i32 17
  %333 = load ptr, ptr %332, align 8, !tbaa !33
  store ptr %333, ptr %17, align 8, !tbaa !5
  br label %334

334:                                              ; preds = %330, %324
  br label %335

335:                                              ; preds = %334, %319
  %336 = load ptr, ptr %17, align 8, !tbaa !5
  %337 = icmp ne ptr %336, null
  br i1 %337, label %338, label %445

338:                                              ; preds = %335
  %339 = load ptr, ptr %2, align 8, !tbaa !5
  %340 = getelementptr inbounds %struct.WhereInfo, ptr %339, i32 0, i32 13
  %341 = load i8, ptr %340, align 1, !tbaa !58
  %342 = zext i8 %341 to i32
  %343 = icmp eq i32 %342, 0
  br i1 %343, label %352, label %344

344:                                              ; preds = %338
  %345 = load ptr, ptr %17, align 8, !tbaa !5
  %346 = getelementptr inbounds %struct.Index, ptr %345, i32 0, i32 3
  %347 = load ptr, ptr %346, align 8, !tbaa !59
  %348 = getelementptr inbounds %struct.Table, ptr %347, i32 0, i32 9
  %349 = load i32, ptr %348, align 8, !tbaa !61
  %350 = and i32 %349, 32
  %351 = icmp eq i32 %350, 0
  br i1 %351, label %445, label %352

352:                                              ; preds = %344, %338
  %353 = load ptr, ptr %9, align 8, !tbaa !5
  %354 = getelementptr inbounds %struct.sqlite3, ptr %353, i32 0, i32 17
  %355 = load i8, ptr %354, align 1, !tbaa !63
  %356 = icmp ne i8 %355, 0
  br i1 %356, label %445, label %357

357:                                              ; preds = %352
  %358 = load ptr, ptr %4, align 8, !tbaa !5
  %359 = call i32 @sqlite3VdbeCurrentAddr(ptr noundef %358)
  store i32 %359, ptr %15, align 4, !tbaa !22
  %360 = load ptr, ptr %6, align 8, !tbaa !5
  %361 = getelementptr inbounds %struct.WhereLevel, ptr %360, i32 0, i32 8
  %362 = load i32, ptr %361, align 8, !tbaa !55
  store i32 %362, ptr %14, align 4, !tbaa !22
  %363 = load ptr, ptr %4, align 8, !tbaa !5
  %364 = load i32, ptr %14, align 4, !tbaa !22
  %365 = call ptr @sqlite3VdbeGetOp(ptr noundef %363, i32 noundef %364)
  store ptr %365, ptr %16, align 8, !tbaa !5
  br label %366

366:                                              ; preds = %439, %357
  %367 = load i32, ptr %14, align 4, !tbaa !22
  %368 = load i32, ptr %15, align 4, !tbaa !22
  %369 = icmp slt i32 %367, %368
  br i1 %369, label %370, label %444

370:                                              ; preds = %366
  %371 = load ptr, ptr %16, align 8, !tbaa !5
  %372 = getelementptr inbounds %struct.VdbeOp, ptr %371, i32 0, i32 3
  %373 = load i32, ptr %372, align 4, !tbaa !69
  %374 = load ptr, ptr %6, align 8, !tbaa !5
  %375 = getelementptr inbounds %struct.WhereLevel, ptr %374, i32 0, i32 1
  %376 = load i32, ptr %375, align 4, !tbaa !56
  %377 = icmp ne i32 %373, %376
  br i1 %377, label %378, label %379

378:                                              ; preds = %370
  br label %439

379:                                              ; preds = %370
  %380 = load ptr, ptr %16, align 8, !tbaa !5
  %381 = getelementptr inbounds %struct.VdbeOp, ptr %380, i32 0, i32 0
  %382 = load i8, ptr %381, align 8, !tbaa !71
  %383 = zext i8 %382 to i32
  %384 = icmp eq i32 %383, 98
  br i1 %384, label %385, label %423

385:                                              ; preds = %379
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #3
  %386 = load ptr, ptr %16, align 8, !tbaa !5
  %387 = getelementptr inbounds %struct.VdbeOp, ptr %386, i32 0, i32 4
  %388 = load i32, ptr %387, align 8, !tbaa !72
  store i32 %388, ptr %21, align 4, !tbaa !22
  %389 = load ptr, ptr %19, align 8, !tbaa !5
  %390 = getelementptr inbounds %struct.Table, ptr %389, i32 0, i32 9
  %391 = load i32, ptr %390, align 8, !tbaa !61
  %392 = and i32 %391, 32
  %393 = icmp eq i32 %392, 0
  br i1 %393, label %405, label %394

394:                                              ; preds = %385
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #3
  %395 = load ptr, ptr %19, align 8, !tbaa !5
  %396 = call ptr @sqlite3PrimaryKeyIndex(ptr noundef %395)
  store ptr %396, ptr %22, align 8, !tbaa !5
  %397 = load ptr, ptr %22, align 8, !tbaa !5
  %398 = getelementptr inbounds %struct.Index, ptr %397, i32 0, i32 1
  %399 = load ptr, ptr %398, align 8, !tbaa !73
  %400 = load i32, ptr %21, align 4, !tbaa !22
  %401 = sext i32 %400 to i64
  %402 = getelementptr inbounds i16, ptr %399, i64 %401
  %403 = load i16, ptr %402, align 2, !tbaa !74
  %404 = sext i16 %403 to i32
  store i32 %404, ptr %21, align 4, !tbaa !22
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #3
  br label %405

405:                                              ; preds = %394, %385
  %406 = load ptr, ptr %17, align 8, !tbaa !5
  %407 = load i32, ptr %21, align 4, !tbaa !22
  %408 = trunc i32 %407 to i16
  %409 = call signext i16 @sqlite3ColumnOfIndex(ptr noundef %406, i16 noundef signext %408)
  %410 = sext i16 %409 to i32
  store i32 %410, ptr %21, align 4, !tbaa !22
  %411 = load i32, ptr %21, align 4, !tbaa !22
  %412 = icmp sge i32 %411, 0
  br i1 %412, label %413, label %422

413:                                              ; preds = %405
  %414 = load i32, ptr %21, align 4, !tbaa !22
  %415 = load ptr, ptr %16, align 8, !tbaa !5
  %416 = getelementptr inbounds %struct.VdbeOp, ptr %415, i32 0, i32 4
  store i32 %414, ptr %416, align 8, !tbaa !72
  %417 = load ptr, ptr %6, align 8, !tbaa !5
  %418 = getelementptr inbounds %struct.WhereLevel, ptr %417, i32 0, i32 2
  %419 = load i32, ptr %418, align 8, !tbaa !49
  %420 = load ptr, ptr %16, align 8, !tbaa !5
  %421 = getelementptr inbounds %struct.VdbeOp, ptr %420, i32 0, i32 3
  store i32 %419, ptr %421, align 4, !tbaa !69
  br label %422

422:                                              ; preds = %413, %405
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #3
  br label %438

423:                                              ; preds = %379
  %424 = load ptr, ptr %16, align 8, !tbaa !5
  %425 = getelementptr inbounds %struct.VdbeOp, ptr %424, i32 0, i32 0
  %426 = load i8, ptr %425, align 8, !tbaa !71
  %427 = zext i8 %426 to i32
  %428 = icmp eq i32 %427, 123
  br i1 %428, label %429, label %437

429:                                              ; preds = %423
  %430 = load ptr, ptr %6, align 8, !tbaa !5
  %431 = getelementptr inbounds %struct.WhereLevel, ptr %430, i32 0, i32 2
  %432 = load i32, ptr %431, align 8, !tbaa !49
  %433 = load ptr, ptr %16, align 8, !tbaa !5
  %434 = getelementptr inbounds %struct.VdbeOp, ptr %433, i32 0, i32 3
  store i32 %432, ptr %434, align 4, !tbaa !69
  %435 = load ptr, ptr %16, align 8, !tbaa !5
  %436 = getelementptr inbounds %struct.VdbeOp, ptr %435, i32 0, i32 0
  store i8 -127, ptr %436, align 8, !tbaa !71
  br label %437

437:                                              ; preds = %429, %423
  br label %438

438:                                              ; preds = %437, %422
  br label %439

439:                                              ; preds = %438, %378
  %440 = load i32, ptr %14, align 4, !tbaa !22
  %441 = add nsw i32 %440, 1
  store i32 %441, ptr %14, align 4, !tbaa !22
  %442 = load ptr, ptr %16, align 8, !tbaa !5
  %443 = getelementptr inbounds %struct.VdbeOp, ptr %442, i32 1
  store ptr %443, ptr %16, align 8, !tbaa !5
  br label %366, !llvm.loop !75

444:                                              ; preds = %366
  br label %445

445:                                              ; preds = %444, %352, %344, %335
  store i32 0, ptr %20, align 4
  br label %446

446:                                              ; preds = %445, %302
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, 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
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  %447 = load i32, ptr %20, align 4
  switch i32 %447, label %462 [
    i32 0, label %448
    i32 10, label %449
  ]

448:                                              ; preds = %446
  br label %449

449:                                              ; preds = %448, %446
  %450 = load i32, ptr %5, align 4, !tbaa !22
  %451 = add nsw i32 %450, 1
  store i32 %451, ptr %5, align 4, !tbaa !22
  %452 = load ptr, ptr %6, align 8, !tbaa !5
  %453 = getelementptr inbounds %struct.WhereLevel, ptr %452, i32 1
  store ptr %453, ptr %6, align 8, !tbaa !5
  br label %273, !llvm.loop !76

454:                                              ; preds = %273
  %455 = load ptr, ptr %2, align 8, !tbaa !5
  %456 = getelementptr inbounds %struct.WhereInfo, ptr %455, i32 0, i32 8
  %457 = load i32, ptr %456, align 4, !tbaa !77
  %458 = load ptr, ptr %3, align 8, !tbaa !5
  %459 = getelementptr inbounds %struct.Parse, ptr %458, i32 0, i32 40
  store i32 %457, ptr %459, align 4, !tbaa !78
  %460 = load ptr, ptr %9, align 8, !tbaa !5
  %461 = load ptr, ptr %2, align 8, !tbaa !5
  call void @whereInfoFree(ptr noundef %460, ptr noundef %461)
  store i32 1, ptr %20, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #3
  ret void

462:                                              ; preds = %446
  unreachable
}

declare void @sqlite3ExprCacheClear(ptr noundef) #1

declare void @sqlite3VdbeResolveLabel(ptr noundef, i32 noundef) #1

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

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

declare i32 @sqlite3VdbeGoto(ptr noundef, i32 noundef) #1

declare i32 @sqlite3VdbeAddOp1(ptr noundef, i32 noundef, i32 noundef) #1

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

declare ptr @sqlite3VdbeGetOp(ptr noundef, i32 noundef) #1

declare ptr @sqlite3PrimaryKeyIndex(ptr noundef) #1

declare signext i16 @sqlite3ColumnOfIndex(ptr noundef, i16 noundef signext) #1

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

!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, !6, i64 0}
!10 = !{!"WhereInfo", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !11, i64 32, !7, i64 36, !12, i64 44, !12, i64 48, !12, i64 52, !11, i64 56, !7, i64 58, !7, i64 59, !7, i64 60, !7, i64 61, !7, i64 62, !7, i64 63, !7, i64 64, !12, i64 68, !6, i64 72, !13, i64 80, !11, i64 88, !14, i64 96, !15, i64 648, !7, i64 912}
!11 = !{!"short", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"long long", !7, i64 0}
!14 = !{!"WhereClause", !6, i64 0, !6, i64 8, !7, i64 16, !12, i64 20, !12, i64 24, !6, i64 32, !7, i64 40}
!15 = !{!"WhereMaskSet", !12, i64 0, !7, i64 4}
!16 = !{!17, !6, i64 16}
!17 = !{!"Parse", !6, i64 0, !6, i64 8, !6, i64 16, !12, 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, !12, i64 40, !12, i64 44, !12, i64 48, !12, i64 52, !12, i64 56, !12, i64 60, !12, i64 64, !12, i64 68, !12, i64 72, !12, i64 76, !12, i64 80, !12, i64 84, !6, i64 88, !6, i64 96, !18, i64 104, !12, i64 120, !12, i64 124, !12, i64 128, !12, i64 132, !12, i64 136, !12, i64 140, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !12, i64 176, !12, i64 180, !12, i64 184, !12, i64 188, !7, i64 192, !7, i64 193, !7, i64 194, !7, i64 196, !7, i64 396, !18, i64 432, !18, i64 448, !11, i64 464, !7, i64 466, !7, i64 467, !7, i64 468, !12, i64 472, !12, i64 476, !12, i64 480, !12, i64 484, !6, i64 488, !6, i64 496, !6, i64 504, !6, i64 512, !6, i64 520, !6, i64 528, !18, i64 536, !6, i64 552, !6, i64 560, !6, i64 568, !6, i64 576, !6, i64 584}
!18 = !{!"Token", !6, i64 0, !12, i64 8}
!19 = !{!10, !6, i64 8}
!20 = !{!17, !6, i64 0}
!21 = !{!10, !7, i64 58}
!22 = !{!12, !12, i64 0}
!23 = !{!24, !6, i64 72}
!24 = !{!"WhereLevel", !12, i64 0, !12, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20, !12, i64 24, !12, i64 28, !12, i64 32, !12, i64 36, !12, i64 40, !7, i64 44, !7, i64 45, !7, i64 46, !7, i64 47, !12, i64 48, !12, i64 52, !7, i64 56, !6, i64 72, !13, i64 80}
!25 = !{!24, !12, i64 24}
!26 = !{!24, !7, i64 45}
!27 = !{!24, !12, i64 48}
!28 = !{!24, !12, i64 52}
!29 = !{!24, !7, i64 46}
!30 = !{!24, !7, i64 47}
!31 = !{!32, !12, i64 40}
!32 = !{!"WhereLoop", !13, i64 0, !13, i64 8, !7, i64 16, !7, i64 17, !11, i64 18, !11, i64 20, !11, i64 22, !7, i64 24, !12, i64 40, !11, i64 44, !11, i64 46, !11, i64 48, !6, i64 56, !6, i64 64, !7, i64 72}
!33 = !{!7, !7, i64 0}
!34 = !{!24, !12, i64 16}
!35 = !{!36, !12, i64 4}
!36 = !{!"InLoop", !12, i64 0, !12, i64 4, !7, i64 8}
!37 = !{!36, !7, i64 8}
!38 = !{!36, !12, i64 0}
!39 = distinct !{!39, !40}
!40 = !{!"llvm.loop.mustprogress"}
!41 = !{!24, !12, i64 12}
!42 = !{!24, !12, i64 20}
!43 = !{!24, !12, i64 40}
!44 = !{!24, !12, i64 36}
!45 = !{!24, !12, i64 0}
!46 = !{!47, !12, i64 68}
!47 = !{!"SrcList_item", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !12, i64 48, !12, i64 52, !12, i64 56, !48, i64 60, !7, i64 64, !12, i64 68, !6, i64 72, !6, i64 80, !13, i64 88, !7, i64 96, !6, i64 104}
!48 = !{!"", !7, i64 0, !12, i64 1, !12, i64 1, !12, i64 1, !12, i64 1, !12, i64 1, !12, i64 1}
!49 = !{!24, !12, i64 8}
!50 = !{!24, !12, i64 28}
!51 = distinct !{!51, !40}
!52 = !{!10, !12, i64 48}
!53 = !{!24, !7, i64 44}
!54 = !{!47, !6, i64 32}
!55 = !{!24, !12, i64 32}
!56 = !{!24, !12, i64 4}
!57 = !{!47, !12, i64 56}
!58 = !{!10, !7, i64 61}
!59 = !{!60, !6, i64 24}
!60 = !{!"Index", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !12, i64 88, !11, i64 92, !11, i64 94, !11, i64 96, !7, i64 98, !12, i64 99, !12, i64 99, !12, i64 99, !12, i64 99, !12, i64 99, !12, i64 99, !12, i64 99}
!61 = !{!62, !12, i64 64}
!62 = !{!"Table", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !12, i64 56, !12, i64 60, !12, i64 64, !11, i64 68, !11, i64 70, !11, i64 72, !11, i64 74, !7, i64 76, !12, i64 80, !12, i64 84, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120}
!63 = !{!64, !7, i64 85}
!64 = !{!"sqlite3", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !12, i64 40, !12, i64 44, !13, i64 48, !13, i64 56, !12, i64 64, !12, i64 68, !12, i64 72, !12, i64 76, !11, 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, !12, i64 96, !12, i64 100, !12, i64 104, !12, i64 108, !7, i64 112, !12, i64 160, !65, i64 164, !12, i64 172, !12, i64 176, !12, i64 180, !12, i64 184, !12, i64 188, !12, 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, !66, i64 344, !6, i64 400, !6, i64 408, !6, i64 416, !6, i64 424, !12, i64 432, !12, i64 436, !67, i64 440, !6, i64 464, !6, i64 472, !6, i64 480, !67, i64 488, !67, i64 512, !68, i64 536, !7, i64 560, !6, i64 624, !12, i64 632, !12, i64 636, !12, i64 640, !13, i64 648, !13, i64 656, !6, i64 664}
!65 = !{!"sqlite3InitInfo", !12, i64 0, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7}
!66 = !{!"Lookaside", !12, i64 0, !11, i64 4, !7, i64 6, !12, i64 8, !12, i64 12, !7, i64 16, !6, i64 32, !6, i64 40, !6, i64 48}
!67 = !{!"Hash", !12, i64 0, !12, i64 4, !6, i64 8, !6, i64 16}
!68 = !{!"BusyHandler", !6, i64 0, !6, i64 8, !12, i64 16}
!69 = !{!70, !12, i64 4}
!70 = !{!"VdbeOp", !7, i64 0, !7, i64 1, !11, i64 2, !12, i64 4, !12, i64 8, !12, i64 12, !7, i64 16}
!71 = !{!70, !7, i64 0}
!72 = !{!70, !12, i64 8}
!73 = !{!60, !6, i64 8}
!74 = !{!11, !11, i64 0}
!75 = distinct !{!75, !40}
!76 = distinct !{!76, !40}
!77 = !{!10, !12, i64 52}
!78 = !{!17, !12, i64 180}


; 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.WhereLevel = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i8, i8, i8, i8, i32, i32, %union.anon.0, ptr, i64 }
%union.anon.0 = type { %struct.anon }
%struct.anon = type { i32, ptr }
%struct.InLoop = type { i32, i32, i8 }
%struct.SrcList_item = type { ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i32, %struct.anon.2, i8, i32, ptr, ptr, i64, %union.anon.3, ptr }
%struct.anon.2 = type { i8, i8, [2 x i8] }
%union.anon.3 = type { ptr }

declare void @sqlite3VdbeChangeP5(ptr noundef, i16 noundef zeroext) local_unnamed_addr #0

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

declare i32 @sqlite3VdbeCurrentAddr(ptr noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
define dso_local void @sqlite3WhereEnd(ptr noundef %0) local_unnamed_addr #1 {
  %2 = load ptr, ptr %0, align 8, !tbaa !5
  %3 = getelementptr inbounds i8, ptr %2, i64 16
  %4 = load ptr, ptr %3, align 8, !tbaa !15
  %5 = getelementptr inbounds i8, ptr %0, i64 8
  %6 = load ptr, ptr %5, align 8, !tbaa !18
  %7 = load ptr, ptr %2, align 8, !tbaa !19
  tail call void @sqlite3ExprCacheClear(ptr noundef nonnull %2) #2
  %8 = getelementptr inbounds i8, ptr %0, i64 58
  %9 = load i8, ptr %8, align 2, !tbaa !20
  %.not174 = icmp eq i8 %9, 0
  br i1 %.not174, label %._crit_edge, label %.lr.ph164

.lr.ph164:                                        ; preds = %1
  %10 = getelementptr inbounds i8, ptr %0, i64 912
  %11 = getelementptr inbounds i8, ptr %6, i64 8
  %12 = zext i8 %9 to i64
  br label %13

13:                                               ; preds = %.lr.ph164, %119
  %indvars.iv = phi i64 [ %12, %.lr.ph164 ], [ %indvars.iv.next, %119 ]
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %14 = getelementptr inbounds [1 x %struct.WhereLevel], ptr %10, i64 0, i64 %indvars.iv.next
  %15 = getelementptr inbounds i8, ptr %14, i64 72
  %16 = load ptr, ptr %15, align 8, !tbaa !21
  %17 = getelementptr inbounds i8, ptr %14, i64 24
  %18 = load i32, ptr %17, align 8, !tbaa !23
  tail call void @sqlite3VdbeResolveLabel(ptr noundef %4, i32 noundef %18) #2
  %19 = getelementptr inbounds i8, ptr %14, i64 45
  %20 = load i8, ptr %19, align 1, !tbaa !24
  %.not147 = icmp eq i8 %20, -94
  br i1 %.not147, label %34, label %21

21:                                               ; preds = %13
  %22 = zext i8 %20 to i32
  %23 = getelementptr inbounds i8, ptr %14, i64 48
  %24 = load i32, ptr %23, align 8, !tbaa !25
  %25 = getelementptr inbounds i8, ptr %14, i64 52
  %26 = load i32, ptr %25, align 4, !tbaa !26
  %27 = getelementptr inbounds i8, ptr %14, i64 46
  %28 = load i8, ptr %27, align 2, !tbaa !27
  %29 = zext i8 %28 to i32
  %30 = tail call i32 @sqlite3VdbeAddOp3(ptr noundef %4, i32 noundef %22, i32 noundef %24, i32 noundef %26, i32 noundef %29) #2
  %31 = getelementptr inbounds i8, ptr %14, i64 47
  %32 = load i8, ptr %31, align 1, !tbaa !28
  %33 = zext i8 %32 to i16
  tail call void @sqlite3VdbeChangeP5(ptr noundef %4, i16 noundef zeroext %33) #2
  br label %34

34:                                               ; preds = %21, %13
  %35 = getelementptr inbounds i8, ptr %16, i64 40
  %36 = load i32, ptr %35, align 8, !tbaa !29
  %37 = and i32 %36, 2048
  %.not148 = icmp eq i32 %37, 0
  br i1 %.not148, label %.loopexit, label %38

38:                                               ; preds = %34
  %39 = getelementptr inbounds i8, ptr %14, i64 56
  %40 = load i32, ptr %39, align 8, !tbaa !31
  %41 = icmp sgt i32 %40, 0
  br i1 %41, label %42, label %.loopexit

42:                                               ; preds = %38
  %43 = getelementptr inbounds i8, ptr %14, i64 16
  %44 = load i32, ptr %43, align 8, !tbaa !32
  tail call void @sqlite3VdbeResolveLabel(ptr noundef %4, i32 noundef %44) #2
  %45 = load i32, ptr %39, align 8, !tbaa !31
  %46 = icmp sgt i32 %45, 0
  br i1 %46, label %.lr.ph.preheader, label %.loopexit

.lr.ph.preheader:                                 ; preds = %42
  %47 = getelementptr inbounds i8, ptr %14, i64 64
  %48 = load ptr, ptr %47, align 8, !tbaa !31
  %49 = zext nneg i32 %45 to i64
  %50 = getelementptr %struct.InLoop, ptr %48, i64 %49
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %61
  %.pn160 = phi ptr [ %.0132161, %61 ], [ %50, %.lr.ph.preheader ]
  %.0134159 = phi i32 [ %64, %61 ], [ %45, %.lr.ph.preheader ]
  %.0132161 = getelementptr inbounds i8, ptr %.pn160, i64 -12
  %51 = getelementptr inbounds i8, ptr %.pn160, i64 -8
  %52 = load i32, ptr %51, align 4, !tbaa !33
  %53 = add nsw i32 %52, 1
  tail call void @sqlite3VdbeJumpHere(ptr noundef %4, i32 noundef %53) #2
  %54 = getelementptr inbounds i8, ptr %.pn160, i64 -4
  %55 = load i8, ptr %54, align 4, !tbaa !35
  %.not155 = icmp eq i8 %55, -94
  br i1 %.not155, label %61, label %56

56:                                               ; preds = %.lr.ph
  %57 = zext i8 %55 to i32
  %58 = load i32, ptr %.0132161, align 4, !tbaa !36
  %59 = load i32, ptr %51, align 4, !tbaa !33
  %60 = tail call i32 @sqlite3VdbeAddOp2(ptr noundef %4, i32 noundef %57, i32 noundef %58, i32 noundef %59) #2
  br label %61

61:                                               ; preds = %56, %.lr.ph
  %62 = load i32, ptr %51, align 4, !tbaa !33
  %63 = add nsw i32 %62, -1
  tail call void @sqlite3VdbeJumpHere(ptr noundef %4, i32 noundef %63) #2
  %64 = add nsw i32 %.0134159, -1
  %65 = icmp sgt i32 %.0134159, 1
  br i1 %65, label %.lr.ph, label %.loopexit, !llvm.loop !37

.loopexit:                                        ; preds = %61, %42, %38, %34
  %66 = getelementptr inbounds i8, ptr %14, i64 12
  %67 = load i32, ptr %66, align 4, !tbaa !39
  tail call void @sqlite3VdbeResolveLabel(ptr noundef %4, i32 noundef %67) #2
  %68 = getelementptr inbounds i8, ptr %14, i64 20
  %69 = load i32, ptr %68, align 4, !tbaa !40
  %.not149 = icmp eq i32 %69, 0
  br i1 %.not149, label %75, label %70

70:                                               ; preds = %.loopexit
  %71 = tail call i32 @sqlite3VdbeGoto(ptr noundef %4, i32 noundef %69) #2
  %72 = load i32, ptr %68, align 4, !tbaa !40
  tail call void @sqlite3VdbeJumpHere(ptr noundef %4, i32 noundef %72) #2
  %73 = load i32, ptr %68, align 4, !tbaa !40
  %74 = add nsw i32 %73, -2
  tail call void @sqlite3VdbeJumpHere(ptr noundef %4, i32 noundef %74) #2
  br label %75

75:                                               ; preds = %70, %.loopexit
  %76 = getelementptr inbounds i8, ptr %14, i64 40
  %77 = load i32, ptr %76, align 8, !tbaa !41
  %.not150 = icmp eq i32 %77, 0
  br i1 %.not150, label %83, label %78

78:                                               ; preds = %75
  %79 = getelementptr inbounds i8, ptr %14, i64 36
  %80 = load i32, ptr %79, align 4, !tbaa !42
  %81 = lshr i32 %80, 1
  %82 = tail call i32 @sqlite3VdbeAddOp2(ptr noundef %4, i32 noundef 69, i32 noundef %81, i32 noundef %77) #2
  br label %83

83:                                               ; preds = %78, %75
  %84 = load i32, ptr %14, align 8, !tbaa !43
  %.not151 = icmp eq i32 %84, 0
  br i1 %.not151, label %119, label %85

85:                                               ; preds = %83
  %86 = load i32, ptr %35, align 8, !tbaa !29
  %87 = tail call i32 @sqlite3VdbeAddOp1(ptr noundef %4, i32 noundef 67, i32 noundef %84) #2
  %88 = and i32 %86, 64
  %89 = icmp eq i32 %88, 0
  br i1 %89, label %90, label %94

90:                                               ; preds = %85
  %91 = getelementptr inbounds [1 x %struct.SrcList_item], ptr %11, i64 0, i64 %indvars.iv.next, i32 11
  %92 = load i32, ptr %91, align 4, !tbaa !44
  %93 = tail call i32 @sqlite3VdbeAddOp1(ptr noundef %4, i32 noundef 124, i32 noundef %92) #2
  br label %94

94:                                               ; preds = %90, %85
  %95 = and i32 %86, 512
  %.not152 = icmp eq i32 %95, 0
  br i1 %.not152, label %96, label %101

96:                                               ; preds = %94
  %97 = and i32 %86, 8192
  %.not153 = icmp eq i32 %97, 0
  br i1 %.not153, label %105, label %98

98:                                               ; preds = %96
  %99 = getelementptr inbounds i8, ptr %14, i64 56
  %100 = load ptr, ptr %99, align 8, !tbaa !31
  %.not154 = icmp eq ptr %100, null
  br i1 %.not154, label %105, label %101

101:                                              ; preds = %98, %94
  %102 = getelementptr inbounds i8, ptr %14, i64 8
  %103 = load i32, ptr %102, align 8, !tbaa !47
  %104 = tail call i32 @sqlite3VdbeAddOp1(ptr noundef %4, i32 noundef 124, i32 noundef %103) #2
  br label %105

105:                                              ; preds = %101, %98, %96
  %106 = load i8, ptr %19, align 1, !tbaa !24
  %107 = icmp eq i8 %106, 73
  br i1 %107, label %108, label %114

108:                                              ; preds = %105
  %109 = getelementptr inbounds i8, ptr %14, i64 48
  %110 = load i32, ptr %109, align 8, !tbaa !25
  %111 = getelementptr inbounds i8, ptr %14, i64 28
  %112 = load i32, ptr %111, align 4, !tbaa !48
  %113 = tail call i32 @sqlite3VdbeAddOp2(ptr noundef %4, i32 noundef 14, i32 noundef %110, i32 noundef %112) #2
  br label %118

114:                                              ; preds = %105
  %115 = getelementptr inbounds i8, ptr %14, i64 28
  %116 = load i32, ptr %115, align 4, !tbaa !48
  %117 = tail call i32 @sqlite3VdbeGoto(ptr noundef %4, i32 noundef %116) #2
  br label %118

118:                                              ; preds = %114, %108
  tail call void @sqlite3VdbeJumpHere(ptr noundef %4, i32 noundef %87) #2
  br label %119

119:                                              ; preds = %118, %83
  %120 = icmp sgt i64 %indvars.iv, 1
  br i1 %120, label %13, label %._crit_edge, !llvm.loop !49

._crit_edge:                                      ; preds = %119, %1
  %121 = getelementptr inbounds i8, ptr %0, i64 48
  %122 = load i32, ptr %121, align 8, !tbaa !50
  tail call void @sqlite3VdbeResolveLabel(ptr noundef %4, i32 noundef %122) #2
  %123 = load i8, ptr %8, align 2, !tbaa !20
  %.not175 = icmp eq i8 %123, 0
  br i1 %.not175, label %._crit_edge173, label %.lr.ph172

.lr.ph172:                                        ; preds = %._crit_edge
  %124 = getelementptr inbounds i8, ptr %0, i64 912
  %125 = getelementptr inbounds i8, ptr %6, i64 8
  %126 = getelementptr inbounds i8, ptr %0, i64 61
  %127 = getelementptr inbounds i8, ptr %7, i64 85
  br label %128

128:                                              ; preds = %.lr.ph172, %.thread
  %.1170 = phi i32 [ 0, %.lr.ph172 ], [ %211, %.thread ]
  %.0129169 = phi ptr [ %124, %.lr.ph172 ], [ %212, %.thread ]
  %129 = getelementptr inbounds i8, ptr %.0129169, i64 44
  %130 = load i8, ptr %129, align 4, !tbaa !51
  %131 = zext i8 %130 to i64
  %132 = getelementptr inbounds [1 x %struct.SrcList_item], ptr %125, i64 0, i64 %131
  %133 = getelementptr inbounds i8, ptr %132, i64 32
  %134 = load ptr, ptr %133, align 8, !tbaa !52
  %135 = getelementptr inbounds i8, ptr %.0129169, i64 72
  %136 = load ptr, ptr %135, align 8, !tbaa !21
  %137 = getelementptr inbounds i8, ptr %132, i64 61
  %138 = load i8, ptr %137, align 1
  %139 = and i8 %138, 16
  %.not = icmp eq i8 %139, 0
  br i1 %.not, label %147, label %140

140:                                              ; preds = %128
  %141 = getelementptr inbounds i8, ptr %.0129169, i64 32
  %142 = load i32, ptr %141, align 8, !tbaa !53
  %143 = getelementptr inbounds i8, ptr %.0129169, i64 4
  %144 = load i32, ptr %143, align 4, !tbaa !54
  %145 = getelementptr inbounds i8, ptr %132, i64 56
  %146 = load i32, ptr %145, align 8, !tbaa !55
  tail call void @translateColumnToCopy(ptr noundef nonnull %2, i32 noundef %142, i32 noundef %144, i32 noundef %146, i32 noundef 0)
  br label %.thread

147:                                              ; preds = %128
  %148 = getelementptr inbounds i8, ptr %136, i64 40
  %149 = load i32, ptr %148, align 8, !tbaa !29
  %150 = and i32 %149, 576
  %.not142 = icmp eq i32 %150, 0
  br i1 %.not142, label %153, label %151

151:                                              ; preds = %147
  %152 = getelementptr inbounds i8, ptr %136, i64 32
  br label %157

153:                                              ; preds = %147
  %154 = and i32 %149, 8192
  %.not143 = icmp eq i32 %154, 0
  br i1 %.not143, label %.thread, label %155

155:                                              ; preds = %153
  %156 = getelementptr inbounds i8, ptr %.0129169, i64 56
  br label %157

157:                                              ; preds = %155, %151
  %.0130.in = phi ptr [ %152, %151 ], [ %156, %155 ]
  %.0130 = load ptr, ptr %.0130.in, align 8, !tbaa !31
  %.not144 = icmp eq ptr %.0130, null
  br i1 %.not144, label %.thread, label %158

158:                                              ; preds = %157
  %159 = load i8, ptr %126, align 1, !tbaa !56
  %160 = icmp eq i8 %159, 0
  br i1 %160, label %168, label %161

161:                                              ; preds = %158
  %162 = getelementptr inbounds i8, ptr %.0130, i64 24
  %163 = load ptr, ptr %162, align 8, !tbaa !57
  %164 = getelementptr inbounds i8, ptr %163, i64 64
  %165 = load i32, ptr %164, align 8, !tbaa !59
  %166 = and i32 %165, 32
  %167 = icmp eq i32 %166, 0
  br i1 %167, label %.thread, label %168

168:                                              ; preds = %161, %158
  %169 = load i8, ptr %127, align 1, !tbaa !61
  %.not145 = icmp eq i8 %169, 0
  br i1 %.not145, label %170, label %.thread

170:                                              ; preds = %168
  %171 = tail call i32 @sqlite3VdbeCurrentAddr(ptr noundef %4) #2
  %172 = getelementptr inbounds i8, ptr %.0129169, i64 32
  %173 = load i32, ptr %172, align 8, !tbaa !53
  %174 = tail call ptr @sqlite3VdbeGetOp(ptr noundef %4, i32 noundef %173) #2
  %175 = icmp slt i32 %173, %171
  br i1 %175, label %.lr.ph168, label %.thread

.lr.ph168:                                        ; preds = %170
  %176 = getelementptr inbounds i8, ptr %.0129169, i64 4
  %177 = getelementptr inbounds i8, ptr %.0129169, i64 8
  %178 = getelementptr inbounds i8, ptr %134, i64 64
  br label %179

179:                                              ; preds = %.lr.ph168, %208
  %.0131166 = phi ptr [ %174, %.lr.ph168 ], [ %210, %208 ]
  %.0133165 = phi i32 [ %173, %.lr.ph168 ], [ %209, %208 ]
  %180 = getelementptr inbounds i8, ptr %.0131166, i64 4
  %181 = load i32, ptr %180, align 4, !tbaa !67
  %182 = load i32, ptr %176, align 4, !tbaa !54
  %.not146 = icmp eq i32 %181, %182
  br i1 %.not146, label %183, label %208

183:                                              ; preds = %179
  %184 = load i8, ptr %.0131166, align 8, !tbaa !69
  switch i8 %184, label %208 [
    i8 98, label %185
    i8 123, label %206
  ]

185:                                              ; preds = %183
  %186 = getelementptr inbounds i8, ptr %.0131166, i64 8
  %187 = load i32, ptr %186, align 8, !tbaa !70
  %188 = load i32, ptr %178, align 8, !tbaa !59
  %189 = and i32 %188, 32
  %190 = icmp eq i32 %189, 0
  br i1 %190, label %199, label %191

191:                                              ; preds = %185
  %192 = tail call ptr @sqlite3PrimaryKeyIndex(ptr noundef nonnull %134) #2
  %193 = getelementptr inbounds i8, ptr %192, i64 8
  %194 = load ptr, ptr %193, align 8, !tbaa !71
  %195 = sext i32 %187 to i64
  %196 = getelementptr inbounds i16, ptr %194, i64 %195
  %197 = load i16, ptr %196, align 2, !tbaa !72
  %198 = zext i16 %197 to i32
  br label %199

199:                                              ; preds = %191, %185
  %.0128 = phi i32 [ %187, %185 ], [ %198, %191 ]
  %200 = trunc i32 %.0128 to i16
  %201 = tail call signext i16 @sqlite3ColumnOfIndex(ptr noundef nonnull %.0130, i16 noundef signext %200) #2
  %202 = icmp sgt i16 %201, -1
  br i1 %202, label %203, label %208

203:                                              ; preds = %199
  %204 = zext nneg i16 %201 to i32
  store i32 %204, ptr %186, align 8, !tbaa !70
  %205 = load i32, ptr %177, align 8, !tbaa !47
  store i32 %205, ptr %180, align 4, !tbaa !67
  br label %208

206:                                              ; preds = %183
  %207 = load i32, ptr %177, align 8, !tbaa !47
  store i32 %207, ptr %180, align 4, !tbaa !67
  store i8 -127, ptr %.0131166, align 8, !tbaa !69
  br label %208

208:                                              ; preds = %183, %199, %203, %206, %179
  %209 = add i32 %.0133165, 1
  %210 = getelementptr inbounds i8, ptr %.0131166, i64 24
  %exitcond.not = icmp eq i32 %209, %171
  br i1 %exitcond.not, label %.thread, label %179, !llvm.loop !73

.thread:                                          ; preds = %208, %170, %153, %157, %161, %168, %140
  %211 = add nuw nsw i32 %.1170, 1
  %212 = getelementptr inbounds i8, ptr %.0129169, i64 88
  %213 = load i8, ptr %8, align 2, !tbaa !20
  %214 = zext i8 %213 to i32
  %215 = icmp ult i32 %211, %214
  br i1 %215, label %128, label %._crit_edge173, !llvm.loop !74

._crit_edge173:                                   ; preds = %.thread, %._crit_edge
  %216 = getelementptr inbounds i8, ptr %0, i64 52
  %217 = load i32, ptr %216, align 4, !tbaa !75
  %218 = getelementptr inbounds i8, ptr %2, i64 180
  store i32 %217, ptr %218, align 4, !tbaa !76
  tail call void @whereInfoFree(ptr noundef %7, ptr noundef nonnull %0)
  ret void
}

declare void @sqlite3ExprCacheClear(ptr noundef) local_unnamed_addr #0

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

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

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

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

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

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

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

declare ptr @sqlite3PrimaryKeyIndex(ptr noundef) local_unnamed_addr #0

declare signext i16 @sqlite3ColumnOfIndex(ptr noundef, i16 noundef signext) local_unnamed_addr #0

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"WhereInfo", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !10, i64 32, !8, i64 36, !11, i64 44, !11, i64 48, !11, i64 52, !10, i64 56, !8, i64 58, !8, i64 59, !8, i64 60, !8, i64 61, !8, i64 62, !8, i64 63, !8, i64 64, !11, i64 68, !7, i64 72, !12, i64 80, !10, i64 88, !13, i64 96, !14, i64 648, !8, i64 912}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"short", !8, i64 0}
!11 = !{!"int", !8, i64 0}
!12 = !{!"long long", !8, i64 0}
!13 = !{!"WhereClause", !7, i64 0, !7, i64 8, !8, i64 16, !11, i64 20, !11, i64 24, !7, i64 32, !8, i64 40}
!14 = !{!"WhereMaskSet", !11, i64 0, !8, i64 4}
!15 = !{!16, !7, i64 16}
!16 = !{!"Parse", !7, i64 0, !7, i64 8, !7, i64 16, !11, 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, !11, i64 40, !11, i64 44, !11, i64 48, !11, i64 52, !11, i64 56, !11, i64 60, !11, i64 64, !11, i64 68, !11, i64 72, !11, i64 76, !11, i64 80, !11, i64 84, !7, i64 88, !7, i64 96, !17, i64 104, !11, i64 120, !11, i64 124, !11, i64 128, !11, i64 132, !11, i64 136, !11, i64 140, !7, i64 144, !7, i64 152, !7, i64 160, !7, i64 168, !11, i64 176, !11, i64 180, !11, i64 184, !11, i64 188, !8, i64 192, !8, i64 193, !8, i64 194, !8, i64 196, !8, i64 396, !17, i64 432, !17, i64 448, !10, i64 464, !8, i64 466, !8, i64 467, !8, i64 468, !11, i64 472, !11, i64 476, !11, i64 480, !11, i64 484, !7, i64 488, !7, i64 496, !7, i64 504, !7, i64 512, !7, i64 520, !7, i64 528, !17, i64 536, !7, i64 552, !7, i64 560, !7, i64 568, !7, i64 576, !7, i64 584}
!17 = !{!"Token", !7, i64 0, !11, i64 8}
!18 = !{!6, !7, i64 8}
!19 = !{!16, !7, i64 0}
!20 = !{!6, !8, i64 58}
!21 = !{!22, !7, i64 72}
!22 = !{!"WhereLevel", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !8, i64 44, !8, i64 45, !8, i64 46, !8, i64 47, !11, i64 48, !11, i64 52, !8, i64 56, !7, i64 72, !12, i64 80}
!23 = !{!22, !11, i64 24}
!24 = !{!22, !8, i64 45}
!25 = !{!22, !11, i64 48}
!26 = !{!22, !11, i64 52}
!27 = !{!22, !8, i64 46}
!28 = !{!22, !8, i64 47}
!29 = !{!30, !11, i64 40}
!30 = !{!"WhereLoop", !12, i64 0, !12, i64 8, !8, i64 16, !8, i64 17, !10, i64 18, !10, i64 20, !10, i64 22, !8, i64 24, !11, i64 40, !10, i64 44, !10, i64 46, !10, i64 48, !7, i64 56, !7, i64 64, !8, i64 72}
!31 = !{!8, !8, i64 0}
!32 = !{!22, !11, i64 16}
!33 = !{!34, !11, i64 4}
!34 = !{!"InLoop", !11, i64 0, !11, i64 4, !8, i64 8}
!35 = !{!34, !8, i64 8}
!36 = !{!34, !11, i64 0}
!37 = distinct !{!37, !38}
!38 = !{!"llvm.loop.mustprogress"}
!39 = !{!22, !11, i64 12}
!40 = !{!22, !11, i64 20}
!41 = !{!22, !11, i64 40}
!42 = !{!22, !11, i64 36}
!43 = !{!22, !11, i64 0}
!44 = !{!45, !11, i64 68}
!45 = !{!"SrcList_item", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !11, i64 48, !11, i64 52, !11, i64 56, !46, i64 60, !8, i64 64, !11, i64 68, !7, i64 72, !7, i64 80, !12, i64 88, !8, i64 96, !7, i64 104}
!46 = !{!"", !8, i64 0, !11, i64 1, !11, i64 1, !11, i64 1, !11, i64 1, !11, i64 1, !11, i64 1}
!47 = !{!22, !11, i64 8}
!48 = !{!22, !11, i64 28}
!49 = distinct !{!49, !38}
!50 = !{!6, !11, i64 48}
!51 = !{!22, !8, i64 44}
!52 = !{!45, !7, i64 32}
!53 = !{!22, !11, i64 32}
!54 = !{!22, !11, i64 4}
!55 = !{!45, !11, i64 56}
!56 = !{!6, !8, i64 61}
!57 = !{!58, !7, i64 24}
!58 = !{!"Index", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !11, i64 88, !10, i64 92, !10, i64 94, !10, i64 96, !8, i64 98, !11, i64 99, !11, i64 99, !11, i64 99, !11, i64 99, !11, i64 99, !11, i64 99, !11, i64 99}
!59 = !{!60, !11, i64 64}
!60 = !{!"Table", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !11, i64 56, !11, i64 60, !11, i64 64, !10, i64 68, !10, i64 70, !10, i64 72, !10, i64 74, !8, i64 76, !11, i64 80, !11, i64 84, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !7, i64 120}
!61 = !{!62, !8, i64 85}
!62 = !{!"sqlite3", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !11, i64 40, !11, i64 44, !12, i64 48, !12, i64 56, !11, i64 64, !11, i64 68, !11, i64 72, !11, i64 76, !10, 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, !11, i64 96, !11, i64 100, !11, i64 104, !11, i64 108, !8, i64 112, !11, i64 160, !63, i64 164, !11, i64 172, !11, i64 176, !11, i64 180, !11, i64 184, !11, i64 188, !11, 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, !64, i64 344, !7, i64 400, !7, i64 408, !7, i64 416, !7, i64 424, !11, i64 432, !11, i64 436, !65, i64 440, !7, i64 464, !7, i64 472, !7, i64 480, !65, i64 488, !65, i64 512, !66, i64 536, !8, i64 560, !7, i64 624, !11, i64 632, !11, i64 636, !11, i64 640, !12, i64 648, !12, i64 656, !7, i64 664}
!63 = !{!"sqlite3InitInfo", !11, i64 0, !8, i64 4, !8, i64 5, !8, i64 6, !8, i64 7}
!64 = !{!"Lookaside", !11, i64 0, !10, i64 4, !8, i64 6, !11, i64 8, !11, i64 12, !8, i64 16, !7, i64 32, !7, i64 40, !7, i64 48}
!65 = !{!"Hash", !11, i64 0, !11, i64 4, !7, i64 8, !7, i64 16}
!66 = !{!"BusyHandler", !7, i64 0, !7, i64 8, !11, i64 16}
!67 = !{!68, !11, i64 4}
!68 = !{!"VdbeOp", !8, i64 0, !8, i64 1, !10, i64 2, !11, i64 4, !11, i64 8, !11, i64 12, !8, i64 16}
!69 = !{!68, !8, i64 0}
!70 = !{!68, !11, i64 8}
!71 = !{!58, !7, i64 8}
!72 = !{!10, !10, i64 0}
!73 = distinct !{!73, !38}
!74 = distinct !{!74, !38}
!75 = !{!6, !11, i64 52}
!76 = !{!16, !11, i64 180}


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