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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.Parse = type { ptr, ptr, ptr, i32, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, ptr, ptr, %struct.Token, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, i32, i32, i32, i32, i8, i8, i8, [10 x %struct.yColCache], [8 x i32], %struct.Token, %struct.Token, i16, i8, i8, i8, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, %struct.Token, ptr, ptr, ptr, ptr, ptr }
%struct.yColCache = type { i32, i16, i8, i32, i32, i32 }
%struct.Token = type { ptr, i32 }
%struct.sqlite3 = type { ptr, ptr, ptr, ptr, ptr, i32, i32, i64, i64, i32, i32, i32, i32, i16, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i32, i32, i32, i32, [12 x i32], i32, %struct.sqlite3InitInfo, i32, i32, i32, i32, i32, i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, %union.anon.0, %struct.Lookaside, ptr, ptr, ptr, ptr, i32, i32, %struct.Hash, ptr, ptr, ptr, %struct.Hash, %struct.Hash, %struct.BusyHandler, [2 x %struct.Db], ptr, i32, i32, i32, i64, i64, ptr }
%struct.sqlite3InitInfo = type { i32, i8, i8, i8, i8 }
%union.anon.0 = 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.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.Column = type { ptr, ptr, ptr, i8, i8, i8, i8 }
%struct.Expr = type { i8, i8, i32, %union.anon.2, ptr, ptr, %union.anon.3, i32, i32, i16, i16, i16, i8, ptr, ptr }
%union.anon.2 = type { ptr }
%union.anon.3 = type { ptr }

@.str.6 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [46 x i8], align 1
@sqlite3CtypeMap = external constant [0 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [109 x i8], align 1

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

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

declare ptr @sqlite3FindTable(ptr noundef, ptr noundef, ptr noundef) #1

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

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

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

declare void @sqlite3NestedParse(ptr noundef, ptr noundef, ...) #1

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

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

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

31:                                               ; preds = %2
  %32 = load ptr, ptr %13, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.sqlite3, ptr %32, i32 0, i32 17
  %34 = load i8, ptr %33, align 1, !tbaa !16
  %35 = zext i8 %34 to i32
  %36 = icmp ne i32 %35, 0
  br i1 %36, label %37, label %38

37:                                               ; preds = %31, %2
  store i32 1, ptr %16, align 4
  br label %256

38:                                               ; preds = %31
  %39 = load ptr, ptr %3, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.Parse, ptr %39, i32 0, i32 61
  %41 = load ptr, ptr %40, align 8, !tbaa !23
  store ptr %41, ptr %5, align 8, !tbaa !5
  %42 = load ptr, ptr %13, align 8, !tbaa !5
  %43 = load ptr, ptr %5, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.Table, ptr %43, i32 0, i32 20
  %45 = load ptr, ptr %44, align 8, !tbaa !24
  %46 = call i32 @sqlite3SchemaToIndex(ptr noundef %42, ptr noundef %45)
  store i32 %46, ptr %7, align 4, !tbaa !26
  %47 = load ptr, ptr %13, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.sqlite3, ptr %47, i32 0, i32 4
  %49 = load ptr, ptr %48, align 8, !tbaa !27
  %50 = load i32, ptr %7, align 4, !tbaa !26
  %51 = sext i32 %50 to i64
  %52 = getelementptr inbounds %struct.Db, ptr %49, i64 %51
  %53 = getelementptr inbounds %struct.Db, ptr %52, i32 0, i32 0
  %54 = load ptr, ptr %53, align 8, !tbaa !28
  store ptr %54, ptr %8, align 8, !tbaa !5
  %55 = load ptr, ptr %5, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.Table, ptr %55, i32 0, i32 0
  %57 = load ptr, ptr %56, align 8, !tbaa !30
  %58 = getelementptr inbounds i8, ptr %57, i64 16
  store ptr %58, ptr %9, align 8, !tbaa !5
  %59 = load ptr, ptr %5, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.Table, ptr %59, i32 0, i32 1
  %61 = load ptr, ptr %60, align 8, !tbaa !31
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.Table, ptr %62, i32 0, i32 11
  %64 = load i16, ptr %63, align 2, !tbaa !32
  %65 = sext i16 %64 to i32
  %66 = sub nsw i32 %65, 1
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds %struct.Column, ptr %61, i64 %67
  store ptr %68, ptr %11, align 8, !tbaa !5
  %69 = load ptr, ptr %11, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.Column, ptr %69, i32 0, i32 1
  %71 = load ptr, ptr %70, align 8, !tbaa !33
  store ptr %71, ptr %12, align 8, !tbaa !5
  %72 = load ptr, ptr %13, align 8, !tbaa !5
  %73 = load ptr, ptr %9, align 8, !tbaa !5
  %74 = load ptr, ptr %8, align 8, !tbaa !5
  %75 = call ptr @sqlite3FindTable(ptr noundef %72, ptr noundef %73, ptr noundef %74)
  store ptr %75, ptr %6, align 8, !tbaa !5
  %76 = load ptr, ptr %3, align 8, !tbaa !5
  %77 = load ptr, ptr %8, align 8, !tbaa !5
  %78 = load ptr, ptr %6, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct.Table, ptr %78, i32 0, i32 0
  %80 = load ptr, ptr %79, align 8, !tbaa !30
  %81 = call i32 @sqlite3AuthCheck(ptr noundef %76, i32 noundef 26, ptr noundef %77, ptr noundef %80, ptr noundef null)
  %82 = icmp ne i32 %81, 0
  br i1 %82, label %83, label %84

83:                                               ; preds = %38
  store i32 1, ptr %16, align 4
  br label %256

84:                                               ; preds = %38
  %85 = load ptr, ptr %12, align 8, !tbaa !5
  %86 = icmp ne ptr %85, null
  br i1 %86, label %87, label %96

87:                                               ; preds = %84
  %88 = load ptr, ptr %12, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.Expr, ptr %88, i32 0, i32 4
  %90 = load ptr, ptr %89, align 8, !tbaa !35
  %91 = getelementptr inbounds %struct.Expr, ptr %90, i32 0, i32 0
  %92 = load i8, ptr %91, align 8, !tbaa !37
  %93 = zext i8 %92 to i32
  %94 = icmp eq i32 %93, 101
  br i1 %94, label %95, label %96

95:                                               ; preds = %87
  store ptr null, ptr %12, align 8, !tbaa !5
  br label %96

96:                                               ; preds = %95, %87, %84
  %97 = load ptr, ptr %11, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.Column, ptr %97, i32 0, i32 6
  %99 = load i8, ptr %98, align 1, !tbaa !38
  %100 = zext i8 %99 to i32
  %101 = and i32 %100, 1
  %102 = icmp ne i32 %101, 0
  br i1 %102, label %103, label %105

103:                                              ; preds = %96
  %104 = load ptr, ptr %3, align 8, !tbaa !5
  call void (ptr, ptr, ...) @sqlite3ErrorMsg(ptr noundef %104, ptr noundef @.str.11)
  store i32 1, ptr %16, align 4
  br label %256

105:                                              ; preds = %96
  %106 = load ptr, ptr %5, align 8, !tbaa !5
  %107 = getelementptr inbounds %struct.Table, ptr %106, i32 0, i32 2
  %108 = load ptr, ptr %107, align 8, !tbaa !39
  %109 = icmp ne ptr %108, null
  br i1 %109, label %110, label %112

110:                                              ; preds = %105
  %111 = load ptr, ptr %3, align 8, !tbaa !5
  call void (ptr, ptr, ...) @sqlite3ErrorMsg(ptr noundef %111, ptr noundef @.str.12)
  store i32 1, ptr %16, align 4
  br label %256

112:                                              ; preds = %105
  %113 = load ptr, ptr %13, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.sqlite3, ptr %113, i32 0, i32 6
  %115 = load i32, ptr %114, align 4, !tbaa !40
  %116 = and i32 %115, 524288
  %117 = icmp ne i32 %116, 0
  br i1 %117, label %118, label %128

118:                                              ; preds = %112
  %119 = load ptr, ptr %5, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.Table, ptr %119, i32 0, i32 4
  %121 = load ptr, ptr %120, align 8, !tbaa !41
  %122 = icmp ne ptr %121, null
  br i1 %122, label %123, label %128

123:                                              ; preds = %118
  %124 = load ptr, ptr %12, align 8, !tbaa !5
  %125 = icmp ne ptr %124, null
  br i1 %125, label %126, label %128

126:                                              ; preds = %123
  %127 = load ptr, ptr %3, align 8, !tbaa !5
  call void (ptr, ptr, ...) @sqlite3ErrorMsg(ptr noundef %127, ptr noundef @.str.13)
  store i32 1, ptr %16, align 4
  br label %256

128:                                              ; preds = %123, %118, %112
  %129 = load ptr, ptr %11, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.Column, ptr %129, i32 0, i32 3
  %131 = load i8, ptr %130, align 8, !tbaa !42
  %132 = zext i8 %131 to i32
  %133 = icmp ne i32 %132, 0
  br i1 %133, label %134, label %139

134:                                              ; preds = %128
  %135 = load ptr, ptr %12, align 8, !tbaa !5
  %136 = icmp ne ptr %135, null
  br i1 %136, label %139, label %137

137:                                              ; preds = %134
  %138 = load ptr, ptr %3, align 8, !tbaa !5
  call void (ptr, ptr, ...) @sqlite3ErrorMsg(ptr noundef %138, ptr noundef @.str.14)
  store i32 1, ptr %16, align 4
  br label %256

139:                                              ; preds = %134, %128
  %140 = load ptr, ptr %12, align 8, !tbaa !5
  %141 = icmp ne ptr %140, null
  br i1 %141, label %142, label %159

142:                                              ; preds = %139
  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
  %143 = load ptr, ptr %13, align 8, !tbaa !5
  %144 = load ptr, ptr %12, align 8, !tbaa !5
  %145 = call i32 @sqlite3ValueFromExpr(ptr noundef %143, ptr noundef %144, i8 noundef zeroext 1, i8 noundef zeroext 65, ptr noundef %17)
  store i32 %145, ptr %18, align 4, !tbaa !26
  %146 = load i32, ptr %18, align 4, !tbaa !26
  %147 = icmp ne i32 %146, 0
  br i1 %147, label %148, label %149

148:                                              ; preds = %142
  store i32 1, ptr %16, align 4
  br label %156

149:                                              ; preds = %142
  %150 = load ptr, ptr %17, align 8, !tbaa !5
  %151 = icmp ne ptr %150, null
  br i1 %151, label %154, label %152

152:                                              ; preds = %149
  %153 = load ptr, ptr %3, align 8, !tbaa !5
  call void (ptr, ptr, ...) @sqlite3ErrorMsg(ptr noundef %153, ptr noundef @.str.15)
  store i32 1, ptr %16, align 4
  br label %156

154:                                              ; preds = %149
  %155 = load ptr, ptr %17, align 8, !tbaa !5
  call void @sqlite3ValueFree(ptr noundef %155)
  store i32 0, ptr %16, align 4
  br label %156

156:                                              ; preds = %154, %152, %148
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  %157 = load i32, ptr %16, align 4
  switch i32 %157, label %256 [
    i32 0, label %158
  ]

158:                                              ; preds = %156
  br label %159

159:                                              ; preds = %158, %139
  %160 = load ptr, ptr %13, align 8, !tbaa !5
  %161 = load ptr, ptr %4, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.Token, ptr %161, i32 0, i32 0
  %163 = load ptr, ptr %162, align 8, !tbaa !43
  %164 = load ptr, ptr %4, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.Token, ptr %164, i32 0, i32 1
  %166 = load i32, ptr %165, align 8, !tbaa !44
  %167 = zext i32 %166 to i64
  %168 = call ptr @sqlite3DbStrNDup(ptr noundef %160, ptr noundef %163, i64 noundef %167)
  store ptr %168, ptr %10, align 8, !tbaa !5
  %169 = load ptr, ptr %10, align 8, !tbaa !5
  %170 = icmp ne ptr %169, null
  br i1 %170, label %171, label %228

171:                                              ; preds = %159
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  %172 = load ptr, ptr %10, align 8, !tbaa !5
  %173 = load ptr, ptr %4, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.Token, ptr %173, i32 0, i32 1
  %175 = load i32, ptr %174, align 8, !tbaa !44
  %176 = sub i32 %175, 1
  %177 = zext i32 %176 to i64
  %178 = getelementptr inbounds i8, ptr %172, i64 %177
  store ptr %178, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #3
  %179 = load ptr, ptr %13, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.sqlite3, ptr %179, i32 0, i32 6
  %181 = load i32, ptr %180, align 4, !tbaa !40
  store i32 %181, ptr %20, align 4, !tbaa !26
  br label %182

182:                                              ; preds = %204, %171
  %183 = load ptr, ptr %19, align 8, !tbaa !5
  %184 = load ptr, ptr %10, align 8, !tbaa !5
  %185 = icmp ugt ptr %183, %184
  br i1 %185, label %186, label %202

186:                                              ; preds = %182
  %187 = load ptr, ptr %19, align 8, !tbaa !5
  %188 = load i8, ptr %187, align 1, !tbaa !45
  %189 = sext i8 %188 to i32
  %190 = icmp eq i32 %189, 59
  br i1 %190, label %200, label %191

191:                                              ; preds = %186
  %192 = load ptr, ptr %19, align 8, !tbaa !5
  %193 = load i8, ptr %192, align 1, !tbaa !45
  %194 = zext i8 %193 to i64
  %195 = getelementptr inbounds [0 x i8], ptr @sqlite3CtypeMap, i64 0, i64 %194
  %196 = load i8, ptr %195, align 1, !tbaa !45
  %197 = zext i8 %196 to i32
  %198 = and i32 %197, 1
  %199 = icmp ne i32 %198, 0
  br label %200

200:                                              ; preds = %191, %186
  %201 = phi i1 [ true, %186 ], [ %199, %191 ]
  br label %202

202:                                              ; preds = %200, %182
  %203 = phi i1 [ false, %182 ], [ %201, %200 ]
  br i1 %203, label %204, label %207

204:                                              ; preds = %202
  %205 = load ptr, ptr %19, align 8, !tbaa !5
  %206 = getelementptr inbounds i8, ptr %205, i32 -1
  store ptr %206, ptr %19, align 8, !tbaa !5
  store i8 0, ptr %205, align 1, !tbaa !45
  br label %182, !llvm.loop !46

207:                                              ; preds = %202
  %208 = load ptr, ptr %13, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct.sqlite3, ptr %208, i32 0, i32 6
  %210 = load i32, ptr %209, align 4, !tbaa !40
  %211 = or i32 %210, 2097152
  store i32 %211, ptr %209, align 4, !tbaa !40
  %212 = load ptr, ptr %3, align 8, !tbaa !5
  %213 = load ptr, ptr %8, align 8, !tbaa !5
  %214 = load ptr, ptr %5, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct.Table, ptr %214, i32 0, i32 15
  %216 = load i32, ptr %215, align 8, !tbaa !48
  %217 = load ptr, ptr %10, align 8, !tbaa !5
  %218 = load ptr, ptr %5, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct.Table, ptr %218, i32 0, i32 15
  %220 = load i32, ptr %219, align 8, !tbaa !48
  %221 = add nsw i32 %220, 1
  %222 = load ptr, ptr %9, align 8, !tbaa !5
  call void (ptr, ptr, ...) @sqlite3NestedParse(ptr noundef %212, ptr noundef @.str.16, ptr noundef %213, ptr noundef @.str.6, i32 noundef %216, ptr noundef %217, i32 noundef %221, ptr noundef %222)
  %223 = load ptr, ptr %13, align 8, !tbaa !5
  %224 = load ptr, ptr %10, align 8, !tbaa !5
  call void @sqlite3DbFree(ptr noundef %223, ptr noundef %224)
  %225 = load i32, ptr %20, align 4, !tbaa !26
  %226 = load ptr, ptr %13, align 8, !tbaa !5
  %227 = getelementptr inbounds %struct.sqlite3, ptr %226, i32 0, i32 6
  store i32 %225, ptr %227, align 4, !tbaa !40
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  br label %228

228:                                              ; preds = %207, %159
  %229 = load ptr, ptr %3, align 8, !tbaa !5
  %230 = call i32 @sqlite3GetTempReg(ptr noundef %229)
  store i32 %230, ptr %15, align 4, !tbaa !26
  %231 = load ptr, ptr %14, align 8, !tbaa !5
  %232 = load i32, ptr %7, align 4, !tbaa !26
  %233 = load i32, ptr %15, align 4, !tbaa !26
  %234 = call i32 @sqlite3VdbeAddOp3(ptr noundef %231, i32 noundef 102, i32 noundef %232, i32 noundef %233, i32 noundef 2)
  %235 = load ptr, ptr %14, align 8, !tbaa !5
  %236 = load i32, ptr %7, align 4, !tbaa !26
  call void @sqlite3VdbeUsesBtree(ptr noundef %235, i32 noundef %236)
  %237 = load ptr, ptr %14, align 8, !tbaa !5
  %238 = load i32, ptr %15, align 4, !tbaa !26
  %239 = call i32 @sqlite3VdbeAddOp2(ptr noundef %237, i32 noundef 92, i32 noundef %238, i32 noundef -2)
  %240 = load ptr, ptr %14, align 8, !tbaa !5
  %241 = load i32, ptr %15, align 4, !tbaa !26
  %242 = load ptr, ptr %14, align 8, !tbaa !5
  %243 = call i32 @sqlite3VdbeCurrentAddr(ptr noundef %242)
  %244 = add nsw i32 %243, 2
  %245 = call i32 @sqlite3VdbeAddOp2(ptr noundef %240, i32 noundef 67, i32 noundef %241, i32 noundef %244)
  %246 = load ptr, ptr %14, align 8, !tbaa !5
  %247 = load i32, ptr %7, align 4, !tbaa !26
  %248 = call i32 @sqlite3VdbeAddOp3(ptr noundef %246, i32 noundef 103, i32 noundef %247, i32 noundef 2, i32 noundef 3)
  %249 = load ptr, ptr %3, align 8, !tbaa !5
  %250 = load i32, ptr %15, align 4, !tbaa !26
  call void @sqlite3ReleaseTempReg(ptr noundef %249, i32 noundef %250)
  %251 = load ptr, ptr %3, align 8, !tbaa !5
  %252 = load ptr, ptr %6, align 8, !tbaa !5
  %253 = load ptr, ptr %6, align 8, !tbaa !5
  %254 = getelementptr inbounds %struct.Table, ptr %253, i32 0, i32 0
  %255 = load ptr, ptr %254, align 8, !tbaa !30
  call void @reloadTableSchema(ptr noundef %251, ptr noundef %252, ptr noundef %255)
  store i32 0, ptr %16, align 4
  br label %256

256:                                              ; preds = %228, %156, %137, %126, %110, %103, %83, %37
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  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 4, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  %257 = load i32, ptr %16, align 4
  switch i32 %257, label %259 [
    i32 0, label %258
    i32 1, label %258
  ]

258:                                              ; preds = %256, %256
  ret void

259:                                              ; preds = %256
  unreachable
}

declare i32 @sqlite3ValueFromExpr(ptr noundef, ptr noundef, i8 noundef zeroext, i8 noundef zeroext, ptr noundef) #1

declare void @sqlite3ValueFree(ptr noundef) #1

declare ptr @sqlite3DbStrNDup(ptr noundef, ptr noundef, i64 noundef) #1

declare i32 @sqlite3GetTempReg(ptr noundef) #1

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

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

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

declare i32 @sqlite3VdbeCurrentAddr(ptr noundef) #1

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


; 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.Db = type { ptr, ptr, i8, i8, ptr }
%struct.Column = type { ptr, ptr, ptr, i8, i8, i8, i8 }

@.str.6 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [32 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [53 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [46 x i8], align 1
@sqlite3CtypeMap = external local_unnamed_addr constant [0 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [109 x i8], align 1

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

declare i32 @sqlite3SchemaToIndex(ptr noundef, ptr noundef) local_unnamed_addr #1

declare ptr @sqlite3FindTable(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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

declare i32 @sqlite3AuthCheck(ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

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

declare void @sqlite3NestedParse(ptr noundef, ptr noundef, ...) local_unnamed_addr #1

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

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

; Function Attrs: nounwind uwtable
define dso_local void @sqlite3AlterFinishAddColumn(ptr noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #2 {
  %3 = alloca ptr, align 8
  %4 = getelementptr inbounds i8, ptr %0, i64 16
  %5 = load ptr, ptr %4, align 8, !tbaa !5
  %6 = load ptr, ptr %0, align 8, !tbaa !13
  %7 = getelementptr inbounds i8, ptr %0, i64 48
  %8 = load i32, ptr %7, align 8, !tbaa !14
  %.not = icmp eq i32 %8, 0
  br i1 %.not, label %9, label %109

9:                                                ; preds = %2
  %10 = getelementptr inbounds i8, ptr %6, i64 85
  %11 = load i8, ptr %10, align 1, !tbaa !15
  %.not88 = icmp eq i8 %11, 0
  br i1 %.not88, label %12, label %109

12:                                               ; preds = %9
  %13 = getelementptr inbounds i8, ptr %0, i64 512
  %14 = load ptr, ptr %13, align 8, !tbaa !22
  %15 = getelementptr inbounds i8, ptr %14, i64 112
  %16 = load ptr, ptr %15, align 8, !tbaa !23
  %17 = tail call i32 @sqlite3SchemaToIndex(ptr noundef nonnull %6, ptr noundef %16) #3
  %18 = getelementptr inbounds i8, ptr %6, i64 32
  %19 = load ptr, ptr %18, align 8, !tbaa !25
  %20 = sext i32 %17 to i64
  %21 = getelementptr inbounds %struct.Db, ptr %19, i64 %20
  %22 = load ptr, ptr %21, align 8, !tbaa !26
  %23 = load ptr, ptr %14, align 8, !tbaa !28
  %24 = getelementptr inbounds i8, ptr %23, i64 16
  %25 = getelementptr inbounds i8, ptr %14, i64 8
  %26 = load ptr, ptr %25, align 8, !tbaa !29
  %27 = getelementptr inbounds i8, ptr %14, i64 70
  %28 = load i16, ptr %27, align 2, !tbaa !30
  %29 = sext i16 %28 to i64
  %30 = getelementptr %struct.Column, ptr %26, i64 %29
  %31 = getelementptr i8, ptr %30, i64 -24
  %32 = load ptr, ptr %31, align 8, !tbaa !31
  %33 = tail call ptr @sqlite3FindTable(ptr noundef nonnull %6, ptr noundef nonnull %24, ptr noundef %22) #3
  %34 = load ptr, ptr %33, align 8, !tbaa !28
  %35 = tail call i32 @sqlite3AuthCheck(ptr noundef nonnull %0, i32 noundef 26, ptr noundef %22, ptr noundef %34, ptr noundef null) #3
  %.not89 = icmp eq i32 %35, 0
  br i1 %.not89, label %36, label %109

36:                                               ; preds = %12
  %.not90 = icmp eq ptr %32, null
  br i1 %.not90, label %42, label %37

37:                                               ; preds = %36
  %38 = getelementptr inbounds i8, ptr %32, i64 16
  %39 = load ptr, ptr %38, align 8, !tbaa !33
  %40 = load i8, ptr %39, align 8, !tbaa !35
  %41 = icmp eq i8 %40, 101
  %spec.store.select = select i1 %41, ptr null, ptr %32
  br label %42

42:                                               ; preds = %37, %36
  %.0 = phi ptr [ %spec.store.select, %37 ], [ null, %36 ]
  %43 = getelementptr i8, ptr %30, i64 -5
  %44 = load i8, ptr %43, align 1, !tbaa !36
  %45 = and i8 %44, 1
  %.not91 = icmp eq i8 %45, 0
  br i1 %.not91, label %47, label %46

46:                                               ; preds = %42
  tail call void (ptr, ptr, ...) @sqlite3ErrorMsg(ptr noundef nonnull %0, ptr noundef nonnull @.str.11) #3
  br label %109

47:                                               ; preds = %42
  %48 = getelementptr inbounds i8, ptr %14, i64 16
  %49 = load ptr, ptr %48, align 8, !tbaa !37
  %.not92 = icmp eq ptr %49, null
  br i1 %.not92, label %51, label %50

50:                                               ; preds = %47
  tail call void (ptr, ptr, ...) @sqlite3ErrorMsg(ptr noundef nonnull %0, ptr noundef nonnull @.str.12) #3
  br label %109

51:                                               ; preds = %47
  %52 = getelementptr inbounds i8, ptr %6, i64 44
  %53 = load i32, ptr %52, align 4, !tbaa !38
  %54 = and i32 %53, 524288
  %.not93 = icmp eq i32 %54, 0
  br i1 %.not93, label %61, label %55

55:                                               ; preds = %51
  %56 = getelementptr inbounds i8, ptr %14, i64 32
  %57 = load ptr, ptr %56, align 8, !tbaa !39
  %58 = icmp ne ptr %57, null
  %59 = icmp ne ptr %.0, null
  %or.cond = select i1 %58, i1 %59, i1 false
  br i1 %or.cond, label %60, label %61

60:                                               ; preds = %55
  tail call void (ptr, ptr, ...) @sqlite3ErrorMsg(ptr noundef nonnull %0, ptr noundef nonnull @.str.13) #3
  br label %109

61:                                               ; preds = %55, %51
  %62 = getelementptr i8, ptr %30, i64 -8
  %63 = load i8, ptr %62, align 8, !tbaa !40
  %64 = icmp eq i8 %63, 0
  %65 = icmp ne ptr %.0, null
  %or.cond3 = select i1 %64, i1 true, i1 %65
  br i1 %or.cond3, label %67, label %66

66:                                               ; preds = %61
  tail call void (ptr, ptr, ...) @sqlite3ErrorMsg(ptr noundef nonnull %0, ptr noundef nonnull @.str.14) #3
  br label %109

67:                                               ; preds = %61
  br i1 %65, label %68, label %74

68:                                               ; preds = %67
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #3
  store ptr null, ptr %3, align 8, !tbaa !41
  %69 = call i32 @sqlite3ValueFromExpr(ptr noundef nonnull %6, ptr noundef nonnull %.0, i8 noundef zeroext 1, i8 noundef zeroext 65, ptr noundef nonnull %3) #3
  %.not94 = icmp eq i32 %69, 0
  br i1 %.not94, label %70, label %73

70:                                               ; preds = %68
  %71 = load ptr, ptr %3, align 8, !tbaa !41
  %.not95 = icmp eq ptr %71, null
  br i1 %.not95, label %72, label %.critedge99

72:                                               ; preds = %70
  call void (ptr, ptr, ...) @sqlite3ErrorMsg(ptr noundef nonnull %0, ptr noundef nonnull @.str.15) #3
  br label %73

.critedge99:                                      ; preds = %70
  call void @sqlite3ValueFree(ptr noundef nonnull %71) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #3
  br label %74

73:                                               ; preds = %68, %72
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #3
  br label %109

74:                                               ; preds = %.critedge99, %67
  %75 = load ptr, ptr %1, align 8, !tbaa !42
  %76 = getelementptr inbounds i8, ptr %1, i64 8
  %77 = load i32, ptr %76, align 8, !tbaa !43
  %78 = zext i32 %77 to i64
  %79 = call ptr @sqlite3DbStrNDup(ptr noundef nonnull %6, ptr noundef %75, i64 noundef %78) #3
  %.not96 = icmp eq ptr %79, null
  br i1 %.not96, label %100, label %80

80:                                               ; preds = %74
  %81 = load i32, ptr %76, align 8, !tbaa !43
  %82 = add i32 %81, -1
  %83 = load i32, ptr %52, align 4, !tbaa !38
  %.not102 = icmp eq i32 %82, 0
  br i1 %.not102, label %.critedge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %80
  %84 = zext i32 %82 to i64
  %85 = getelementptr inbounds i8, ptr %79, i64 %84
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.critedge5
  %.083100 = phi ptr [ %93, %.critedge5 ], [ %85, %.lr.ph.preheader ]
  %86 = load i8, ptr %.083100, align 1, !tbaa !44
  %87 = icmp eq i8 %86, 59
  br i1 %87, label %.critedge5, label %88

88:                                               ; preds = %.lr.ph
  %89 = zext i8 %86 to i64
  %90 = getelementptr inbounds [0 x i8], ptr @sqlite3CtypeMap, i64 0, i64 %89
  %91 = load i8, ptr %90, align 1, !tbaa !44
  %92 = and i8 %91, 1
  %.not97 = icmp eq i8 %92, 0
  br i1 %.not97, label %.critedge.loopexit, label %.critedge5

.critedge5:                                       ; preds = %.lr.ph, %88
  %93 = getelementptr inbounds i8, ptr %.083100, i64 -1
  store i8 0, ptr %.083100, align 1, !tbaa !44
  %94 = icmp ugt ptr %93, %79
  br i1 %94, label %.lr.ph, label %.critedge.loopexit, !llvm.loop !45

.critedge.loopexit:                               ; preds = %.critedge5, %88
  %.pre = load i32, ptr %52, align 4, !tbaa !38
  br label %.critedge

.critedge:                                        ; preds = %.critedge.loopexit, %80
  %95 = phi i32 [ %.pre, %.critedge.loopexit ], [ %83, %80 ]
  %96 = or i32 %95, 2097152
  store i32 %96, ptr %52, align 4, !tbaa !38
  %97 = getelementptr inbounds i8, ptr %14, i64 80
  %98 = load i32, ptr %97, align 8, !tbaa !47
  %99 = add nsw i32 %98, 1
  call void (ptr, ptr, ...) @sqlite3NestedParse(ptr noundef nonnull %0, ptr noundef nonnull @.str.16, ptr noundef %22, ptr noundef nonnull @.str.6, i32 noundef %98, ptr noundef nonnull %79, i32 noundef %99, ptr noundef nonnull %24) #3
  call void @sqlite3DbFree(ptr noundef nonnull %6, ptr noundef nonnull %79) #3
  store i32 %83, ptr %52, align 4, !tbaa !38
  br label %100

100:                                              ; preds = %.critedge, %74
  %101 = call i32 @sqlite3GetTempReg(ptr noundef nonnull %0) #3
  %102 = call i32 @sqlite3VdbeAddOp3(ptr noundef %5, i32 noundef 102, i32 noundef %17, i32 noundef %101, i32 noundef 2) #3
  call void @sqlite3VdbeUsesBtree(ptr noundef %5, i32 noundef %17) #3
  %103 = call i32 @sqlite3VdbeAddOp2(ptr noundef %5, i32 noundef 92, i32 noundef %101, i32 noundef -2) #3
  %104 = call i32 @sqlite3VdbeCurrentAddr(ptr noundef %5) #3
  %105 = add nsw i32 %104, 2
  %106 = call i32 @sqlite3VdbeAddOp2(ptr noundef %5, i32 noundef 67, i32 noundef %101, i32 noundef %105) #3
  %107 = call i32 @sqlite3VdbeAddOp3(ptr noundef %5, i32 noundef 103, i32 noundef %17, i32 noundef 2, i32 noundef 3) #3
  call void @sqlite3ReleaseTempReg(ptr noundef nonnull %0, i32 noundef %101) #3
  %108 = load ptr, ptr %33, align 8, !tbaa !28
  call void @reloadTableSchema(ptr noundef nonnull %0, ptr noundef nonnull %33, ptr noundef %108)
  br label %109

109:                                              ; preds = %73, %12, %2, %9, %100, %66, %60, %50, %46
  ret void
}

declare i32 @sqlite3ValueFromExpr(ptr noundef, ptr noundef, i8 noundef zeroext, i8 noundef zeroext, ptr noundef) local_unnamed_addr #1

declare void @sqlite3ValueFree(ptr noundef) local_unnamed_addr #1

declare ptr @sqlite3DbStrNDup(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #1

declare i32 @sqlite3GetTempReg(ptr noundef) local_unnamed_addr #1

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

declare void @sqlite3VdbeUsesBtree(ptr noundef, i32 noundef) local_unnamed_addr #1

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

declare i32 @sqlite3VdbeCurrentAddr(ptr noundef) local_unnamed_addr #1

declare void @sqlite3ReleaseTempReg(ptr noundef, i32 noundef) local_unnamed_addr #1

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


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,LoopRotatePass,LoopSimplifyPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass